1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2888],{79742:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),r=t[0],n=t[1];return(r+n)*3/4-n},t.toByteArray=function(e){var t,r,i=l(e),s=i[0],a=i[1],c=new o((s+a)*3/4-a),u=0,d=a>0?s-4:s;for(r=0;r<d;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[u++]=t>>16&255,c[u++]=t>>8&255,c[u++]=255&t;return 2===a&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[u++]=255&t),1===a&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[u++]=t>>8&255,c[u++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,o=n%3,i=[],s=0,a=n-o;s<a;s+=16383)i.push(function(e,t,n){for(var o,i=[],s=t;s<n;s+=3)i.push(r[(o=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]))>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return i.join("")}(e,s,s+16383>a?a:s+16383));return 1===o?i.push(r[(t=e[n-1])>>2]+r[t<<4&63]+"=="):2===o&&i.push(r[(t=(e[n-2]<<8)+e[n-1])>>10]+r[t>>4&63]+r[t<<2&63]+"="),i.join("")};for(var r=[],n=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,a=i.length;s<a;++s)r[s]=i[s],n[i.charCodeAt(s)]=s;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");-1===r&&(r=t);var n=r===t?0:4-r%4;return[r,n]}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},48764:function(e,t,r){"use strict";let n=r(79742),o=r(80645),i="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function s(e){if(e>2147483647)throw RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,r){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return u(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if(("string"!=typeof t||""===t)&&(t="utf8"),!a.isEncoding(t))throw TypeError("Unknown encoding: "+t);let r=0|p(e,t),n=s(r),o=n.write(e,t);return o!==r&&(n=n.slice(0,o)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(B(e,Uint8Array)){let t=new Uint8Array(e);return h(t.buffer,t.byteOffset,t.byteLength)}return d(e)}(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer)||"undefined"!=typeof SharedArrayBuffer&&(B(e,SharedArrayBuffer)||e&&B(e.buffer,SharedArrayBuffer)))return h(e,t,r);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return a.from(n,t,r);let o=function(e){var t;if(a.isBuffer(e)){let t=0|f(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||(t=e.length)!=t?s(0):d(e):"Buffer"===e.type&&Array.isArray(e.data)?d(e.data):void 0}(e);if(o)return o;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,r);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function c(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function u(e){return c(e),s(e<0?0:0|f(e))}function d(e){let t=e.length<0?0:0|f(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function h(e,t,r){let n;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),a.prototype),n}function f(e){if(e>=2147483647)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function p(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let o=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return P(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return U(e).length;default:if(o)return n?-1:P(e).length;t=(""+t).toLowerCase(),o=!0}}function m(e,t,r){let o=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===r||r>this.length)&&(r=this.length),r<=0||(r>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,r){let n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let o="";for(let n=t;n<r;++n)o+=M[e[n]];return o}(this,t,r);case"utf8":case"utf-8":return b(this,t,r);case"ascii":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(127&e[o]);return n}(this,t,r);case"latin1":case"binary":return function(e,t,r){let n="";r=Math.min(e.length,r);for(let o=t;o<r;++o)n+=String.fromCharCode(e[o]);return n}(this,t,r);case"base64":var i,s;return i=t,s=r,0===i&&s===this.length?n.fromByteArray(this):n.fromByteArray(this.slice(i,s));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,r){let n=e.slice(t,r),o="";for(let e=0;e<n.length-1;
vendor: 4,506 bytes, line 1
1e+=2)o+=String.fromCharCode(n[e]+256*n[e+1]);return o}(this,t,r);default:if(o)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),o=!0}}function g(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,o){var i;if(0===e.length)return -1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),(i=r=+r)!=i&&(r=o?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(o)return -1;r=e.length-1}else if(r<0){if(!o)return -1;r=0}if("string"==typeof t&&(t=a.from(t,n)),a.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,o);if("number"==typeof t)return(t&=255,"function"==typeof Uint8Array.prototype.indexOf)?o?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,o);throw TypeError("val must be string, number or Buffer")}function y(e,t,r,n,o){let i,s=1,a=e.length,l=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return -1;s=2,a/=2,l/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(o){let n=-1;for(i=r;i<a;i++)if(c(e,i)===c(t,-1===n?0:i-n)){if(-1===n&&(n=i),i-n+1===l)return n*s}else -1!==n&&(i-=i-n),n=-1}else for(r+l>a&&(r=a-l),i=r;i>=0;i--){let r=!0;for(let n=0;n<l;n++)if(c(e,i+n)!==c(t,n)){r=!1;break}if(r)return i}return -1}function b(e,t,r){r=Math.min(e.length,r);let n=[],o=t;for(;o<r;){let t=e[o],i=null,s=t>239?4:t>223?3:t>191?2:1;if(o+s<=r){let r,n,a,l;switch(s){case 1:t<128&&(i=t);break;case 2:(192&(r=e[o+1]))==128&&(l=(31&t)<<6|63&r)>127&&(i=l);break;case 3:r=e[o+1],n=e[o+2],(192&r)==128&&(192&n)==128&&(l=(15&t)<<12|(63&r)<<6|63&n)>2047&&(l<55296||l>57343)&&(i=l);break;case 4:r=e[o+1],n=e[o+2],a=e[o+3],(192&r)==128&&(192&n)==128&&(192&a)==128&&(l=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a)>65535&&l<1114112&&(i=l)}}null===i?(i=65533,s=1):i>65535&&(i-=65536,n.push(i>>>10&1023|55296),i=56320|1023&i),n.push(i),o+=s}return function(e){let t=e.length;if(t<=4096)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=4096));return r}(n)}function w(e,t,r){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>r)throw RangeError("Trying to access beyond buffer length")}function x(e,t,r,n,o,i){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>o||t<i)throw RangeError('"value" argument is out of bounds');if(r+n>e.length)throw RangeError("Index out of range")}function E(e,t,r,n,o){O(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i,i>>=8,e[r++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function _(e,t,r,n,o){O(t,n,o,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i>>=8,e[r+6]=i,i>>=8,e[r+5]=i,i>>=8,e[r+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function S(e,t,r,n,o,i){if(r+n>e.length||r<0)throw RangeError("Index out of range")}function k(e,t,r,n,i){return t=+t,r>>>=0,i||S(e,t,r,4,34028234663852886e22,-34028234663852886e22),o.write(e,t,r,n,23,4),r+4}function j(e,t,r,n,i){return t=+t,r>>>=0,i||S(e,t,r,8,17976931348623157e292,-17976931348623157e292),o.write(e,t,r,n,52,8),r+8}t.lW=a,t.h2=50,a.TYPED_ARRAY_SUPPORT=function(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),a.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,r){return(c(e),e<=0)?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)},a.allocUnsafe=function(e){return u(e)},a.allocUnsafeSlow=function(e){return u(e)},a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(B(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),B(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!
vendor: 12,506 bytes, line 1
1a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){let r;if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(r=0,t=0;r<e.length;++r)t+=e[r].length;let n=a.allocUnsafe(t),o=0;for(r=0;r<e.length;++r){let t=e[r];if(B(t,Uint8Array))o+t.length>n.length?(a.isBuffer(t)||(t=a.from(t)),t.copy(n,o)):Uint8Array.prototype.set.call(n,t,o);else if(a.isBuffer(t))t.copy(n,o);else throw TypeError('"list" argument must be an Array of Buffers');o+=t.length}return n},a.byteLength=p,a.prototype._isBuffer=!0,a.prototype.swap16=function(){let e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)g(this,t,t+1);return this},a.prototype.swap32=function(){let e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},a.prototype.swap64=function(){let e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){let e=this.length;return 0===e?"":0==arguments.length?b(this,0,e):m.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){let e="",r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},i&&(a.prototype[i]=a.prototype.inspect),a.prototype.compare=function(e,t,r,n,o){if(B(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===o&&(o=this.length),t<0||r>e.length||n<0||o>this.length)throw RangeError("out of range index");if(n>=o&&t>=r)return 0;if(n>=o)return -1;if(t>=r)return 1;if(t>>>=0,r>>>=0,n>>>=0,o>>>=0,this===e)return 0;let i=o-n,s=r-t,l=Math.min(i,s),c=this.slice(n,o),u=e.slice(t,r);for(let e=0;e<l;++e)if(c[e]!==u[e]){i=c[e],s=u[e];break}return i<s?-1:s<i?1:0},a.prototype.includes=function(e,t,r){return -1!==this.indexOf(e,t,r)},a.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},a.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},a.prototype.write=function(e,t,r,n){var o,i,s,a,l,c,u,d;if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let h=this.length-t;if((void 0===r||r>h)&&(r=h),e.length>0&&(r<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let f=!1;for(;;)switch(n){case"hex":return function(e,t,r,n){let o;r=Number(r)||0;let i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;let s=t.length;for(n>s/2&&(n=s/2),o=0;o<n;++o){let n=parseInt(t.substr(2*o,2),16);if(n!=n)break;e[r+o]=n}return o}(this,e,t,r);case"utf8":case"utf-8":return o=t,i=r,L(P(e,this.length-o),this,o,i);case"ascii":case"latin1":case"binary":return s=t,a=r,L(function(e){let t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(e),this,s,a);case"base64":return l=t,c=r,L(U(e),this,l,c);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return u=t,d=r,L(function(e,t){let r,n;let o=[];for(let i=0;i<e.length&&!((t-=2)<0);++i)n=(r=e.charCodeAt(i))>>8,o.push(r%256),o.push(n);return o}(e,this.length-u),this,u,d);default:if(f)throw TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),f=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){let r=this.length;e=~~e,t=void 0===t?r:~~t,e<0?(e+=r)<0&&(e=0):e>r&&(e=r),t<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);let n=this.subarray(e,t);return Object.setPrototypeOf(n,a.prototype),n},a.prototype.readUintLE=a.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n},a.prototype.readUintBE=a.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e+--t],o=1;for(;t>0&&(o*=256);)n+=this[e+--t]*o;return n},a.prototype.readUint8=a.prototype.readUInt8=function(e,t){return e>>>=0,t||w(e,1,this.length),this[e]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||w(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readBigUInt64LE=D(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&T(e,this.length-8);let n=t+256*this[++e]+65536*this[++e]+16777216*this[++e],o=this[++e]+256*this[++e]+65536*this[++e]+16777216*r;return BigInt(n)+(BigInt(o)<<BigInt(32))}),a.prototype.readBigUInt64BE=D(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];(void 0===t||void 0===r)&&T(e,this.length-8);let n=16777216*t+65536*this[++e]+256*this[++e]+this[++e],o=16777216*this[++e]+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(o)}),a.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=this[e],o=1,i=0;for(;++i<t&&(o*=256);)n+=this[e+i]*o;return n>=(o*=128)&&(n-=Math.pow(2,8*t)),n},a.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||w(e,t,this.length);let n=t,o=1,i=this[e+--n];for(;n>0&&(o*=256);)i+=this[e+--n]*o;return i>=(o*=128)&&(i-=Math.pow(2,8*t)),i},a.prototype.readInt8=function(e,t){return(e>>>=0,t||w(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||w(e,2,this.length);let r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt16BE=function(e,t){e>>>=0,t||w(e,2,this.length);let r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||w(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readBigInt64LE=D(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&T(e,this.length-8),(BigInt(this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24))<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+16777216*this[++e])}),a.prototype.readBigInt64BE=D(function(e){N(e>>>=0,"offset");let t=this[e],r=this[e+7];return(void 0===t||void 0===r)&&T(e,this.length-8),(BigInt((t<<24)+65536*this[++e]+256*this[++e]+this[++e])<<BigInt(32))+BigInt(16777216*this[++e]+65536*this[++e]+256*this[++e]+r)}),a.prototype.readFloatLE=function(e,t){return e>>>=0,t||w(e,4,this.length),o.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||w(e,4,this.length),o.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||w(e,8,this.length),o.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||w(e,8,this.length),o.read(this,e,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;x(this,e,t,r,n,0)}let o=1,i=0;for(this[t]=255&e;++i<r&&(o*=256);)this[t+i]=e/o&255;return t+r},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(e,t,r,n){if(e=+e,t>>>=0,r>>>=0,!n){let n=Math.pow(2,8*r)-1;x(this,e,t,r,n,0)}let o=r-1,i=1;for(this[t+o]=255&e;--o>=0&&(i*=256);)this[t+o]=e/i&255;return t+r},a.prototype.writeUint8=a.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigUInt64LE=D(function(e,t=0){return E(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=D(function(e,t=0){return _(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let o=0,i=1,s=0;for(this[t]=255&e;++o<r&&(i*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},a.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){let n=Math.pow(2,8*r-1);x(this,e,t,r,n-1,-n)}let o=r-1,i=1,s=0;for(this[t+o]=255&e;--o>=0&&(i*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/i>>0)-s&255;return t+r},a.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||x(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeBigInt64LE=D(function(e,t=0){return E(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=D(function(e,t=0){return _(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(e,t,r){return k(this,e,t,!0,r)},a.prototype.writeFloatBE=function(e,t,r){return k(this,e,t,!1,r)},a.prototype.writeDoubleLE=function(e,t,r){return j(this,e,t,!0,r)},a.prototype.writeDoubleBE=function(e,t,r){return j(this,e,t,!1,r)},a.prototype.copy=function(e,t,r,n){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw RangeError("Index out of range");if(n<0)throw RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);let o=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),o},a.prototype.fill=function(e,t,r,n){let o;if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw TypeError("encoding must be a string");if("string"==typeof n&&!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);if(1===e.length){let t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw RangeError("Out of range index");if(r<=t)return this;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{let i=a.isBuffer(e)?e:a.from(e,n),s=i.length;
1if(0===s)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<r-t;++o)this[o+t]=i[o%s]}return this};let A={};function I(e,t,r){A[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function C(e){let t="",r=e.length,n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function O(e,t,r,n,o,i){if(e>r||e<t){let n;let o="bigint"==typeof t?"n":"";throw n=i>3?0===t||t===BigInt(0)?`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:`>= ${t}${o} and <= ${r}${o}`,new A.ERR_OUT_OF_RANGE("value",n,e)}N(o,"offset"),(void 0===n[o]||void 0===n[o+i])&&T(o,n.length-(i+1))}function N(e,t){if("number"!=typeof e)throw new A.ERR_INVALID_ARG_TYPE(t,"number",e)}function T(e,t,r){if(Math.floor(e)!==e)throw N(e,r),new A.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new A.ERR_BUFFER_OUT_OF_BOUNDS;throw new A.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}I("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),I("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),I("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,o=r;return Number.isInteger(r)&&Math.abs(r)>4294967296?o=C(String(r)):"bigint"==typeof r&&(o=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(o=C(o)),o+="n"),n+=` It must be ${t}. Received ${o}`},RangeError);let R=/[^+/0-9A-Za-z-_]/g;function P(e,t){let r;t=t||1/0;let n=e.length,o=null,i=[];for(let s=0;s<n;++s){if((r=e.charCodeAt(s))>55295&&r<57344){if(!o){if(r>56319||s+1===n){(t-=3)>-1&&i.push(239,191,189);continue}o=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),o=r;continue}r=(o-55296<<10|r-56320)+65536}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,63&r|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}else throw Error("Invalid code point")}return i}function U(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(R,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function L(e,t,r,n){let o;for(o=0;o<n&&!(o+r>=t.length)&&!(o>=e.length);++o)t[o+r]=e[o];return o}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}let M=function(){let e="0123456789abcdef",t=Array(256);for(let r=0;r<16;++r){let n=16*r;for(let o=0;o<16;++o)t[n+o]=e[r]+e[o]}return t}();function D(e){return"undefined"==typeof BigInt?F:e}function F(){throw Error("BigInt not supported")}},80645:function(e,t){t.read=function(e,t,r,n,o){var i,s,a=8*o-n-1,l=(1<<a)-1,c=l>>1,u=-7,d=r?o-1:0,h=r?-1:1,f=e[t+d];for(d+=h,i=f&(1<<-u)-1,f>>=-u,u+=a;u>0;i=256*i+e[t+d],d+=h,u-=8);for(s=i&(1<<-u)-1,i>>=-u,u+=n;u>0;s=256*s+e[t+d],d+=h,u-=8);if(0===i)i=1-c;else{if(i===l)return s?NaN:1/0*(f?-1:1);s+=Math.pow(2,n),i-=c}return(f?-1:1)*s*Math.pow(2,i-n)},t.write=function(e,t,r,n,o,i){var s,a,l,c=8*i-o-1,u=(1<<c)-1,d=u>>1,h=23===o?5960464477539062e-23:0,f=n?0:i-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(isNaN(t=Math.abs(t))||t===1/0?(a=isNaN(t)?1:0,s=u):(s=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-s))<1&&(s--,l*=2),s+d>=1?t+=h/l:t+=h*Math.pow(2,1-d),t*l>=2&&(s++,l/=2),s+d>=u?(a=0,s=u):s+d>=1?(a=(t*l-1)*Math.pow(2,o),s+=d):(a=t*Math.pow(2,d-1)*Math.pow(2,o),s=0));o>=8;e[r+f]=255&a,f+=p,a/=256,o-=8);for(s=s<<o|a,c+=o;c>0;e[r+f]=255&s,f+=p,s/=256,c-=8);e[r+f-p]|=128*m}},41143:function(e){"use strict";e.exports=function(e,t,r,n,o,i,s,a){if(!e){var l;if(void 0===t)l=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,i,s,a],u=0;(l=Error(t.replace(/%s/g,function(){return c[u++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}},83454:function(e,t,r){"use strict";var n,o;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(o=r.g.process)?void 0:o.env)?r.g.process:r(77663)},6840:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/_app",function(){return r(34069)}])},63759:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});var n=r(67294),o={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};let i=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),s=(e,t)=>{let r=(0,n.forwardRef)((r,s)=>{let{color:a="currentColor",size:l=24,strokeWidth:c=2,absoluteStrokeWidth:u,className:d="",children:h,...f}=r;return(0,n.createElement)("svg",{ref:s,...o,width:l,height:l,stroke:a,strokeWidth:u?24*Number(c)/Number(l):c,className:["lucide","lucide-".concat(i(e)),d].join(" "),...f},[...t.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(h)?h:[h]])});return r.displayName="".concat(e),r}},83989:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(63759).Z)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},60641:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(63759).Z)("Loader2",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]])},62190:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});let n=(0,r(63759).Z)("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
1],["path",{d:"m6 6 12 12",key:"d8bk6v"}]])},1581:function(e,t,r){"use strict";r.d(t,{Bd:function(){return i},Qd:function(){return s},jU:function(){return a}});var n=r(6733),o=r(29204);let i=async()=>{var e,t,r,i,s,a,l,c,u;try{let o=await localStorage.getItem("developerId"),i=await n.ZP.get("/v1/developer/".concat(o,"/get-api-keys"));if((null===(t=i.data)||void 0===t?void 0:null===(e=t.api_details)||void 0===e?void 0:e.api_status)==="success"&&Array.isArray(null===(r=i.data)||void 0===r?void 0:r.data))return{apiKeys:i.data.data.map(e=>({prefix:e.api_key_prefix||"",apiKeyName:e.api_key_name||"",createdAt:e.created_at||"",lastUsedAt:e.last_usage,status:"active"}))};return{apiKeys:[]}}catch(e){if(e instanceof o.d7)return{message:(null===(a=e.response)||void 0===a?void 0:null===(s=a.data)||void 0===s?void 0:null===(i=s.error)||void 0===i?void 0:i.message)||(null===(u=e.response)||void 0===u?void 0:null===(c=u.data)||void 0===c?void 0:null===(l=c.api_details)||void 0===l?void 0:l.api_message)||e.message,developerId:"",kind:"error"};return{message:"Something went wrong",developerId:"",kind:"error"}}},s=async e=>{var t,r,i,s,a,l,c,u,d,h,f,p;try{let o=await localStorage.getItem("developerId"),a=await n.ZP.post("/v1/developer/".concat(o,"/create-api-key?api_key_name=").concat(e.apiKeyName,"&environment=").concat(e.environment));if((null===(r=a.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success"&&(null===(s=a.data)||void 0===s?void 0:null===(i=s.data)||void 0===i?void 0:i.api_key))return{apiKey:a.data.data.api_key};return console.error("Invalid response format from create API key endpoint:",a.data),{error:"Invalid response from server"}}catch(t){let e="An unknown error occurred";return t instanceof o.d7?(console.error("Error creating API key:",(null===(a=t.response)||void 0===a?void 0:a.data)||t.message),e=(null===(d=t.response)||void 0===d?void 0:null===(u=d.data)||void 0===u?void 0:null===(c=u.detail)||void 0===c?void 0:null===(l=c.error)||void 0===l?void 0:l.error_description)||(null===(p=t.response)||void 0===p?void 0:null===(f=p.data)||void 0===f?void 0:null===(h=f.detail)||void 0===h?void 0:h.message)||t.message):(console.error("Unexpected error creating API key:",t),e=String(t)),{error:e}}},a=async e=>{try{var t,r;let o=await localStorage.getItem("developerId"),i=await n.ZP.delete("/v1/developer/".concat(o,"/delete-api-key?api_key_name=").concat(e));if((null===(r=i.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success")return!0;return console.error("Failed to revoke API key:",i.data),!1}catch(e){return console.error("Error revoking API key:",e),!1}}},48981:function(e,t,r){"use strict";r.d(t,{$G:function(){return l},Jq:function(){return a},PY:function(){return c},sendQuery:function(){return o}});var n=r(6733);let o=async(e,t,r)=>{try{var o;let i=new FormData;return i.append("query",t.query),i.append("tts_enabled",String(null===(o=t.tts_enabled)||void 0===o||o)),t.files&&(Array.isArray(t.files)?t.files:Array.from(t.files)).forEach(e=>{i.append("files",e)}),(await n.ZP.post("/v1/developer/".concat(e,"/query"),i,{headers:{"Content-Type":"multipart/form-data",Authorization:"Bearer ".concat(r)}})).data}catch(e){throw console.error("Error sending query:",e),e}},i=async(e,t,r)=>{try{var o;let i=new FormData;i.append("query",t.query),i.append("tts_enabled",String(null===(o=t.tts_enabled)||void 0===o||o)),t.files&&(Array.isArray(t.files)?t.files:Array.from(t.files)).forEach(e=>{i.append("files",e)});let s=await fetch("".concat(n.ZP.defaults.baseURL,"/v1/developer/").concat(e,"/query/stream"),{method:"POST",headers:{Authorization:"Bearer ".concat(r)},body:i});if(!s.ok)throw Error("HTTP error! status: ".concat(s.status));if(!s.body)throw Error("Response body is null");return s.body}catch(e){throw console.error("Error sending streaming query:",e),e}},s=async(e,t,r,n)=>{let o=e.getReader(),i=new TextDecoder,s="";try{for(;;){let{done:e,value:a}=await o.read();if(e){n&&n();break}let l=(s+=i.decode(a,{stream:!0})).split("\n");for(let e of(s=l.pop()||"",l))if(e.startsWith("data: ")&&"data:"!==e.trim())try{let r=JSON.parse(e.substring(6));t(r)}catch(t){console.error("Error parsing SSE JSON:",t,"Line:",e),r&&r(Error("Failed to parse SSE data: ".concat(e)))}}}
1catch(e){console.error("Error reading SSE stream:",e),r&&r(e)}finally{o.releaseLock()}},a=async(e,t,r,n,o,a)=>{try{let l=await i(e,t,r);await s(l,n,o,a)}catch(e){throw o&&o(e),e}},l=async()=>{let e;if(!(e=window.localStorage.getItem("developerId")))throw Error("Developer ID not found in localStorage");try{let t=await n.ZP.get("/v1/developer/".concat(e,"/agent-flows"));return t.data.data||t.data}catch(e){throw console.error("Error fetching agent flows:",e),e}},c=async(e,t)=>{let r;if(!(r=window.localStorage.getItem("developerId")))throw Error("Developer ID not found in localStorage");try{let o=await n.ZP.put("/v1/developer/".concat(r,"/agent-flows/").concat(e,"/fallback"),null,{params:{use_fallback_directly:t}});return o.data.data||o.data}catch(e){throw console.error("Error updating agent fallback state:",e),e}}},94923:function(e,t,r){"use strict";r.d(t,{CZ:function(){return u},Mv:function(){return l},TA:function(){return i},_v:function(){return f},lJ:function(){return c},yv:function(){return d}});var n=r(6733),o=r(29204);let i=async()=>{var e,t,r,i,s,a,l,c,u;try{let o=await localStorage.getItem("developerId"),i=await n.ZP.get("/v1/developer/".concat(o,"/daily-usage"));if((null===(t=i.data)||void 0===t?void 0:null===(e=t.api_details)||void 0===e?void 0:e.api_status)==="success"&&Array.isArray(null===(r=i.data)||void 0===r?void 0:r.data.daily_usage))return{dailyUsage:i.data.data.daily_usage.map(e=>({providerName:e.provider_name||"",modelName:e.model_name||"",totalInputTokens:e.total_input_tokens||0,totalOutputTokens:e.total_output_tokens||0,amount:e.amount||0,date:e.date||""}))};return{dailyUsage:[]}}catch(e){return e instanceof o.d7&&((null===(a=e.response)||void 0===a?void 0:null===(s=a.data)||void 0===s?void 0:null===(i=s.error)||void 0===i?void 0:i.message)||(null===(u=e.response)||void 0===u?void 0:null===(c=u.data)||void 0===c?void 0:null===(l=c.api_details)||void 0===l?void 0:l.api_message)||e.message),{dailyUsage:[]}}},s=async()=>{var e,t,r,i,s,a,l,c,u;try{let o=await localStorage.getItem("developerId"),i=await n.ZP.get("/v1/developer/".concat(o,"/get-credits"));if((null===(t=i.data)||void 0===t?void 0:null===(e=t.api_details)||void 0===e?void 0:e.api_status)!=="success")return{availableCredits:{creditBalance:0,lastUpdated:"",usdBalance:0,studioCredits:0}};{let e=Number(i.data.data.credit_balance||0),t=Number(null!==(r=i.data.data.usd_balance)&&void 0!==r?r:e/100);return{availableCredits:{creditBalance:e,lastUpdated:i.data.data.last_updated,usdBalance:t,studioCredits:Number(i.data.data.studio_credits||0)}}}}catch(e){return e instanceof o.d7&&((null===(a=e.response)||void 0===a?void 0:null===(s=a.data)||void 0===s?void 0:null===(i=s.error)||void 0===i?void 0:i.message)||(null===(u=e.response)||void 0===u?void 0:null===(c=u.data)||void 0===c?void 0:null===(l=c.api_details)||void 0===l?void 0:l.api_message)||e.message),{availableCredits:{creditBalance:0,lastUpdated:"",usdBalance:0,studioCredits:0}}}},a=null,l=()=>(a||(a=s().finally(()=>{a=null})),a),c=async(e,t)=>{var r,i,s,a,l,c,u,d;try{let o=await localStorage.getItem("developerId"),s=await n.ZP.post("/v1/developer/".concat(o,"/buy-credits?amount=").concat(e,"&country_id=").concat(t));if((null===(i=s.data)||void 0===i?void 0:null===(r=i.api_details)||void 0===r?void 0:r.api_status)==="success")return{buyCredits:{amount:s.data.data.amount,orderId:s.data.data.order_id,currency:s.data.data.currency,approvalUrl:s.data.data.approval_url}};return{buyCredits:{amount:0,orderId:"",currency:"",approvalUrl:""}}}catch(e){return e instanceof o.d7&&((null===(l=e.response)||void 0===l?void 0:null===(a=l.data)||void 0===a?void 0:null===(s=a.error)||void 0===s?void 0:s.message)||(null===(d=e.response)||void 0===d?void 0:null===(u=d.data)||void 0===u?void 0:null===(c=u.api_details)||void 0===c?void 0:c.api_message)||e.message),{buyCredits:{amount:0,orderId:"",currency:"",approvalUrl:""}}}},u=async e=>{try{var t,r;let o=await localStorage.getItem("developerId"),i=await n.ZP.get("/v1/developer/".concat(o,"/get-amount-breakdown?amount=").concat(e));if((null===(r=i.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success")return{calculatedCredits:{gstAmount:i.data.data.gst_amount,paymentGatewayFee:i.data.data.payment_gateway_fee,
1subTotal:i.data.data.subtotal,totalAmount:i.data.data.total_amount}};return{calculatedCredits:{gstAmount:0,paymentGatewayFee:0,subTotal:0,totalAmount:0}}}catch(e){return e instanceof Error&&e.message,{calculatedCredits:{gstAmount:0,paymentGatewayFee:0,subTotal:0,totalAmount:0}}}},d=async(e,t)=>{try{var r,o;let i=await localStorage.getItem("developerId"),s=new URLSearchParams({order_id:e,payment_id:t}),a=await n.ZP.get("/v1/developer/".concat(i,"/payment-status?").concat(s.toString()));if((null===(o=a.data)||void 0===o?void 0:null===(r=o.api_details)||void 0===r?void 0:r.api_status)==="success")return{paymentStatus:{paymentStatus:a.data.data.payment_status}};return{paymentStatus:{paymentStatus:""}}}catch(e){return e instanceof Error&&e.message,{paymentStatus:{paymentStatus:""}}}},h=(e,t)=>({allTransactions:[],pagination:{page:e,pageSize:t,totalItems:0,totalPages:0,hasNext:!1,hasPrevious:e>1},periodSummary:{week:{count:0,totalSpent:0},month:{count:0,totalSpent:0}}}),f=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"credit";try{var i,s,a,l,c,u,d,f,p,m,g,v,y,b,w,x;let o=await localStorage.getItem("developerId"),E=await n.ZP.get("/v1/developer/".concat(o,"/get-transactions"),{params:{page:e,page_size:t,category:r}});if((null===(s=E.data)||void 0===s?void 0:null===(i=s.api_details)||void 0===i?void 0:i.api_status)!=="success")return h(e,t);{let r=E.data.data;if(Array.isArray(r))return{...h(e,t),allTransactions:r,pagination:{page:e,pageSize:t,totalItems:r.length,totalPages:r.length?1:0,hasNext:!1,hasPrevious:!1}};let n=null==r?void 0:r.pagination,o=null==r?void 0:r.period_summary;return{allTransactions:Array.isArray(null==r?void 0:r.transactions)?r.transactions:[],pagination:{page:null!==(d=null==n?void 0:n.page)&&void 0!==d?d:e,pageSize:null!==(f=null==n?void 0:n.page_size)&&void 0!==f?f:t,totalItems:null!==(p=null==n?void 0:n.total_items)&&void 0!==p?p:0,totalPages:null!==(m=null==n?void 0:n.total_pages)&&void 0!==m?m:0,hasNext:null!==(g=null==n?void 0:n.has_next)&&void 0!==g&&g,hasPrevious:null!==(v=null==n?void 0:n.has_previous)&&void 0!==v&&v},periodSummary:{week:{count:null!==(y=null==o?void 0:null===(a=o.week)||void 0===a?void 0:a.count)&&void 0!==y?y:0,totalSpent:null!==(b=null==o?void 0:null===(l=o.week)||void 0===l?void 0:l.total_spent)&&void 0!==b?b:0},month:{count:null!==(w=null==o?void 0:null===(c=o.month)||void 0===c?void 0:c.count)&&void 0!==w?w:0,totalSpent:null!==(x=null==o?void 0:null===(u=o.month)||void 0===u?void 0:u.total_spent)&&void 0!==x?x:0}}}}}catch(r){return o.d7,h(e,t)}}},74379:function(e,t,r){"use strict";r.d(t,{G9:function(){return s},H:function(){return S},Iu:function(){return E},Qw:function(){return x},SU:function(){return h},Tk:function(){return b},UC:function(){return k},Us:function(){return _},Ww:function(){return a},YD:function(){return w},Yv:function(){return p},Z1:function(){return j},c1:function(){return g},eB:function(){return y},f7:function(){return d},wU:function(){return v},wX:function(){return f},zT:function(){return A}});var n,o,i,s,a,l,c=r(6733),u=r(29204);(n=s||(s={})).REQUESTS="requests",n.TOKENS="tokens",n.COST="cost",(o=a||(a={})).GLOBAL="global",o.IP="ip",o.API_KEY="api_key",o.USER="user",o.ENDPOINT="endpoint",(i=l||(l={})).REJECT="reject",i.DELAY="delay";let d=async e=>{try{let t=await localStorage.getItem("developerId");return(await c.ZP.post("/v1/developer/".concat(t,"/create-intelligent-endpoint?name=").concat(encodeURIComponent(e)))).data}catch(e){if(e instanceof u.d7){var t;console.error("Axios error creating intelligent endpoint:",(null===(t=e.response)||void 0===t?void 0:t.data)||e.message)}else console.error("Unexpected error creating intelligent endpoint:",e);throw e}},h=async(e,t,r)=>{try{let n=await localStorage.getItem("developerId"),o={intelligent_endpoint_id:e};return t&&(o.name=t),r&&(o.routing_config=r),(await c.ZP.put("/v1/developer/".concat(n,"/update-intelligent-endpoint"),o)).data}catch(e){throw console.error("Error updating intelligent endpoint:",e),e}},f=async e=>{try{let t=await localStorage.getItem("developerId");return(await c.ZP.delete("/v1/developer/".concat(t,"/delete-intelligent-endpoint?intelligent_endpoint_id=").concat(e))).data}catch(e){if(e instanceof u.d7){var t;console.error("Error deleting intelligent endpoint:",(null===(t=e.response)||void 0===t?void 0:t.data)||e.message)}else console.error("Error deleting intelligent endpoint:",e);throw e}},p=async()=>{try{let e=await localStorage.getItem("developerId");return(await c.ZP.get("/v1/developer/".concat(e,"/list-intelligent-endpoints"))).data}catch(t){if(t instanceof u.d7){var e;console.error("Error listing intelligent endpoints:",(null===(e=t.response)||void 0===e?void 0:e.data)||t.message)}else console.error("Error listing intelligent endpoints:",t);throw t}},m=new Set(["novita","nebius_ai","verda","runpod","vastai","vultr","azure","e2e_networks"]),g=async()=>{var e,t,r,n,o,i,s,a,l;try{let n=await localStorage.getItem("developerId"),o=await c.ZP.get("/v1/developer/".concat(n,"/get-endpoints?provider_name=all"));if((null===(t=o.data)||void 0===t?void 0:null===(e=t.api_details)||void 0===e?void 0:e.api_status)==="success"&&Array.isArray(null===(r=o.data)||void 0===r?void 0:r.data))return{endpoints:o.data.data.map(e=>({id:e.endpoint_id||"",name:e.endpoint_name||"",provider:e.provider_name||"",model:e.model_name||e.template_id||"",endpoint:e.endpoint_url||"",status:e.endpoint_status||"active",createdAt:e.created_at||new Date().toISOString(),lastUsedAt:null,requestCount:0,responseTime:0,scaling:{minInstances:1,maxInstances:5,autoScale:!1},regions:[],estimatedCost:0,state:e.state||"",worker_state:e.worker_state||"",image:e.image||"",deploymentTarget:e.deployment_target||"",instanceId:e.instance_id||"",deploymentError:e.deployment_error||""}))};return{endpoints:[]}}catch(e){if(e instanceof u.d7)return{message:(null===(i=e.response)||void 0===i?void 0:null===(o=i.data)||void 0===o?void 0:null===(n=o.error)||void 0===n?void 0:n.message)||(null===(l=e.response)||void 0===l?void 0:null===(a=l.data)||void 0===a?void 0:null===(s=a.api_details)||void 0===s?void 0:s.api_message)||e.message,developerId:"",kind:"error"};return{message:"Something went wrong",developerId:"",kind:"error"}}},v=async e=>{var t,r,n,o,i,s,a,l,d,h,f,p,m,g,v;try{let a=await localStorage.getItem("developerId"),l=e.provider;if(!l)throw Error("Please select a provider before creating the endpoint");let u="request_count"===e.scale||"queue"===e.scale?e.scale:"queue",d=Number.isFinite(Number(e.min_workers))?Number(e.min_workers):0,h=Number.isFinite(Number(e.max_workers))&&Number(e.max_workers)>0?Number(e.max_workers):1,f={name:e.name,template_id:e.template_id,instance_id:e.instance_id,gpu_id:e.gpu_id,gpu_count:e.gpu_count,compute_type:e.compute_type,scale:{scaler_type:u,scaler_value:4},worker_config:{min_workers:d,max_workers:Math.max(h,d||1)},max_concurrency:e.max_concurrency,app_name:e.app_name||"default-app",idle_timeout_seconds:10,huggingface_image_url:e.huggingface_image_url,custom_model_s3_path:e.custom_model_s3_path,environment:e.custom_model_s3_path?{CUSTOM_MODEL_S3_PATH:e.custom_model_s3_path}:{}};e.hf_token&&(f.hf_token=e.hf_token),e.volume_size&&e.volume_size>0&&(f.volume_size=e.volume_size),e.region&&(f.region=e.region);let p=await c.ZP.post("/v1/developer/".concat(a,"/create-endpoint?provider_name=").concat(l),f);
1if((null===(r=p.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success"&&(null===(n=p.data)||void 0===n?void 0:n.data))return p.data.data,{deploymentId:(null===(o=p.data)||void 0===o?void 0:o.data)||""};throw Error((null===(s=p.data)||void 0===s?void 0:null===(i=s.api_details)||void 0===i?void 0:i.api_message)||"Failed to create dedicated endpoint")}catch(e){if(e instanceof u.d7){let t=Error((null===(l=e.response)||void 0===l?void 0:null===(a=l.data)||void 0===a?void 0:a.error_description)||(null===(f=e.response)||void 0===f?void 0:null===(h=f.data)||void 0===h?void 0:null===(d=h.error)||void 0===d?void 0:d.message)||(null===(g=e.response)||void 0===g?void 0:null===(m=g.data)||void 0===m?void 0:null===(p=m.api_details)||void 0===p?void 0:p.api_message)||e.message);throw(null===(v=e.response)||void 0===v?void 0:v.data)&&(t.error_code=e.response.data.error_code,t.error_description=e.response.data.error_description,t.error_type=e.response.data.error_type),t}throw Error("Something went wrong while creating the endpoint")}},y=async function(e){var t,r,n,o,i,s,a,l,d,h,f,p;let m=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"novita";try{let a=await localStorage.getItem("developerId"),l=await c.ZP.delete("/v1/developer/".concat(a,"/delete-endpoint?endpoint_id=").concat(e,"&provider_name=").concat(m));if((null===(r=l.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success")return{success:!0,message:(null===(o=l.data)||void 0===o?void 0:null===(n=o.api_details)||void 0===n?void 0:n.api_message)||"Endpoint deleted successfully"};throw Error((null===(s=l.data)||void 0===s?void 0:null===(i=s.api_details)||void 0===i?void 0:i.api_message)||"Failed to delete dedicated endpoint")}catch(e){if(e instanceof u.d7)throw Error((null===(d=e.response)||void 0===d?void 0:null===(l=d.data)||void 0===l?void 0:null===(a=l.error)||void 0===a?void 0:a.message)||(null===(p=e.response)||void 0===p?void 0:null===(f=p.data)||void 0===f?void 0:null===(h=f.api_details)||void 0===h?void 0:h.api_message)||e.message);throw Error("Something went wrong while deleting the endpoint")}},b=async()=>{try{let n=await localStorage.getItem("developerId");try{var e,t,r;let o=await c.ZP.get("/v1/developer/".concat(n,"/get-model-templates"));if((null===(t=o.data)||void 0===t?void 0:null===(e=t.api_details)||void 0===e?void 0:e.api_status)==="success"&&Array.isArray(null===(r=o.data)||void 0===r?void 0:r.data))return o.data.data.map(e=>({...e,template_name:e.model_template_name,template_description:"Docker image: ".concat(e.model_template_image," (").concat(e.disk_size,"GB disk)")}))}catch(e){console.log("Failed to get templates without provider, trying with default provider")}return console.warn("Unable to fetch templates from any provider"),[]}catch(e){return console.error("Error fetching all templates:",e),[]}},w=async e=>{if(!e||"all"===e||!m.has(e))return[];try{var t,r,n,o;let i=await localStorage.getItem("developerId"),s=await c.ZP.get("/v1/developer/".concat(i,"/get-serverless-gpus?provider_name=").concat(e));if((null===(r=s.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success"&&(null===(o=s.data)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.serverless_gpus))return s.data.data.serverless_gpus;return[]}catch(e){return[]}},x=async(e,t)=>{try{var r,n,o;let i=localStorage.getItem("developerId"),s=await c.ZP.get("/v1/developer/".concat(i,"/get-endpoint?endpoint_id=").concat(e,"&provider_name=").concat(t));if((null===(n=s.data)||void 0===n?void 0:null===(r=n.api_details)||void 0===r?void 0:r.api_status)==="success"&&(null===(o=s.data)||void 0===o?void 0:o.data)){let e=Array.isArray(s.data.data)?s.data.data[0]:s.data.data;if(!e)return null;return{developer_id:e.developer_id,endpoint_id:e.endpoint_id,endpoint_name:e.endpoint_name,image:e.image,endpoint_url:e.endpoint_url,state:e.state,worker_state:e.worker_state}}return null}catch(e){return console.error("Error fetching endpoint status:",e),null}},E=async function(e,t){var r,n,o,i,s;let a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:300,l=localStorage.getItem("developerId"),u=await c.ZP.get("/v1/developer/".concat(l,"/get-endpoint-logs"),{params:{endpoint_id:e,provider_name:t,limit:a}});if((null===(n=u.data)||void 0===n?void 0:null===(r=n.api_details)||void 0===r?void 0:r.api_status)!=="success"||!(null===(o=u.data)||void 0===o?void 0:o.data))throw Error((null===(s=u.data)||void 0===s?void 0:null===(i=s.api_details)||void 0===i?void 0:i.api_message)||"Failed to fetch endpoint logs");return u.data.data},_=async(e,t)=>{var r,n,o,i;try{let i=localStorage.getItem("developerId"),s="/v1/developer/".concat(i,"/model-gpu-recommendation?model_image=").concat(encodeURIComponent(e)).concat(t?"&provider_name=".concat(encodeURIComponent(t)):""),a=await c.ZP.get(s);if((null===(n=a.data)||void 0===n?void 0:null===(r=n.api_details)||void 0===r?void 0:r.api_status)==="success"&&(null===(o=a.data)||void 0===o?void 0:o.data))return a.data.data;return null}catch(e){if(e instanceof u.d7)return console.error("getModelGpuRecommendation error",(null===(i=e.response)||void 0===i?void 0:i.data)||e.message),null;return console.error("getModelGpuRecommendation error",e),null}},S=async(e,t)=>{try{let r=await localStorage.getItem("developerId");return(await c.ZP.post("/v1/developer/".concat(r,"/inference-api-endpoint"),{provider:e,model_id:t,top_p:.9,temperature:.7,max_tokens:4096})).data}catch(e){if(e instanceof u.d7){var r;console.error("Error creating inference endpoint:",(null===(r=e.response)||void 0===r?void 0:r.data)||e.message)}else console.error("Error creating inference endpoint:",e);throw e}},k=async e=>{try{let t=await localStorage.getItem("developerId");return(await c.ZP.get("/v1/developer/".concat(t,"/get-inference-api-endpoint?inference_endpoint_id=").concat(e))).data}catch(e){if(e instanceof u.d7){var t;console.error("Error fetching inference endpoint:",(null===(t=e.response)||void 0===t?void 0:t.data)||e.message)}else console.error("Error fetching inference endpoint:",e);throw e}},j=async(e,t,r)=>{try{let n=await localStorage.getItem("developerId");return(await c.ZP.post("/v1/developer/".concat(n,"/attach-endpoint?intelligent_endpoint_id=").concat(e,"&endpoint_type=").concat(t,"&endpoint_id=").concat(r))).data}catch(e){if(e instanceof u.d7){var n;console.error("Error attaching endpoint:",(null===(n=e.response)||void 0===n?void 0:n.data)||e.message)}else console.error("Error attaching endpoint:",e);throw e}},A=async(e,t,r)=>{try{let n=await localStorage.getItem("developerId");return(await c.ZP.post("/v1/developer/".concat(n,"/detach-endpoint?intelligent_endpoint_id=").concat(e,"&endpoint_type=").concat(t,"&endpoint_id=").concat(r))).data}catch(e){throw e}}},15834:function(e,t,r){"use strict";r.d(t,{$s:function(){return d},Jg:function(){return c},L5:function(){return h},LN:function(){return m},PH:function(){return v},RR:function(){return u},dA:function(){return g},j5:function(){return f},qq:function(){return p}});var n=r(6733),o=r(29204),i=r(79931);let s=()=>{var e;return null===(e=localStorage.getItem("developerId"))||void 0===e?void 0:e.trim()},a=e=>{if("string"==typeof e)return e.trim()||void 0;if("number"==typeof e||"boolean"==typeof e)return String(e);if(Array.isArray(e)){let t=e.map(e=>a(e)).filter(e=>!!e);return t.length>0?t.join(" "):void 0}if(e&&"object"==typeof e)return a(e.error_description)||a(e.message)||a(e.msg)||a(e.detail)},l=(e,t)=>
1{var r;if(!(e instanceof o.d7))return t;let n=null===(r=e.response)||void 0===r?void 0:r.data,i=null==n?void 0:n.detail;return a(i&&"object"==typeof i&&!Array.isArray(i)?i.error:void 0)||a(null==n?void 0:n.error)||a(i)||a(null==n?void 0:n.message)||t},c=async e=>{try{var t,r,o,i,a,c,u,d;let l=s();if(!l)return{success:!1,message:"Developer ID not found. Please sign in again."};let h=await n.ZP.post("/v1/developer/".concat(encodeURIComponent(l),"/free-credits/phone-availability"),{mobile_number:e});return{success:(null===(r=h.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success",available:!!(null===(i=h.data)||void 0===i?void 0:null===(o=i.data)||void 0===o?void 0:o.available),alreadyClaimed:!!(null===(c=h.data)||void 0===c?void 0:null===(a=c.data)||void 0===a?void 0:a.already_claimed),message:null===(d=h.data)||void 0===d?void 0:null===(u=d.data)||void 0===u?void 0:u.message}}catch(e){return{success:!1,message:l(e,"Unable to check this mobile number.")}}},u=async e=>{try{var t,r,o,i,a,c,u,d;let l=s();if(!l)return{success:!1,message:"Developer ID not found. Please sign in again."};let h=await n.ZP.post("/v1/developer/".concat(encodeURIComponent(l),"/free-credits/email-availability"),{email:e.trim().toLowerCase()});return{success:(null===(r=h.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success",available:!!(null===(i=h.data)||void 0===i?void 0:null===(o=i.data)||void 0===o?void 0:o.available),alreadyClaimed:!!(null===(c=h.data)||void 0===c?void 0:null===(a=c.data)||void 0===a?void 0:a.already_claimed),message:null===(d=h.data)||void 0===d?void 0:null===(u=d.data)||void 0===u?void 0:u.message}}catch(e){return{success:!1,message:l(e,"Unable to check this email.")}}},d=async()=>{try{var e,t,r,o,i,a,c,u,d,h,f,p,m;let l=s();if(!l)return{success:!1,message:"Developer ID not found. Please sign in again."};let g=await n.ZP.get("/v1/developer/".concat(encodeURIComponent(l),"/free-credits/claim-status"));return{success:(null===(t=g.data)||void 0===t?void 0:null===(e=t.api_details)||void 0===e?void 0:e.api_status)==="success",hasClaim:!!(null===(o=g.data)||void 0===o?void 0:null===(r=o.data)||void 0===r?void 0:r.has_claim),claimStatus:null!==(f=null===(a=g.data)||void 0===a?void 0:null===(i=a.data)||void 0===i?void 0:i.claim_status)&&void 0!==f?f:null,approvedAmount:null!==(p=null===(u=g.data)||void 0===u?void 0:null===(c=u.data)||void 0===c?void 0:c.approved_amount)&&void 0!==p?p:null,approvedAt:null!==(m=null===(h=g.data)||void 0===h?void 0:null===(d=h.data)||void 0===d?void 0:d.approved_at)&&void 0!==m?m:null}}catch(e){return{success:!1,message:l(e,"Unable to check free credits status.")}}},h=async e=>{var t,r,i,s;try{let o=localStorage.getItem("developerId");if(!o)return{success:!1,message:"Developer ID not found"};let i=new URLSearchParams;i.append("input_suggestion",e.input_suggestion);let s=await n.ZP.post("/v1/developer/".concat(o,"/suggestion?").concat(i.toString()));if(console.log("Response from createFeedback:",s.data),(null===(r=s.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success")return{success:!0,message:s.data.data.message,suggestion_id:s.data.data.suggestion_id};return{success:!1,message:s.data.data.message}}catch(e){if(console.error("Error creating feedback:",e),e instanceof o.d7)return{success:!1,message:(null===(s=e.response)||void 0===s?void 0:null===(i=s.data)||void 0===i?void 0:i.message)||"Network error occurred"};return{success:!1,message:"An unexpected error occurred"}}},f=async()=>{var e,t,r,i,s,a,l;try{let o=localStorage.getItem("developerId");if(!o)return{success:!1,message:"Developer ID not found"};let a=await n.ZP.get("/v1/developer/".concat(o,"/get-developer-suggestions"));if(console.log("Response from getFeedbacks:",a.data.data),!((null===(t=a.data)||void 0===t?void 0:null===(e=t.api_details)||void 0===e?void 0:e.api_status)==="success"&&Array.isArray(null===(r=a.data)||void 0===r?void 0:r.data.data)))return{success:!1,message:(null===(s=a.data)||void 0===s?void 0:null===(i=s.api_details)||void 0===i?void 0:i.api_message)||"No feedbacks foun
1d"};{console.log("daaada");let e=a.data.data.data.map(e=>({id:e.suggestion_id||"",msg:e.input_suggestion||""}));return{success:!0,feedbacks:e}}}catch(e){if(console.error("Error fetching feedbacks:",e),e instanceof o.d7)return{success:!1,message:(null===(l=e.response)||void 0===l?void 0:null===(a=l.data)||void 0===a?void 0:a.message)||"Network error occurred"};return{success:!1,message:"An unexpected error occurred"}}},p=async e=>{var t,r,i,s;try{let o=localStorage.getItem("developerId");if(!o)return{success:!1,message:"Developer ID not found"};let i=new URLSearchParams;i.append("suggestion_id",e.suggestion_id);let s=await n.ZP.delete("/v1/developer/".concat(o,"/delete-developer-suggestion?").concat(i.toString()));if(console.log("Response from createFeedback:",s.data),(null===(r=s.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success")return{success:!0,message:s.data.data.message};return{success:!1,message:s.data.data.message}}catch(e){if(console.error("Error creating feedback:",e),e instanceof o.d7)return{success:!1,message:(null===(s=e.response)||void 0===s?void 0:null===(i=s.data)||void 0===i?void 0:i.message)||"Network error occurred"};return{success:!1,message:"An unexpected error occurred"}}},m=async e=>{var t,r,i,s;try{let o=localStorage.getItem("developerId");if(!o)return{success:!1,message:"Developer ID not found"};let i=await n.ZP.put("/v1/developer/".concat(o,"/update-developer-suggestion"),e);if(console.log("Response from createFeedback:",i.data),(null===(r=i.data)||void 0===r?void 0:null===(t=r.api_details)||void 0===t?void 0:t.api_status)==="success")return{success:!0,message:i.data.data.message};return{success:!1,message:i.data.data.message}}catch(e){if(console.error("Error creating feedback:",e),e instanceof o.d7)return{success:!1,message:(null===(s=e.response)||void 0===s?void 0:null===(i=s.data)||void 0===i?void 0:i.message)||"Network error occurred"};return{success:!1,message:"An unexpected error occurred"}}},g=async(e,t)=>{var r,s,a,l,c,u,d,h,f;try{let o=await n.ZP.post("/v1/contact-us",e,{headers:{"X-Recaptcha-Token":t}});if(console.log("Response from createFeedback:",o.data),(null===(s=o.data)||void 0===s?void 0:null===(r=s.api_details)||void 0===r?void 0:r.api_status)==="success")return(0,i.e)("contact_form_submitted",{status:"success"}),{success:!0,message:o.data.data.message};return(0,i.e)("contact_form_submitted",{status:"failure"}),{success:!1,message:o.data.data.message}}catch(e){if((0,i.e)("contact_form_submitted",{status:"failure",http_status:e instanceof o.d7?null===(a=e.response)||void 0===a?void 0:a.status:void 0}),console.error("Error creating feedback:",e),e instanceof o.d7)return{success:!1,message:(null===(d=e.response)||void 0===d?void 0:null===(u=d.data)||void 0===u?void 0:null===(c=u.detail)||void 0===c?void 0:null===(l=c.error)||void 0===l?void 0:l.error_description)||(null===(f=e.response)||void 0===f?void 0:null===(h=f.data)||void 0===h?void 0:h.message)||"Network error occurred"};return{success:!1,message:"An unexpected error occurred"}}},v=async e=>{try{var t,r,o,i,s,a,c;let l=null===(t=localStorage.getItem("developerId"))||void 0===t?void 0:t.trim();if(!l)return{success:!1,message:"Developer ID not found. Please sign in again."};let u=await n.ZP.post("/v1/developer/".concat(encodeURIComponent(l),"/free-credits/claim"),e);if((null===(o=u.data)||void 0===o?void 0:null===(r=o.api_details)||void 0===r?void 0:r.api_status)==="success")return{success:!0,message:null===(c=u.data)||void 0===c?void 0:null===(a=c.data)||void 0===a?void 0:a.message};return{success:!1,message:(null===(s=u.data)||void 0===s?void 0:null===(i=s.data)||void 0===i?void 0:i.message)||"Unable to submit your claim."}}catch(e){return console.error("Error submitting free credits claim:",e),{success:!1,message:l(e,"An unexpected error occurred")}}}},6733:function(e,t,r){"use strict";r.d(t,{AB:function(){return s},Fp:function(){return d},ZP:function(){return S},RZ:function(){return c},oT:function(){return u}});var n=r(87066),o=r(94082);r(74379);let i=e=>{let t=a(e);return t?t.port&&22!==t.port?"ssh -p ".concat(t.port," ").concat(t.user,"@").concat(t.host):"ssh ".concat(t.user,"@").concat(t.host):e};class s{connect(){return new Promise((e,t)=>
1{try{let r;try{r=window.localStorage.getItem("accessToken")}catch(e){console.error("Error accessing localStorage for token:",e),t(Error("Could not access localStorage to get authentication token"));return}if(!r){t(Error("Authentication token not found. Please make sure you are logged in."));return}let n="https://api.oneinfer.ai".replace("https://","wss://").replace("http://","ws://").replace(/\/$/,""),o=i(this.options.sshCommand),s="".concat(n,"/v1/websocket/ssh?token=").concat(encodeURIComponent(r),"&developer_id=").concat(this.options.developerId,"&provider=").concat(this.options.provider,"&sshCommand=").concat(encodeURIComponent(o));this.options.instanceId&&(s+="&instance_id=".concat(this.options.instanceId)),this.ws=new WebSocket(s),this.ws.onopen=()=>{this.reconnectAttempts=0,this.sendMessage({type:"start",sshCommand:o}),this.options.onOpen&&this.options.onOpen(),e()},this.ws.onmessage=e=>{this.options.onMessage&&this.options.onMessage(e.data)},this.ws.onerror=e=>{console.error("â SSH WebSocket error:",e);let r="WebSocket connection error occurred";if(e instanceof Event&&e.target)switch(e.target.readyState){case WebSocket.CONNECTING:r="WebSocket connection failed during handshake";break;case WebSocket.CLOSING:r="WebSocket connection was closing when error occurred";break;case WebSocket.CLOSED:r="WebSocket connection is closed";break;default:r="Unknown WebSocket error occurred"}console.error("SSH WebSocket detailed error: ".concat(r)),this.options.onError&&this.options.onError(r),t(Error(r))},this.ws.onclose=e=>{switch(e.code,e.code){case 1e3:case 1001:case 1002:case 1003:case 1006:case 1007:case 1008:case 1009:case 1011:case 4e3:break;default:e.reason||e.code}this.options.onClose&&this.options.onClose(),1e3!==e.code&&this.reconnectAttempts<this.maxReconnectAttempts&&this.attemptReconnect()}}catch(e){console.error("Error creating SSH WebSocket connection:",e),t(e)}})}sendInput(e){this.ws&&this.ws.readyState===WebSocket.OPEN?this.sendMessage({type:"input",data:e}):(console.warn("â ï¸ Cannot send input: WebSocket is not connected"),this.options.onError&&this.options.onError("Cannot send input: Not connected to SSH session"))}disconnect(){this.ws&&(this.ws.close(1e3,"Client disconnect"),this.ws=null)}isConnected(){return null!==this.ws&&this.ws.readyState===WebSocket.OPEN}sendMessage(e){this.ws&&this.ws.readyState===WebSocket.OPEN?this.ws.send(JSON.stringify(e)):console.warn("â ï¸ Cannot send message: WebSocket is not open")}attemptReconnect(){this.reconnectAttempts++,setTimeout(()=>{this.connect().catch(e=>{console.error("â Reconnection failed:",e),this.reconnectAttempts>=this.maxReconnectAttempts&&this.options.onError&&this.options.onError("Failed to reconnect to SSH session after multiple attempts")})},this.reconnectDelay*this.reconnectAttempts)}constructor(e){this.ws=null,this.reconnectAttempts=0,this.maxReconnectAttempts=3,this.reconnectDelay=1e3,this.options=e}}let a=e=>{let t=e.trim().split(/\s+/);if("ssh"!==t[0])return null;let r=22,n="";for(let e=1;e<t.length;e++){let o=t[e];if("-p"===o&&t[e+1]){let n=Number.parseInt(t[e+1],10);Number.isNaN(n)||(r=n),e++;continue}if(o.startsWith("-p")&&o.length>2){let e=Number.parseInt(o.slice(2),10);Number.isNaN(e)||(r=e);continue}!o.startsWith("-")&&o.includes("@")&&(n=o)}let o=n.match(/^([\w.-]+)@([\w.-]+)$/);return o?{port:r,user:o[1],host:o[2]}:null};r(48981);var l=r(29204);let c=async()=>{var e,t,r,n,o,i,s,a,c;try{let o=await localStorage.getItem("developerId");if(!o)throw Error("Developer ID is required");let i=await S.get("/v1/developer/".concat(o,"/get-all-sessions-nodes"));if((null===(t=i.data)||void 0===t?void 0:null===(e=t.api_details)||void 0===e?void 0:e.api_status)==="success")return{success:!0,data:i.data.data};{let e=(null===(n=i.data)||void 0===n?void 0:null===(r=n.api_details)||void 0===r?void 0:r.api_message)||"API request failed";return{success:!1,error:e}}}catch(t){let e="Something went wrong while fetching session nodes";return t instanceof l.d7?(null===(s=t.response)||void 0===s?void 0:null===(i=s.data)||void 0===i?void 0:null===(o=i.api_details)||void 0===o?void 0:o.api_message)?e=t.response.data.api_details.api_message:(null===(c=t.response)||void 0===c?void 0:null===(a=c.data)||void 0===a?void 0:a.detail)?e=t.response.data.detail:t.message&&(e=t.message):t instanceof Error&&(e=t.message),console.error("Error fetching session nodes:",e),{success:!1,error:e}}},u=e=>{let t=[],r={},n=[],o=new Map;e.filter(e=>e.is_root).forEach(t=>{let r=[t],n=new Set,i=[t.node_id];for(n.add(t.node_id);i.length>0;){let t=i.shift(),o=e.filter(e=>e.parent_id===t&&!n.has(e.node_id));o.sort((e,t)=>
1new Date(e.created_at).getTime()-new Date(t.created_at).getTime()),o.forEach(e=>{r.push(e),n.add(e.node_id),i.push(e.node_id)})}o.set(t.node_id,r)});let i=100;return o.forEach((e,o)=>{let s=100;e.forEach((e,o)=>{if(e.is_root||"root"===e.value.node_type){let n="Session ".concat(e.session_ids.length>0?e.session_ids[0].slice(-8):"Root"),o="Session with ".concat(e.session_ids.length," conversation").concat(1!==e.session_ids.length?"s":"");t.push({id:e.node_id,title:n,content:o,type:"root"}),r[e.node_id]={x:s,y:i,width:200,height:120},s+=280}else if(e.value.messages&&e.value.messages.length>0){let o=e.value.messages.find(e=>"user"===e.role),a=e.value.messages.find(e=>"assistant"===e.role),l="Message Node";if(o){let e=o.content.split(" "),t=e.length>7?"".concat(e.slice(0,7).join(" "),"..."):o.content;l="User: ".concat(t)}let c=o?o.content:"No user message",u=a?a.content:"No assistant message";t.push({id:e.node_id,title:l,content:JSON.stringify({userMessage:c,assistantMessage:u,userPreview:o?o.content.split(" ").length>7?"".concat(o.content.split(" ").slice(0,7).join(" "),"..."):o.content:"No user message",assistantPreview:a?a.content.split(" ").length>10?"".concat(a.content.split(" ").slice(0,10).join(" "),"..."):a.content:"No assistant message"}),type:"process"}),r[e.node_id]={x:s,y:i,width:200,height:120},e.parent_id&&n.push({id:"".concat(e.parent_id,"-").concat(e.node_id),from:e.parent_id,to:e.node_id}),s+=280}else{let o="Node ID: ".concat(e.node_id.slice(-8));t.push({id:e.node_id,title:"Data Node",content:o,type:"output"}),r[e.node_id]={x:s,y:i,width:200,height:120},e.parent_id&&n.push({id:"".concat(e.parent_id,"-").concat(e.node_id),from:e.parent_id,to:e.node_id}),s+=280}}),i+=320}),{nodes:t,positions:r,connections:n}},d=e=>{let t={},r=[];e.filter(e=>e.is_root).forEach(t=>{let n=[t],o=new Set,i=[t.node_id];for(o.add(t.node_id);i.length>0;){let t=i.shift();e.filter(e=>e.parent_id===t&&!o.has(e.node_id)).forEach(e=>{n.push(e),o.add(e.node_id),i.push(e.node_id)})}r.push(n)});let n=50;return r.forEach((e,r)=>{let o=50,i=n;e.forEach((e,r)=>{e.is_root||"root"===e.value.node_type||e.value.messages&&e.value.messages.length,t[e.node_id]={x:o,y:i,width:200,height:120},o+=280}),n+=320}),t},h="https://api.oneinfer.ai".replace(/\/$/,"")+"/",f=n.default.create({baseURL:h,headers:{"ngrok-skip-browser-warning":"true","Content-Type":"application/json"}}),p=e=>!!e&&(e.includes("/v1/developer/")||e.includes("v1/developer/")||e.includes("/v1/admin/")||e.includes("v1/admin/")),m=e=>!!e&&(e.includes("/v1/developer/refresh-token")||e.includes("v1/developer/refresh-token")),g=e=>!!e&&["v1/developer/login","v1/developer/password-login","v1/developer/forgot-password","v1/developer/reset-password","v1/developer/unsubscribe","v1/developer/verify-registration","v1/developer/google-login","v1/developer/github-login"].some(t=>e.includes(t)),v=()=>{var e;return(null===(e=(0,o.Rd)())||void 0===e?void 0:e.accessToken)||localStorage.getItem("accessToken")},y=()=>localStorage.getItem("refreshToken"),b=()=>localStorage.getItem("ulaToken"),w=()=>{(0,o.IH)(),localStorage.removeItem("refreshToken")};f.interceptors.request.use(e=>{if(!(g(e.url)||m(e.url))){let t=p(e.url)?v():b();t&&(e.headers.Authorization="Bearer ".concat(t))}return e},e=>Promise.reject(e));let x=!1,E=[],_=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;E.forEach(r=>{e?r.reject(e):r.resolve(t)}),E=[]};f.interceptors.response.use(e=>e,async e=>{var t;let r=e.config,i=p(null==r?void 0:r.url);if((null===(t=e.response)||void 0===t?void 0:t.status)===401&&i&&!g(null==r?void 0:r.url)&&!m(null==r?void 0:r.url)&&!r._retry){if(x)return new Promise(function(e,t){E.push({resolve:e,reject:t})}).then(e=>(r.headers.Authorization="Bearer "+e,f(r))).catch(e=>Promise.reject(e));r._retry=!0,x=!0;let t=y();return t?new Promise(function(e,i){n.default.post("".concat(h,"v1/developer/refresh-token"),{refresh_token:t}).then(t=>{let{data:n}=t,i=(null==n?void 0:n.data)||n,s=null==i?void 0:i.access_token,a=null==i?void 0:i.refresh_token;if(!s||!a)throw Error("Refresh token response did not include required credentials");(0,o.Ut)(s),localStorage.setItem("refreshToken",a),f.defaults.headers.common.Authorization="Bearer "+s,r.headers.Authorization="Bearer "+s,_(null,s),e(f(r))}).catch(e=>{_(e,null),w(),window.location.href="/login",i(e)}).finally(()=>{x=!1})}):(x=!1,_(e,null),Promise.reject(e))}return e.response&&e.response.status,Promise.reject(e)});var S=f},19563:function(e,t,r){"use strict";
1var n=r(85893),o=r(67294),i=r(15834);t.Z=e=>{let{onClose:t}=e,[r,s]=(0,o.useState)(!1),[a,l]=(0,o.useState)(""),[c,u]=(0,o.useState)([]),[d,h]=(0,o.useState)(null),[f,p]=(0,o.useState)(!0),[m,g]=(0,o.useState)("create");(0,o.useEffect)(()=>{(async()=>{p(!0);try{let e=await (0,i.j5)();e.success&&e.feedbacks&&u(e.feedbacks)}finally{p(!1)}})()},[]);let v=async e=>{if(e.preventDefault(),a.trim())try{if(("edit"===m&&d?await (0,i.LN)({input_suggestion:a,suggestion_id:d.id}):await (0,i.L5)({input_suggestion:a})).success){let e=await (0,i.j5)();e.success&&e.feedbacks&&u(e.feedbacks),l(""),h(null),s(!1)}}catch(e){}},y=e=>{g("edit"),h(e),l(e.msg),s(!0)},b=async e=>{if(window.confirm("Are you sure you want to delete this feedback?"))try{(await (0,i.qq)({suggestion_id:e})).success&&u(t=>t.filter(t=>t.id!==e))}catch(e){}};return(0,n.jsx)("div",{className:"fixed inset-0 bg-gradient-to-br from-violet-900/20 via-indigo-900/20 to-purple-900/20 backdrop-blur-sm flex items-center justify-center z-50 p-4",children:(0,n.jsxs)("div",{className:"bg-white rounded-2xl shadow-2xl w-full max-w-4xl max-h-[90vh] overflow-hidden",children:[(0,n.jsx)("div",{className:"bg-gradient-to-r from-violet-600 to-indigo-600 p-6 border-b border-gray-200",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("h2",{className:"text-2xl font-bold text-white",children:"Feedback"}),(0,n.jsx)("button",{onClick:t,className:"text-white hover:text-white/80 transition-all duration-200",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})}),(0,n.jsx)("div",{className:"p-8 overflow-y-auto max-h-[calc(90vh-160px)]",children:r?(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsxs)("div",{className:"bg-gradient-to-br from-violet-50 to-indigo-50 p-6 rounded-xl border border-violet-100",children:[(0,n.jsxs)("label",{className:"flex items-center gap-2 text-sm font-semibold text-gray-700 mb-3",children:[(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-violet-600",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M18 10c0 3.866-3.582 7-8 7a8.841 8.841 0 01-4.083-.98L2 17l1.338-3.123C2.493 12.767 2 11.434 2 10c0-3.866 3.582-7 8-7s8 3.134 8 7zM7 9H5v2h2V9zm8 0h-2v2h2V9zM9 9h2v2H9V9z",clipRule:"evenodd"})}),"Your Suggestion *"]}),(0,n.jsx)("textarea",{value:a,onChange:e=>{l(e.target.value)},rows:6,className:"w-full px-4 py-3 bg-white border-2 border-violet-200 rounded-xl focus:ring-4 focus:ring-violet-100 focus:border-violet-500 transition-all duration-200 resize-none placeholder-gray-400",placeholder:"Share your thoughts, ideas, or suggestions..."})]}),(0,n.jsxs)("div",{className:"flex justify-end gap-3 pt-2",children:[(0,n.jsx)("button",{onClick:()=>{s(!1),h(null)},className:"px-6 py-3 border-2 border-gray-300 rounded-xl text-gray-700 font-medium hover:bg-gray-50 hover:border-gray-400 transition-all duration-200",children:"Cancel"}),(0,n.jsxs)("button",{onClick:v,className:"px-6 py-3 bg-gradient-to-r from-violet-600 to-indigo-600 text-white font-medium rounded-xl shadow-lg hover:shadow-xl hover:from-violet-700 hover:to-indigo-700 transform hover:-translate-y-0.5 transition-all duration-200",children:["edit"===m?"Update":"Submit"," Feedback"]})]})]}):(0,n.jsxs)("div",{className:"space-y-4",children:[f?(0,n.jsxs)("div",{className:"text-center py-16",children:[(0,n.jsx)("div",{className:"inline-block h-10 w-10 animate-spin rounded-full border-4 border-violet-200 border-t-violet-600"}),(0,n.jsx)("p",{className:"mt-4 text-gray-500",children:"Loading feedback..."})]}):0===c.length?(0,n.jsxs)("div",{className:"text-center py-16",children:[(0,n.jsxs)("div",{className:"relative inline-block mb-6",children:[(0,n.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-violet-400 to-indigo-400 rounded-full blur-2xl opacity-20"}),(0,n.jsx)("div",{className:"relative bg-gradient-to-br from-violet-100 to-indigo-100 p-6 rounded-full",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-16 w-16 text-violet-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M8 10h.01M12 10h.01M16 10h.01M9 16H5a2 2 0 01-2-2V6a2 2 0 012-2h14a2 2 0 012 2v8a2 2 0 01-2 2h-5l-5 5v-5z"})})})]}),(0,n.jsx)("h3",{className:"text-xl font-semibold text-gray-800 mb
1-2",children:"No feedback yet"}),(0,n.jsx)("p",{className:"text-gray-500",children:"Be the first to share your thoughts!"})]}):(0,n.jsx)("div",{className:"space-y-3",children:c.map(e=>(0,n.jsx)("div",{className:"group bg-gradient-to-br from-white to-gray-50 rounded-xl p-5 border-2 border-gray-100 hover:border-violet-200 hover:shadow-lg transition-all duration-200",children:(0,n.jsxs)("div",{className:"flex justify-between items-start gap-4",children:[(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsxs)("div",{className:"flex items-start gap-3",children:[(0,n.jsx)("div",{className:"bg-gradient-to-br from-violet-100 to-indigo-100 p-2 rounded-lg mt-0.5",children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-violet-600",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M18 13V5a2 2 0 00-2-2H4a2 2 0 00-2 2v8a2 2 0 002 2h3l3 3 3-3h3a2 2 0 002-2zM5 7a1 1 0 011-1h8a1 1 0 110 2H6a1 1 0 01-1-1zm1 3a1 1 0 100 2h3a1 1 0 100-2H6z",clipRule:"evenodd"})})}),(0,n.jsx)("p",{className:"text-gray-700 leading-relaxed pt-1",children:e.msg})]})}),(0,n.jsxs)("div",{className:"flex gap-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200",children:[(0,n.jsx)("button",{className:"p-2 text-blue-600 hover:bg-blue-50 rounded-lg transition-all duration-200 hover:scale-110",onClick:()=>y(e),children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),(0,n.jsx)("button",{className:"p-2 text-red-600 hover:bg-red-50 rounded-lg transition-all duration-200 hover:scale-110",onClick:()=>b(e.id),children:(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,n.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]})},e.id))}),!r&&(0,n.jsx)("div",{className:"flex justify-end pt-4",children:(0,n.jsxs)("button",{onClick:()=>{g("create"),h(null),l(""),s(!0)},className:"group flex items-center gap-2 px-6 py-3 bg-gradient-to-r from-violet-600 to-indigo-600 text-white font-medium rounded-xl shadow-lg hover:shadow-xl hover:from-violet-700 hover:to-indigo-700 transform hover:-translate-y-0.5 transition-all duration-200",children:[(0,n.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 group-hover:rotate-90 transition-transform duration-200",viewBox:"0 0 20 20",fill:"currentColor",children:(0,n.jsx)("path",{fillRule:"evenodd",d:"M10 5a1 1 0 011 1v3h3a1 1 0 110 2h-3v3a1 1 0 11-2 0v-3H6a1 1 0 110-2h3V6a1 1 0 011-1z",clipRule:"evenodd"})}),"New Feedback"]})})]})})]})})}},96286:function(e,t,r){"use strict";var n=r(85893),o=r(67294);t.Z=e=>{let{onPaymentSuccess:t,onPaymentFailure:r,paymentDetails:i={amount:0,currency:"INR",orderId:""},autoInitialize:s}=e,[a,l]=(0,o.useState)(!1),[c,u]=(0,o.useState)(""),d=()=>new Promise(e=>{if(window.Razorpay){e(!0);return}let t=document.createElement("script");t.src="https://checkout.razorpay.com/v1/checkout.js",t.onload=()=>{e(!0)},t.onerror=()=>{e(!1)},document.body.appendChild(t)}),h=async()=>{l(!0),u("");try{if(!await d())throw Error("Failed to load Razorpay SDK");if(!i.orderId)throw Error("Razorpay order ID is missing");let e={key:"rzp_live_RFm9UVVlQTt8tM",amount:Math.round(100*i.amount),currency:i.currency,name:"OneInfer",description:"Add credits to your account",image:"https://example.com/your_logo.jpg",order_id:i.orderId,handler:function(e){l(!1),u("success"),t&&t(e)},prefill:{name:"",email:"",contact:""},notes:{address:"Customer address"},theme:{color:"#6366f1"},modal:{ondismiss:function(){l(!1),u("dismissed")}}},n=new window.Razorpay(e);n.on("payment.failed",function(e){l(!1),u("failed"),r&&r(e.error),console.error("Payment failed:",e.error)}),n.open()}catch(e){l(!1),u("error"),console.error("Error in payment process:",e),r&&r(e),console.error("Payment error:",e)}};return(0,o.useEffect)(()=>
1{if(s){let e=setTimeout(()=>{h()},100);return()=>clearTimeout(e)}},[s,i]),(0,n.jsx)("div",{children:a&&(0,n.jsx)("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:(0,n.jsx)("div",{className:"bg-white p-6 rounded-lg shadow-lg",children:(0,n.jsxs)("div",{className:"flex items-center space-x-3",children:[(0,n.jsx)("div",{className:"animate-spin rounded-full h-6 w-6 border-b-2 border-violet-600"}),(0,n.jsx)("span",{className:"text-gray-700",children:"Processing payment..."})]})})})})}},36197:function(e,t,r){"use strict";r.d(t,{H:function(){return u},a:function(){return d}});var n=r(85893),o=r(67294),i=r(11163),s=r(94082),a=r(17177);let l=(0,o.createContext)(void 0),c=e=>!!(e&&"undefined"!==e&&"null"!==e);function u(e){let{children:t}=e,[r,u]=(0,o.useState)(!1),[d,h]=(0,o.useState)(!0),[f,p]=(0,o.useState)(null),[m,g]=(0,o.useState)(null),v=(0,i.useRouter)();(0,o.useEffect)(()=>{(()=>{let e=(0,s.Rd)(),t=(null==e?void 0:e.accessToken)||localStorage.getItem("accessToken"),r=(null==e?void 0:e.developerId)||localStorage.getItem("developerId"),n=localStorage.getItem("isLoggedIn");if(c(t)&&c(r)&&"true"===n){let e=localStorage.getItem("userEmail")||"",t=(0,a.c)("");u(!0),p({developerId:r,email:e,firstName:t}),m&&(v.push(m),g(null))}else(0,s.IH)(),localStorage.removeItem("firstName"),localStorage.removeItem("isLoggedIn"),u(!1),p(null);h(!1)})()},[v,m]);let y=async()=>{(0,s.IH)(),localStorage.removeItem("userEmail"),localStorage.removeItem("firstName"),localStorage.removeItem("isLoggedIn"),u(!1),g(null),p(null),v.push("/")};return(0,n.jsx)(l.Provider,{value:{user:f,login:function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(e){let e=localStorage.getItem("userEmail")||"",t=localStorage.getItem("developerId")||"",r=(0,a.c)("");u(!0),p({developerId:t,email:e,firstName:r})}t||(m?(v.push(m),g(null)):v.push("/console"))},logout:y,isLoading:d,setRedirectPath:g,isAuthenticated:r,redirectPath:m},children:t})}let d=()=>{let e=(0,o.useContext)(l);if(void 0===e)throw Error("useAuth must be used within an AuthProvider");return e}},79867:function(e,t,r){"use strict";r.d(t,{M:function(){return l},j:function(){return c}});var n=r(85893),o=r(67294),i=r(94082),s=r(17177);let a=o.createContext(void 0),l=e=>{let{children:t}=e,[r,l]=(0,o.useState)("paper-trading"),[c,u]=(0,o.useState)(null),[d,h]=(0,o.useState)("username"),[f,p]=(0,o.useState)("Give Feedback"),[m,g]=(0,o.useState)(!1),[v,y]=(0,o.useState)(!1),[b,w]=(0,o.useState)(!0),[x,E]=(0,o.useState)(!1),[_,S]=(0,o.useState)(!1),[k,j]=(0,o.useState)(""),[A,I]=(0,o.useState)(""),[C,O]=(0,o.useState)(!1),[N,T]=(0,o.useState)(!1),[R,P]=(0,o.useState)(null),[U,L]=(0,o.useState)(null),[B,M]=(0,o.useState)(null);return o.useEffect(()=>{(()=>{{let e=(0,i.Rd)(),t=(null==e?void 0:e.accessToken)||localStorage.getItem("accessToken"),r=(null==e?void 0:e.developerId)||localStorage.getItem("developerId");if(t&&r){E(!0);let e=(0,s.c)("");e&&j(e)}}S(!0)})()},[]),(0,n.jsx)(a.Provider,{value:{accountToggleButtonData:r,setAccountToggleButtonData:l,profileToggleButtonData:d,setProfileToggleButtonData:h,suggestionsToggleButtonData:f,setSuggestionsToggleButtonData:p,currentTradingAccountContext:c,setcurrentTradingAccountContext:u,isDarkTheme:m,setIsDarkTheme:g,isAskAIModalOpen:v,setIsAskAIModalOpen:y,isBacktestingSet:b,setIsBacktestingSet:w,loggedIn:x,setLoggedIn:E,isAuthChecked:_,setIsAuthChecked:S,username:k,setUsername:j,currentSessionId:A,setCurrentSessionId:I,sessions:R,setSessions:P,tokenUsage:U,setTokenUsage:L,updateSessionChat:(e,t)=>{P(r=>r?r.map(r=>r.sessionId===e?{...r,sessionChat:[...r.sessionChat,t]}:r):null)},logout:()=>{(0,i.IH)(),localStorage.removeItem("userEmail"),localStorage.removeItem("firstName"),localStorage.removeItem("isLoggedIn"),E(!1),S(!0),j(""),I(""),P(null),L(null),localStorage.clear(),sessionStorage.clear(),window.location.replace("/")},showLoginPopup:C,setShowLoginPopUp:O,showSignupPopup:N,setShowSignupPopup:T,activeCodingPlan:B,setActiveCodingPlan:M},children:t})},c=()=>{let e=(0,o.useContext)(a);if(void 0===e)throw Error("useGlobalState must be used within a GlobalStateProvider");return e}},69530:function(e,t,r){"use strict";r.d(t,{A8:function(){return m},EX:function(){return p},JC:function(){return a}});
1var n=r(85893),o=r(67294),i=r(94923),s=r(79931);let a="oneinfer:payment-completed",l="oneinfer:pending-payments",c=(0,o.createContext)(void 0),u=e=>"".concat(e.orderId,":").concat(e.paymentId),d=()=>{try{let e=window.sessionStorage.getItem(l);if(!e)return[];let t=JSON.parse(e);return Array.isArray(t)?t:[]}catch(e){return console.error("Failed to read pending payment polling state:",e),[]}},h=e=>{try{window.sessionStorage.setItem(l,JSON.stringify(e))}catch(e){console.error("Failed to store pending payment polling state:",e)}},f=e=>(e||"").toLowerCase(),p=e=>{let{children:t}=e,[r,l]=(0,o.useState)([]),p=(0,o.useRef)(new Set);(0,o.useEffect)(()=>{l(d())},[]),(0,o.useEffect)(()=>{h(r)},[r]);let m=(0,o.useCallback)(e=>{let t=u(e);l(e=>e.filter(e=>u(e)!==t))},[]),g=(0,o.useCallback)(async e=>{let t=u(e);if(!p.current.has(t)){p.current.add(t);try{let t=await (0,i.yv)(e.orderId,e.paymentId),r=f(t.paymentStatus.paymentStatus);"completed"===r&&(m(e),"credits"===e.source&&(0,s.e)("credits_purchased",{status:"completed",payment_provider:e.paymentId.startsWith("pay_")?"razorpay":"paypal"}),window.dispatchEvent(new CustomEvent(a,{detail:{...e,status:r}})))}catch(e){console.error("Error polling payment status:",e)}finally{p.current.delete(t)}}},[m]);(0,o.useEffect)(()=>{if(0===r.length)return;r.forEach(e=>{g(e)});let e=window.setInterval(()=>{r.forEach(e=>{g(e)})},2e3);return()=>window.clearInterval(e)},[r,g]);let v=(0,o.useCallback)(e=>{l(t=>{let r=u(e);return t.some(e=>u(e)===r)?t:[...t,{...e,startedAt:Date.now()}]})},[]);return(0,n.jsx)(c.Provider,{value:{watchPaymentUntilCompleted:v},children:t})},m=()=>{let e=(0,o.useContext)(c);if(!e)throw Error("usePaymentPolling must be used within a PaymentPollingProvider");return e}},16883:function(e,t,r){"use strict";r.d(t,{V:function(){return a},p:function(){return s}});var n=r(85893),o=r(67294);let i=(0,o.createContext)(void 0),s=()=>{let e=(0,o.useContext)(i);if(void 0===e)throw Error("useToast must be used within a ToastProvider");return e},a=e=>{let{children:t}=e,[r,s]=(0,o.useState)([]),a=(0,o.useRef)(new Map),l=e=>{s(t=>t.filter(t=>t.id!==e));let t=a.current.get(e);t&&(clearTimeout(t),a.current.delete(e))};return(0,n.jsx)(i.Provider,{value:{toasts:r,addToast:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5e3,n=Math.random().toString(36).substr(2,9),o={id:n,message:e,type:t,duration:r};s(e=>[...e,o]);let i=setTimeout(()=>{l(n)},r);return a.current.set(n,i),n},removeToast:l},children:t})}},41961:function(e,t,r){"use strict";r.d(t,{R:function(){return a},a:function(){return s}});var n=r(85893),o=r(67294);let i=(0,o.createContext)(void 0),s=e=>{let{children:t}=e,[r,s]=(0,o.useState)(null),[a,l]=(0,o.useState)([]),[c,u]=(0,o.useState)(!1),[d,h]=(0,o.useState)(null),[f,p]=(0,o.useState)(null);return(0,o.useEffect)(()=>{{let e=localStorage.getItem("currentChatSessionId");e&&(h(e),s(e))}},[]),(0,o.useEffect)(()=>{d?localStorage.setItem("currentChatSessionId",d):localStorage.removeItem("currentChatSessionId")},[d]),(0,n.jsx)(i.Provider,{value:{selectedSession:r,setSelectedSession:s,sessionMessages:a,setSessionMessages:l,showMessagesTree:c,setShowMessagesTree:u,currentSessionId:d,setCurrentSessionId:h,scrollToMessageIndex:f,setScrollToMessageIndex:p},children:t})},a=()=>{let e=(0,o.useContext)(i);if(!e)throw Error("useChat must be used within a ChatProvider");return e}},34069:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return tx}});var n,o=r(85893);r(80876),r(19983);var i="undefined"==typeof window||"Deno"in globalThis;function s(){}function a(e,t){return"function"==typeof e?e(t):e}function l(e,t){let{type:r="all",exact:n,fetchStatus:o,predicate:i,queryKey:s,stale:a}=e;if(s){if(n){if(t.queryHash!==u(s,t.options))return!1}else if(!h(t.queryKey,s))return!1}if("all"!==r){let e=t.isActive();if("active"===r&&!e||"inactive"===r&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&(!o||o===t.state.fetchStatus)&&(!i||!!i(t))}function c(e,t){let{exact:r,status:n,predicate:o,mutationKey:i}=e;if(i){if(!t.options.mutationKey)return!1;if(r){if(d(t.options.mutationKey)!==d(i))return!1}else if(!h(t.options.mutationKey,i))return!1}return(!n||t.state.status===n)&&(!o||!!o(t))}function u(e,t){return(t?.queryKeyHashFn||d)(e)}function d(e){return JSON.stringify(e,(e,t)=>p(t)?Object.keys(t).sort().reduce((e,r)=>(e[r]=t[r],e),{}):t)}function h(e,t){return e===t||typeof e==typeof t&&!!e&&!!t&&"object"==typeof e&&"object"==typeof t&&Object.keys(t).every(r=>h(e[r],t[r]))}function f(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function p(e){if(!m(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!!(m(r)&&r.hasOwnProperty("isPrototypeOf"))&&Object.getPrototypeOf(e)===Object.prototype}function m(e){return"[object Object]"===Object.prototype.toString.call(e)}function g(e,t,r=0){let n=[...e,t];return r&&n.length>r?n.slice(1):n}function v(e,t,r=0){let n=[t,...e];return r&&n.length>r?n.slice(0,-1):n}var y=Symbol();function b(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==y?e.queryFn:()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`))}var w=e=>setTimeout(e,0),x=function(){let e=[],t=0,r=e=>{e()},n=e=>{e()},o=w,i=n=>{t?e.push(n):o(()=>{r(n)})},s=()=>{let t=e;e=[],t.length&&o(()=>{n(()=>
1{t.forEach(e=>{r(e)})})})};return{batch:e=>{let r;t++;try{r=e()}finally{--t||s()}return r},batchCalls:e=>(...t)=>{i(()=>{e(...t)})},schedule:i,setNotifyFunction:e=>{r=e},setBatchNotifyFunction:e=>{n=e},setScheduler:e=>{o=e}}}(),E=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},_=new class extends E{#e;#t;#r;constructor(){super(),this.#r=e=>{if(!i&&window.addEventListener){let t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:globalThis.document?.visibilityState!=="hidden"}},S=new class extends E{#n=!0;#t;#r;constructor(){super(),this.#r=e=>{if(!i&&window.addEventListener){let t=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",r)}}}}onSubscribe(){this.#t||this.setEventListener(this.#r)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#r=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#n!==e&&(this.#n=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#n}};function k(e){return Math.min(1e3*2**e,3e4)}function j(e){return(e??"online")!=="online"||S.isOnline()}var A=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function I(e){return e instanceof A}function C(e){let t,r=!1,n=0,o=!1,s=function(){let e,t;let r=new Promise((r,n)=>{e=r,t=n});function n(e){Object.assign(r,e),delete r.resolve,delete r.reject}return r.status="pending",r.catch(()=>{}),r.resolve=t=>{n({status:"fulfilled",value:t}),e(t)},r.reject=e=>{n({status:"rejected",reason:e}),t(e)},r}(),a=()=>_.isFocused()&&("always"===e.networkMode||S.isOnline())&&e.canRun(),l=()=>j(e.networkMode)&&e.canRun(),c=r=>{o||(o=!0,e.onSuccess?.(r),t?.(),s.resolve(r))},u=r=>{o||(o=!0,e.onError?.(r),t?.(),s.reject(r))},d=()=>new Promise(r=>{t=e=>{(o||a())&&r(e)},e.onPause?.()}).then(()=>{t=void 0,o||e.onContinue?.()}),h=()=>{let t;if(o)return;let s=0===n?e.initialPromise:void 0;try{t=s??e.fn()}catch(e){t=Promise.reject(e)}Promise.resolve(t).then(c).catch(t=>{if(o)return;let s=e.retry??(i?0:3),l=e.retryDelay??k,c="function"==typeof l?l(n,t):l,f=!0===s||"number"==typeof s&&n<s||"function"==typeof s&&s(n,t);if(r||!f){u(t);return}n++,e.onFail?.(n,t),new Promise(e=>{setTimeout(e,c)}).then(()=>a()?void 0:d()).then(()=>{r?u(t):h()})})};return{promise:s,cancel:t=>{o||(u(new A(t)),e.abort?.())},continue:()=>(t?.(),s),cancelRetry:()=>{r=!0},continueRetry:()=>{r=!1},canStart:l,start:()=>(l()?h():d().then(h),s)}}var O=class{#o;destroy(){this.clearGcTimeout()}scheduleGc(){var e;this.clearGcTimeout(),"number"==typeof(e=this.gcTime)&&e>=0&&e!==1/0&&(this.#o=setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(i?1/0:3e5))}clearGcTimeout(){this.#o&&(clearTimeout(this.#o),this.#o=void 0)}},N=class extends O{#i;#s;#a;#l;#c;#u;#d;constructor(e){super(),this.#d=!1,this.#u=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#l=e.client,this.#a=this.#l.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#i=function(e){let t="function"==typeof e.initialData?e.initialData():e.initialData,r=void 0!==t,n=r?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:r?n??Date.now():0,error:null,errorUpdate
1Count:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:r?"success":"pending",fetchStatus:"idle"}}(this.options),this.state=e.state??this.#i,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#c?.promise}setOptions(e){this.options={...this.#u,...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#a.remove(this)}setData(e,t){var r,n;let o=(r=this.state.data,"function"==typeof(n=this.options).structuralSharing?n.structuralSharing(r,e):!1!==n.structuralSharing?function e(t,r){if(t===r)return t;let n=f(t)&&f(r);if(n||p(t)&&p(r)){let o=n?t:Object.keys(t),i=o.length,s=n?r:Object.keys(r),a=s.length,l=n?[]:{},c=0;for(let i=0;i<a;i++){let a=n?i:s[i];(!n&&o.includes(a)||n)&&void 0===t[a]&&void 0===r[a]?(l[a]=void 0,c++):(l[a]=e(t[a],r[a]),l[a]===t[a]&&void 0!==t[a]&&c++)}return i===a&&c===i?t:l}return r}(r,e):e);return this.#h({data:o,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),o}setState(e,t){this.#h({type:"setState",state:e,setStateOptions:t})}cancel(e){let t=this.#c?.promise;return this.#c?.cancel(e),t?t.then(s).catch(s):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#i)}isActive(){return this.observers.some(e=>{var t;return!1!==("function"==typeof(t=e.options.enabled)?t(this):t)})}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===y||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return!!this.state.isInvalidated||(this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data)}isStaleByTime(e=0){return this.state.isInvalidated||void 0===this.state.data||!Math.max(this.state.dataUpdatedAt+(e||0)-Date.now(),0)}onFocus(){let e=this.observers.find(e=>e.shouldFetchOnWindowFocus());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}onOnline(){let e=this.observers.find(e=>e.shouldFetchOnReconnect());e?.refetch({cancelRefetch:!1}),this.#c?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#a.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#c&&(this.#d?this.#c.cancel({revert:!0}):this.#c.cancelRetry()),this.scheduleGc()),this.#a.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#h({type:"invalidate"})}fetch(e,t){if("idle"!==this.state.fetchStatus){if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#c)return this.#c.continueRetry(),this.#c.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let r=new AbortController,n=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#d=!0,r.signal)})},o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#l,state:this.state,fetchFn:()=>{let e=b(this.options,t),r={client:this.#l,queryKey:this.queryKey,meta:this.meta};return(n(r),this.#d=!1,this.options.persister)?this.options.persister(e,r,this):e(r)}};n(o),this.options.behavior?.onFetch(o,this),this.#s=this.state,("idle"===this.state.fetchStatus||this.state.fetchMeta!==o.fetchOptions?.meta)&&this.#h({type:"fetch",meta:o.fetchOptions?.meta});let i=e=>{I(e)&&e.silent||this.#h({type:"error",error:e}),I(e)||(this.#a.config.onError?.(e,this),this.#a.config.onSettled?.(this.state.data,e,this)),this.scheduleGc()};return this.#c=C({initialPromise:t?.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:e=>{if(void 0===e){i(Error(`${this.queryHash} data is undefined`));return}try{this.setData(e)}catch(e){i(e);return}this.#a.config.onSuccess?.(e,this),this.#a.config.onSettled?.(e,this.state.error,this),this.scheduleGc()},onError:i,onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:()=>{this.#h({type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0}),this.#c.start()}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":var r;return{...t,...(r=t.data,{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:j(this.options.networkMode)?"fetching":"paused",...void 0===r&&{error:null,status:"pending"}}),fetchMeta:e.meta??null};case"success":return{...t,data:e.data,dataUpdateCount:t.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":let n=e.error;if(I(n)&&n.revert&&this.#s)return{...this.#s,fetchStatus:"idle"};
1return{...t,error:n,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),x.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#a.notify({query:this,type:"updated",action:e})})}},T=class extends E{constructor(e={}){super(),this.config=e,this.#f=new Map}#f;build(e,t,r){let n=t.queryKey,o=t.queryHash??u(n,t),i=this.get(o);return i||(i=new N({client:e,queryKey:n,queryHash:o,options:e.defaultQueryOptions(t),state:r,defaultOptions:e.getQueryDefaults(n)}),this.add(i)),i}add(e){this.#f.has(e.queryHash)||(this.#f.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#f.get(e.queryHash);t&&(e.destroy(),t===e&&this.#f.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){x.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#f.get(e)}getAll(){return[...this.#f.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>l(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>l(e,t)):t}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){x.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){x.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},R=class extends O{#p;#m;#c;constructor(e){super(),this.mutationId=e.mutationId,this.#m=e.mutationCache,this.#p=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#p.includes(e)||(this.#p.push(e),this.clearGcTimeout(),this.#m.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#p=this.#p.filter(t=>t!==e),this.scheduleGc(),this.#m.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#p.length||("pending"===this.state.status?this.scheduleGc():this.#m.remove(this))}continue(){return this.#c?.continue()??this.execute(this.state.variables)}async execute(e){let t=()=>{this.#h({type:"continue"})};this.#c=C({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(Error("No mutationFn found")),onFail:(e,t)=>{this.#h({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#h({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#m.canRun(this)});let r="pending"===this.state.status,n=!this.#c.canStart();try{if(r)t();else{this.#h({type:"pending",variables:e,isPaused:n}),await this.#m.config.onMutate?.(e,this);let t=await this.options.onMutate?.(e);t!==this.state.context&&this.#h({type:"pending",context:t,variables:e,isPaused:n})}let o=await this.#c.start();return await this.#m.config.onSuccess?.(o,e,this.state.context,this),await this.options.onSuccess?.(o,e,this.state.context),await this.#m.config.onSettled?.(o,null,this.state.variables,this.state.context,this),await this.options.onSettled?.(o,null,e,this.state.context),this.#h({type:"success",data:o}),o}catch(t){try{throw await this.#m.config.onError?.(t,e,this.state.context,this),await this.options.onError?.(t,e,this.state.context),await this.#m.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this),await this.options.onSettled?.(void 0,t,e,this.state.context),t}finally{this.#h({type:"error",error:t})}}finally{this.#m.runNext(this)}}#h(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPau
1sed:!1,status:"error"}}})(this.state),x.batch(()=>{this.#p.forEach(t=>{t.onMutationUpdate(e)}),this.#m.notify({mutation:this,type:"updated",action:e})})}},P=class extends E{constructor(e={}){super(),this.config=e,this.#g=new Set,this.#v=new Map,this.#y=0}#g;#v;#y;build(e,t,r){let n=new R({mutationCache:this,mutationId:++this.#y,options:e.defaultMutationOptions(t),state:r});return this.add(n),n}add(e){this.#g.add(e);let t=U(e);if("string"==typeof t){let r=this.#v.get(t);r?r.push(e):this.#v.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#g.delete(e)){let t=U(e);if("string"==typeof t){let r=this.#v.get(t);if(r){if(r.length>1){let t=r.indexOf(e);-1!==t&&r.splice(t,1)}else r[0]===e&&this.#v.delete(t)}}}this.notify({type:"removed",mutation:e})}canRun(e){let t=U(e);if("string"!=typeof t)return!0;{let r=this.#v.get(t),n=r?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=U(e);if("string"!=typeof t)return Promise.resolve();{let r=this.#v.get(t)?.find(t=>t!==e&&t.state.isPaused);return r?.continue()??Promise.resolve()}}clear(){x.batch(()=>{this.#g.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#g.clear(),this.#v.clear()})}getAll(){return Array.from(this.#g)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>c(t,e))}findAll(e={}){return this.getAll().filter(t=>c(e,t))}notify(e){x.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>
1e.state.isPaused);return x.batch(()=>Promise.all(e.map(e=>e.continue().catch(s))))}};function U(e){return e.options.scope?.id}function L(e){return{onFetch:(t,r)=>{let n=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,i=t.state.data?.pages||[],s=t.state.data?.pageParams||[],a={pages:[],pageParams:[]},l=0,c=async()=>{let r=!1,c=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(t.signal.aborted?r=!0:t.signal.addEventListener("abort",()=>{r=!0}),t.signal)})},u=b(t.options,t.fetchOptions),d=async(e,n,o)=>{if(r)return Promise.reject();if(null==n&&e.pages.length)return Promise.resolve(e);let i={client:t.client,queryKey:t.queryKey,pageParam:n,direction:o?"backward":"forward",meta:t.options.meta};c(i);let s=await u(i),{maxPages:a}=t.options,l=o?v:g;return{pages:l(e.pages,s,a),pageParams:l(e.pageParams,n,a)}};if(o&&i.length){let e="backward"===o,t={pages:i,pageParams:s},r=(e?function(e,{pages:t,pageParams:r}){return t.length>0?e.getPreviousPageParam?.(t[0],t,r[0],r):void 0}:B)(n,t);a=await d(t,r,e)}else{let t=e??i.length;do{let e=0===l?s[0]??n.initialPageParam:B(n,a);if(l>0&&null==e)break;a=await d(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},r):t.fetchFn=c}}}function B(e,{pages:t,pageParams:r}){let n=t.length-1;return t.length>0?e.getNextPageParam(t[n],t,r[n],r):void 0}var M=class{#b;#m;#u;#w;#x;#E;#_;#S;constructor(e={}){this.#b=e.queryCache||new T,this.#m=e.mutationCache||new P,this.#u=e.defaultOptions||{},this.#w=new Map,this.#x=new Map,this.#E=0}mount(){this.#E++,1===this.#E&&(this.#_=_.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#b.onFocus())}),this.#S=S.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#b.onOnline())}))}unmount(){this.#E--,0===this.#E&&(this.#_?.(),this.#_=void 0,this.#S?.(),this.#S=void 0)}isFetching(e){return this.#b.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#m.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#b.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),r=this.#b.build(this,t),n=r.state.data;return void 0===n?this.fetchQuery(e):(e.revalidateIfStale&&r.isStaleByTime(a(t.staleTime,r))&&this.prefetchQuery(t),Promise.resolve(n))}getQueriesData(e){return this.#b.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,r){let n=this.defaultQueryOptions({queryKey:e}),o=this.#b.get(n.queryHash),i=o?.state.data,s="function"==typeof t?t(i):t;if(void 0!==s)return this.#b.build(this,n).setData(s,{...r,manual:!0})}setQueriesData(e,t,r){return x.batch(()=>this.#b.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,r)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#b.get(t.queryHash)?.state}removeQueries(e){let t=this.#b;x.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let r=this.#b;return x.batch(()=>(r.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let r={revert:!0,...t};return Promise.all(x.batch(()=>this.#b.findAll(e).map(e=>e.cancel(r)))).then(s).catch(s)}invalidateQueries(e,t={}){return x.batch(()=>(this.#b.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let r={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(x.batch(()=>this.#b.findAll(e).filter(e=>!e.isDisabled()).map(e=>{let t=e.fetch(void 0,r);return r.throwOnError||(t=t.catch(s)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(s)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let r=this.#b.build(this,t);return r.isStaleByTime(a(t.staleTime,r))?r.fetch(t):Promise.resolve(r.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(s).catch(s)}fetchInfiniteQuery(e){return e.behavior=L(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(s).catch(s)}ensureInfiniteQueryData(e){return e.behavior=L(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return S.isOnline()?this.#m.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#b}getMutationCache(){return this.#m}getDefaultOptions(){return this.#u}setDefaultOptions(e){this.#u=e}setQueryDefaults(e,t){this.#w.set(d(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#w.values()],r={};return t.forEach(t=>{h(e,t.queryKey)&&Object.assign(r,t.defaultOptions)}),r}setMutationDefaults(e,t){this.#x.set(d(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#x.values()],r={};return t.forEach(t=>{h(e,t.mutationKey)&&Object.assign(r,t.defaultOptions)}),r}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#u.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=u(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===y&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#u.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#b.clear(),this.#m.clear()}},D=r(67294),F=D.createContext(void 0),q=({client:e,children:t})=>(D.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,o.jsx)(F.Provider,{value:e,children:t})),z=r(9008),$=r.n(z),H=r(11163),Z=r(4298),G=r.n(Z),W=r(79867),K=r(41961),Q=r(36197),J=r(16883),V=r(69530),X=r(62190),Y=r(60641),ee=r(83989),et=r(96286),er=r(6733),en=r(29204);let eo=e=>{var t,r;return null!==(r=null===(t=e.data)||void 0===t?void 0:t.data)&&void 0!==r?r:e.data},ei=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"monthly",r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"USD";try{let n=await er.ZP.post("/v1/studio/subscription/create-order",{plan_id:e,billing_cycle:t,currency:r}),o=eo(n)||n.data;if(!(null==o?void 0:o.order_id))return null;return{order_id:o.order_id,amount:Number(o.amount||0),currency:o.currency||r,is_trial:!!o.is_trial,plan_id:o.plan_id||e}}catch(e){if(e instanceof en.d7){var n,o;throw Error((null===(o=e.response)||void 0===o?void 0:null===(n=o.data)||void 0===n?void 0:n.detail)||e.message)}throw e}},es=async e=>{let t=await er.ZP.post("/v1/studio/subscription/verify",e);return eo(t)||t.data},ea=async()=>{let e=await ei("starter","monthly","USD");if(!e)throw Error("Unable to start the Studio trial.");return(e.is_trial||0===e.amount)&&await es({order_id:e.order_id,payment_id:"free_trial",signature:"trial",plan_id:"starter",billing_cycle:"monthly"}),e},el="oneinfer:studio-plan-error",ec={PLAN_RESOLUTION_LIMIT_EXCEEDED:{recommendedPlan:"creator",title:"Unlock higher export resolution",description:"Your current Studio plan cannot export at this resolution. Upgrade to Creator ($9.90) for 1080p or Pro ($24.90) for watermark-free 4K."},ACTOR_LIMIT_EXCEEDED:{recommendedPlan:"creator",title:"Character vault is full",description:"This plan has used all of its actor slots. Upgrade to add more characters to your Studio vault."},SEEDANCE_SLOT_LIMIT_EXCEEDED:{recommendedPlan:"pro",title:"Seedance face slots are full",description:"KYC face registrations exceed your plan allowance (1 / 5 / 15 / 30). Upgrade or wait for an active slot to expire."},HTTP_413_CONTENT_TOO_LARGE:{recommendedPlan:"pro",title:"Vault storage quota exceeded",description:"This upload exceeds your Studio vault quota (100MB / 1GB / 5GB / 50GB). Upgrade to continue storing assets."}},eu={PLAN_RESOLUTION_LIMIT_EXCEEDED:"PLAN_RESOLUTION_LIMIT_EXCEEDED",ACTOR_LIMIT_EXCEEDED:"ACTOR_LIMIT_EXCEEDED",SEEDANCE_SLOT_LIMIT_EXCEEDED:"SEEDANCE_SLOT_LIMIT_EXCEEDED",HTTP_413_CONTENT_TOO_LARGE:"HTTP_413_CONTENT_TOO_LARGE",CONTENT_TOO_LARGE:"HTTP_413_CONTENT_TOO_LARGE"},ed=e=>{var t,r,n,o;let i=null===(t=e.response)||void 0===t?void 0:t.data;return{code:(null==i?void 0:null===(r=i.error)||void 0===r?void 0:r.code)||(null==i?void 0:i.code)||(null==i?void 0:null===(n=i.detail)||void 0===n?void 0:n.code)||e.code,status:(null===(o=e.response)||void 0===o?void 0:o.status)||e.status}};var eh=r(62506);let ef={starter:{name:"Starter",price:"$4.90 / mo"},creator:{name:"Creator",price:"$9.90 / mo"},pro:{name:"Studio Pro",price:"$24.90 / mo"},enterprise:{name:"Enterprise",price:"$99.00 / mo"}},ep=()=>{let[e,t]=(0,D.useState)(null);return((0,D.useEffect)(()=>{let e=er.ZP.interceptors.response.use(e=>e,e=>
1((function(e){let t=function(e){let{code:t,status:r}=ed(e),n=t?eu[String(t).toUpperCase()]:void 0;return n?{code:n,httpStatus:r||("HTTP_413_CONTENT_TOO_LARGE"===n?413:403),...ec[n]}:413===r?{code:"HTTP_413_CONTENT_TOO_LARGE",httpStatus:413,...ec.HTTP_413_CONTENT_TOO_LARGE}:null}(e);t&&window.dispatchEvent(new CustomEvent(el,{detail:t}))})(e),Promise.reject(e))),r=e=>{let r=e.detail;r&&t(r)};return window.addEventListener(el,r),()=>{er.ZP.interceptors.response.eject(e),window.removeEventListener(el,r)}},[]),e)?(0,o.jsx)(em,{error:e,onClose:()=>t(null)}):null},em=e=>{let{error:t,onClose:r}=e,[n,i]=(0,D.useState)(!1),[s,a]=(0,D.useState)(null),[l,c]=(0,D.useState)(),u=async e=>{i(!0),a(null);try{if("starter"===e){let t=await ea();if(t.is_trial||0===t.amount){a("Starter trial activated for 30 days. 500 Studio credits are ready to use.");return}c({amount:t.amount,currency:t.currency,orderId:t.order_id,planId:e});return}let t=await ei(e,"monthly","USD");if(!t)throw Error("Unable to create a Studio upgrade order.");c({amount:t.amount,currency:t.currency,orderId:t.order_id,planId:e})}catch(e){a(e instanceof Error?e.message:"Unable to start Studio checkout.")}finally{i(!1)}},d=ef[t.recommendedPlan],h="creator"===t.recommendedPlan?"pro":"creator";return(0,o.jsxs)("div",{className:"fixed inset-0 z-[10000] flex items-center justify-center bg-slate-950/80 p-4 backdrop-blur-sm",children:[(0,o.jsxs)("div",{className:"w-full max-w-lg rounded-2xl border border-slate-800 bg-slate-950 p-6 shadow-2xl",children:[(0,o.jsxs)("div",{className:"flex items-start justify-between gap-4",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-xs font-semibold uppercase tracking-wide text-indigo-300",children:"Studio plan limit"}),(0,o.jsx)("h3",{className:"mt-1 text-xl font-semibold text-white",children:t.title})]}),(0,o.jsx)("button",{onClick:r,className:"text-slate-400 hover:text-white","aria-label":"Close upgrade modal",children:(0,o.jsx)(X.Z,{className:"h-5 w-5"})})]}),(0,o.jsx)("p",{className:"mt-3 text-sm leading-6 text-slate-300",children:t.description}),(0,o.jsxs)("div",{className:"mt-5 grid gap-3 sm:grid-cols-2",children:[(0,o.jsxs)("button",{type:"button",disabled:n,onClick:()=>u(t.recommendedPlan),className:"rounded-xl bg-gradient-to-r from-indigo-500 to-violet-500 px-4 py-3 text-left text-sm font-semibold text-white",children:["Upgrade to ",d.name,(0,o.jsx)("span",{className:"mt-1 block text-xs font-normal text-indigo-100",children:d.price})]}),(0,o.jsxs)("button",{type:"button",disabled:n,onClick:()=>u(h),className:"rounded-xl border border-slate-700 px-4 py-3 text-left text-sm font-semibold text-slate-200 hover:border-indigo-400",children:["Compare ",ef[h].name,(0,o.jsx)("span",{className:"mt-1 block text-xs font-normal text-slate-400",children:ef[h].price})]})]}),"HTTP_413_CONTENT_TOO_LARGE"===t.code&&(0,o.jsx)("div",{className:"mt-4 h-2 overflow-hidden rounded-full bg-slate-800",children:(0,o.jsx)("div",{className:"h-full w-full rounded-full bg-gradient-to-r from-rose-500 to-orange-400"})}),s&&(0,o.jsx)("p",{className:"mt-4 text-sm text-emerald-300",children:s}),n&&(0,o.jsxs)("p",{className:"mt-4 flex items-center gap-2 text-sm text-slate-400",children:[(0,o.jsx)(Y.Z,{className:"h-4 w-4 animate-spin"})," Preparing checkoutâ¦"]}),(0,o.jsxs)("a",{href:eh.O2,target:"_blank",rel:"noreferrer",className:"mt-5 inline-flex items-center gap-1 text-sm text-indigo-300 hover:text-white",children:["Open OneInfer Studio ",(0,o.jsx)(ee.Z,{className:"h-4 w-4"})]})]}),l&&(0,o.jsx)(et.Z,{autoInitialize:!0,paymentDetails:l,onPaymentSuccess:async e=>{await es({order_id:l.orderId,payment_id:e.razorpay_payment_id,signature:e.razorpay_signature,plan_id:l.planId,billing_cycle:"monthly"}),a("".concat(ef[l.planId].name," is now active.")),c(void 0)},onPaymentFailure:()=>{c(void 0),a("Payment was not completed. Please try again.")}})]})};var eg=()=>{let{toasts:e,removeToast:t}=(0,J.p)();return 0===e.length?null:(0,o.jsx)("div",{className:"fixed top-4 right-4 z-50 space-y-3 max-w-md",children:e.map(e=>(0,o.jsx)("div",{className:"p-4 rounded-md shadow-lg transform transition-all duration-300 animate-fadeInDown\n ".concat("error"===e.type?"bg-gradient-to-r from-red-500 to-pink-600":"warning"===e.type?"bg-gradient-to-r from-yellow-400 to-orange-500":"success"===e.type?"bg-gradient-to-r from-green-500 to-emerald-600":"bg-gradient-to-r from-blue-500 to-indigo-600"," \n text-white"),children:(0,o.jsxs)("div",{className:"flex items-center",children:[(0,o.jsxs)("div",{className:"flex-shrink-0",children:["error"===e.type&&(0,o.jsx)("svg",{className:"h-5 w-5 text-white",viewBox:"0 0 20 20",fill:"currentColor",children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),"warning"===e.type&&(0,o.jsx)("svg",{className:"h-5 w-5 text-white",viewBox:"0 0 20 20",fill:"CurrentColor",children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),"success"===e.type&&(0,o.jsx)("svg",{className:"h-5 w-5 text-white",viewBox:"0 0 20 20",fill:"currentColor",children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),"info"===e.type&&(0,o.jsx)("svg",{className:"h-5 w-5 text-white",viewBox:"0 0 20 20",fill:"currentColor",children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})})]}),(0,o.jsx)("div",{className:"ml-3 flex-1",children:(0,o.jsx)("p",{className:"text-sm font-medium text-white",children:e.message})}),(0,o.jsx)("div",{className:"ml-auto pl-3",children:(0,o.jsxs)("button",{onClick:()=>t(e.id),className:"inline-flex rounded-md p-1.5 text-white hover:bg-opacity-20 hover:bg-white focus:outline-none",children:[(0,o.jsx)("span",{className:"sr-only",children:"Dismiss"}),(0,o.jsx)("svg",{className:"h-5 w-5",viewBox:"0 0 20 20",fill:"currentColor",children:(0,o.jsx)("path",{fillRule:"evenodd",d:"M4.293 4.293a1 1 0 011.414 0L10 8.586l4.293-4.293a1 1 0 111.414 1.414L11.414 10l4.293 4.293a1 1 0 01-1.414 1.414L10 11.414l-4.293 4.293a1 1 0 01-1.414-1.414L8.586 10 4.293 5.707a1 1 0 010-1.414z",clipRule:"evenodd"})})]})})]})},e.id))})},ev=(r(69590),r(41143),r(96774)),ey=((n=ey||{}).BASE="base",n.BODY="body",n.HEAD="head",n.HTML="html",n.LINK="link",n.META="meta",n.NOSCRIPT="noscript",n.SCRIPT="script",n.STYLE="style",n.TITLE="title",n.FRAGMENT="Symbol(react.fragment)",n),eb={rel:["amphtml","canonical","alternate"]},ew={type:["application/ld+json"]}
1,ex={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},eE=(Object.values(ey),{accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"}),e_=(Object.entries(eE).reduce((e,[t,r])=>(e[r]=t,e),{}),"data-rh"),eS=(e,t)=>{for(let r=e.length-1;r>=0;r-=1){let n=e[r];if(Object.prototype.hasOwnProperty.call(n,t))return n[t]}return null},ek=e=>{let t=eS(e,"title"),r=eS(e,"titleTemplate");if(Array.isArray(t)&&(t=t.join("")),r&&t)return r.replace(/%s/g,()=>t);let n=eS(e,"defaultTitle");return t||n||void 0},ej=e=>eS(e,"onChangeClientState")||(()=>{}),eA=(e,t)=>t.filter(t=>void 0!==t[e]).map(t=>t[e]).reduce((e,t)=>({...e,...t}),{}),eI=(e,t)=>t.filter(e=>void 0!==e.base).map(e=>e.base).reverse().reduce((t,r)=>{if(!t.length){let n=Object.keys(r);for(let o=0;o<n.length;o+=1){let i=n[o].toLowerCase();if(-1!==e.indexOf(i)&&r[i])return t.concat(r)}}return t},[]),eC=e=>console&&"function"==typeof console.warn&&console.warn(e),eO=(e,t,r)=>{let n={};return r.filter(t=>!!Array.isArray(t[e])||(void 0!==t[e]&&eC(`Helmet: ${e} should be of type "Array". Instead found type "${typeof t[e]}"`),!1)).map(t=>t[e]).reverse().reduce((e,r)=>{let o={};r.filter(e=>{let r;let i=Object.keys(e);for(let n=0;n<i.length;n+=1){let o=i[n],s=o.toLowerCase();-1===t.indexOf(s)||"rel"===r&&"canonical"===e[r].toLowerCase()||"rel"===s&&"stylesheet"===e[s].toLowerCase()||(r=s),-1!==t.indexOf(o)&&("innerHTML"===o||"cssText"===o||"itemprop"===o)&&(r=o)}if(!r||!e[r])return!1;let s=e[r].toLowerCase();return n[r]||(n[r]={}),o[r]||(o[r]={}),!n[r][s]&&(o[r][s]=!0,!0)}).reverse().forEach(t=>e.push(t));let i=Object.keys(o);for(let e=0;e<i.length;e+=1){let t=i[e],r={...n[t],...o[t]};n[t]=r}return e},[]).reverse()},eN=(e,t)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][t])return!0}return!1},eT=e=>Array.isArray(e)?e.join(""):e,eR=(e,t)=>{let r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(t[r[n]]&&t[r[n]].includes(e[r[n]]))return!0;return!1},eP=(e,t)=>Array.isArray(e)?e.reduce((e,r)=>(eR(r,t)?e.priority.push(r):e.default.push(r),e),{priority:[],default:[]}):{default:e,priority:[]},eU=["noscript","script","style"],eL=(e,t=!0)=>!1===t?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),eB=e=>Object.keys(e).reduce((t,r)=>{let n=void 0!==e[r]?`${r}="${e[r]}"`:`${r}`;return t?`${t} ${n}`:n},""),eM=(e,t,r,n)=>{let o=eB(r),i=eT(t);return o?`<${e} ${e_}="true" ${o}>${eL(i,n)}</${e}>`:`<${e} ${e_}="true">${eL(i,n)}</${e}>`},eD=(e,t,r=!0)=>t.reduce((t,n)=>{let o=Object.keys(n).filter(e=>!("innerHTML"===e||"cssText"===e)).reduce((e,t)=>{let o=void 0===n[t]?t:`${t}="${eL(n[t],r)}"`;return e?`${e} ${o}`:o},""),i=n.innerHTML||n.cssText||"",s=-1===eU.indexOf(e);return`${t}<${e} ${e_}="true" ${o}${s?"/>":`>${i}</${e}>`}`},""),eF=(e,t={})=>Object.keys(e).reduce((t,r)=>(t[eE[r]||r]=e[r],t),t),eq=(e,t,r)=>{let n=eF(r,{key:t,[e_]:!0});return[D.createElement("title",n,t)]},ez=(e,t)=>t.map((t,r)=>{let n={key:r,[e_]:!0};return Object.keys(t).forEach(e=>{let r=eE[e]||e;if("innerHTML"===r||"cssText"===r){let e=t.innerHTML||t.cssText;n.dangerouslySetInnerHTML={__html:e}}else n[r]=t[e]}),D.createElement(e,n)}),e$=(e,t,r=!0)=>{switch(e){case"title":return{toComponent:()=>eq(e,t.title,t.titleAttributes),toString:()=>eM(e,t.title,t.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>eF(t),toString:()=>eB(t)};default:return{toComponent:()=>ez(e,t),toString:()=>eD(e,t,r)}}},eH=({metaTags:e,linkTags:t,scriptTags:r,encode:n})=>{let o=eP(e,ex),i=eP(t,eb),s=eP(r,ew);return{priorityMethods:{toComponent:()=>[...ez("meta",o.priority),...ez("link",i.priority),...ez("script",s.priority)],toString:()=>`${e$("meta",o.priority,n)} ${e$("link",i.priority,n)} ${e$("script",s.priority,n)}`},metaTags:o.default,linkTags:i.default,scriptTags:s.default}},eZ=e=>{let{baseTag:t,bodyAttributes:r,encode:n=!0,htmlAttributes:o,noscriptTags:i,styleTags:s,title:a="",titleAttributes:l,prioritizeSeoTags:c}=e,{linkTags:u,metaTags:d,scriptTags:h}=e,f={toComponent:()=>{},toString:()=>""};return c&&({priorityMethods:f,linkTags:u,metaTags:d,scriptTags:h}=eH(e)),{priority:f,base:e$("base",t,n),bodyAttributes:e$("bodyAttributes",r,n),htmlAttributes:e$("htmlAttributes",o,n),link:e$("link",u,n),meta:e$("meta",d,n),noscript:e$("noscript",i,n),script:e$("script",h,n),style:e$("style",s,n),title:e$("title",{title:a,titleAttributes:l},n)}},eG=[],eW=!!("undefined"!=typeof window&&window.document&&window.document.createElement),eK=class{instances=[];canUseDOM=eW;context;value={setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?eG:this.instances,add:e=>{(this.canUseDOM?eG:this.instances).push(e)},remove:e=>{let t=(this.canUseDOM?eG:this.instances).indexOf(e);(this.canUseDOM?eG:this.instances).splice(t,1)}}};constructor(e,t){this.context=e,this.canUseDOM=t||!1,t||(e.helmet=eZ({baseTag:[],bodyAttributes:{},encodeSpecialCharacters:!0,htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},eQ=D.createContext({}),eJ=class e extends D.Component{static canUseDOM=eW;helmetData;constructor(t){super(t),this.helmetData=new eK(this.props.context||{},e.canUseDOM)}render(){return D.createElement(eQ.Provider,{value:this.helmetData.value},this.props.children)}},eV=(e,t)=>{let r;let n=document.head||document.querySelector("head"),o=n.querySelectorAll(`${e}[${e_}]`),i=[].slice.call(o),s=[];return t&&t.length&&t.forEach(t=>{let n=document.createElement(e);for(let e in t)if(Object.prototype.hasOwnProperty.call(t,e)){if("innerHTML"===e)n.innerHTML=t.innerHTML;else if("cssText"===e)n.styleSheet?n.styleSheet.cssText=t.cssText:n.appendChild(document.createTextNode(t.cssText));
1else{let r=void 0===t[e]?"":t[e];n.setAttribute(e,r)}}n.setAttribute(e_,"true"),i.some((e,t)=>(r=t,n.isEqualNode(e)))?i.splice(r,1):s.push(n)}),i.forEach(e=>e.parentNode?.removeChild(e)),s.forEach(e=>n.appendChild(e)),{oldTags:i,newTags:s}},eX=(e,t)=>{let r=document.getElementsByTagName(e)[0];if(!r)return;let n=r.getAttribute(e_),o=n?n.split(","):[],i=[...o],s=Object.keys(t);for(let e of s){let n=t[e]||"";r.getAttribute(e)!==n&&r.setAttribute(e,n),-1===o.indexOf(e)&&o.push(e);let s=i.indexOf(e);-1!==s&&i.splice(s,1)}for(let e=i.length-1;e>=0;e-=1)r.removeAttribute(i[e]);o.length===i.length?r.removeAttribute(e_):r.getAttribute(e_)!==s.join(",")&&r.setAttribute(e_,s.join(","))},eY=(e,t)=>{void 0!==e&&document.title!==e&&(document.title=eT(e)),eX("title",t)},e0=(e,t)=>{let{baseTag:r,bodyAttributes:n,htmlAttributes:o,linkTags:i,metaTags:s,noscriptTags:a,onChangeClientState:l,scriptTags:c,styleTags:u,title:d,titleAttributes:h}=e;eX("body",n),eX("html",o),eY(d,h);let f={baseTag:eV("base",r),linkTags:eV("link",i),metaTags:eV("meta",s),noscriptTags:eV("noscript",a),scriptTags:eV("script",c),styleTags:eV("style",u)},p={},m={};Object.keys(f).forEach(e=>{let{newTags:t,oldTags:r}=f[e];t.length&&(p[e]=t),r.length&&(m[e]=f[e].oldTags)}),t&&t(),l(e,p,m)},e1=null;D.Component,D.Component;var e2=r(19563);function e4(){let e=(0,H.useRouter)(),[t,r]=(0,D.useState)(!1);return e.pathname.startsWith("/console")?(0,o.jsxs)(o.Fragment,{children:[t&&(0,o.jsx)(e2.Z,{onClose:()=>r(!1)}),(0,o.jsx)("button",{type:"button",onClick:()=>r(!0),className:"fixed bottom-24 -right-10 z-[60] flex rotate-[-90deg] items-center justify-center rounded-xl bg-gradient-to-r from-violet-600 to-indigo-600 px-4 py-3 text-white shadow-lg transition-all duration-300 hover:from-violet-700 hover:to-indigo-700 focus:outline-none focus:ring-2 focus:ring-violet-500 focus:ring-offset-2","aria-label":"Open feedback",children:(0,o.jsx)("span",{className:"text-sm font-medium",children:"Feedback"})})]}):null}var e6=r(37482),e3=r(43106),e5=r(40885),e8=(0,e5.Z)("outline","antenna","IconAntenna",[["path",{d:"M20 4v8",key:"svg-0"}],["path",{d:"M16 4.5v7",key:"svg-1"}],["path",{d:"M12 5v16",key:"svg-2"}],["path",{d:"M8 5.5v5",key:"svg-3"}],["path",{d:"M4 6v4",key:"svg-4"}],["path",{d:"M20 8h-16",key:"svg-5"}]]),e7=(0,e5.Z)("outline","coin-off","IconCoinOff",[["path",{d:"M14.8 9a2 2 0 0 0 -1.8 -1h-1m-2.82 1.171a2 2 0 0 0 1.82 2.829h1m2.824 2.822a2 2 0 0 1 -1.824 1.178h-2a2 2 0 0 1 -1.8 -1",key:"svg-0"}],["path",{d:"M20.042 16.045a9 9 0 0 0 -12.087 -12.087m-2.318 1.677a9 9 0 1 0 12.725 12.73",key:"svg-1"}],["path",{d:"M12 6v2m0 8v2",key:"svg-2"}],["path",{d:"M3 3l18 18",key:"svg-3"}]]),e9=r(96715),te=r(21047),tt=r(70772),tr=r(30516),tn=(0,e5.Z)("outline","send","IconSend",[["path",{d:"M10 14l11 -11",key:"svg-0"}],["path",{d:"M21 3l-6.5 18a.55 .55 0 0 1 -1 0l-3.5 -7l-7 -3.5a.55 .55 0 0 1 0 -1l18 -6.5",key:"svg-1"}]]),to=r(1581);let ti="consoleAssistantApiKey";function ts(){return"https://api.oneinfer.ai".replace(/\/$/,"")}async function ta(){let e=await (0,to.Qd)({apiKeyName:"console-ai-assistant",environment:"production"});if(e.apiKey)return e;let t=await (0,to.Qd)({apiKeyName:"console-ai-assistant-".concat(Date.now().toString(36)),environment:"production"});return t.apiKey?t:{error:t.error||e.error||"Could not create assistant API key."}}let tl=async()=>{let e=ts(),t=localStorage.getItem("accessToken"),r=localStorage.getItem("developerId");if(!t||!r)return{error:"Not authenticated. Please log in and try again."};let n=localStorage.getItem(ti);if(!n){let e=await ta();if(!e.apiKey)return{error:e.error||"Could not create assistant API key. Please try again."};n=e.apiKey,localStorage.setItem(ti,n)}let o=async t=>{try{var r,n;let o=await fetch("".concat(e,"/v1/ula/oauth-authentication?api_key=").concat(encodeURIComponent(t)),{method:"POST",headers:{"ngrok-skip-browser-warning":"true"}}),i=await o.json();if((null==i?void 0:null===(r=i.api_details)||void 0===r?void 0:r.api_status)==="success"&&(null==i?void 0:null===(n=i.data)||void 0===n?void 0:n.access_token))return{token:i.data.access_token};return{error:""}}catch(e){return{error:"Network error during authentication."}}},i=await o(n);if(""===i.error){localStorage.removeItem(ti);let e=await ta();if(!e.apiKey)return{error:e.error||"Could not refresh assistant credentials. Please try again."};if(n=e.apiKey,localStorage.setItem(ti,n),""===(i=await o(n)).error)return{error:"API key authentication failed. Please try again."}}return i},tc=function(e,t,r,n,o){let i=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"google/gemma-4-31b-it",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:"novita",a=ts(),l=new AbortController,c=[{role:"system",content:"You are the oneinfer AI Console Assistant embedded directly in the developer console. You help developers take real actions and get things done on the platform.\n\n**Platform capabilities:**\n- **GPU Marketplace**: Deploy H100, A100, RTX 4090, and more from 10+ cloud providers (Novita, VastAI, Vultr, Nebius, RunPod, Hyperbolic, Fireworks, E2E Networks, Azure AI, etc.)\n- **Dedicated Endpoints**: Deploy any LLM on dedicated GPU infrastru
1cture for predictable, low-latency performance\n- **Intelligent Endpoints**: Auto-scaling serverless inference â pay only for what you use\n- **Models Marketplace**: 100+ LLMs â GPT-4o, Claude 3.5, Gemini 1.5, Llama 3, Mistral, DeepSeek, and more\n- **Storage**: Persistent S3-compatible storage for model weights, datasets, and outputs\n- **Training / GPU Orchestrator**: Multi-GPU distributed training jobs at scale\n- **Kernels**: Interactive Jupyter-like compute environments\n- **Evaluation**: Benchmark and compare models across standard metrics (MMLU, HumanEval, etc.)\n- **API Keys**: Generate and manage API keys for programmatic access\n- **Credits**: View usage, remaining credits, and buy more\n\n**Actions you can perform:**\nWhen the user wants to perform an action, always explain what you are doing first, then place ONE action tag on its own line at the very end of your response.\n\nAvailable actions:\n- <<ACTION:create_instance>> â User wants to deploy or create a GPU instance/server\n- <<ACTION:create_endpoint>> â User wants to create a dedicated or intelligent endpoint\n- <<ACTION:navigate:/console/path>> â Navigate user to any specific console page\n\nRules for action tags:\n- Output at most ONE action tag per response\n- The action tag must be on its own line at the very end, after all explanation text\n- Never output action tags in the middle of a response\n- Only use the exact action types listed above\n- For navigate, use the exact console path (e.g. <<ACTION:navigate:/console/credits>>)\n\n**Console navigation links â format as [Label](/console/path) for inline clickable links:**\n- GPU Instances: /console/gpu-marketplace/instance\n- Dedicated Endpoints: /console/dedicated-endpoints\n- Intelligent Endpoints: /console/intelligent-endpoints\n- Models: /console/models\n- Storage: /console/storage\n- API Keys: /console/api-keys\n- Credits: /console/credits\n- Playground: /console/playground\n\n**Response style:**\n- Be concise and action-oriented â 2-4 sentences before an action\n- Use **bold** for key terms and `code` for technical values\n- Bullet points for steps or lists of options\n- When you trigger an action, the UI will render an action card â you don't need to add extra navigation links for that same action"},...t];return(async()=>{try{var t,u,d,h,f;let p=await fetch("".concat(a,"/v1/ula/chat/completions"),{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer ".concat(e),"ngrok-skip-browser-warning":"true"},body:JSON.stringify({model:i,provider:s,messages:c,stream:!0,max_tokens:1024}),signal:l.signal});if(!p.ok){if(403===p.status)try{let e=await p.json(),r=null!==(u=null==e?void 0:null===(t=e.error)||void 0===t?void 0:t.error_description)&&void 0!==u?u:"";if(r.toLowerCase().includes("balance")||r.toLowerCase().includes("credit")){o("insufficient_credits",!0);return}}catch(e){}o("Assistant unavailable (".concat(p.status,"). Please try again."));return}if(!p.body){o("No response received from assistant.");return}let m=p.body.getReader(),g=new TextDecoder,v="";for(;;){let{done:e,value:t}=await m.read();if(e)break;let o=(v+=g.decode(t,{stream:!0})).split("\n");for(let e of(v=o.pop()||"",o)){if(!e.startsWith("data: "))continue;let t=e.slice(6).trim();if("[DONE]"===t){n();return}try{let e=JSON.parse(t),n=null===(f=e.choices)||void 0===f?void 0:null===(h=f[0])||void 0===h?void 0:null===(d=h.delta)||void 0===d?void 0:d.content;n&&r(n)}catch(e){}}}n()}catch(e){if((null==e?void 0:e.name)==="AbortError")return;o("Connection error. Please check your network and try again.")}})(),l},tu=/<<ACTION:([^:>\s]+)(?::([^>\s]*))?>>[\s]*$/;function td(e){let t=e.match(tu);return t?{clean:e.replace(tu,"").trim(),action:{type:t[1],params:t[2]}}:{clean:e.trim()}}let th=["Deploy a GPU instance","Create a dedicated endpoint","What models are available?","Explain dedicated vs intelligent endpoints","How do I manage API keys?"];function tf(e){let{text:t}=e,r=(0,H.useRouter)();return(0,o.jsx)(o.Fragment,{children:t.split("\n").map((e,t)=>(0,o.jsxs)(D.Fragment,{children:[t>0&&(0,o.jsx)("br",{}),(0,o.jsx)(tp,{line:e,router:r})]},t))})}function tp(e){let{line:t,router:r}=e,n=/^\s*[-*â¢]\s+/.test(t),i=n?t.replace(/^\s*[-*â¢]\s+/,""):t;return n?(0,o.jsxs)("span",{className:"flex items-start gap-1.5",children:[(0,o.jsx)("span",{className:"mt-[7px] h-1.5 w-1.5 rounded-full bg-violet-400 flex-shrink-0"}),(0,o.jsx)("span",{children:tm(i,r)})]}):(0,o.jsx)(o.Fragment,{children:tm(t,r)})}function tm(e,t){let r=[],n=/\*\*(.*?)\*\*|`([^`]+)`|\[([^\]]+)\]\(([^)]+)\)/g,i=0,s,a=0;for(;null!==(s=n.exec(e));){if(s.index>i&&r.push((0,o.jsx)("span",{children:e.slice(i,s.index)},a++)),void 0!==s[1])r.push((0,o.jsx)("strong",{className:"font-semibold",children:s[1]},a++));else if(void 0!==s[2])r.push((0,o.jsx)("code",{className:"bg-violet-50 text-violet-700 px-1.5 py-0.5 rounded text-xs font-mono",children:s[2]},a++));else if(void 0!==s[3]&&void 0!==s[4]){let e=s[4];e.startsWith("/")?r.push((0,o.jsxs)("button",{onClick:()=>t.push(e),className:"inline-flex items-center gap-1 px-2.5 py-0.5 text-xs bg-indigo-600 text-white rounded-full hover:bg-indigo-700 transition-colors mx-0.5 font-medium",children:[s[3]," â"]},a++)):r.push((0,o.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",className:"text-indigo-600 underline hover:text-indigo-800",children:s[3]},a++))}i=n.lastIndex}return i<e.length&&r.push((0,o.jsx)("span",{children:e.slice(i)},a++)),r.length?(0,o.jsx)(o.Fragment,{children:r}):(0,o.jsx)(o.Fragment,{children:e})}function tg(e){let{action:t,router:r}=e;if("create_instance"===t.type)return(0,o.jsxs)("div",{className:"mt-3 bg-violet-50 border border-violet-200 rounded-xl p-4",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,o.jsx)("div",{className:"h-7 w-7 rounded-lg bg-gradient-to-br from-violet-500 to-indigo-600 flex items-center justify-center flex-shrink-0",children:(0,o.jsx)(e6.Z,{className:"h-4 w-4 text-white"})}),(0,o.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Deploy GPU Instance"})]}),(0,o.jsx)("p",{className:"text-xs text-gray-600 mb-3",children:"Select your GPU type, cloud provider, and configuration in the GPU Marketplace."}),(0,o.jsxs)("button",{onClick:()=>r.push("/console/gpu-marketplace/instance"),className:"w-full py-2 text-xs font-semibold bg-gradient-to-r from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 text-white rounded-lg transition-all flex items-center justify-center gap-1.5",children:["Open GPU Marketplace ",(0,o.jsx)(e3.Z,{className:"h-3.5 w-3.5"})]})]});if("create_endpoint"===t.type)return(0,o.jsxs)("div",{className:"mt-3 bg-indigo-50 border border-indigo-200 rounded-xl p-4",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,o.jsx)("div",{className:"h-7 w-7 rounded-lg bg-gradient-to-br from-indigo-500 to-blue-600 flex items-center justify-center flex-shrink-0",children:(0,o.jsx)(e8,{className:"h-4 w-4 text-white"})}),(0,o.jsx)("span",{className:"text-sm font-semibold text-gray-900",children:"Create Dedicated Endpoint"})]}),(0,o.jsx)("p",{className:"text-xs text-gray-600 mb-3",children:"Deploy a model on dedicated GPU infrastru
1cture for predictable, low-latency performance."}),(0,o.jsxs)("button",{onClick:()=>r.push("/console/dedicated-endpoints"),className:"w-full py-2 text-xs font-semibold bg-gradient-to-r from-indigo-600 to-blue-600 hover:from-indigo-700 hover:to-blue-700 text-white rounded-lg transition-all flex items-center justify-center gap-1.5",children:["Create Endpoint ",(0,o.jsx)(e3.Z,{className:"h-3.5 w-3.5"})]})]});if("navigate"===t.type&&t.params){var n,i;let e=null!==(i=null===(n=t.params.split("/").filter(Boolean).pop())||void 0===n?void 0:n.replace(/-/g," "))&&void 0!==i?i:"page";return(0,o.jsx)("div",{className:"mt-3",children:(0,o.jsxs)("button",{onClick:()=>r.push(t.params),className:"w-full py-2 text-xs font-semibold bg-gray-100 hover:bg-gray-200 text-gray-700 rounded-lg transition-all flex items-center justify-center gap-1.5",children:["Go to ",e," ",(0,o.jsx)(e3.Z,{className:"h-3.5 w-3.5"})]})})}return null}function tv(e){let{router:t}=e;return(0,o.jsxs)("div",{className:"mt-3 bg-amber-50 border border-amber-200 rounded-xl p-4",children:[(0,o.jsxs)("div",{className:"flex items-center gap-2 mb-2",children:[(0,o.jsx)("div",{className:"h-7 w-7 rounded-lg bg-amber-100 flex items-center justify-center flex-shrink-0",children:(0,o.jsx)(e7,{className:"h-4 w-4 text-amber-600"})}),(0,o.jsx)("span",{className:"text-sm font-semibold text-amber-900",children:"Insufficient credits"})]}),(0,o.jsx)("p",{className:"text-xs text-amber-700 mb-3",children:"Your account doesn't have enough credits to use the AI assistant. Top up to continue."}),(0,o.jsxs)("button",{onClick:()=>t.push("/console/credits"),className:"w-full py-2 text-xs font-semibold bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 text-white rounded-lg transition-all flex items-center justify-center gap-1.5",children:["Top up credits ",(0,o.jsx)(e3.Z,{className:"h-3.5 w-3.5"})]})]})}function ty(e){let{onOpenChange:t}=e,r=(0,H.useRouter)(),[n,i]=(0,D.useState)(!1),[s,a]=(0,D.useState)(null),[l,c]=(0,D.useState)(!1),[u,d]=(0,D.useState)(null),[h,f]=(0,D.useState)(0),[p,m]=(0,D.useState)([]),[g,v]=(0,D.useState)(""),[y,b]=(0,D.useState)(!1),[w,x]=(0,D.useState)(""),[E,_]=(0,D.useState)(null),[S,k]=(0,D.useState)(!1),j=(0,D.useRef)(null),A=(0,D.useRef)(null),I=(0,D.useRef)(null),C=(0,D.useCallback)(e=>{i(e),null==t||t(e)},[t]);(0,D.useEffect)(()=>{n&&(s||(c(!0),d(null),tl().then(e=>{if("error"in e){var t;d(null!==(t=e.error)&&void 0!==t?t:"Failed to initialize the assistant.")}else a(e.token);c(!1)})))},[h,n,s]),(0,D.useEffect)(()=>{var e;null===(e=j.current)||void 0===e||e.scrollIntoView({behavior:"smooth"})},[p,w]);let O=(0,D.useCallback)(e=>{let t=e.trim();if(!t||y||!s)return;_(null),k(!1);let r=[...p,{role:"user",content:t}];m(r),v(""),b(!0),x(""),I.current&&(I.current.style.height="auto");let n=r.map(e=>({role:e.role,content:e.content})),o="";A.current=tc(s,n,e=>{x(o+=e)},()=>{let{clean:e,action:t}=td(o);m(r=>[...r,{role:"assistant",content:e,action:t}]),x(""),b(!1)},(e,t)=>{t?k(!0):_(e),b(!1),x("")})},[p,y,s]),N=p.length>0||y,T=w.replace(tu,"").trim(),R=!l&&!u&&s;return(0,o.jsxs)(o.Fragment,{children:[!n&&(0,o.jsx)("button",{onClick:()=>C(!0),className:"fixed bottom-6 right-6 z-30 h-14 w-14 rounded-2xl bg-gradient-to-br from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 flex items-center justify-center shadow-lg hover:shadow-xl transition-all group",title:"Open AI Assistant",children:(0,o.jsx)(e9.Z,{className:"h-6 w-6 text-white group-hover:scale-110 transition-transform"})}),(0,o.jsxs)("div",{className:"fixed top-0 right-0 h-full w-96 z-20 bg-white border-l border-gray-200 shadow-2xl flex flex-col transition-transform duration-300 ease-in-out ".concat(n?"translate-x-0":"translate-x-full"),children:[(0,o.jsxs)("div",{className:"flex items-center justify-between px-5 py-4 border-b border-gray-100 bg-gradient-to-r from-violet-50 to-indigo-50 flex-shrink-0",children:[(0,o.jsxs)("div",{className:"flex items-center gap-3",children:[(0,o.jsx)("div",{className:"h-8 w-8 rounded-xl bg-gradient-to-br from-violet-500 to-indigo-600 flex items-center justify-center shadow-sm",children:(0,o.jsx)(te.Z,{className:"h-4 w-4 text-white"})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-sm font-semibold text-gray-900",children:"AI Assistant"}),(0,o.jsx)("p",{className:"text-xs text-gray-500",children:"Instances \xb7 Endpoints \xb7 Guidance"})]})]}),(0,o.jsx)("button",{onClick:()=>{var e;null===(e=A.current)||void 0===e||e.abort(),m([]),x(""),b(!1),_(null),k(!1),v(""),C(!1)},className:"p-1.5 rounded-lg text-gray-400 hover:text-gray-700 hover:bg-white transition-colors",title:"Close",children:(0,o.jsx)(tt.Z,{className:"h-4 w-4"})})]}),(0,o.jsxs)("div",{className:"flex-1 overflow-y-auto px-4 py-4 flex flex-col gap-4 scrollbar-thin scrollbar-thumb-gray-200",children:[l&&(0,o.jsxs)("div",{className:"flex flex-col h-full items-center justify-center gap-3 text-center",children:[(0,o.jsx)(tr.Z,{className:"h-8 w-8 text-violet-500 animate-spin"}),(0,o.jsx)("p",{className:"text-sm text-gray-500",children:"Connecting assistantâ¦"})]}),u&&!l&&(0,o.jsxs)("div",{className:"flex flex-col h-full items-center justify-center gap-4 text-center px-2",children:[(0,o.jsx)("div",{className:"h-12 w-12 rounded-2xl bg-red-50 flex items-center justify-center",children:(0,o.jsx)(tt.Z,{className:"h-6 w-6 text-red-400"})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-sm font-semibold text-gray-800 mb
1-1",children:"Couldn't connect"}),(0,o.jsx)("p",{className:"text-xs text-gray-500",children:u})]}),(0,o.jsx)("button",{onClick:()=>{a(null),d(null),f(e=>e+1)},className:"text-xs px-4 py-2 rounded-lg bg-violet-600 text-white hover:bg-violet-700 transition-colors",children:"Retry"})]}),R&&!N&&(0,o.jsxs)("div",{className:"flex flex-col h-full items-center justify-center gap-5 text-center py-8",children:[(0,o.jsx)("div",{className:"h-16 w-16 rounded-2xl bg-gradient-to-br from-violet-100 to-indigo-100 flex items-center justify-center",children:(0,o.jsx)(e9.Z,{className:"h-8 w-8 text-violet-500"})}),(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"text-sm font-semibold text-gray-800 mb-1",children:"What can I help you with?"}),(0,o.jsxs)("p",{className:"text-xs text-gray-500 leading-relaxed",children:["I can deploy instances, create endpoints,",(0,o.jsx)("br",{}),"and guide you through the platform."]})]}),(0,o.jsx)("div",{className:"flex flex-col gap-2 w-full",children:th.map(e=>(0,o.jsx)("button",{onClick:()=>O(e),className:"text-left text-xs px-4 py-2.5 rounded-xl border border-gray-200 text-gray-700 hover:border-violet-300 hover:bg-violet-50 hover:text-violet-700 transition-colors",children:e},e))})]}),R&&N&&(0,o.jsxs)(o.Fragment,{children:[p.map((e,t)=>(0,o.jsxs)("div",{className:"flex gap-2 ".concat("user"===e.role?"flex-row-reverse":"flex-row"),children:["assistant"===e.role&&(0,o.jsx)("div",{className:"h-6 w-6 rounded-full bg-gradient-to-br from-violet-500 to-indigo-600 flex items-center justify-center flex-shrink-0 mt-0.5",children:(0,o.jsx)(te.Z,{className:"h-3.5 w-3.5 text-white"})}),(0,o.jsxs)("div",{className:"flex flex-col max-w-[85%]",children:[(0,o.jsx)("div",{className:"rounded-2xl px-3.5 py-2.5 text-sm leading-relaxed ".concat("user"===e.role?"bg-gradient-to-br from-violet-600 to-indigo-600 text-white rounded-tr-sm":"bg-gray-50 text-gray-800 rounded-tl-sm border border-gray-100"),children:"assistant"===e.role?(0,o.jsx)(tf,{text:e.content}):e.content}),"assistant"===e.role&&e.action&&(0,o.jsx)(tg,{action:e.action,router:r})]})]},t)),S&&(0,o.jsx)(tv,{router:r}),y&&(0,o.jsxs)("div",{className:"flex gap-2",children:[(0,o.jsx)("div",{className:"h-6 w-6 rounded-full bg-gradient-to-br from-violet-500 to-indigo-600 flex items-center justify-center flex-shrink-0 mt-0.5",children:(0,o.jsx)(te.Z,{className:"h-3.5 w-3.5 text-white"})}),(0,o.jsx)("div",{className:"max-w-[85%] rounded-2xl rounded-tl-sm px-3.5 py-2.5 text-sm leading-relaxed bg-gray-50 text-gray-800 border border-gray-100",children:T?(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(tf,{text:T}),(0,o.jsx)("span",{className:"animate-pulse text-violet-400 ml-0.5",children:"â"})]}):(0,o.jsx)("span",{className:"flex gap-1 items-center py-0.5",children:[0,150,300].map(e=>(0,o.jsx)("span",{className:"h-1.5 w-1.5 bg-violet-400 rounded-full animate-bounce",style:{animationDelay:"".concat(e,"ms")}},e))})})]}),E&&(0,o.jsx)("p",{className:"text-xs text-red-600 bg-red-50 border border-red-100 rounded-xl px-3.5 py-2",children:E})]}),(0,o.jsx)("div",{ref:j})]}),(0,o.jsxs)("div",{className:"flex-shrink-0 border-t border-gray-100 px-4 py-4 bg-gray-50/60",children:[(0,o.jsxs)("div",{className:"flex items-end gap-2 bg-white rounded-xl border transition-all px-3 py-2.5 ".concat(R?"border-gray-200 focus-within:border-violet-300 focus-within:ring-2 focus-within:ring-violet-100":"border-gray-100 opacity-60"),children:[(0,o.jsx)("textarea",{ref:I,value:g,onChange:e=>{v(e.target.value),e.target.style.height="auto",e.target.style.height=Math.min(e.target.scrollHeight,120)+"px"},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),O(g))},placeholder:l?"Connectingâ¦":u?"Unavailable":"Ask me to deploy instances, create endpointsâ¦",rows:1,disabled:!R||y,className:"flex-1 resize-none bg-transparent text-sm text-gray-800 placeholder-gray-400 focus:outline-none disabled:opacity-60 overflow-hidden leading-relaxed",style:{maxHeight:"100px"}}),y?(0,o.jsx)("button",{onClick:()=>{var e;if(null===(e=A.current)||void 0===e||e.abort(),w){let{clean:e,action:t}=td(w);m(r=>[...r,{role:"assistant",content:e,action:t}])}x(""),b(!1)},className:"flex-shrink-0 h-7 w-7 rounded-lg bg-gray-200 hover:bg-gray-300 flex items-center justify-center transition-colors",title:"Stop",children:(0,o.jsx)(tt.Z,{className:"h-3.5 w-3.5 text-gray-600"})}):(0,o.jsx)("button",{onClick:()=>O(g),disabled:!R||!g.trim(),className:"flex-shrink-0 h-7 w-7 rounded-lg bg-gradient-to-br from-violet-600 to-indigo-600 hover:from-violet-700 hover:to-indigo-700 flex items-center justify-center transition-all disabled:opacity-30 disabled:cursor-not-allowed",title:"Send",children:(0,o.jsx)(tn,{className:"h-3.5 w-3.5 text-white"})})]}),(0,o.jsx)("p",{className:"text-xs text-gray-400 mt-1.5 text-center",children:"Enter âµ to send \xb7 Shift+Enter for new line"})]})]})]})}var tb=r(92720);let tw="G-87YS5WJ1NR";var tx=function(e){var t;let{Component:r,pageProps:n}=e,i=(0,H.useRouter)(),[s]=(0,D.useState)(()=>new M({defaultOptions:{queries:{staleTime:6e4,retry:1,refetchOnWindowFocus:!1}}})),a=(null===(t=i.asPath)||void 0===t?void 0:t.split("?")[0].split("#")[0])||"/",l="/"===a?"/":a.replace(/\/$/,""),c="".concat("https://oneinfer.ai").concat(l);return(0,D.useEffect)(()=>{let e=["/signup","/login","/forgot-password","/contact-us","/chat/signup","/chat/login"].some(e=>a===e||a.startsWith("".concat(e,"/"))),t="/console"===a&&!!i.query.code;if(e||t)return;let r=()=>(0,tb.H)(!1);r();let n=window.setTimeout(r,250);return()=>window.clearTimeout(n)},[a,i.query.code]),(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)($(),{children:[(0,o.jsx)("title",{children:"OneInfer - AI Inference, Training, and Kernel Optimization Platform"}
1,"title"),(0,o.jsx)("link",{rel:"canonical",href:c},"canonical")]}),(0,o.jsx)(G(),{src:"https://www.googletagmanager.com/gtag/js?id=".concat(tw),strategy:"afterInteractive"}),(0,o.jsx)(G(),{id:"google-analytics",strategy:"afterInteractive",children:"\n window.dataLayer = window.dataLayer || [];\n window.gtag = function(){window.dataLayer.push(arguments);}\n window.gtag('js', new Date());\n window.gtag('config', '".concat(tw,"');\n ")}),(0,o.jsx)(q,{client:s,children:(0,o.jsx)(eJ,{children:(0,o.jsx)(Q.H,{children:(0,o.jsx)(W.M,{children:(0,o.jsx)(K.a,{children:(0,o.jsx)(J.V,{children:(0,o.jsx)(V.EX,{children:(0,o.jsxs)("div",{className:"flex flex-col justify-between w-full",children:[(0,o.jsx)(r,{...n}),i.pathname.startsWith("/console")&&(0,o.jsx)(ty,{}),(0,o.jsx)(e4,{}),(0,o.jsx)(eg,{}),(0,o.jsx)(ep,{})]})})})})})})})})]})}},79931:function(e,t,r){"use strict";let n;r.d(t,{_:function(){return s},e:function(){return l}});let o=new Set(["email","name","first_name","last_name","password","otp","token","access_token","refresh_token","payment_id","order_id"]),i=function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];if("function"==typeof window.gtag){window.gtag(...t);return}window.dataLayer=window.dataLayer||[],window.dataLayer.push(t)},s=e=>{n!==e&&(n=e,i("set",{user_id:e}))},a=()=>{try{var e;let t=(null===(e=window.localStorage.getItem("developerId"))||void 0===e?void 0:e.trim())||null;t?s(t):n&&s(null)}catch(e){}},l=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return;let r=Object.fromEntries(Object.entries(t).filter(e=>{let[t,r]=e;return!o.has(t.toLowerCase())&&null!=r}));a(),i("event",e,r)}},92720:function(e,t,r){"use strict";r.d(t,{H:function(){return i},O:function(){return a}});let n="oneinfer-recaptcha-v3",o=null,i=e=>{"undefined"!=typeof document&&document.querySelectorAll(".grecaptcha-badge").forEach(t=>{t.style.visibility=e?"visible":"hidden"})},s=e=>window.grecaptcha?Promise.resolve():o||(o=new Promise((t,r)=>{let o=document.getElementById(n);if(o){o.addEventListener("load",()=>t(),{once:!0}),o.addEventListener("error",()=>r(Error("Failed to load reCAPTCHA.")),{once:!0});return}let i=document.createElement("script");i.id=n,i.src="https://www.google.com/recaptcha/api.js?render=".concat(encodeURIComponent(e)),i.async=!0,i.defer=!0,i.onload=()=>t(),i.onerror=()=>r(Error("Failed to load reCAPTCHA.")),document.head.appendChild(i)})),a=async e=>{let t="6LeAYw4sAAAAADwc0kfTn_GZXTepXa5xj7qGcUB7";if(!t)throw Error("reCAPTCHA site key is not configured.");if(await s(t),!window.grecaptcha)throw Error("reCAPTCHA failed to initialize.");return new Promise((r,n)=>{window.grecaptcha.ready(()=>{i(!0),window.grecaptcha.execute(t,{action:e}).then(e=>{i(!0),r(e)}).catch(n)})})}},94082:function(e,t,r){"use strict";r.d(t,{IH:function(){return h},N_:function(){return l},Rd:function(){return u},Ut:function(){return c}});let n=()=>"undefined"!=typeof document,o=()=>{if(!n())return!1;let e=window.location.hostname.toLowerCase();return"oneinfer.ai"===e||e.endsWith(".oneinfer.ai")},i=function(e){let t=!(arguments.length>1)||void 0===arguments[1]||arguments[1],r=["Path=/","Max-Age=".concat(e),"SameSite=Lax"];return t&&o()&&r.push("Domain=".concat(".oneinfer.ai")),"https:"===window.location.protocol&&r.push("Secure"),r.join("; ")},s=(e,t)=>{n()&&t&&(document.cookie="".concat(e,"=").concat(encodeURIComponent(t),"; ").concat(i(2592e3)))},a=e=>{if(!n())return null;let t="".concat(e,"="),r=document.cookie.split("; ").find(e=>e.startsWith(t));if(!r)return null;try{return decodeURIComponent(r.slice(t.length))}catch(e){return r.slice(t.length)}},l=(e,t)=>{n()&&e&&t&&(localStorage.setItem("accessToken",e),localStorage.setItem("developerId",t),localStorage.setItem("isLoggedIn","true"),s("accessToken",e),s("developerId",t))},c=e=>{n()&&e&&(localStorage.setItem("accessToken",e),s("accessToken",e))},u=()=>{if(!n())return null;let e=a("accessToken"),t=a("developerId");if(e&&t)return localStorage.setItem("accessToken",e),localStorage.setItem("developerId",t),localStorage.setItem("isLoggedIn","true"),{accessToken:e,developerId:t};let r=localStorage.getItem("accessToken"),o=localStorage.getItem("developerId");return r&&o?(s("accessToken",r),s("developerId",o),{accessToken:r,developerId:o}):null},d=(e,t)=>{document.cookie="".concat(e,"=; ").concat(i(0,t))},h=()=>{n()&&(localStorage.removeItem("accessToken"),localStorage.removeItem("developerId"),localStorage.removeItem("isLoggedIn"),d("accessToken",!0),d("developerId",!0),d("accessToken",!1),d("developerId",!1))}},62506:function(e,t,r){"use strict";r.d(t,{O2:function(){return o},ai:function(){return n},gC:function(){return i}});let n=[{amountUsd:25,bonusCredits:50,label:"+50 Studio credits",note:"Enough for 1 test video"},{amountUsd:50,bonusCredits:150,label:"+150 Studio credits",note:"3 videos or character setup",popular:!0},{amountUsd:100,bonusCredits:400,label:"+400 Studio credits",note:"Creator trial pack"},{amountUsd:250,bonusCredits:1200,label:"+1,200 Studio credits",note:"Full monthly Creator equivalent"}],o="https://studio.oneinfer.ai";function i(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;
1return e.toLocaleString("en-US",{style:"currency",currency:"USD",minimumFractionDigits:t,maximumFractionDigits:e>0&&e<.01?4:2})}},17177:function(e,t,r){"use strict";r.d(t,{M:function(){return o},c:function(){return i}});let n=new Set(["undefined","null","account","user"]),o=(e,t)=>{let r=(null==e?void 0:e.trim())||"";return!r||n.has(r.toLowerCase())||t&&r===t.trim()||r.includes("@")||/^[a-f0-9]{24,}$/i.test(r)?"":r.split(/\s+/)[0]},i=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Account";return o(localStorage.getItem("firstName"),localStorage.getItem("developerId"))||e}},19983:function(){},80876:function(){},77663:function(e){!function(){var t={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function s(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:s}catch(e){r=s}}();var l=[],c=!1,u=-1;function d(){c&&n&&(c=!1,n.length?l=n.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=a(d);c=!0;for(var t=l.length;t;){for(n=l,l=[];++u<t;)n&&n[u].run();u=-1,t=l.length}n=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===s||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function f(e,t){this.fun=e,this.array=t}function p(){}o.nextTick=function(e){var t=Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new f(e,t)),1!==l.length||c||a(h)},f.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=p,o.addListener=p,o.once=p,o.off=p,o.removeListener=p,o.removeAllListeners=p,o.emit=p,o.prependListener=p,o.prependOnceListener=p,o.listeners=function(e){return[]},o.binding=function(e){throw Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw Error("process.chdir is not supported")},o.umask=function(){return 0}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}},s=!0;try{t[e](i,i.exports,n),s=!1}finally{s&&delete r[e]}return i.exports}n.ab="//";var o=n(229);e.exports=o}()},9008:function(e,t,r){e.exports=r(23867)},11163:function(e,t,r){e.exports=r(43079)},4298:function(e,t,r){e.exports=r(23381)},69590:function(e){var t="undefined"!=typeof Element,r="function"==typeof Map,n="function"==typeof Set,o="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;e.exports=function(e,i){try{return function e(i,s){if(i===s)return!0;if(i&&s&&"object"==typeof i&&"object"==typeof s){var a,l,c,u;if(i.constructor!==s.constructor)return!1;if(Array.isArray(i)){if((a=i.length)!=s.length)return!1;for(l=a;0!=l--;)if(!e(i[l],s[l]))return!1;return!0}if(r&&i instanceof Map&&s instanceof Map){if(i.size!==s.size)return!1;for(u=i.entries();!(l=u.next()).done;)if(!s.has(l.value[0]))return!1;for(u=i.entries();!(l=u.next()).done;)if(!e(l.value[1],s.get(l.value[0])))return!1;return!0}if(n&&i instanceof Set&&s instanceof Set){if(i.size!==s.size)return!1;for(u=i.entries();!(l=u.next()).done;)if(!s.has(l.value[0]))return!1;return!0}if(o&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(s)){if((a=i.length)!=s.length)return!1;for(l=a;0!=l--;)if(i[l]!==s[l])return!1;return!0}if(i.constructor===RegExp)return i.source===s.source&&i.flags===s.flags;if(i.valueOf!==Object.prototype.valueOf&&"function"==typeof i.valueOf&&"function"==typeof s.valueOf)return i.valueOf()===s.valueOf();if(i.toString!==Object.prototype.toString&&"function"==typeof i.toString&&"function"==typeof s.toString)return i.toString()===s.toString();if((a=(c=Object.keys(i)).length)!==Object.keys(s).length)return!1;for(l=a;0!=l--;)if(!Object.prototype.hasOwnProperty.call(s,c[l]))return!1;if(t&&i instanceof Element)return!1;for(l=a;0!=l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!i.$$typeof)&&!e(i[c[l]],s[c[l]]))return!1;return!0}return i!=i&&s!=s}(e,i)}catch(e){if((e.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw e}}},96774:function(e){e.exports=function(e,t,r,n){var o=r?r.call(n,e,t):void 0;if(void 0!==o)return!!o;if(e===t)return!0;
1if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),s=Object.keys(t);if(i.length!==s.length)return!1;for(var a=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!a(c))return!1;var u=e[c],d=t[c];if(!1===(o=r?r.call(n,u,d,c):void 0)||void 0===o&&u!==d)return!1}return!0}},29204:function(e,t,r){"use strict";r.d(t,{d7:function(){return o}});let{Axios:n,AxiosError:o,CanceledError:i,isCancel:s,CancelToken:a,VERSION:l,all:c,Cancel:u,isAxiosError:d,spread:h,toFormData:f,AxiosHeaders:p,HttpStatusCode:m,formToJSON:g,getAdapter:v,mergeConfig:y}=r(87066).default},87066:function(e,t,r){"use strict";let n,o,i,s,a;r.d(t,{default:function(){return tm}});var l,c,u,d,h,f={};function p(e,t){return function(){return e.apply(t,arguments)}}r.r(f),r.d(f,{hasBrowserEnv:function(){return ey},hasStandardBrowserEnv:function(){return ew},hasStandardBrowserWebWorkerEnv:function(){return ex},navigator:function(){return eb},origin:function(){return eE}});var m=r(83454);let{toString:g}=Object.prototype,{getPrototypeOf:v}=Object,{iterator:y,toStringTag:b}=Symbol,w=(n=Object.create(null),e=>{let t=g.call(e);return n[t]||(n[t]=t.slice(8,-1).toLowerCase())}),x=e=>(e=e.toLowerCase(),t=>w(t)===e),E=e=>t=>typeof t===e,{isArray:_}=Array,S=E("undefined"),k=x("ArrayBuffer"),j=E("string"),A=E("function"),I=E("number"),C=e=>null!==e&&"object"==typeof e,O=e=>{if("object"!==w(e))return!1;let t=v(e);return(null===t||t===Object.prototype||null===Object.getPrototypeOf(t))&&!(b in e)&&!(y in e)},N=x("Date"),T=x("File"),R=x("Blob"),P=x("FileList"),U=x("URLSearchParams"),[L,B,M,D]=["ReadableStream","Request","Response","Headers"].map(x);function F(e,t,{allOwnKeys:r=!1}={}){let n,o;if(null!=e){if("object"!=typeof e&&(e=[e]),_(e))for(n=0,o=e.length;n<o;n++)t.call(null,e[n],n,e);else{let o;let i=r?Object.getOwnPropertyNames(e):Object.keys(e),s=i.length;for(n=0;n<s;n++)o=i[n],t.call(null,e[o],o,e)}}}function q(e,t){let r;t=t.toLowerCase();let n=Object.keys(e),o=n.length;for(;o-- >0;)if(t===(r=n[o]).toLowerCase())return r;return null}let z="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,$=e=>!S(e)&&e!==z,H=(o="undefined"!=typeof Uint8Array&&v(Uint8Array),e=>o&&e instanceof o),Z=x("HTMLFormElement"),G=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),W=x("RegExp"),K=(e,t)=>{let r=Object.getOwnPropertyDescriptors(e),n={};F(r,(r,o)=>{let i;!1!==(i=t(r,o,e))&&(n[o]=i||r)}),Object.defineProperties(e,n)},Q=x("AsyncFunction"),J=(l="function"==typeof setImmediate,c=A(z.postMessage),l?setImmediate:c?(u=`axios@${Math.random()}`,d=[],z.addEventListener("message",({source:e,data:t})=>{e===z&&t===u&&d.length&&d.shift()()},!1),e=>{d.push(e),z.postMessage(u,"*")}):e=>setTimeout(e)),V="undefined"!=typeof queueMicrotask?queueMicrotask.bind(z):void 0!==m&&m.nextTick||J;var X={isArray:_,isArrayBuffer:k,isBuffer:function(e){return null!==e&&!S(e)&&null!==e.constructor&&!S(e.constructor)&&A(e.constructor.isBuffer)&&e.constructor.isBuffer(e)},isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||A(e.append)&&("formdata"===(t=w(e))||"object"===t&&A(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&k(e.buffer)},isString:j,isNumber:I,isBoolean:e=>!0===e||!1===e,isObject:C,isPlainObject:O,isReadableStream:L,isRequest:B,isResponse:M,isHeaders:D,isUndefined:S,isDate:N,isFile:T,isBlob:R,isRegExp:W,isFunction:A,isStream:e=>C(e)&&A(e.pipe),isURLSearchParams:U,isTypedArray:H,isFileList:P,forEach:F,merge:function e(){let{caseless:t}=$(this)&&this||{},r={},n=(n,o)=>{let i=t&&q(r,o)||o;O(r[i])&&O(n)?r[i]=e(r[i],n):O(n)?r[i]=e({},n):_(n)?r[i]=n.slice():r[i]=n};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&F(arguments[e],n);return r},extend:(e,t,r,{allOwnKeys:n}={})=>(F(t,(t,n)=>{r&&A(t)?e[n]=p(t,r):e[n]=t},{allOwnKeys:n}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},toFlatObject:(e,t,r,n)=>{let o,i,s;let a={};if(t=t||{},null==e)return t;do{for(i=(o=Object.getOwnPropertyNames(e)).length;i-- >0;)s=o[i],(!n||n(s,e,t))&&!a[s]&&(t[s]=e[s],a[s]=!0);e=!1!==r&&v(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},kindOf:w,kindOfTest:x,endsWith:(e,t,r)=>{e=String(e),(void 0===r||r>e.length)&&(r=e.length),r-=t.length;let n=e.indexOf(t,r);return -1!==n&&n===r},toArray:e=>{if(!e)return null;if(_(e))return e;let t=e.length;if(!I(t))return null;let r=Array(t);for(;t-- >0;)r[t]=e[t];return r},forEachEntry:(e,t)=>{let r;let n=(e&&e[y]).call(e);for(;(r=n.next())&&!r.done;){let n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>
1{let r;let n=[];for(;null!==(r=e.exec(t));)n.push(r);return n},isHTMLForm:Z,hasOwnProperty:G,hasOwnProp:G,reduceDescriptors:K,freezeMethods:e=>{K(e,(t,r)=>{if(A(e)&&-1!==["arguments","caller","callee"].indexOf(r))return!1;if(A(e[r])){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},toObjectSet:(e,t)=>{let r={};return(e=>{e.forEach(e=>{r[e]=!0})})(_(e)?e:String(e).split(t)),r},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,r){return t.toUpperCase()+r}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:q,global:z,isContextDefined:$,isSpecCompliantForm:function(e){return!!(e&&A(e.append)&&"FormData"===e[b]&&e[y])},toJSONObject:e=>{let t=Array(10),r=(e,n)=>{if(C(e)){if(t.indexOf(e)>=0)return;if(!("toJSON"in e)){t[n]=e;let o=_(e)?[]:{};return F(e,(e,t)=>{let i=r(e,n+1);S(i)||(o[t]=i)}),t[n]=void 0,o}}return e};return r(e,0)},isAsyncFn:Q,isThenable:e=>e&&(C(e)||A(e))&&A(e.then)&&A(e.catch),setImmediate:J,asap:V,isIterable:e=>null!=e&&A(e[y])};function Y(e,t,r,n,o){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),o&&(this.response=o,this.status=o.status?o.status:null)}X.inherits(Y,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:X.toJSONObject(this.config),code:this.code,status:this.status}}});let ee=Y.prototype,et={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{et[e]={value:e}}),Object.defineProperties(Y,et),Object.defineProperty(ee,"isAxiosError",{value:!0}),Y.from=(e,t,r,n,o,i)=>{let s=Object.create(ee);return X.toFlatObject(e,s,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e),Y.call(s,e.message,t,r,n,o),s.cause=e,s.name=e.name,i&&Object.assign(s,i),s};var er=r(48764).lW;function en(e){return X.isPlainObject(e)||X.isArray(e)}function eo(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function ei(e,t,r){return e?e.concat(t).map(function(e,t){return e=eo(e),!r&&t?"["+e+"]":e}).join(r?".":""):t}let es=X.toFlatObject(X,{},null,function(e){return/^is[A-Z]/.test(e)});var ea=function(e,t,r){if(!X.isObject(e))throw TypeError("target must be an object");t=t||new FormData;let n=(r=X.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!X.isUndefined(t[e])})).metaTokens,o=r.visitor||c,i=r.dots,s=r.indexes,a=(r.Blob||"undefined"!=typeof Blob&&Blob)&&X.isSpecCompliantForm(t);if(!X.isFunction(o))throw TypeError("visitor must be a function");function l(e){if(null===e)return"";if(X.isDate(e))return e.toISOString();if(!a&&X.isBlob(e))throw new Y("Blob is not supported. Use a Buffer instead.");return X.isArrayBuffer(e)||X.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):er.from(e):e}function c(e,r,o){let a=e;if(e&&!o&&"object"==typeof e){if(X.endsWith(r,"{}"))r=n?r:r.slice(0,-2),e=JSON.stringify(e);else{var c;if(X.isArray(e)&&(c=e,X.isArray(c)&&!c.some(en))||(X.isFileList(e)||X.endsWith(r,"[]"))&&(a=X.toArray(e)))return r=eo(r),a.forEach(function(e,n){X.isUndefined(e)||null===e||t.append(!0===s?ei([r],n,i):null===s?r:r+"[]",l(e))}),!1}}return!!en(e)||(t.append(ei(o,r,i),l(e)),!1)}let u=[],d=Object.assign(es,{defaultVisitor:c,convertValue:l,isVisitable:en});if(!X.isObject(e))throw TypeError("data must be an object");return!function e(r,n){if(!X.isUndefined(r)){if(-1!==u.indexOf(r))throw Error("Circular reference detected in "+n.join("."));u.push(r),X.forEach(r,function(r,i){!0===(!(X.isUndefined(r)||null===r)&&o.call(t,r,X.isString(i)?i.trim():i,n,d))&&e(r,n?n.concat(i):[i])}),u.pop()}}(e),t};function el(e){let t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ec(e,t){this._pairs=[],e&&ea(e,this,t)}let eu=ec.prototype;function ed(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function eh(e,t,r){let n;if(!t)return e;let o=r&&r.encode||ed;X.isFunction(r)&&(r={serialize:r});let i=r&&r.serialize;if(n=i?i(t,r):X.isURLSearchParams(t)?t.toString():new ec(t,r).toString(o)){let t=e.indexOf("#");
1-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}eu.append=function(e,t){this._pairs.push([e,t])},eu.toString=function(e){let t=e?function(t){return e.call(this,t,el)}:el;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};class ef{constructor(){this.handlers=[]}use(e,t,r){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!r&&r.synchronous,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){X.forEach(this.handlers,function(t){null!==t&&e(t)})}}var ep={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},em="undefined"!=typeof URLSearchParams?URLSearchParams:ec,eg="undefined"!=typeof FormData?FormData:null,ev="undefined"!=typeof Blob?Blob:null;let ey="undefined"!=typeof window&&"undefined"!=typeof document,eb="object"==typeof navigator&&navigator||void 0,ew=ey&&(!eb||0>["ReactNative","NativeScript","NS"].indexOf(eb.product)),ex="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,eE=ey&&window.location.href||"http://localhost";var e_={...f,isBrowser:!0,classes:{URLSearchParams:em,FormData:eg,Blob:ev},protocols:["http","https","file","blob","url","data"]},eS=function(e){if(X.isFormData(e)&&X.isFunction(e.entries)){let t={};return X.forEachEntry(e,(e,r)=>{!function e(t,r,n,o){let i=t[o++];if("__proto__"===i)return!0;let s=Number.isFinite(+i),a=o>=t.length;return(i=!i&&X.isArray(n)?n.length:i,a)?X.hasOwnProp(n,i)?n[i]=[n[i],r]:n[i]=r:(n[i]&&X.isObject(n[i])||(n[i]=[]),e(t,r,n[i],o)&&X.isArray(n[i])&&(n[i]=function(e){let t,r;let n={},o=Object.keys(e),i=o.length;for(t=0;t<i;t++)n[r=o[t]]=e[r];return n}(n[i]))),!s}(X.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0]),r,t,0)}),t}return null};let ek={transitional:ep,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){let r;let n=t.getContentType()||"",o=n.indexOf("application/json")>-1,i=X.isObject(e);if(i&&X.isHTMLForm(e)&&(e=new FormData(e)),X.isFormData(e))return o?JSON.stringify(eS(e)):e;if(X.isArrayBuffer(e)||X.isBuffer(e)||X.isStream(e)||X.isFile(e)||X.isBlob(e)||X.isReadableStream(e))return e;if(X.isArrayBufferView(e))return e.buffer;if(X.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(i){if(n.indexOf("application/x-www-form-urlencoded")>-1){var s,a;return(s=e,a=this.formSerializer,ea(s,new e_.classes.URLSearchParams,Object.assign({visitor:function(e,t,r,n){return e_.isNode&&X.isBuffer(e)?(this.append(t,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)}},a))).toString()}if((r=X.isFileList(e))||n.indexOf("multipart/form-data")>-1){let t=this.env&&this.env.FormData;return ea(r?{"files[]":e}:e,t&&new t,this.formSerializer)}}return i||o?(t.setContentType("application/json",!1),function(e,t,r){if(X.isString(e))try{return(0,JSON.parse)(e),X.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){let t=this.transitional||ek.transitional,r=t&&t.forcedJSONParsing,n="json"===this.responseType;if(X.isResponse(e)||X.isReadableStream(e))return e;if(e&&X.isString(e)&&(r&&!this.responseType||n)){let r=t&&t.silentJSONParsing;try{return JSON.parse(e)}catch(e){if(!r&&n){if("SyntaxError"===e.name)throw Y.from(e,Y.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:e_.classes.FormData,Blob:e_.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};X.forEach(["delete","get","head","post","put","patch"],e=>{ek.headers[e]={}});let ej=X.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]);var eA=e=>{let t,r,n;let o={};return e&&e.split("\n").forEach(function(e){n=e.indexOf(":"),t=e.substring(0,n).trim().toLowerCase(),r=e.substring(n+1).trim(),!t||o[t]&&ej[t]||("set-cookie"===t?o[t]?o[t].push(r):o[t]=[r]:o[t]=o[t]?o[t]+", "+r:r)}),o};let eI=Symbol("internals");function eC(e){return e&&String(e).trim().toLowerCase()}function eO(e){return!1===e||null==e?e:X.isArray(e)?e.map(eO):String(e)}let eN=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function eT(e,t,r,n,o){if(X.isFunction(n))return n.call(this,t,r);if(o&&(t=r),X.isString(t)){if(X.isString(n))return -1!==t.indexOf(n);if(X.isRegExp(n))return n.test(t)}}class eR{constructor(e){e&&this.set(e)}set(e,t,r){let n=this;function o(e,t,r){let o=eC(t);if(!o)throw Error("header name must be a non-empty string");let i=X.findKey(n,o);i&&void 0!==n[i]&&!0!==r&&(void 0!==r||!1===n[i])||(n[i||t]=eO(e))}let i=(e,t)=>X.forEach(e,(e,r)=>o(e,r,t));if(X.isPlainObject(e)||e instanceof this.constructor)i(e,t);else if(X.isString(e)&&(e=e.trim())&&!eN(e))i(eA(e),t);else if(X.isObject(e)&&X.isIterable(e)){let r={},n,o;for(let t of e){if(!X.isArray(t))throw TypeError("Object iterator must return a key-value pair");r[o=t[0]]=(n=r[o])?X.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}i(r,t)}else null!=e&&o(t,e,r);return this}get(e,t){if(e=eC(e)){let r=X.findKey(this,e);if(r){let e=this[r];if(!t)return e;if(!0===t)return function(e){let t;let r=Object.create(null),n=/([^\s,;
1=]+)\s*(?:=\s*([^,;]+))?/g;for(;t=n.exec(e);)r[t[1]]=t[2];return r}(e);if(X.isFunction(t))return t.call(this,e,r);if(X.isRegExp(t))return t.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=eC(e)){let r=X.findKey(this,e);return!!(r&&void 0!==this[r]&&(!t||eT(this,this[r],r,t)))}return!1}delete(e,t){let r=this,n=!1;function o(e){if(e=eC(e)){let o=X.findKey(r,e);o&&(!t||eT(r,r[o],o,t))&&(delete r[o],n=!0)}}return X.isArray(e)?e.forEach(o):o(e),n}clear(e){let t=Object.keys(this),r=t.length,n=!1;for(;r--;){let o=t[r];(!e||eT(this,this[o],o,e,!0))&&(delete this[o],n=!0)}return n}normalize(e){let t=this,r={};return X.forEach(this,(n,o)=>{let i=X.findKey(r,o);if(i){t[i]=eO(n),delete t[o];return}let s=e?o.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,r)=>t.toUpperCase()+r):String(o).trim();s!==o&&delete t[o],t[s]=eO(n),r[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let t=Object.create(null);return X.forEach(this,(r,n)=>{null!=r&&!1!==r&&(t[n]=e&&X.isArray(r)?r.join(", "):r)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){let r=new this(e);return t.forEach(e=>r.set(e)),r}static accessor(e){let t=(this[eI]=this[eI]={accessors:{}}).accessors,r=this.prototype;function n(e){let n=eC(e);t[n]||(!function(e,t){let r=X.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(e,r,o){return this[n].call(this,t,e,r,o)},configurable:!0})})}(r,e),t[n]=!0)}return X.isArray(e)?e.forEach(n):n(e),this}}function eP(e,t){let r=this||ek,n=t||r,o=eR.from(n.headers),i=n.data;return X.forEach(e,function(e){i=e.call(r,i,o.normalize(),t?t.status:void 0)}),o.normalize(),i}function eU(e){return!!(e&&e.__CANCEL__)}function eL(e,t,r){Y.call(this,null==e?"canceled":e,Y.ERR_CANCELED,t,r),this.name="CanceledError"}function eB(e,t,r){let n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new Y("Request failed with status code "+r.status,[Y.ERR_BAD_REQUEST,Y.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}eR.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(eR.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[r]=e}}}),X.freezeMethods(eR),X.inherits(eL,Y,{__CANCEL__:!0});var eM=function(e,t){let r;let n=Array(e=e||10),o=Array(e),i=0,s=0;return t=void 0!==t?t:1e3,function(a){let l=Date.now(),c=o[s];r||(r=l),n[i]=a,o[i]=l;let u=s,d=0;for(;u!==i;)d+=n[u++],u%=e;if((i=(i+1)%e)===s&&(s=(s+1)%e),l-r<t)return;let h=c&&l-c;return h?Math.round(1e3*d/h):void 0}},eD=function(e,t){let r,n,o=0,i=1e3/t,s=(t,i=Date.now())=>{o=i,r=null,n&&(clearTimeout(n),n=null),e.apply(null,t)};return[(...e)=>{let t=Date.now(),a=t-o;a>=i?s(e,t):(r=e,n||(n=setTimeout(()=>{n=null,s(r)},i-a)))},()=>r&&s(r)]};let eF=(e,t,r=3)=>{let n=0,o=eM(50,250);return eD(r=>{let i=r.loaded,s=r.lengthComputable?r.total:void 0,a=i-n,l=o(a);n=i,e({loaded:i,total:s,progress:s?i/s:void 0,bytes:a,rate:l||void 0,estimated:l&&s&&i<=s?(s-i)/l:void 0,event:r,lengthComputable:null!=s,[t?"download":"upload"]:!0})},r)},eq=(e,t)=>{let r=null!=e;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},ez=e=>(...t)=>X.asap(()=>e(...t));var e$=e_.hasStandardBrowserEnv?(i=new URL(e_.origin),s=e_.navigator&&/(msie|trident)/i.test(e_.navigator.userAgent),e=>(e=new URL(e,e_.origin),i.protocol===e.protocol&&i.host===e.host&&(s||i.port===e.port))):()=>!0,eH=e_.hasStandardBrowserEnv?{write(e,t,r,n,o,i){let s=[e+"="+encodeURIComponent(t)];X.isNumber(r)&&s.push("expires="+new Date(r).toGMTString()),X.isString(n)&&s.push("path="+n),X.isString(o)&&s.push("domain="+o),!0===i&&s.push("secure"),document.cookie=s.join("; ")},read(e){let t=document.cookie.match(RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function eZ(e,t,r){let n=!/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);return e&&(n||!1==r)?t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e:t}let eG=e=>e instanceof eR?{...e}:e;function eW(e,t){t=t||{};let r={};function n(e,t,r,n){return X.isPlainObject(e)&&X.isPlainObject(t)?X.merge.call({caseless:n},e,t):X.isPlainObject(t)?X.merge({},t):X.isArray(t)?t.slice():t}function o(e,t,r,o){return X.isUndefined(t)?X.isUndefined(e)?void 0:n(void 0,e,r,o):n(e,t,r,o)}function i(e,t){if(!X.isUndefined(t))return n(void 0,t)}function s(e,t){return X.isUndefined(t)?X.isUndefined(e)?void 0:n(void 0,e):n(void 0,t)}function a(r,o,i){return i in t?n(r,o):i in e?n(void 0,r):void 0}let l={url:i,method:i,data:i,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,withXSRFToken:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:a,headers:(e,t,r)=>o(eG(e),eG(t),r,!0)};
1return X.forEach(Object.keys(Object.assign({},e,t)),function(n){let i=l[n]||o,s=i(e[n],t[n],n);X.isUndefined(s)&&i!==a||(r[n]=s)}),r}var eK=e=>{let t;let r=eW({},e),{data:n,withXSRFToken:o,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:l}=r;if(r.headers=a=eR.from(a),r.url=eh(eZ(r.baseURL,r.url,r.allowAbsoluteUrls),e.params,e.paramsSerializer),l&&a.set("Authorization","Basic "+btoa((l.username||"")+":"+(l.password?unescape(encodeURIComponent(l.password)):""))),X.isFormData(n)){if(e_.hasStandardBrowserEnv||e_.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(!1!==(t=a.getContentType())){let[e,...r]=t?t.split(";").map(e=>e.trim()).filter(Boolean):[];a.setContentType([e||"multipart/form-data",...r].join("; "))}}if(e_.hasStandardBrowserEnv&&(o&&X.isFunction(o)&&(o=o(r)),o||!1!==o&&e$(r.url))){let e=i&&s&&eH.read(s);e&&a.set(i,e)}return r},eQ="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,r){let n,o,i,s,a;let l=eK(e),c=l.data,u=eR.from(l.headers).normalize(),{responseType:d,onUploadProgress:h,onDownloadProgress:f}=l;function p(){s&&s(),a&&a(),l.cancelToken&&l.cancelToken.unsubscribe(n),l.signal&&l.signal.removeEventListener("abort",n)}let m=new XMLHttpRequest;function g(){if(!m)return;let n=eR.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());eB(function(e){t(e),p()},function(e){r(e),p()},{data:d&&"text"!==d&&"json"!==d?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:n,config:e,request:m}),m=null}m.open(l.method.toUpperCase(),l.url,!0),m.timeout=l.timeout,"onloadend"in m?m.onloadend=g:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(g)},m.onabort=function(){m&&(r(new Y("Request aborted",Y.ECONNABORTED,e,m)),m=null)},m.onerror=function(){r(new Y("Network Error",Y.ERR_NETWORK,e,m)),m=null},m.ontimeout=function(){let t=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded",n=l.transitional||ep;l.timeoutErrorMessage&&(t=l.timeoutErrorMessage),r(new Y(t,n.clarifyTimeoutError?Y.ETIMEDOUT:Y.ECONNABORTED,e,m)),m=null},void 0===c&&u.setContentType(null),"setRequestHeader"in m&&X.forEach(u.toJSON(),function(e,t){m.setRequestHeader(t,e)}),X.isUndefined(l.withCredentials)||(m.withCredentials=!!l.withCredentials),d&&"json"!==d&&(m.responseType=l.responseType),f&&([i,a]=eF(f,!0),m.addEventListener("progress",i)),h&&m.upload&&([o,s]=eF(h
1),m.upload.addEventListener("progress",o),m.upload.addEventListener("loadend",s)),(l.cancelToken||l.signal)&&(n=t=>{m&&(r(!t||t.type?new eL(null,e,m):t),m.abort(),m=null)},l.cancelToken&&l.cancelToken.subscribe(n),l.signal&&(l.signal.aborted?n():l.signal.addEventListener("abort",n)));let v=function(e){let t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(l.url);if(v&&-1===e_.protocols.indexOf(v)){r(new Y("Unsupported protocol "+v+":",Y.ERR_BAD_REQUEST,e));return}m.send(c||null)})},eJ=(e,t)=>{let{length:r}=e=e?e.filter(Boolean):[];if(t||r){let r,n=new AbortController,o=function(e){if(!r){r=!0,s();let t=e instanceof Error?e:this.reason;n.abort(t instanceof Y?t:new eL(t instanceof Error?t.message:t))}},i=t&&setTimeout(()=>{i=null,o(new Y(`timeout ${t} of ms exceeded`,Y.ETIMEDOUT))},t),s=()=>{e&&(i&&clearTimeout(i),i=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));let{signal:a}=n;return a.unsubscribe=()=>X.asap(s),a}};let eV=function*(e,t){let r,n=e.byteLength;if(!t||n<t){yield e;return}let o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},eX=async function*(e,t){for await(let r of eY(e))yield*eV(r,t)},eY=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}let t=e.getReader();try{for(;;){let{done:e,value:r}=await t.read();if(e)break;yield r}}finally{await t.cancel()}},e0=(e,t,r,n)=>{let o;let i=eX(e,t),s=0,a=e=>{!o&&(o=!0,n&&n(e))};return new ReadableStream({async pull(e){try{let{done:t,value:n}=await i.next();if(t){a(),e.close();return}let o=n.byteLength;if(r){let e=s+=o;r(e)}e.enqueue(new Uint8Array(n))}catch(e){throw a(e),e}},cancel:e=>(a(e),i.return())},{highWaterMark:2})},e1="function"==typeof fetch&&"function"==typeof Request&&"function"==typeof Response,e2=e1&&"function"==typeof ReadableStream,e4=e1&&("function"==typeof TextEncoder?(a=new TextEncoder,e=>a.encode(e)):async e=>new Uint8Array(await new Response(e).arrayBuffer())),e6=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},e3=e2&&e6(()=>{let e=!1,t=new Request(e_.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),e5=e2&&e6(()=>X.isReadableStream(new Response("").body)),e8={stream:e5&&(e=>e.body)};e1&&(h=new Response,["text","arrayBuffer","blob","formData","stream"].forEach(e=>{e8[e]||(e8[e]=X.isFunction(h[e])?t=>t[e]():(t,r)=>{throw new Y(`Response type '${e}' is not supported`,Y.ERR_NOT_SUPPORT,r)})}));let e7=async e=>{if(null==e)return 0;if(X.isBlob(e))return e.size;if(X.isSpecCompliantForm(e)){let t=new Request(e_.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return X.isArrayBufferView(e)||X.isArrayBuffer(e)?e.byteLength:(X.isURLSearchParams(e)&&(e+=""),X.isString(e))?(await e4(e)).byteLength:void 0},e9=async(e,t)=>{let r=X.toFiniteNumber(e.getContentLength());return null==r?e7(t):r},te={http:null,xhr:eQ,fetch:e1&&(async e=>{let t,r,{url:n,method:o,data:i,signal:s,cancelToken:a,timeout:l,onDownloadProgress:c,onUploadProgress:u,responseType:d,headers:h,withCredentials:f="same-origin",fetchOptions:p}=eK(e);d=d?(d+"").toLowerCase():"text";let m=eJ([s,a&&a.toAbortSignal()],l),g=m&&m.unsubscribe&&(()=>{m.unsubscribe()});try{if(u&&e3&&"get"!==o&&"head"!==o&&0!==(r=await e9(h,i))){let e,t=new Request(n,{method:"POST",body:i,duplex:"half"});if(X.isFormData(i)&&(e=t.headers.get("content-type"))&&h.setContentType(e),t.body){let[e,n]=eq(r,eF(ez(u)));i=e0(t.body,65536,e,n)}}X.isString(f)||(f=f?"include":"omit");let s="credentials"in Request.prototype;t=new Request(n,{...p,signal:m,method:o.toUpperCase(),headers:h.normalize().toJSON(),body:i,duplex:"half",credentials:s?f:void 0});let a=await fetch(t),l=e5&&("stream"===d||"response"===d);if(e5&&(c||l&&g)){let e={};["status","statusText","headers"].forEach(t=>{e[t]=a[t]});let t=X.toFiniteNumber(a.headers.get("content-length")),[r,n]=c&&eq(t,eF(ez(c),!0))||[];a=new Response(e0(a.body,65536,r,()=>{n&&n(),g&&g()}),e)}d=d||"text";let v=await e8[X.findKey(e8,d)||"text"](a,e);return!l&&g&&g(),await new Promise((r,n)=>{eB(r,n,{data:v,headers:eR.from(a.headers),status:a.status,statusText:a.statusText,config:e,request:t})})}catch(r){if(g&&g(),r&&"TypeError"===r.name&&/Load failed|fetch/i.test(r.message))throw Object.assign(new Y("Network Error",Y.ERR_NETWORK,e,t),{cause:r.cause||r});throw Y.from(r,r&&r.code,e,t)}})};
1X.forEach(te,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});let tt=e=>`- ${e}`,tr=e=>X.isFunction(e)||null===e||!1===e;var tn=e=>{let t,r;let{length:n}=e=X.isArray(e)?e:[e],o={};for(let i=0;i<n;i++){let n;if(r=t=e[i],!tr(t)&&void 0===(r=te[(n=String(t)).toLowerCase()]))throw new Y(`Unknown adapter '${n}'`);if(r)break;o[n||"#"+i]=r}if(!r){let e=Object.entries(o).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Y("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(tt).join("\n"):" "+tt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return r};function to(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new eL(null,e)}function ti(e){return to(e),e.headers=eR.from(e.headers),e.data=eP.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1),tn(e.adapter||ek.adapter)(e).then(function(t){return to(e),t.data=eP.call(e,e.transformResponse,t),t.headers=eR.from(t.headers),t},function(t){return!eU(t)&&(to(e),t&&t.response&&(t.response.data=eP.call(e,e.transformResponse,t.response),t.response.headers=eR.from(t.response.headers))),Promise.reject(t)})}let ts="1.9.0",ta={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ta[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});let tl={};ta.transitional=function(e,t,r){function n(e,t){return"[Axios v"+ts+"] Transitional option '"+e+"'"+t+(r?". "+r:"")}return(r,o,i)=>{if(!1===e)throw new Y(n(o," has been removed"+(t?" in "+t:"")),Y.ERR_DEPRECATED);return t&&!tl[o]&&(tl[o]=!0,console.warn(n(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(r,o,i)}},ta.spelling=function(e){return(t,r)=>(console.warn(`${r} is likely a misspelling of ${e}`),!0)};var tc={assertOptions:function(e,t,r){if("object"!=typeof e)throw new Y("options must be an object",Y.ERR_BAD_OPTION_VALUE);let n=Object.keys(e),o=n.length;for(;o-- >0;){let i=n[o],s=t[i];if(s){let t=e[i],r=void 0===t||s(t,i,e);if(!0!==r)throw new Y("option "+i+" must be "+r,Y.ERR_BAD_OPTION_VALUE);continue}if(!0!==r)throw new Y("Unknown option "+i,Y.ERR_BAD_OPTION)}},validators:ta};let tu=tc.validators;class td{constructor(e){this.defaults=e||{},this.interceptors={request:new ef,response:new ef}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=Error();let r=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?r&&!String(e.stack).endsWith(r.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+r):e.stack=r}catch(e){}}throw e}}_request(e,t){let r,n;"string"==typeof e?(t=t||{}).url=e:t=e||{};let{transitional:o,paramsSerializer:i,headers:s}=t=eW(this.defaults,t);void 0!==o&&tc.assertOptions(o,{silentJSONParsing:tu.transitional(tu.boolean),forcedJSONParsing:tu.transitional(tu.boolean),clarifyTimeoutError:tu.transitional(tu.boolean)},!1),null!=i&&(X.isFunction(i)?t.paramsSerializer={serialize:i}:tc.assertOptions(i,{encode:tu.function,serialize:tu.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),tc.assertOptions(t,{baseUrl:tu.spelling("baseURL"),withXsrfToken:tu.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let a=s&&X.merge(s.common,s[t.method]);s&&X.forEach(["delete","get","head","post","put","patch","common"],e=>{delete s[e]}),t.headers=eR.concat(a,s);let l=[],c=!0;this.interceptors.request.forEach(function(e){("function"!=typeof e.runWhen||!1!==e.runWhen(t))&&(c=c&&e.synchronous,l.unshift(e.fulfilled,e.rejected))});let u=[];this.interceptors.response.forEach(function(e){u.push(e.fulfilled,e.rejected)});let d=0;if(!c){let e=[ti.bind(this),void 0];for(e.unshift.apply(e,l),e.push.apply(e,u),n=e.length,r=Promise.resolve(t);d<n;)r=r.then(e[d++],e[d++]);return r}n=l.length;let h=t;for(d=0;d<n;){let e=l[d++],t=l[d++];try{h=e(h)}catch(e){t.call(this,e);break}}try{r=ti.call(this,h)}catch(e){return Promise.reject(e)}for(d=0,n=u.length;d<n;)r=r.then(u[d++],u[d++]);return r}getUri(e){return eh(eZ((e=eW(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}X.forEach(["delete","get","head","options"],function(e){td.prototype[e]=function(t,r){return this.request(eW(r||{},{method:e,url:t,data:(r||{}).data}))}}
1),X.forEach(["post","put","patch"],function(e){function t(t){return function(r,n,o){return this.request(eW(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:r,data:n}))}}td.prototype[e]=t(),td.prototype[e+"Form"]=t(!0)});class th{constructor(e){let t;if("function"!=typeof e)throw TypeError("executor must be a function.");this.promise=new Promise(function(e){t=e});let r=this;this.promise.then(e=>{if(!r._listeners)return;let t=r._listeners.length;for(;t-- >0;)r._listeners[t](e);r._listeners=null}),this.promise.then=e=>{let t;let n=new Promise(e=>{r.subscribe(e),t=e}).then(e);return n.cancel=function(){r.unsubscribe(t)},n},e(function(e,n,o){r.reason||(r.reason=new eL(e,n,o),t(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;let t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){let e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new th(function(t){e=t}),cancel:e}}}let tf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,Parti
1alContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(tf).forEach(([e,t])=>{tf[t]=e});let tp=function e(t){let r=new td(t),n=p(td.prototype.request,r);return X.extend(n,td.prototype,r,{allOwnKeys:!0}),X.extend(n,r,null,{allOwnKeys:!0}),n.create=function(r){return e(eW(t,r))},n}(ek);tp.Axios=td,tp.CanceledError=eL,tp.CancelToken=th,tp.isCancel=eU,tp.VERSION=ts,tp.toFormData=ea,tp.AxiosError=Y,tp.Cancel=tp.CanceledError,tp.all=function(e){return Promise.all(e)},tp.spread=function(e){return function(t){return e.apply(null,t)}},tp.isAxiosError=function(e){return X.isObject(e)&&!0===e.isAxiosError},tp.mergeConfig=eW,tp.AxiosHeaders=eR,tp.formToJSON=e=>eS(X.isHTMLForm(e)?new FormData(e):e),tp.getAdapter=tn,tp.HttpStatusCode=tf,tp.default=tp;var tm=tp},40885:function(e,t,r){"use strict";r.d(t,{Z:function(){return i}});var n=r(67294),o={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};let i=(e,t,r,i)=>{let s=(0,n.forwardRef)((r,s)=>{let{color:a="currentColor",size:l=24,stroke:c=2,title:u,className:d,children:h,...f}=r;return(0,n.createElement)("svg",{ref:s,...o[e],width:l,height:l,className:["tabler-icon","tabler-icon-".concat(t),d].join(" "),..."filled"===e?{fill:a}:{strokeWidth:c,stroke:a},...f},[u&&(0,n.createElement)("title",{key:"svg-title"},u),...i.map(e=>{let[t,r]=e;return(0,n.createElement)(t,r)}),...Array.isArray(h)?h:[h]])});return s.displayName="".concat(r),s}},43106:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","arrow-right","IconArrowRight",[["path",{d:"M5 12l14 0",key:"svg-0"}],["path",{d:"M13 18l6 -6",key:"svg-1"}],["path",{d:"M13 6l6 6",key:"svg-2"}]])},30516:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","loader-2","IconLoader2",[["path",{d:"M12 3a9 9 0 1 0 9 9",key:"svg-0"}]])},21047:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","robot","IconRobot",[["path",{d:"M6 4m0 2a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v4a2 2 0 0 1 -2 2h-8a2 2 0 0 1 -2 -2z",key:"svg-0"}],["path",{d:"M12 2v2",key:"svg-1"}],["path",{d:"M9 12v9",key:"svg-2"}],["path",{d:"M15 12v9",key:"svg-3"}],["path",{d:"M5 16l4 -2",key:"svg-4"}],["path",{d:"M15 14l4 2",key:"svg-5"}],["path",{d:"M9 18h6",key:"svg-6"}],["path",{d:"M10 8v.01",key:"svg-7"}],["path",{d:"M14 8v.01",key:"svg-8"}]])},37482:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","server","IconServer",[["path",{d:"M3 4m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-0"}],["path",{d:"M3 12m0 3a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v2a3 3 0 0 1 -3 3h-12a3 3 0 0 1 -3 -3z",key:"svg-1"}],["path",{d:"M7 8l0 .01",key:"svg-2"}],["path",{d:"M7 16l0 .01",key:"svg-3"}]])},96715:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","sparkles","IconSparkles",[["path",{d:"M16 18a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm0 -12a2 2 0 0 1 2 2a2 2 0 0 1 2 -2a2 2 0 0 1 -2 -2a2 2 0 0 1 -2 2zm-7 12a6 6 0 0 1 6 -6a6 6 0 0 1 -6 -6a6 6 0 0 1 -6 6a6 6 0 0 1 6 6z",ke
1y:"svg-0"}]])},70772:function(e,t,r){"use strict";r.d(t,{Z:function(){return n}});var n=(0,r(40885).Z)("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]])}},function(e){var t=function(t){return e(e.s=t)};e.O(0,[9774,179],function(){return t(6840),t(43079)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.