@karan171996/metricflow 0.1.8 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/fallback-build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +1 -1
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found.html +1 -1
  11. package/.next/server/app/_not-found.rsc +1 -1
  12. package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
  13. package/.next/server/app/_not-found.segments/_index.segment.rsc +1 -1
  14. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  15. package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  16. package/.next/server/app/api/analyze/route.js.nft.json +1 -1
  17. package/.next/server/app/api/connect/route.js +2 -2
  18. package/.next/server/app/api/connect/route.js.nft.json +1 -1
  19. package/.next/server/app/api/metrics/route.js +2 -2
  20. package/.next/server/app/api/metrics/route.js.nft.json +1 -1
  21. package/.next/server/app/api/setup/ai/route.js.nft.json +1 -1
  22. package/.next/server/app/api/setup/route.js +1 -1
  23. package/.next/server/app/api/setup/route.js.nft.json +1 -1
  24. package/.next/server/app/connect.html +1 -1
  25. package/.next/server/app/connect.rsc +1 -1
  26. package/.next/server/app/connect.segments/_full.segment.rsc +1 -1
  27. package/.next/server/app/connect.segments/_index.segment.rsc +1 -1
  28. package/.next/server/app/connect.segments/_tree.segment.rsc +1 -1
  29. package/.next/server/app/connect.segments/connect/__PAGE__.segment.rsc +1 -1
  30. package/.next/server/app/index.html +1 -1
  31. package/.next/server/app/index.rsc +1 -1
  32. package/.next/server/app/index.segments/__PAGE__.segment.rsc +1 -1
  33. package/.next/server/app/index.segments/_full.segment.rsc +1 -1
  34. package/.next/server/app/index.segments/_index.segment.rsc +1 -1
  35. package/.next/server/app/index.segments/_tree.segment.rsc +1 -1
  36. package/.next/server/app/performance/[slug]/page.js.nft.json +1 -1
  37. package/.next/server/app/performance.html +1 -1
  38. package/.next/server/app/performance.rsc +1 -1
  39. package/.next/server/app/performance.segments/_full.segment.rsc +1 -1
  40. package/.next/server/app/performance.segments/_index.segment.rsc +1 -1
  41. package/.next/server/app/performance.segments/_tree.segment.rsc +1 -1
  42. package/.next/server/app/performance.segments/performance/__PAGE__.segment.rsc +1 -1
  43. package/.next/server/app/settings.html +1 -1
  44. package/.next/server/app/settings.rsc +1 -1
  45. package/.next/server/app/settings.segments/_full.segment.rsc +1 -1
  46. package/.next/server/app/settings.segments/_index.segment.rsc +1 -1
  47. package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
  48. package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +1 -1
  49. package/.next/server/app/setup/page.js.nft.json +1 -1
  50. package/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  51. package/.next/server/app/setup.html +2 -2
  52. package/.next/server/app/setup.rsc +8 -8
  53. package/.next/server/app/setup.segments/_full.segment.rsc +8 -8
  54. package/.next/server/app/setup.segments/_index.segment.rsc +5 -5
  55. package/.next/server/app/setup.segments/_tree.segment.rsc +1 -1
  56. package/.next/server/app/setup.segments/setup/__PAGE__.segment.rsc +7 -7
  57. package/.next/server/chunks/{[root-of-the-server]__02yfc43._.js → [root-of-the-server]__0jh5wh2._.js} +2 -2
  58. package/.next/server/chunks/{[root-of-the-server]__1226gv2._.js → [root-of-the-server]__0ndce1-._.js} +2 -2
  59. package/.next/server/chunks/{[root-of-the-server]__1d1y03f._.js → [root-of-the-server]__10xpkhu._.js} +2 -2
  60. package/.next/server/chunks/_0w8wvdn._.js +1 -1
  61. package/.next/server/chunks/_0wct7-r._.js +1 -1
  62. package/.next/server/chunks/_1l9d64o._.js +1 -1
  63. package/.next/server/chunks/_1lktrox._.js +1 -1
  64. package/.next/server/chunks/_1ze9o4l._.js +1 -1
  65. package/.next/server/chunks/ssr/_0defuav._.js +1 -1
  66. package/.next/server/chunks/ssr/_0htqt7_._.js +1 -1
  67. package/.next/server/middleware-build-manifest.js +3 -3
  68. package/.next/server/pages/404.html +1 -1
  69. package/.next/server/pages/500.html +1 -1
  70. package/.next/static/chunks/3xupay20_o0lm.js +1 -0
  71. package/.next/trace +1 -1
  72. package/.next/trace-build +1 -1
  73. package/README.md +2 -3
  74. package/package.json +3 -2
  75. package/.next/static/chunks/11ea1elg0081p.js +0 -1
  76. /package/.next/static/{4eFlFb3mHDe_1sW60xSTA → W3WQIPNU6SPcB55G3PD2t}/_buildManifest.js +0 -0
  77. /package/.next/static/{4eFlFb3mHDe_1sW60xSTA → W3WQIPNU6SPcB55G3PD2t}/_clientMiddlewareManifest.js +0 -0
  78. /package/.next/static/{4eFlFb3mHDe_1sW60xSTA → W3WQIPNU6SPcB55G3PD2t}/_ssgManifest.js +0 -0
@@ -1,4 +1,4 @@
1
- module.exports=[12892,e=>{"use strict";var a=e.i(2157),i=e.i(50227);let n=["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID","SENTRY_API_KEY","SENTRY_ORG_SLUG","SENTRY_PROJECT_ID"],t="NEWRELIC_REGION",o={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},s={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},r="AI_PROVIDER";function c(e){return process.env[e]??""}e.s(["AI_PROVIDERS",0,s,"AI_PROVIDER_KEY",0,r,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,t,"SETUP_KEYS",0,n,"activeAi",0,function(){let e=process.env[r];for(let a of(e&&e in s?[e]:[]).concat(Object.keys(s))){let e=process.env[s[a].key];if(e)return{provider:a,key:e}}return null},"env",0,c,"isConfigured",0,function(){return n.every(e=>c(e))},"nrHosts",0,(e="eu"===process.env[t]?"eu":"us")=>o[e],"writeEnvLocal",0,function(e,n=process.env.METRICFLOW_ENV_FILE||(0,i.join)(process.cwd(),".env.local")){let t=(0,a.existsSync)(n)?(0,a.readFileSync)(n,"utf8").split("\n"):[],o=new Map(Object.entries(e)),s=t.map(e=>{let a=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(a&&o.has(a)){let e=o.get(a);return o.delete(a),`${a}=${e}`}return e});for(;s.length&&""===s[s.length-1];)s.pop();for(let[e,a]of o)s.push(`${e}=${a}`);let r=`${n}.tmp`;for(let[i,t]of((0,a.writeFileSync)(r,s.join("\n")+"\n",{mode:384}),(0,a.renameSync)(r,n),Object.entries(e)))process.env[i]=t}])},34594,(e,a,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){return function(a,i){return new Promise((n,t)=>{e.call(this,a,i,(e,a)=>{e?t(e):n(a)})})}}},44342,(e,a,i)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let t=e.r(27699),o=n(e.r(20287)),s=n(e.r(34594)),r=o.default("agent-base");function c(){let{stack:e}=Error();return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function p(e,a){return new p.Agent(e,a)}var l=p||(p={});class u extends t.EventEmitter{constructor(e,a){super();let i=a;"function"==typeof e?this.callback=e:e&&(i=e),this.timeout=null,i&&"number"==typeof i.timeout&&(this.timeout=i.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,a,i){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,a){let i=Object.assign({},a);"boolean"!=typeof i.secureEndpoint&&(i.secureEndpoint=c()),null==i.host&&(i.host="localhost"),null==i.port&&(i.port=i.secureEndpoint?443:80),null==i.protocol&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,e._last=!0,e.shouldKeepAlive=!1;let n=!1,t=null,o=i.timeout||this.timeout,p=a=>{e._hadError||(e.emit("error",a),e._hadError=!0)},l=e=>{n||(null!==t&&(clearTimeout(t),t=null),p(e))},u=a=>{if(!n){if(null!=t&&(clearTimeout(t),t=null),a&&"function"==typeof a.addRequest){r("Callback returned another Agent instance %o",a.constructor.name),a.addRequest(e,i);return}if(a){a.once("free",()=>{this.freeSocket(a,i)}),e.onSocket(a);return}p(Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``))}};if("function"!=typeof this.callback)return void p(Error("`callback` is not defined"));this.promisifiedCallback||(this.callback.length>=3?(r("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof o&&o>0&&(t=setTimeout(()=>{t=null,n=!0;let e=Error(`A "socket" was not created for HTTP request before ${o}ms`);e.code="ETIMEOUT",p(e)},o)),"port"in i&&"number"!=typeof i.port&&(i.port=Number(i.port));try{r("Resolving socket for %o request: %o",i.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,i)).then(u,l)}catch(e){Promise.reject(e).catch(l)}}freeSocket(e,a){r("Freeing socket %o %o",e.constructor.name,a),e.destroy()}destroy(){r("Destroying agent %o",this.constructor.name)}}l.Agent=u,l.prototype=l.Agent.prototype,a.exports=p},72986,(e,a,i)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let t=n(e.r(20287)).default("https-proxy-agent:parse-proxy-response");i.default=function(e){return new Promise((a,i)=>{let n=0,o=[];function s(){let i=e.read();i?function(e){o.push(e),n+=e.length;let i=Buffer.concat(o,n);if(-1===i.indexOf("\r\n\r\n")){t("have not received end of HTTP headers yet..."),s();return}let r=i.toString("ascii",0,i.indexOf("\r\n")),c=+r.split(" ")[1];t("got proxy server response: %o",r),a({statusCode:c,buffered:i})}(i):e.once("readable",s)}function r(e){t("onclose had error %o",e)}function c(){t("onend")}e.on("error",function a(n){e.removeListener("end",c),e.removeListener("error",a),e.removeListener("close",r),e.removeListener("readable",s),t("onerror %o",n),i(n)}),e.on("close",r),e.on("end",c),s()})}},62370,(e,a,i)=>{"use strict";var n=e.e&&e.e.__awaiter||function(e,a,i,n){return new(i||(i=Promise))(function(t,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function r(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var a;e.done?t(e.value):((a=e.value)instanceof i?a:new i(function(e){e(a)})).then(s,r)}c((n=n.apply(e,a||[])).next())})},t=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let o=t(e.r(4446)),s=t(e.r(55004)),r=t(e.r(92509)),c=t(e.r(49719)),p=t(e.r(20287)),l=e.r(44342),u=t(e.r(72986)),d=p.default("https-proxy-agent:agent");class m extends l.Agent{constructor(e){let a;if(!(a="string"==typeof e?r.default.parse(e):e))throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("creating new HttpsProxyAgent instance: %o",a),super(a);const i=Object.assign({},a);this.secureProxy=a.secureProxy||function(e){return"string"==typeof e&&/^https:?$/i.test(e)}(i.protocol),i.host=i.hostname||i.host,"string"==typeof i.port&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),!this.secureProxy||"ALPNProtocols"in i||(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(e,a){return n(this,void 0,void 0,function*(){var i,n;let t,{proxy:r,secureProxy:p}=this;p?(d("Creating `tls.Socket`: %o",r),t=s.default.connect(r)):(d("Creating `net.Socket`: %o",r),t=o.default.connect(r));let l=Object.assign({},r.headers),m=`${a.host}:${a.port}`,x=`CONNECT ${m} HTTP/1.1\r
1
+ module.exports=[12892,e=>{"use strict";var a=e.i(2157),i=e.i(50227);let n=["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID","SENTRY_API_KEY","SENTRY_DSN"],t="NEWRELIC_REGION",o={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},s={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},r="AI_PROVIDER";function c(e){return process.env[e]??""}e.s(["AI_PROVIDERS",0,s,"AI_PROVIDER_KEY",0,r,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,t,"SETUP_KEYS",0,n,"activeAi",0,function(){let e=process.env[r];for(let a of(e&&e in s?[e]:[]).concat(Object.keys(s))){let e=process.env[s[a].key];if(e)return{provider:a,key:e}}return null},"env",0,c,"isConfigured",0,function(){return n.every(e=>c(e))},"nrHosts",0,(e="eu"===process.env[t]?"eu":"us")=>o[e],"writeEnvLocal",0,function(e,n=process.env.METRICFLOW_ENV_FILE||(0,i.join)(process.cwd(),".env.local")){let t=(0,a.existsSync)(n)?(0,a.readFileSync)(n,"utf8").split("\n"):[],o=new Map(Object.entries(e)),s=t.map(e=>{let a=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(a&&o.has(a)){let e=o.get(a);return o.delete(a),`${a}=${e}`}return e});for(;s.length&&""===s[s.length-1];)s.pop();for(let[e,a]of o)s.push(`${e}=${a}`);let r=`${n}.tmp`;for(let[i,t]of((0,a.writeFileSync)(r,s.join("\n")+"\n",{mode:384}),(0,a.renameSync)(r,n),Object.entries(e)))process.env[i]=t}])},34594,(e,a,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){return function(a,i){return new Promise((n,t)=>{e.call(this,a,i,(e,a)=>{e?t(e):n(a)})})}}},44342,(e,a,i)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let t=e.r(27699),o=n(e.r(20287)),s=n(e.r(34594)),r=o.default("agent-base");function c(){let{stack:e}=Error();return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function p(e,a){return new p.Agent(e,a)}var l=p||(p={});class u extends t.EventEmitter{constructor(e,a){super();let i=a;"function"==typeof e?this.callback=e:e&&(i=e),this.timeout=null,i&&"number"==typeof i.timeout&&(this.timeout=i.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,a,i){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,a){let i=Object.assign({},a);"boolean"!=typeof i.secureEndpoint&&(i.secureEndpoint=c()),null==i.host&&(i.host="localhost"),null==i.port&&(i.port=i.secureEndpoint?443:80),null==i.protocol&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,e._last=!0,e.shouldKeepAlive=!1;let n=!1,t=null,o=i.timeout||this.timeout,p=a=>{e._hadError||(e.emit("error",a),e._hadError=!0)},l=e=>{n||(null!==t&&(clearTimeout(t),t=null),p(e))},u=a=>{if(!n){if(null!=t&&(clearTimeout(t),t=null),a&&"function"==typeof a.addRequest){r("Callback returned another Agent instance %o",a.constructor.name),a.addRequest(e,i);return}if(a){a.once("free",()=>{this.freeSocket(a,i)}),e.onSocket(a);return}p(Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``))}};if("function"!=typeof this.callback)return void p(Error("`callback` is not defined"));this.promisifiedCallback||(this.callback.length>=3?(r("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof o&&o>0&&(t=setTimeout(()=>{t=null,n=!0;let e=Error(`A "socket" was not created for HTTP request before ${o}ms`);e.code="ETIMEOUT",p(e)},o)),"port"in i&&"number"!=typeof i.port&&(i.port=Number(i.port));try{r("Resolving socket for %o request: %o",i.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,i)).then(u,l)}catch(e){Promise.reject(e).catch(l)}}freeSocket(e,a){r("Freeing socket %o %o",e.constructor.name,a),e.destroy()}destroy(){r("Destroying agent %o",this.constructor.name)}}l.Agent=u,l.prototype=l.Agent.prototype,a.exports=p},72986,(e,a,i)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let t=n(e.r(20287)).default("https-proxy-agent:parse-proxy-response");i.default=function(e){return new Promise((a,i)=>{let n=0,o=[];function s(){let i=e.read();i?function(e){o.push(e),n+=e.length;let i=Buffer.concat(o,n);if(-1===i.indexOf("\r\n\r\n")){t("have not received end of HTTP headers yet..."),s();return}let r=i.toString("ascii",0,i.indexOf("\r\n")),c=+r.split(" ")[1];t("got proxy server response: %o",r),a({statusCode:c,buffered:i})}(i):e.once("readable",s)}function r(e){t("onclose had error %o",e)}function c(){t("onend")}e.on("error",function a(n){e.removeListener("end",c),e.removeListener("error",a),e.removeListener("close",r),e.removeListener("readable",s),t("onerror %o",n),i(n)}),e.on("close",r),e.on("end",c),s()})}},62370,(e,a,i)=>{"use strict";var n=e.e&&e.e.__awaiter||function(e,a,i,n){return new(i||(i=Promise))(function(t,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function r(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var a;e.done?t(e.value):((a=e.value)instanceof i?a:new i(function(e){e(a)})).then(s,r)}c((n=n.apply(e,a||[])).next())})},t=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let o=t(e.r(4446)),s=t(e.r(55004)),r=t(e.r(92509)),c=t(e.r(49719)),p=t(e.r(20287)),l=e.r(44342),u=t(e.r(72986)),d=p.default("https-proxy-agent:agent");class m extends l.Agent{constructor(e){let a;if(!(a="string"==typeof e?r.default.parse(e):e))throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("creating new HttpsProxyAgent instance: %o",a),super(a);const i=Object.assign({},a);this.secureProxy=a.secureProxy||function(e){return"string"==typeof e&&/^https:?$/i.test(e)}(i.protocol),i.host=i.hostname||i.host,"string"==typeof i.port&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),!this.secureProxy||"ALPNProtocols"in i||(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(e,a){return n(this,void 0,void 0,function*(){var i,n;let t,{proxy:r,secureProxy:p}=this;p?(d("Creating `tls.Socket`: %o",r),t=s.default.connect(r)):(d("Creating `net.Socket`: %o",r),t=o.default.connect(r));let l=Object.assign({},r.headers),m=`${a.host}:${a.port}`,x=`CONNECT ${m} HTTP/1.1\r
2
2
  `;r.auth&&(l["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`);let{host:h,port:v,secureEndpoint:b}=a;for(let e of(i=v,((n=b)||80!==i)&&(!n||443!==i)&&(h+=`:${v}`),l.Host=h,l.Connection="close",Object.keys(l)))x+=`${e}: ${l[e]}\r
3
3
  `;let g=u.default(t);t.write(`${x}\r
4
4
  `);let{statusCode:y,buffered:w}=yield g;if(200===y){if(e.once("socket",f),a.secureEndpoint){d("Upgrading socket connection to TLS");let e=a.servername||a.host;return s.default.connect(Object.assign(Object.assign({},function(e,...a){let i,n={};for(i in e)a.includes(i)||(n[i]=e[i]);return n}(a,"host","hostname","path","port")),{socket:t,servername:e}))}return t}t.destroy();let _=new o.default.Socket({writable:!1});return _.readable=!0,e.once("socket",e=>{d("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(w),e.push(null)}),_})}}function f(e){e.resume()}i.default=m},70513,(e,a,i)=>{"use strict";var n;let t=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(62370));function o(e){return new t.default(e)}(n=o||(o={})).HttpsProxyAgent=t.default,n.prototype=t.default.prototype,a.exports=o},60756,e=>{"use strict";let a,i,n,t;function o(e,a){return function(){return e.apply(a,arguments)}}let{toString:s}=Object.prototype,{getPrototypeOf:r}=Object,{iterator:c,toStringTag:p}=Symbol,l=(({hasOwnProperty:e})=>(a,i)=>e.call(a,i))(Object.prototype),u=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),d=(e,a,i)=>e===Object.prototype||!i&&null===a,m=(e,a)=>{let i=e,n=[];for(;null!=i&&-1===n.indexOf(i);){n.push(i);let t=r(i);if(d(i,t,i===e))break;if(l(i,a))return!0;i=t}return!1},f=(a=Object.create(null),e=>{let i=s.call(e);return a[i]||(a[i]=i.slice(8,-1).toLowerCase())}),x=e=>(e=e.toLowerCase(),a=>f(a)===e),h=e=>a=>typeof a===e,{isArray:v}=Array,b=h("undefined");function g(e){return null!==e&&!b(e)&&null!==e.constructor&&!b(e.constructor)&&_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let y=x("ArrayBuffer"),w=h("string"),_=h("function"),E=h("number"),k=e=>null!==e&&"object"==typeof e,j=e=>{if(!k(e))return!1;let a=r(e);return(null===a||a===Object.prototype||null===r(a))&&!m(e,p)&&!m(e,c)},R=x("Date"),O=x("File"),S=x("Blob"),A=x("FileList"),C=x("Set"),P="u">typeof globalThis?globalThis:"u">typeof self?self:e.g,T=void 0!==P.FormData?P.FormData:void 0,F=x("URLSearchParams"),[L,N,U,z]=["ReadableStream","Request","Response","Headers"].map(x);function B(e,a,{allOwnKeys:i=!1}={}){let n,t;if(null!=e)if("object"!=typeof e&&(e=[e]),v(e))for(n=0,t=e.length;n<t;n++)a.call(null,e[n],n,e);else{let t;if(g(e))return;let o=i?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;for(n=0;n<s;n++)t=o[n],a.call(null,e[t],t,e)}}function I(e,a){let i;if(g(e))return null;a=a.toLowerCase();let n=Object.keys(e),t=n.length;for(;t-- >0;)if(a===(i=n[t]).toLowerCase())return i;return null}let D="u">typeof globalThis?globalThis:"u">typeof self?self:e.g,q=e=>!b(e)&&e!==D,M=(i="u">typeof Uint8Array&&r(Uint8Array),e=>i&&e instanceof i),$=x("HTMLFormElement"),{propertyIsEnumerable:H}=Object.prototype,W=x("RegExp"),V=(e,a)=>{let i=Object.getOwnPropertyDescriptors(e),n={};B(i,(i,t)=>{let o;!1!==(o=a(i,t,e))&&(n[t]=o||i)}),Object.defineProperties(e,n)},G=x("AsyncFunction"),K=(eT="function"==typeof setImmediate,eF=_(D.postMessage),eT?setImmediate:eF?(eL=`axios@${Math.random()}`,eN=[],D.addEventListener("message",({source:e,data:a})=>{e===D&&a===eL&&eN.length&&eN.shift()()},!1),e=>{eN.push(e),D.postMessage(eL,"*")}):e=>setTimeout(e)),J="u">typeof queueMicrotask?queueMicrotask.bind(D):"u">typeof process&&process.nextTick||K,Y=e=>null!=e&&_(e[c]),X={isArray:v,isArrayBuffer:y,isBuffer:g,isFormData:e=>{if(!e)return!1;if(T&&e instanceof T)return!0;let a=r(e);if(!a||a===Object.prototype||!_(e.append))return!1;let i=f(e);return"formdata"===i||"object"===i&&_(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&y(e.buffer)},isString:w,isNumber:E,isBoolean:e=>!0===e||!1===e,isObject:k,isPlainObject:j,isEmptyObject:e=>{if(!k(e)||g(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:L,isRequest:N,isResponse:U,isHeaders:z,isUndefined:b,isDate:R,isFile:O,isReactNativeBlob:e=>!!(e&&void 0!==e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:S,isRegExp:W,isFunction:_,isStream:e=>k(e)&&_(e.pipe),isURLSearchParams:F,isTypedArray:M,isFileList:A,forEach:B,merge:function e(...a){let{caseless:i,skipUndefined:n}=q(this)&&this||{},t={},o=(a,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;let s=i&&"string"==typeof o&&I(t,o)||o,r=l(t,s)?t[s]:void 0;j(r)&&j(a)?t[s]=e(r,a):j(a)?t[s]=e({},a):v(a)?t[s]=a.slice():n&&b(a)||(t[s]=a)};for(let e=0,i=a.length;e<i;e++){let i=a[e];if(!i||g(i)||(B(i,o),"object"!=typeof i||v(i)))continue;let n=Object.getOwnPropertySymbols(i);for(let e=0;e<n.length;e++){let a=n[e];H.call(i,a)&&o(i[a],a)}}return t},extend:(e,a,i,{allOwnKeys:n}={})=>(B(a,(a,n)=>{i&&_(a)?Object.defineProperty(e,n,{__proto__:null,value:o(a,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{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,a,i,n)=>{e.prototype=Object.create(a.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:a.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,a,i,n)=>{let t,o,s,c={};if(a=a||{},null==e)return a;do{for(o=(t=Object.getOwnPropertyNames(e)).length;o-- >0;)s=t[o],(!n||n(s,e,a))&&!c[s]&&(a[s]=e[s],c[s]=!0);e=!1!==i&&r(e)}while(e&&(!i||i(e,a))&&e!==Object.prototype)return a},kindOf:f,kindOfTest:x,endsWith:(e,a,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=a.length;let n=e.indexOf(a,i);return -1!==n&&n===i},toArray:e=>{if(!e)return null;if(v(e))return e;let a=e.length;if(!E(a))return null;let i=Array(a);for(;a-- >0;)i[a]=e[a];return i},forEachEntry:(e,a)=>{let i,n=(e&&e[c]).call(e);for(;(i=n.next())&&!i.done;){let n=i.value;a.call(e,n[0],n[1])}},matchAll:(e,a)=>{let i,n=[];for(;null!==(i=e.exec(a));)n.push(i);return n},isHTMLForm:$,hasOwnProperty:l,hasOwnProp:l,hasOwnInPrototypeChain:m,getSafeProp:(e,a)=>null!=e&&m(e,a)?e[a]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;let a=r(e);if(null===a&&(e=>{if(!Object.isExtensible(e))return!1;let a=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&a.push(...Object.getOwnPropertySymbols(e)),a.every(a=>{if(u(a))return!1;let i=Object.getOwnPropertyDescriptor(e,a);return!!i&&i.configurable&&!0===i.writable})})(e))return e;let i=Object.create(null),n=Object.create(null),t=[],o=e;for(;null!=o&&-1===t.indexOf(o);){t.push(o);let s=o===e?a:r(o);if(d(o,s,o===e))break;let c=Object.getOwnPropertyNames(o);for(let a of(Object.getOwnPropertySymbols&&c.push(...Object.getOwnPropertySymbols(o)),c))!u(a)&&(l(n,a)||(i[a]=e[a],n[a]=!0));o=s}return i},reduceDescriptors:V,freezeMethods:e=>{V(e,(a,i)=>{if(_(e)&&["arguments","caller","callee"].includes(i))return!1;if(_(e[i])){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},toObjectSet:(e,a)=>{let i={};return(v(e)?e:String(e).split(a)).forEach(e=>{i[e]=!0}),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,a,i){return a.toUpperCase()+i}),noop:()=>{},toFiniteNumber:(e,a)=>null!=e&&Number.isFinite(e*=1)?e:a,findKey:I,global:D,isContextDefined:q,isSpecCompliantForm:function(e){return!!(e&&_(e.append)&&"FormData"===e[p]&&e[c])},toJSONObject:e=>{let a=new WeakSet,i=e=>{if(k(e)){if(a.has(e))return;if(g(e))return e;if(!("toJSON"in e)){let n;if(a.add(e),C(e))for(let a of(n=[],e)){let e=i(a);b(e)||n.push(e)}else n=v(e)?[]:{},B(e,(e,a)=>{let t=i(e);b(t)||(n[a]=t)});return a.delete(e),n}}return e};return i(e)},isAsyncFn:G,isThenable:e=>e&&(k(e)||_(e))&&_(e.then)&&_(e.catch),setImmediate:K,asap:J,isIterable:Y,isSafeIterable:e=>null!=e&&m(e,c)&&Y(e)},Z=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"]),Q=RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ee=RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ea(e,a){return X.isArray(e)?e.map(e=>ea(e,a)):function(e){let a=0,i=e.length;for(;a<i;){let i=e.charCodeAt(a);if(9!==i&&32!==i)break;a+=1}for(;i>a;){let a=e.charCodeAt(i-1);if(9!==a&&32!==a)break;i-=1}return 0===a&&i===e.length?e:e.slice(a,i)}(String(e).replace(a,""))}function ei(e){let a=Object.create(null);return X.forEach(e.toJSON(),(e,i)=>{a[i]=ea(e,ee)}),a}let en=Symbol("internals");function et(e){return e&&String(e).trim().toLowerCase()}function eo(e){return!1===e||null==e?e:X.isArray(e)?e.map(eo):ea(String(e),Q)}let es=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function er(e){let a=0,i=e.length;for(;a<i;){let i=e.charCodeAt(a);if(9!==i&&32!==i)break;a+=1}for(;i>a;){let a=e.charCodeAt(i-1);if(9!==a&&32!==a)break;i-=1}return 0===a&&i===e.length?e:e.slice(a,i)}function ec(e,a,i,n,t){if(X.isFunction(n))return n.call(this,a,i);if(t&&(a=i),X.isString(a)){if(X.isString(n))return -1!==a.indexOf(n);if(X.isRegExp(n))return n.test(a)}}class ep{constructor(e){e&&this.set(e)}set(e,a,i){let n=this;function t(e,a,i){let t=et(a);if(!t)return;let o=X.findKey(n,t);o&&void 0!==n[o]&&!0!==i&&(void 0!==i||!1===n[o])||(n[o||a]=eo(e))}let o=(e,a)=>X.forEach(e,(e,i)=>t(e,i,a));if(X.isPlainObject(e)||e instanceof this.constructor)o(e,a);else{let n;if(X.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var s;let i,n,t,r;o((r={},(s=e)&&s.split("\n").forEach(function(e){t=e.indexOf(":"),i=e.substring(0,t).trim().toLowerCase(),n=e.substring(t+1).trim();let a=X.hasOwnProp(r,i);!i||a&&X.hasOwnProp(Z,i)||("set-cookie"===i?a?r[i].push(n):r[i]=[n]:r[i]=a?r[i]+", "+n:n)}),r),a)}else if(X.isObject(e)&&X.isSafeIterable(e)){let i=Object.create(null),n,t;for(let a of e){if(!X.isArray(a))throw TypeError("Object iterator must return a key-value pair");t=a[0],X.hasOwnProp(i,t)?(n=i[t],i[t]=X.isArray(n)?[...n,a[1]]:[n,a[1]]):i[t]=a[1]}o(i,a)}else null!=e&&t(a,e,i)}return this}get(e,a){if(e=et(e)){let i=X.findKey(this,e);if(i){let e=this[i];if(!a)return e;if(!0===a){let a,i=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;a=n.exec(e);)i[a[1]]=a[2];return i}if(X.isFunction(a))return a.call(this,e,i);if(X.isRegExp(a))return a.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=et(e)){let i=X.findKey(this,e);return!!(i&&void 0!==this[i]&&(!a||ec(this,this[i],i,a)))}return!1}delete(e,a){let i=this,n=!1;function t(e){if(e=et(e)){let t=X.findKey(i,e);t&&(!a||ec(i,i[t],t,a))&&(delete i[t],n=!0)}}return X.isArray(e)?e.forEach(t):t(e),n}clear(e){let a=Object.keys(this),i=a.length,n=!1;for(;i--;){let t=a[i];(!e||ec(this,this[t],t,e,!0))&&(delete this[t],n=!0)}return n}normalize(e){let a=this,i={};return X.forEach(this,(n,t)=>{let o=X.findKey(i,t);if(o){a[o]=eo(n),delete a[t];return}let s=e?t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,a,i)=>a.toUpperCase()+i):String(t).trim();s!==t&&delete a[t],a[s]=eo(n),i[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let a=Object.create(null);return X.forEach(this,(i,n)=>{null!=i&&!1!==i&&(a[n]=e&&X.isArray(i)?i.join(", "):i)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,a])=>e+": "+a).join("\n")}getSetCookie(){let e=this.get("set-cookie");return X.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){let a=Object.create(null),i=String(e),n=0,t=!1,o=!1;function s(e){let t=er(i.slice(n,e)),o=t.indexOf("=");if(o<1)return;let s=er(t.slice(0,o));if(!es.test(s))return;let r=s.toLowerCase();if("__proto__"===r||"constructor"===r||"prototype"===r)return;let c=er(t.slice(o+1));a[r]=function(e){let a=e.length-1;if(a<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(a))return e;let i="";for(let n=1;n<a;n++){let t=e.charCodeAt(n);if(34===t||92===t&&(n+=1)>=a)return e;i+=e[n]}return i}(c)}for(let e=0;e<i.length;e++){let a=i.charCodeAt(e);t?o?o=!1:92===a?o=!0:34===a&&(t=!1):34===a?t=!0:(44===a||59===a)&&(s(e),n=e+1)}return s(i.length),a}(e)}static concat(e,...a){let i=new this(e);return a.forEach(e=>i.set(e)),i}static accessor(e){let a=(this[en]=this[en]={accessors:{}}).accessors,i=this.prototype;function n(e){let n=et(e);if(!a[n]){let t;t=X.toCamelCase(" "+e),["get","set","has"].forEach(a=>{Object.defineProperty(i,a+t,{__proto__:null,value:function(i,n,t){return this[a].call(this,e,i,n,t)},configurable:!0})}),a[n]=!0}}return X.isArray(e)?e.forEach(n):n(e),this}}ep.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(ep.prototype,({value:e},a)=>{let i=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(e){this[i]=e}}}),X.freezeMethods(ep);let el="[REDACTED ****]";function eu(e){try{return String(e)}catch(e){return""}}class ed extends Error{static from(e,a,i,n,t,o){let s=e.message;!s&&X.isArray(e.errors)&&e.errors.length&&(s=e.errors.map(e=>{try{return e&&e.message?eu(e.message):eu(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError");let r=new ed(s,a||e.code,i,n,t);return Object.defineProperty(r,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),r.name=e.name,null!=e.status&&null==r.status&&(r.status=e.status),o&&Object.assign(r,o),r}constructor(e,a,i,n,t){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),i&&(this.config=i),n&&(this.request=n),t&&(this.response=t,this.status=t.status)}toJSON(){let e,a,i,n=this.config,t=n&&X.hasOwnProp(n,"redact")?n.redact:void 0,o=X.isArray(t)&&t.length>0?(e=new Set(t.map(e=>String(e).toLowerCase())),a=[],(i=n=>{let t;if(null===n||"object"!=typeof n||X.isBuffer(n))return n;if(-1===a.indexOf(n)){if(n instanceof ep&&(n=n.toJSON()),a.push(n),X.isArray(n))t=[],n.forEach((e,a)=>{let n=i(e);X.isUndefined(n)||(t[a]=n)});else{if(!X.isPlainObject(n)&&function(e){if(X.hasOwnProp(e,"toJSON"))return!0;let a=Object.getPrototypeOf(e);for(;a&&a!==Object.prototype;){if(X.hasOwnProp(a,"toJSON"))return!0;a=Object.getPrototypeOf(a)}return!1}(n))return a.pop(),n;for(let[a,o]of(t=Object.create(null),Object.entries(n))){let n=e.has(a.toLowerCase())?el:i(o);X.isUndefined(n)||(t[a]=n)}}return a.pop(),t}})(n)):X.toJSONObject(n);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:o,code:this.code,status:this.status}}}ed.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ed.ERR_BAD_OPTION="ERR_BAD_OPTION",ed.ECONNABORTED="ECONNABORTED",ed.ETIMEDOUT="ETIMEDOUT",ed.ECONNREFUSED="ECONNREFUSED",ed.ERR_NETWORK="ERR_NETWORK",ed.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ed.ERR_DEPRECATED="ERR_DEPRECATED",ed.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ed.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ed.ERR_CANCELED="ERR_CANCELED",ed.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ed.ERR_INVALID_URL="ERR_INVALID_URL",ed.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";let em=ed,ef=e.i(34330).default,ex={isBufferAvailable:()=>"u">typeof Buffer,from:e=>Buffer.from(e)};function eh(e){return X.isPlainObject(e)||X.isArray(e)}function ev(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function eb(e,a,i){return e?e.concat(a).map(function(e,a){return e=ev(e),!i&&a?"["+e+"]":e}).join(i?".":""):a}let eg=X.toFlatObject(X,{},null,function(e){return/^is[A-Z]/.test(e)}),ey=function(e,a,i){if(!X.isObject(e))throw TypeError("target must be an object");a=a||new(ef||FormData);let n=(e,a)=>{let n=X.getSafeProp(i,e);return X.isUndefined(n)?a:n},t=n("metaTokens",!0),o=n("visitor")||f,s=n("dots",!1),r=n("indexes",!1),c=n("Blob")||"u">typeof Blob&&Blob,p=n("maxDepth",100),l=c&&X.isSpecCompliantForm(a),u=[];if(!X.isFunction(o))throw TypeError("visitor must be a function");function d(e){if(null===e)return"";if(X.isDate(e))return e.toISOString();if(X.isBoolean(e))return e.toString();if(!l&&X.isBlob(e))throw new em("Blob is not supported. Use a Buffer instead.");if(X.isArrayBuffer(e)||X.isTypedArray(e)){if(l&&"function"==typeof c)return new c([e]);if(ex&&ex.isBufferAvailable())return ex.from(e);throw new em("Blob is not supported. Use a Buffer instead.",em.ERR_NOT_SUPPORT)}return e}function m(e){if(e>p)throw new em("Object is too deeply nested ("+e+" levels). Max depth: "+p,em.ERR_FORM_DATA_DEPTH_EXCEEDED)}function f(e,i,n){let o=e;if(X.isReactNative(a)&&X.isReactNativeBlob(e))return a.append(eb(n,i,s),d(e)),!1;if(e&&!n&&"object"==typeof e)if(X.endsWith(i,"{}"))i=t?i:i.slice(0,-2),e=function(e){if(p===1/0)return JSON.stringify(e);let a=[];return JSON.stringify(e,function(e,i){if(!X.isObject(i))return i;for(;a.length&&a[a.length-1]!==this;)a.pop();return a.push(i),m(1+a.length-1),i})}(e);else{var c;if(X.isArray(e)&&(c=e,X.isArray(c)&&!c.some(eh))||(X.isFileList(e)||X.endsWith(i,"[]"))&&(o=X.toArray(e)))return i=ev(i),o.forEach(function(e,n){X.isUndefined(e)||null===e||a.append(!0===r?eb([i],n,s):null===r?i:i+"[]",d(e))}),!1}return!!eh(e)||(a.append(eb(n,i,s),d(e)),!1)}let x=Object.assign(eg,{defaultVisitor:f,convertValue:d,isVisitable:eh});if(!X.isObject(e))throw TypeError("data must be an object");return!function e(i,n,t=0){if(!X.isUndefined(i)){if(m(t),-1!==u.indexOf(i))throw Error("Circular reference detected in "+n.join("."));u.push(i),X.forEach(i,function(i,s){!0===(!(X.isUndefined(i)||null===i)&&o.call(a,i,X.isString(s)?s.trim():s,n,x))&&e(i,n?n.concat(s):[s],t+1)}),u.pop()}}(e),a};function ew(e){let a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return a[e]})}function e_(e,a){this._pairs=[],e&&ey(e,this,a)}let eE=e_.prototype;function ek(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ej(e,a,i){let n;if(!a)return e;e=e||"";let t=X.isFunction(i)?{serialize:i}:i,o=X.getSafeProp(t,"encode")||ek,s=X.getSafeProp(t,"serialize");if(n=s?s(a,t):X.isURLSearchParams(a)?a.toString():new e_(a,t).toString(o)){let a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}eE.append=function(e,a){this._pairs.push([e,a])},eE.toString=function(e){let a=e?a=>e.call(this,a,ew):ew;return this._pairs.map(function(e){return a(e[0])+"="+a(e[1])},"").join("&")};let eR=Symbol("internals");function eO(e){return e?e.length:0}function eS(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function eA(e,a){let i=e.handlers,n=eO(i);i!==a.handlersRef?(a.handlersRef=i,a.handlerEntries.clear()):n!==a.handlersLength&&(n?a.handlerEntries.forEach(function(e,n){i[e.index]!==e.handler&&a.handlerEntries.delete(n)}):a.handlerEntries.clear()),a.handlersLength=n}let eC=class{constructor(){this.handlers=[],this[eR]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,a,i){let n={fulfilled:e,rejected:a,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null},t=this[eR];null==this.handlers&&(this.handlers=[]),eA(this,t);let o=t.nextId++;return this.handlers.push(n),t.handlerEntries.set(o,{handler:n,index:this.handlers.length-1}),t.handlersLength=this.handlers.length,o}eject(e){let a=this[eR];eA(this,a);let i=a.handlerEntries.get(e);if(i){if(a.handlerEntries.delete(e),this.handlers[i.index]!==i.handler)return;this.handlers[i.index]=null,a.iterationDepth||(eS(this.handlers),a.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],eA(this,this[eR]))}forEach(e){let a=this[eR];eA(this,a),a.iterationDepth++;try{X.forEach(this.handlers,function(a){null!==a&&e(a)})}finally{--a.iterationDepth||(eA(this,a),eS(this.handlers),a.handlersLength=eO(this.handlers))}}},eP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var eT,eF,eL,eN,eU=e.i(54799);let ez=e.i(92509).default.URLSearchParams,eB="abcdefghijklmnopqrstuvwxyz",eI="0123456789",eD={DIGIT:eI,ALPHA:eB,ALPHA_DIGIT:eB+eB.toUpperCase()+eI},eq={isNode:!0,classes:{URLSearchParams:ez,FormData:ef,Blob:"u">typeof Blob&&Blob||null},ALPHABET:eD,generateString:(e=16,a=eD.ALPHA_DIGIT)=>{let i="",{length:n}=a,t=new Uint32Array(e);eU.default.randomFillSync(t);for(let o=0;o<e;o++)i+=a[t[o]%n];return i},protocols:["http","https","file","data"]},eM="object"==typeof navigator&&navigator||void 0,e$="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;e.s(["hasBrowserEnv",0,!1,"hasStandardBrowserEnv",0,!1,"hasStandardBrowserWebWorkerEnv",0,e$,"navigator",0,eM,"origin",0,"http://localhost"],92545);let eH={...e.i(92545),...eq};function eW(e){if(e>100)throw new em("FormData field is too deeply nested ("+e+" levels). Max depth: 100",em.ERR_FORM_DATA_DEPTH_EXCEEDED)}let eV=function(e){if(X.isFormData(e)&&X.isFunction(e.entries)){let a={};return X.forEachEntry(e,(e,i)=>{!function e(a,i,n,t){eW(t);let o=a[t++];if("__proto__"===o)return!0;let s=Number.isFinite(+o),r=t>=a.length;return(o=!o&&X.isArray(n)?n.length:o,r)?X.hasOwnProp(n,o)?n[o]=X.isArray(n[o])?n[o].concat(i):[n[o],i]:n[o]=i:(X.hasOwnProp(n,o)&&X.isObject(n[o])||(n[o]=[]),e(a,i,n[o],t)&&X.isArray(n[o])&&(n[o]=function(e){let a,i,n={},t=Object.keys(e),o=t.length;for(a=0;a<o;a++)n[i=t[a]]=e[i];return n}(n[o]))),!s}(function(e){let a,i=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;for(;null!==(a=n.exec(e));)eW(i.length),i.push("[]"===a[0]?"":a[1]||a[0]);return i}(e),i,a,0)}),a}return null},eG=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),eK=(e,a)=>null!=e&&X.hasOwnProp(e,a)?e[a]:void 0,eJ={transitional:eP,adapter:["xhr","http","fetch"],transformRequest:[function(e,a){let i,n=a.getContentType()||"",t=n.indexOf("application/json")>-1,o=X.isObject(e);if(o&&X.isHTMLForm(e)&&(e=new FormData(e)),X.isFormData(e))return t?JSON.stringify(eV(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 a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){let a=eK(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return ey(e,new eH.classes.URLSearchParams,{visitor:function(e,a,i,n){return eH.isNode&&X.isBuffer(e)?(this.append(a,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...a}).toString();if((i=X.isFileList(e))||n.indexOf("multipart/form-data")>-1){let n=eK(this,"env"),t=n&&n.FormData;return ey(i?{"files[]":e}:e,t&&new t,a)}}if(o||t){a.setContentType("application/json",!1);var s=e;if(X.isString(s))try{return(0,JSON.parse)(s),X.trim(s)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(s)}return e}],transformResponse:[function(e){let a=eK(this,"transitional")||eJ.transitional,i=a&&a.forcedJSONParsing,n=eK(this,"responseType"),t="json"===n;if(X.isResponse(e)||X.isReadableStream(e))return e;if(e&&X.isString(e)&&(i&&!n||t)){let i=a&&a.silentJSONParsing;try{return JSON.parse(e,eK(this,"parseReviver"))}catch(e){if(!i&&t){if("SyntaxError"===e.name)throw em.from(e,em.ERR_BAD_RESPONSE,this,null,eK(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eH.classes.FormData,Blob:eH.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function eY(e,a){let i=this||eJ,n=a||i,t=ep.from(n.headers),o=n.data;return X.forEach(e,function(e){o=e.call(i,o,t.normalize(),a?a.status:void 0)}),t.normalize(),o}function eX(e){return!!(e&&e.__CANCEL__)}X.forEach(eG,e=>{eJ.headers[e]={}});let eZ=class extends em{constructor(e,a,i){super(null==e?"canceled":e,em.ERR_CANCELED,a,i),this.name="CanceledError",this.__CANCEL__=!0}};function eQ(e,a,i){let n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):a(new em("Request failed with status code "+i.status,i.status>=400&&i.status<500?em.ERR_BAD_REQUEST:em.ERR_BAD_RESPONSE,i.config,i.request,i))}let e0=/[\t\n\r]/g;function e1(e){if("string"!=typeof e)return e;let a=0;for(;a<e.length&&32>=e.charCodeAt(a);)a++;return e.slice(a).replace(e0,"")}let e2=/^https?:(?!\/\/)/i;function e3(e,a){if("string"==typeof e){let n=e1(e);if(e2.test(n)){var i;let e,t,o;throw new em(`Invalid URL ${JSON.stringify((o=(-1===(t=(e=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${el}@`)).indexOf("#"))?e:e.slice(0,t)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${el}`),-1===t?o:`${o}#${!(i=e.slice(t+1))?i:i.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,a,i="")=>`${a}${i}${el}`)}`))}: missing "//" after protocol`,em.ERR_INVALID_URL,a)}}}function e4(e,a,i,n){e3(a,n);let t=!("string"==typeof a&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));if(e&&(t||!1===i)){e3(e,n);if(!a)return e;let i=e.length;for(;i>0&&47===e.charCodeAt(i-1);)i--;return e.slice(0,i)+"/"+a.replace(/^\/+/,"")}return a}var e6={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function e8(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var e5=e.i(70513),e9=e.i(21517),e7=e.i(24836),ae=e.i(25328),aa=e.i(24361),ai=e.i(14747),an=e.i(82637),at=e.i(6461);let ao="1.20.0";function as(e){let a=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return a&&a[1]||""}let ar=/^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;var ac=e.i(88947);let ap=["content-type","content-length"];function al(e,a,i){"content-only"!==i?e.set(a):Object.entries(a||{}).forEach(([a,i])=>{ap.includes(a.toLowerCase())&&e.set(a,i)})}var au=ac;let ad=Symbol("internals");class am extends au.default.Transform{constructor(e){super({readableHighWaterMark:(e=X.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(e,a)=>!X.isUndefined(a[e]))).chunkSize});const a=this[ad]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",e=>{"progress"!==e||a.isCaptured||(a.isCaptured=!0)})}_read(e){let a=this[ad];return a.onReadCallback&&a.onReadCallback(),super._read(e)}_transform(e,a,i){let n=this[ad],t=n.maxRate,o=this.readableHighWaterMark,s=n.timeWindow,r=t/(1e3/s),c=!1!==n.minChunkSize?Math.max(n.minChunkSize,.01*r):0,p=(e,a)=>{let i=Buffer.byteLength(e);n.bytesSeen+=i,n.bytes+=i,n.isCaptured&&this.emit("progress",n.bytesSeen),this.push(e)?process.nextTick(a):n.onReadCallback=()=>{n.onReadCallback=null,process.nextTick(a)}},l=(e,a)=>{let i,l=Buffer.byteLength(e),u=null,d=o,m=0;if(t){let e=Date.now();(!n.ts||(m=e-n.ts)>=s)&&(n.ts=e,i=r-n.bytes,n.bytes=i<0?-i:0,m=0),i=r-n.bytes}if(t){if(i<=0)return setTimeout(()=>{a(null,e)},s-m);i<d&&(d=i)}d&&l>d&&l-d>c&&(u=e.subarray(d),e=e.subarray(0,d)),p(e,u?()=>{process.nextTick(a,null,u)}:a)};l(e,function e(a,n){if(a)return i(a);n?l(n,e):i(null)})}}var af=e.i(27699);let{asyncIterator:ax}=Symbol,ah=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[ax]?yield*e[ax]():yield e},av=eH.ALPHABET.ALPHA_DIGIT+"-_",ab="function"==typeof TextEncoder?new TextEncoder:new aa.default.TextEncoder,ag=ab.encode("\r\n");class ay{constructor(e,a){const{escapeName:i}=this.constructor,n=X.isString(a);let t=`Content-Disposition: form-data; name="${i(e)}"${!n&&a.name?`; filename="${i(a.name)}"`:""}\r
@@ -1,4 +1,4 @@
1
- module.exports=[12892,e=>{"use strict";var a=e.i(2157),i=e.i(50227);let n=["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID","SENTRY_API_KEY","SENTRY_ORG_SLUG","SENTRY_PROJECT_ID"],t="NEWRELIC_REGION",o={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},s={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},r="AI_PROVIDER";function c(e){return process.env[e]??""}e.s(["AI_PROVIDERS",0,s,"AI_PROVIDER_KEY",0,r,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,t,"SETUP_KEYS",0,n,"activeAi",0,function(){let e=process.env[r];for(let a of(e&&e in s?[e]:[]).concat(Object.keys(s))){let e=process.env[s[a].key];if(e)return{provider:a,key:e}}return null},"env",0,c,"isConfigured",0,function(){return n.every(e=>c(e))},"nrHosts",0,(e="eu"===process.env[t]?"eu":"us")=>o[e],"writeEnvLocal",0,function(e,n=process.env.METRICFLOW_ENV_FILE||(0,i.join)(process.cwd(),".env.local")){let t=(0,a.existsSync)(n)?(0,a.readFileSync)(n,"utf8").split("\n"):[],o=new Map(Object.entries(e)),s=t.map(e=>{let a=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(a&&o.has(a)){let e=o.get(a);return o.delete(a),`${a}=${e}`}return e});for(;s.length&&""===s[s.length-1];)s.pop();for(let[e,a]of o)s.push(`${e}=${a}`);let r=`${n}.tmp`;for(let[i,t]of((0,a.writeFileSync)(r,s.join("\n")+"\n",{mode:384}),(0,a.renameSync)(r,n),Object.entries(e)))process.env[i]=t}])},34594,(e,a,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){return function(a,i){return new Promise((n,t)=>{e.call(this,a,i,(e,a)=>{e?t(e):n(a)})})}}},44342,(e,a,i)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let t=e.r(27699),o=n(e.r(20287)),s=n(e.r(34594)),r=o.default("agent-base");function c(){let{stack:e}=Error();return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function p(e,a){return new p.Agent(e,a)}var l=p||(p={});class u extends t.EventEmitter{constructor(e,a){super();let i=a;"function"==typeof e?this.callback=e:e&&(i=e),this.timeout=null,i&&"number"==typeof i.timeout&&(this.timeout=i.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,a,i){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,a){let i=Object.assign({},a);"boolean"!=typeof i.secureEndpoint&&(i.secureEndpoint=c()),null==i.host&&(i.host="localhost"),null==i.port&&(i.port=i.secureEndpoint?443:80),null==i.protocol&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,e._last=!0,e.shouldKeepAlive=!1;let n=!1,t=null,o=i.timeout||this.timeout,p=a=>{e._hadError||(e.emit("error",a),e._hadError=!0)},l=e=>{n||(null!==t&&(clearTimeout(t),t=null),p(e))},u=a=>{if(!n){if(null!=t&&(clearTimeout(t),t=null),a&&"function"==typeof a.addRequest){r("Callback returned another Agent instance %o",a.constructor.name),a.addRequest(e,i);return}if(a){a.once("free",()=>{this.freeSocket(a,i)}),e.onSocket(a);return}p(Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``))}};if("function"!=typeof this.callback)return void p(Error("`callback` is not defined"));this.promisifiedCallback||(this.callback.length>=3?(r("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof o&&o>0&&(t=setTimeout(()=>{t=null,n=!0;let e=Error(`A "socket" was not created for HTTP request before ${o}ms`);e.code="ETIMEOUT",p(e)},o)),"port"in i&&"number"!=typeof i.port&&(i.port=Number(i.port));try{r("Resolving socket for %o request: %o",i.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,i)).then(u,l)}catch(e){Promise.reject(e).catch(l)}}freeSocket(e,a){r("Freeing socket %o %o",e.constructor.name,a),e.destroy()}destroy(){r("Destroying agent %o",this.constructor.name)}}l.Agent=u,l.prototype=l.Agent.prototype,a.exports=p},72986,(e,a,i)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let t=n(e.r(20287)).default("https-proxy-agent:parse-proxy-response");i.default=function(e){return new Promise((a,i)=>{let n=0,o=[];function s(){let i=e.read();i?function(e){o.push(e),n+=e.length;let i=Buffer.concat(o,n);if(-1===i.indexOf("\r\n\r\n")){t("have not received end of HTTP headers yet..."),s();return}let r=i.toString("ascii",0,i.indexOf("\r\n")),c=+r.split(" ")[1];t("got proxy server response: %o",r),a({statusCode:c,buffered:i})}(i):e.once("readable",s)}function r(e){t("onclose had error %o",e)}function c(){t("onend")}e.on("error",function a(n){e.removeListener("end",c),e.removeListener("error",a),e.removeListener("close",r),e.removeListener("readable",s),t("onerror %o",n),i(n)}),e.on("close",r),e.on("end",c),s()})}},62370,(e,a,i)=>{"use strict";var n=e.e&&e.e.__awaiter||function(e,a,i,n){return new(i||(i=Promise))(function(t,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function r(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var a;e.done?t(e.value):((a=e.value)instanceof i?a:new i(function(e){e(a)})).then(s,r)}c((n=n.apply(e,a||[])).next())})},t=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let o=t(e.r(4446)),s=t(e.r(55004)),r=t(e.r(92509)),c=t(e.r(49719)),p=t(e.r(20287)),l=e.r(44342),u=t(e.r(72986)),d=p.default("https-proxy-agent:agent");class m extends l.Agent{constructor(e){let a;if(!(a="string"==typeof e?r.default.parse(e):e))throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("creating new HttpsProxyAgent instance: %o",a),super(a);const i=Object.assign({},a);this.secureProxy=a.secureProxy||function(e){return"string"==typeof e&&/^https:?$/i.test(e)}(i.protocol),i.host=i.hostname||i.host,"string"==typeof i.port&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),!this.secureProxy||"ALPNProtocols"in i||(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(e,a){return n(this,void 0,void 0,function*(){var i,n;let t,{proxy:r,secureProxy:p}=this;p?(d("Creating `tls.Socket`: %o",r),t=s.default.connect(r)):(d("Creating `net.Socket`: %o",r),t=o.default.connect(r));let l=Object.assign({},r.headers),m=`${a.host}:${a.port}`,x=`CONNECT ${m} HTTP/1.1\r
1
+ module.exports=[12892,e=>{"use strict";var a=e.i(2157),i=e.i(50227);let n=["NEWRELIC_API_KEY","NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID","SENTRY_API_KEY","SENTRY_DSN"],t="NEWRELIC_REGION",o={us:{graphql:"https://api.newrelic.com/graphql",ingest:"https://insights-collector.newrelic.com"},eu:{graphql:"https://api.eu.newrelic.com/graphql",ingest:"https://insights-collector.eu01.nr-data.net"}},s={gemini:{label:"Google Gemini",key:"GEMINI_API_KEY"},claude:{label:"Anthropic Claude",key:"CLAUDE_API_KEY"},openai:{label:"OpenAI",key:"OPENAI_API_KEY"}},r="AI_PROVIDER";function c(e){return process.env[e]??""}e.s(["AI_PROVIDERS",0,s,"AI_PROVIDER_KEY",0,r,"INSERT_KEY",0,"NEWRELIC_INSERT_KEY","REGION_KEY",0,t,"SETUP_KEYS",0,n,"activeAi",0,function(){let e=process.env[r];for(let a of(e&&e in s?[e]:[]).concat(Object.keys(s))){let e=process.env[s[a].key];if(e)return{provider:a,key:e}}return null},"env",0,c,"isConfigured",0,function(){return n.every(e=>c(e))},"nrHosts",0,(e="eu"===process.env[t]?"eu":"us")=>o[e],"writeEnvLocal",0,function(e,n=process.env.METRICFLOW_ENV_FILE||(0,i.join)(process.cwd(),".env.local")){let t=(0,a.existsSync)(n)?(0,a.readFileSync)(n,"utf8").split("\n"):[],o=new Map(Object.entries(e)),s=t.map(e=>{let a=e.match(/^\s*([A-Z0-9_]+)\s*=/)?.[1];if(a&&o.has(a)){let e=o.get(a);return o.delete(a),`${a}=${e}`}return e});for(;s.length&&""===s[s.length-1];)s.pop();for(let[e,a]of o)s.push(`${e}=${a}`);let r=`${n}.tmp`;for(let[i,t]of((0,a.writeFileSync)(r,s.join("\n")+"\n",{mode:384}),(0,a.renameSync)(r,n),Object.entries(e)))process.env[i]=t}])},34594,(e,a,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=function(e){return function(a,i){return new Promise((n,t)=>{e.call(this,a,i,(e,a)=>{e?t(e):n(a)})})}}},44342,(e,a,i)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let t=e.r(27699),o=n(e.r(20287)),s=n(e.r(34594)),r=o.default("agent-base");function c(){let{stack:e}=Error();return"string"==typeof e&&e.split("\n").some(e=>-1!==e.indexOf("(https.js:")||-1!==e.indexOf("node:https:"))}function p(e,a){return new p.Agent(e,a)}var l=p||(p={});class u extends t.EventEmitter{constructor(e,a){super();let i=a;"function"==typeof e?this.callback=e:e&&(i=e),this.timeout=null,i&&"number"==typeof i.timeout&&(this.timeout=i.timeout),this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){return"number"==typeof this.explicitDefaultPort?this.explicitDefaultPort:c()?443:80}set defaultPort(e){this.explicitDefaultPort=e}get protocol(){return"string"==typeof this.explicitProtocol?this.explicitProtocol:c()?"https:":"http:"}set protocol(e){this.explicitProtocol=e}callback(e,a,i){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(e,a){let i=Object.assign({},a);"boolean"!=typeof i.secureEndpoint&&(i.secureEndpoint=c()),null==i.host&&(i.host="localhost"),null==i.port&&(i.port=i.secureEndpoint?443:80),null==i.protocol&&(i.protocol=i.secureEndpoint?"https:":"http:"),i.host&&i.path&&delete i.path,delete i.agent,delete i.hostname,delete i._defaultAgent,delete i.defaultPort,delete i.createConnection,e._last=!0,e.shouldKeepAlive=!1;let n=!1,t=null,o=i.timeout||this.timeout,p=a=>{e._hadError||(e.emit("error",a),e._hadError=!0)},l=e=>{n||(null!==t&&(clearTimeout(t),t=null),p(e))},u=a=>{if(!n){if(null!=t&&(clearTimeout(t),t=null),a&&"function"==typeof a.addRequest){r("Callback returned another Agent instance %o",a.constructor.name),a.addRequest(e,i);return}if(a){a.once("free",()=>{this.freeSocket(a,i)}),e.onSocket(a);return}p(Error(`no Duplex stream was returned to agent-base for \`${e.method} ${e.path}\``))}};if("function"!=typeof this.callback)return void p(Error("`callback` is not defined"));this.promisifiedCallback||(this.callback.length>=3?(r("Converting legacy callback function to promise"),this.promisifiedCallback=s.default(this.callback)):this.promisifiedCallback=this.callback),"number"==typeof o&&o>0&&(t=setTimeout(()=>{t=null,n=!0;let e=Error(`A "socket" was not created for HTTP request before ${o}ms`);e.code="ETIMEOUT",p(e)},o)),"port"in i&&"number"!=typeof i.port&&(i.port=Number(i.port));try{r("Resolving socket for %o request: %o",i.protocol,`${e.method} ${e.path}`),Promise.resolve(this.promisifiedCallback(e,i)).then(u,l)}catch(e){Promise.reject(e).catch(l)}}freeSocket(e,a){r("Freeing socket %o %o",e.constructor.name,a),e.destroy()}destroy(){r("Destroying agent %o",this.constructor.name)}}l.Agent=u,l.prototype=l.Agent.prototype,a.exports=p},72986,(e,a,i)=>{"use strict";var n=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let t=n(e.r(20287)).default("https-proxy-agent:parse-proxy-response");i.default=function(e){return new Promise((a,i)=>{let n=0,o=[];function s(){let i=e.read();i?function(e){o.push(e),n+=e.length;let i=Buffer.concat(o,n);if(-1===i.indexOf("\r\n\r\n")){t("have not received end of HTTP headers yet..."),s();return}let r=i.toString("ascii",0,i.indexOf("\r\n")),c=+r.split(" ")[1];t("got proxy server response: %o",r),a({statusCode:c,buffered:i})}(i):e.once("readable",s)}function r(e){t("onclose had error %o",e)}function c(){t("onend")}e.on("error",function a(n){e.removeListener("end",c),e.removeListener("error",a),e.removeListener("close",r),e.removeListener("readable",s),t("onerror %o",n),i(n)}),e.on("close",r),e.on("end",c),s()})}},62370,(e,a,i)=>{"use strict";var n=e.e&&e.e.__awaiter||function(e,a,i,n){return new(i||(i=Promise))(function(t,o){function s(e){try{c(n.next(e))}catch(e){o(e)}}function r(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var a;e.done?t(e.value):((a=e.value)instanceof i?a:new i(function(e){e(a)})).then(s,r)}c((n=n.apply(e,a||[])).next())})},t=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let o=t(e.r(4446)),s=t(e.r(55004)),r=t(e.r(92509)),c=t(e.r(49719)),p=t(e.r(20287)),l=e.r(44342),u=t(e.r(72986)),d=p.default("https-proxy-agent:agent");class m extends l.Agent{constructor(e){let a;if(!(a="string"==typeof e?r.default.parse(e):e))throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");d("creating new HttpsProxyAgent instance: %o",a),super(a);const i=Object.assign({},a);this.secureProxy=a.secureProxy||function(e){return"string"==typeof e&&/^https:?$/i.test(e)}(i.protocol),i.host=i.hostname||i.host,"string"==typeof i.port&&(i.port=parseInt(i.port,10)),!i.port&&i.host&&(i.port=this.secureProxy?443:80),!this.secureProxy||"ALPNProtocols"in i||(i.ALPNProtocols=["http 1.1"]),i.host&&i.path&&(delete i.path,delete i.pathname),this.proxy=i}callback(e,a){return n(this,void 0,void 0,function*(){var i,n;let t,{proxy:r,secureProxy:p}=this;p?(d("Creating `tls.Socket`: %o",r),t=s.default.connect(r)):(d("Creating `net.Socket`: %o",r),t=o.default.connect(r));let l=Object.assign({},r.headers),m=`${a.host}:${a.port}`,x=`CONNECT ${m} HTTP/1.1\r
2
2
  `;r.auth&&(l["Proxy-Authorization"]=`Basic ${Buffer.from(r.auth).toString("base64")}`);let{host:h,port:v,secureEndpoint:b}=a;for(let e of(i=v,((n=b)||80!==i)&&(!n||443!==i)&&(h+=`:${v}`),l.Host=h,l.Connection="close",Object.keys(l)))x+=`${e}: ${l[e]}\r
3
3
  `;let g=u.default(t);t.write(`${x}\r
4
4
  `);let{statusCode:y,buffered:w}=yield g;if(200===y){if(e.once("socket",f),a.secureEndpoint){d("Upgrading socket connection to TLS");let e=a.servername||a.host;return s.default.connect(Object.assign(Object.assign({},function(e,...a){let i,n={};for(i in e)a.includes(i)||(n[i]=e[i]);return n}(a,"host","hostname","path","port")),{socket:t,servername:e}))}return t}t.destroy();let _=new o.default.Socket({writable:!1});return _.readable=!0,e.once("socket",e=>{d("replaying proxy buffer for failed request"),c.default(e.listenerCount("data")>0),e.push(w),e.push(null)}),_})}}function f(e){e.resume()}i.default=m},70513,(e,a,i)=>{"use strict";var n;let t=(e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}})(e.r(62370));function o(e){return new t.default(e)}(n=o||(o={})).HttpsProxyAgent=t.default,n.prototype=t.default.prototype,a.exports=o},60756,e=>{"use strict";let a,i,n,t;function o(e,a){return function(){return e.apply(a,arguments)}}let{toString:s}=Object.prototype,{getPrototypeOf:r}=Object,{iterator:c,toStringTag:p}=Symbol,l=(({hasOwnProperty:e})=>(a,i)=>e.call(a,i))(Object.prototype),u=e=>"string"==typeof e&&("__proto__"===e||"constructor"===e||"prototype"===e),d=(e,a,i)=>e===Object.prototype||!i&&null===a,m=(e,a)=>{let i=e,n=[];for(;null!=i&&-1===n.indexOf(i);){n.push(i);let t=r(i);if(d(i,t,i===e))break;if(l(i,a))return!0;i=t}return!1},f=(a=Object.create(null),e=>{let i=s.call(e);return a[i]||(a[i]=i.slice(8,-1).toLowerCase())}),x=e=>(e=e.toLowerCase(),a=>f(a)===e),h=e=>a=>typeof a===e,{isArray:v}=Array,b=h("undefined");function g(e){return null!==e&&!b(e)&&null!==e.constructor&&!b(e.constructor)&&_(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}let y=x("ArrayBuffer"),w=h("string"),_=h("function"),E=h("number"),k=e=>null!==e&&"object"==typeof e,j=e=>{if(!k(e))return!1;let a=r(e);return(null===a||a===Object.prototype||null===r(a))&&!m(e,p)&&!m(e,c)},R=x("Date"),O=x("File"),S=x("Blob"),A=x("FileList"),C=x("Set"),P="u">typeof globalThis?globalThis:"u">typeof self?self:e.g,T=void 0!==P.FormData?P.FormData:void 0,F=x("URLSearchParams"),[L,N,U,z]=["ReadableStream","Request","Response","Headers"].map(x);function B(e,a,{allOwnKeys:i=!1}={}){let n,t;if(null!=e)if("object"!=typeof e&&(e=[e]),v(e))for(n=0,t=e.length;n<t;n++)a.call(null,e[n],n,e);else{let t;if(g(e))return;let o=i?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;for(n=0;n<s;n++)t=o[n],a.call(null,e[t],t,e)}}function I(e,a){let i;if(g(e))return null;a=a.toLowerCase();let n=Object.keys(e),t=n.length;for(;t-- >0;)if(a===(i=n[t]).toLowerCase())return i;return null}let D="u">typeof globalThis?globalThis:"u">typeof self?self:e.g,q=e=>!b(e)&&e!==D,M=(i="u">typeof Uint8Array&&r(Uint8Array),e=>i&&e instanceof i),$=x("HTMLFormElement"),{propertyIsEnumerable:H}=Object.prototype,W=x("RegExp"),V=(e,a)=>{let i=Object.getOwnPropertyDescriptors(e),n={};B(i,(i,t)=>{let o;!1!==(o=a(i,t,e))&&(n[t]=o||i)}),Object.defineProperties(e,n)},G=x("AsyncFunction"),K=(eT="function"==typeof setImmediate,eF=_(D.postMessage),eT?setImmediate:eF?(eL=`axios@${Math.random()}`,eN=[],D.addEventListener("message",({source:e,data:a})=>{e===D&&a===eL&&eN.length&&eN.shift()()},!1),e=>{eN.push(e),D.postMessage(eL,"*")}):e=>setTimeout(e)),J="u">typeof queueMicrotask?queueMicrotask.bind(D):"u">typeof process&&process.nextTick||K,Y=e=>null!=e&&_(e[c]),X={isArray:v,isArrayBuffer:y,isBuffer:g,isFormData:e=>{if(!e)return!1;if(T&&e instanceof T)return!0;let a=r(e);if(!a||a===Object.prototype||!_(e.append))return!1;let i=f(e);return"formdata"===i||"object"===i&&_(e.toString)&&"[object FormData]"===e.toString()},isArrayBufferView:function(e){return"u">typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&y(e.buffer)},isString:w,isNumber:E,isBoolean:e=>!0===e||!1===e,isObject:k,isPlainObject:j,isEmptyObject:e=>{if(!k(e)||g(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:L,isRequest:N,isResponse:U,isHeaders:z,isUndefined:b,isDate:R,isFile:O,isReactNativeBlob:e=>!!(e&&void 0!==e.uri),isReactNative:e=>e&&void 0!==e.getParts,isBlob:S,isRegExp:W,isFunction:_,isStream:e=>k(e)&&_(e.pipe),isURLSearchParams:F,isTypedArray:M,isFileList:A,forEach:B,merge:function e(...a){let{caseless:i,skipUndefined:n}=q(this)&&this||{},t={},o=(a,o)=>{if("__proto__"===o||"constructor"===o||"prototype"===o)return;let s=i&&"string"==typeof o&&I(t,o)||o,r=l(t,s)?t[s]:void 0;j(r)&&j(a)?t[s]=e(r,a):j(a)?t[s]=e({},a):v(a)?t[s]=a.slice():n&&b(a)||(t[s]=a)};for(let e=0,i=a.length;e<i;e++){let i=a[e];if(!i||g(i)||(B(i,o),"object"!=typeof i||v(i)))continue;let n=Object.getOwnPropertySymbols(i);for(let e=0;e<n.length;e++){let a=n[e];H.call(i,a)&&o(i[a],a)}}return t},extend:(e,a,i,{allOwnKeys:n}={})=>(B(a,(a,n)=>{i&&_(a)?Object.defineProperty(e,n,{__proto__:null,value:o(a,i),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,n,{__proto__:null,value:a,writable:!0,enumerable:!0,configurable:!0})},{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,a,i,n)=>{e.prototype=Object.create(a.prototype,n),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:a.prototype}),i&&Object.assign(e.prototype,i)},toFlatObject:(e,a,i,n)=>{let t,o,s,c={};if(a=a||{},null==e)return a;do{for(o=(t=Object.getOwnPropertyNames(e)).length;o-- >0;)s=t[o],(!n||n(s,e,a))&&!c[s]&&(a[s]=e[s],c[s]=!0);e=!1!==i&&r(e)}while(e&&(!i||i(e,a))&&e!==Object.prototype)return a},kindOf:f,kindOfTest:x,endsWith:(e,a,i)=>{e=String(e),(void 0===i||i>e.length)&&(i=e.length),i-=a.length;let n=e.indexOf(a,i);return -1!==n&&n===i},toArray:e=>{if(!e)return null;if(v(e))return e;let a=e.length;if(!E(a))return null;let i=Array(a);for(;a-- >0;)i[a]=e[a];return i},forEachEntry:(e,a)=>{let i,n=(e&&e[c]).call(e);for(;(i=n.next())&&!i.done;){let n=i.value;a.call(e,n[0],n[1])}},matchAll:(e,a)=>{let i,n=[];for(;null!==(i=e.exec(a));)n.push(i);return n},isHTMLForm:$,hasOwnProperty:l,hasOwnProp:l,hasOwnInPrototypeChain:m,getSafeProp:(e,a)=>null!=e&&m(e,a)?e[a]:void 0,toSafeFlatObject:e=>{if(null==e||"object"!=typeof e&&"function"!=typeof e)return e;let a=r(e);if(null===a&&(e=>{if(!Object.isExtensible(e))return!1;let a=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&a.push(...Object.getOwnPropertySymbols(e)),a.every(a=>{if(u(a))return!1;let i=Object.getOwnPropertyDescriptor(e,a);return!!i&&i.configurable&&!0===i.writable})})(e))return e;let i=Object.create(null),n=Object.create(null),t=[],o=e;for(;null!=o&&-1===t.indexOf(o);){t.push(o);let s=o===e?a:r(o);if(d(o,s,o===e))break;let c=Object.getOwnPropertyNames(o);for(let a of(Object.getOwnPropertySymbols&&c.push(...Object.getOwnPropertySymbols(o)),c))!u(a)&&(l(n,a)||(i[a]=e[a],n[a]=!0));o=s}return i},reduceDescriptors:V,freezeMethods:e=>{V(e,(a,i)=>{if(_(e)&&["arguments","caller","callee"].includes(i))return!1;if(_(e[i])){if(a.enumerable=!1,"writable"in a){a.writable=!1;return}a.set||(a.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},toObjectSet:(e,a)=>{let i={};return(v(e)?e:String(e).split(a)).forEach(e=>{i[e]=!0}),i},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,a,i){return a.toUpperCase()+i}),noop:()=>{},toFiniteNumber:(e,a)=>null!=e&&Number.isFinite(e*=1)?e:a,findKey:I,global:D,isContextDefined:q,isSpecCompliantForm:function(e){return!!(e&&_(e.append)&&"FormData"===e[p]&&e[c])},toJSONObject:e=>{let a=new WeakSet,i=e=>{if(k(e)){if(a.has(e))return;if(g(e))return e;if(!("toJSON"in e)){let n;if(a.add(e),C(e))for(let a of(n=[],e)){let e=i(a);b(e)||n.push(e)}else n=v(e)?[]:{},B(e,(e,a)=>{let t=i(e);b(t)||(n[a]=t)});return a.delete(e),n}}return e};return i(e)},isAsyncFn:G,isThenable:e=>e&&(k(e)||_(e))&&_(e.then)&&_(e.catch),setImmediate:K,asap:J,isIterable:Y,isSafeIterable:e=>null!=e&&m(e,c)&&Y(e)},Z=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"]),Q=RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),ee=RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ea(e,a){return X.isArray(e)?e.map(e=>ea(e,a)):function(e){let a=0,i=e.length;for(;a<i;){let i=e.charCodeAt(a);if(9!==i&&32!==i)break;a+=1}for(;i>a;){let a=e.charCodeAt(i-1);if(9!==a&&32!==a)break;i-=1}return 0===a&&i===e.length?e:e.slice(a,i)}(String(e).replace(a,""))}function ei(e){let a=Object.create(null);return X.forEach(e.toJSON(),(e,i)=>{a[i]=ea(e,ee)}),a}let en=Symbol("internals");function et(e){return e&&String(e).trim().toLowerCase()}function eo(e){return!1===e||null==e?e:X.isArray(e)?e.map(eo):ea(String(e),Q)}let es=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function er(e){let a=0,i=e.length;for(;a<i;){let i=e.charCodeAt(a);if(9!==i&&32!==i)break;a+=1}for(;i>a;){let a=e.charCodeAt(i-1);if(9!==a&&32!==a)break;i-=1}return 0===a&&i===e.length?e:e.slice(a,i)}function ec(e,a,i,n,t){if(X.isFunction(n))return n.call(this,a,i);if(t&&(a=i),X.isString(a)){if(X.isString(n))return -1!==a.indexOf(n);if(X.isRegExp(n))return n.test(a)}}class ep{constructor(e){e&&this.set(e)}set(e,a,i){let n=this;function t(e,a,i){let t=et(a);if(!t)return;let o=X.findKey(n,t);o&&void 0!==n[o]&&!0!==i&&(void 0!==i||!1===n[o])||(n[o||a]=eo(e))}let o=(e,a)=>X.forEach(e,(e,i)=>t(e,i,a));if(X.isPlainObject(e)||e instanceof this.constructor)o(e,a);else{let n;if(X.isString(e)&&(e=e.trim())&&(n=e,!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(n.trim()))){var s;let i,n,t,r;o((r={},(s=e)&&s.split("\n").forEach(function(e){t=e.indexOf(":"),i=e.substring(0,t).trim().toLowerCase(),n=e.substring(t+1).trim();let a=X.hasOwnProp(r,i);!i||a&&X.hasOwnProp(Z,i)||("set-cookie"===i?a?r[i].push(n):r[i]=[n]:r[i]=a?r[i]+", "+n:n)}),r),a)}else if(X.isObject(e)&&X.isSafeIterable(e)){let i=Object.create(null),n,t;for(let a of e){if(!X.isArray(a))throw TypeError("Object iterator must return a key-value pair");t=a[0],X.hasOwnProp(i,t)?(n=i[t],i[t]=X.isArray(n)?[...n,a[1]]:[n,a[1]]):i[t]=a[1]}o(i,a)}else null!=e&&t(a,e,i)}return this}get(e,a){if(e=et(e)){let i=X.findKey(this,e);if(i){let e=this[i];if(!a)return e;if(!0===a){let a,i=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;for(;a=n.exec(e);)i[a[1]]=a[2];return i}if(X.isFunction(a))return a.call(this,e,i);if(X.isRegExp(a))return a.exec(e);throw TypeError("parser must be boolean|regexp|function")}}}has(e,a){if(e=et(e)){let i=X.findKey(this,e);return!!(i&&void 0!==this[i]&&(!a||ec(this,this[i],i,a)))}return!1}delete(e,a){let i=this,n=!1;function t(e){if(e=et(e)){let t=X.findKey(i,e);t&&(!a||ec(i,i[t],t,a))&&(delete i[t],n=!0)}}return X.isArray(e)?e.forEach(t):t(e),n}clear(e){let a=Object.keys(this),i=a.length,n=!1;for(;i--;){let t=a[i];(!e||ec(this,this[t],t,e,!0))&&(delete this[t],n=!0)}return n}normalize(e){let a=this,i={};return X.forEach(this,(n,t)=>{let o=X.findKey(i,t);if(o){a[o]=eo(n),delete a[t];return}let s=e?t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,a,i)=>a.toUpperCase()+i):String(t).trim();s!==t&&delete a[t],a[s]=eo(n),i[s]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){let a=Object.create(null);return X.forEach(this,(i,n)=>{null!=i&&!1!==i&&(a[n]=e&&X.isArray(i)?i.join(", "):i)}),a}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,a])=>e+": "+a).join("\n")}getSetCookie(){let e=this.get("set-cookie");return X.isArray(e)?e:null==e||!1===e?[]:[e]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static parseParameters(e){return function(e){let a=Object.create(null),i=String(e),n=0,t=!1,o=!1;function s(e){let t=er(i.slice(n,e)),o=t.indexOf("=");if(o<1)return;let s=er(t.slice(0,o));if(!es.test(s))return;let r=s.toLowerCase();if("__proto__"===r||"constructor"===r||"prototype"===r)return;let c=er(t.slice(o+1));a[r]=function(e){let a=e.length-1;if(a<1||34!==e.charCodeAt(0)||34!==e.charCodeAt(a))return e;let i="";for(let n=1;n<a;n++){let t=e.charCodeAt(n);if(34===t||92===t&&(n+=1)>=a)return e;i+=e[n]}return i}(c)}for(let e=0;e<i.length;e++){let a=i.charCodeAt(e);t?o?o=!1:92===a?o=!0:34===a&&(t=!1):34===a?t=!0:(44===a||59===a)&&(s(e),n=e+1)}return s(i.length),a}(e)}static concat(e,...a){let i=new this(e);return a.forEach(e=>i.set(e)),i}static accessor(e){let a=(this[en]=this[en]={accessors:{}}).accessors,i=this.prototype;function n(e){let n=et(e);if(!a[n]){let t;t=X.toCamelCase(" "+e),["get","set","has"].forEach(a=>{Object.defineProperty(i,a+t,{__proto__:null,value:function(i,n,t){return this[a].call(this,e,i,n,t)},configurable:!0})}),a[n]=!0}}return X.isArray(e)?e.forEach(n):n(e),this}}ep.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),X.reduceDescriptors(ep.prototype,({value:e},a)=>{let i=a[0].toUpperCase()+a.slice(1);return{get:()=>e,set(e){this[i]=e}}}),X.freezeMethods(ep);let el="[REDACTED ****]";function eu(e){try{return String(e)}catch(e){return""}}class ed extends Error{static from(e,a,i,n,t,o){let s=e.message;!s&&X.isArray(e.errors)&&e.errors.length&&(s=e.errors.map(e=>{try{return e&&e.message?eu(e.message):eu(e)}catch(e){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError");let r=new ed(s,a||e.code,i,n,t);return Object.defineProperty(r,"cause",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),r.name=e.name,null!=e.status&&null==r.status&&(r.status=e.status),o&&Object.assign(r,o),r}constructor(e,a,i,n,t){super(e),Object.defineProperty(this,"message",{__proto__:null,value:e,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,a&&(this.code=a),i&&(this.config=i),n&&(this.request=n),t&&(this.response=t,this.status=t.status)}toJSON(){let e,a,i,n=this.config,t=n&&X.hasOwnProp(n,"redact")?n.redact:void 0,o=X.isArray(t)&&t.length>0?(e=new Set(t.map(e=>String(e).toLowerCase())),a=[],(i=n=>{let t;if(null===n||"object"!=typeof n||X.isBuffer(n))return n;if(-1===a.indexOf(n)){if(n instanceof ep&&(n=n.toJSON()),a.push(n),X.isArray(n))t=[],n.forEach((e,a)=>{let n=i(e);X.isUndefined(n)||(t[a]=n)});else{if(!X.isPlainObject(n)&&function(e){if(X.hasOwnProp(e,"toJSON"))return!0;let a=Object.getPrototypeOf(e);for(;a&&a!==Object.prototype;){if(X.hasOwnProp(a,"toJSON"))return!0;a=Object.getPrototypeOf(a)}return!1}(n))return a.pop(),n;for(let[a,o]of(t=Object.create(null),Object.entries(n))){let n=e.has(a.toLowerCase())?el:i(o);X.isUndefined(n)||(t[a]=n)}}return a.pop(),t}})(n)):X.toJSONObject(n);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:o,code:this.code,status:this.status}}}ed.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",ed.ERR_BAD_OPTION="ERR_BAD_OPTION",ed.ECONNABORTED="ECONNABORTED",ed.ETIMEDOUT="ETIMEDOUT",ed.ECONNREFUSED="ECONNREFUSED",ed.ERR_NETWORK="ERR_NETWORK",ed.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",ed.ERR_DEPRECATED="ERR_DEPRECATED",ed.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",ed.ERR_BAD_REQUEST="ERR_BAD_REQUEST",ed.ERR_CANCELED="ERR_CANCELED",ed.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",ed.ERR_INVALID_URL="ERR_INVALID_URL",ed.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";let em=ed,ef=e.i(34330).default,ex={isBufferAvailable:()=>"u">typeof Buffer,from:e=>Buffer.from(e)};function eh(e){return X.isPlainObject(e)||X.isArray(e)}function ev(e){return X.endsWith(e,"[]")?e.slice(0,-2):e}function eb(e,a,i){return e?e.concat(a).map(function(e,a){return e=ev(e),!i&&a?"["+e+"]":e}).join(i?".":""):a}let eg=X.toFlatObject(X,{},null,function(e){return/^is[A-Z]/.test(e)}),ey=function(e,a,i){if(!X.isObject(e))throw TypeError("target must be an object");a=a||new(ef||FormData);let n=(e,a)=>{let n=X.getSafeProp(i,e);return X.isUndefined(n)?a:n},t=n("metaTokens",!0),o=n("visitor")||f,s=n("dots",!1),r=n("indexes",!1),c=n("Blob")||"u">typeof Blob&&Blob,p=n("maxDepth",100),l=c&&X.isSpecCompliantForm(a),u=[];if(!X.isFunction(o))throw TypeError("visitor must be a function");function d(e){if(null===e)return"";if(X.isDate(e))return e.toISOString();if(X.isBoolean(e))return e.toString();if(!l&&X.isBlob(e))throw new em("Blob is not supported. Use a Buffer instead.");if(X.isArrayBuffer(e)||X.isTypedArray(e)){if(l&&"function"==typeof c)return new c([e]);if(ex&&ex.isBufferAvailable())return ex.from(e);throw new em("Blob is not supported. Use a Buffer instead.",em.ERR_NOT_SUPPORT)}return e}function m(e){if(e>p)throw new em("Object is too deeply nested ("+e+" levels). Max depth: "+p,em.ERR_FORM_DATA_DEPTH_EXCEEDED)}function f(e,i,n){let o=e;if(X.isReactNative(a)&&X.isReactNativeBlob(e))return a.append(eb(n,i,s),d(e)),!1;if(e&&!n&&"object"==typeof e)if(X.endsWith(i,"{}"))i=t?i:i.slice(0,-2),e=function(e){if(p===1/0)return JSON.stringify(e);let a=[];return JSON.stringify(e,function(e,i){if(!X.isObject(i))return i;for(;a.length&&a[a.length-1]!==this;)a.pop();return a.push(i),m(1+a.length-1),i})}(e);else{var c;if(X.isArray(e)&&(c=e,X.isArray(c)&&!c.some(eh))||(X.isFileList(e)||X.endsWith(i,"[]"))&&(o=X.toArray(e)))return i=ev(i),o.forEach(function(e,n){X.isUndefined(e)||null===e||a.append(!0===r?eb([i],n,s):null===r?i:i+"[]",d(e))}),!1}return!!eh(e)||(a.append(eb(n,i,s),d(e)),!1)}let x=Object.assign(eg,{defaultVisitor:f,convertValue:d,isVisitable:eh});if(!X.isObject(e))throw TypeError("data must be an object");return!function e(i,n,t=0){if(!X.isUndefined(i)){if(m(t),-1!==u.indexOf(i))throw Error("Circular reference detected in "+n.join("."));u.push(i),X.forEach(i,function(i,s){!0===(!(X.isUndefined(i)||null===i)&&o.call(a,i,X.isString(s)?s.trim():s,n,x))&&e(i,n?n.concat(s):[s],t+1)}),u.pop()}}(e),a};function ew(e){let a={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(e){return a[e]})}function e_(e,a){this._pairs=[],e&&ey(e,this,a)}let eE=e_.prototype;function ek(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ej(e,a,i){let n;if(!a)return e;e=e||"";let t=X.isFunction(i)?{serialize:i}:i,o=X.getSafeProp(t,"encode")||ek,s=X.getSafeProp(t,"serialize");if(n=s?s(a,t):X.isURLSearchParams(a)?a.toString():new e_(a,t).toString(o)){let a=e.indexOf("#");-1!==a&&(e=e.slice(0,a)),e+=(-1===e.indexOf("?")?"?":"&")+n}return e}eE.append=function(e,a){this._pairs.push([e,a])},eE.toString=function(e){let a=e?a=>e.call(this,a,ew):ew;return this._pairs.map(function(e){return a(e[0])+"="+a(e[1])},"").join("&")};let eR=Symbol("internals");function eO(e){return e?e.length:0}function eS(e){if(e)for(;e.length&&null===e[e.length-1];)e.pop()}function eA(e,a){let i=e.handlers,n=eO(i);i!==a.handlersRef?(a.handlersRef=i,a.handlerEntries.clear()):n!==a.handlersLength&&(n?a.handlerEntries.forEach(function(e,n){i[e.index]!==e.handler&&a.handlerEntries.delete(n)}):a.handlerEntries.clear()),a.handlersLength=n}let eC=class{constructor(){this.handlers=[],this[eR]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(e,a,i){let n={fulfilled:e,rejected:a,synchronous:!!i&&i.synchronous,runWhen:i?i.runWhen:null},t=this[eR];null==this.handlers&&(this.handlers=[]),eA(this,t);let o=t.nextId++;return this.handlers.push(n),t.handlerEntries.set(o,{handler:n,index:this.handlers.length-1}),t.handlersLength=this.handlers.length,o}eject(e){let a=this[eR];eA(this,a);let i=a.handlerEntries.get(e);if(i){if(a.handlerEntries.delete(e),this.handlers[i.index]!==i.handler)return;this.handlers[i.index]=null,a.iterationDepth||(eS(this.handlers),a.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],eA(this,this[eR]))}forEach(e){let a=this[eR];eA(this,a),a.iterationDepth++;try{X.forEach(this.handlers,function(a){null!==a&&e(a)})}finally{--a.iterationDepth||(eA(this,a),eS(this.handlers),a.handlersLength=eO(this.handlers))}}},eP={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};var eT,eF,eL,eN,eU=e.i(54799);let ez=e.i(92509).default.URLSearchParams,eB="abcdefghijklmnopqrstuvwxyz",eI="0123456789",eD={DIGIT:eI,ALPHA:eB,ALPHA_DIGIT:eB+eB.toUpperCase()+eI},eq={isNode:!0,classes:{URLSearchParams:ez,FormData:ef,Blob:"u">typeof Blob&&Blob||null},ALPHABET:eD,generateString:(e=16,a=eD.ALPHA_DIGIT)=>{let i="",{length:n}=a,t=new Uint32Array(e);eU.default.randomFillSync(t);for(let o=0;o<e;o++)i+=a[t[o]%n];return i},protocols:["http","https","file","data"]},eM="object"==typeof navigator&&navigator||void 0,e$="u">typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts;e.s(["hasBrowserEnv",0,!1,"hasStandardBrowserEnv",0,!1,"hasStandardBrowserWebWorkerEnv",0,e$,"navigator",0,eM,"origin",0,"http://localhost"],92545);let eH={...e.i(92545),...eq};function eW(e){if(e>100)throw new em("FormData field is too deeply nested ("+e+" levels). Max depth: 100",em.ERR_FORM_DATA_DEPTH_EXCEEDED)}let eV=function(e){if(X.isFormData(e)&&X.isFunction(e.entries)){let a={};return X.forEachEntry(e,(e,i)=>{!function e(a,i,n,t){eW(t);let o=a[t++];if("__proto__"===o)return!0;let s=Number.isFinite(+o),r=t>=a.length;return(o=!o&&X.isArray(n)?n.length:o,r)?X.hasOwnProp(n,o)?n[o]=X.isArray(n[o])?n[o].concat(i):[n[o],i]:n[o]=i:(X.hasOwnProp(n,o)&&X.isObject(n[o])||(n[o]=[]),e(a,i,n[o],t)&&X.isArray(n[o])&&(n[o]=function(e){let a,i,n={},t=Object.keys(e),o=t.length;for(a=0;a<o;a++)n[i=t[a]]=e[i];return n}(n[o]))),!s}(function(e){let a,i=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;for(;null!==(a=n.exec(e));)eW(i.length),i.push("[]"===a[0]?"":a[1]||a[0]);return i}(e),i,a,0)}),a}return null},eG=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),eK=(e,a)=>null!=e&&X.hasOwnProp(e,a)?e[a]:void 0,eJ={transitional:eP,adapter:["xhr","http","fetch"],transformRequest:[function(e,a){let i,n=a.getContentType()||"",t=n.indexOf("application/json")>-1,o=X.isObject(e);if(o&&X.isHTMLForm(e)&&(e=new FormData(e)),X.isFormData(e))return t?JSON.stringify(eV(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 a.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();if(o){let a=eK(this,"formSerializer");if(n.indexOf("application/x-www-form-urlencoded")>-1)return ey(e,new eH.classes.URLSearchParams,{visitor:function(e,a,i,n){return eH.isNode&&X.isBuffer(e)?(this.append(a,e.toString("base64")),!1):n.defaultVisitor.apply(this,arguments)},...a}).toString();if((i=X.isFileList(e))||n.indexOf("multipart/form-data")>-1){let n=eK(this,"env"),t=n&&n.FormData;return ey(i?{"files[]":e}:e,t&&new t,a)}}if(o||t){a.setContentType("application/json",!1);var s=e;if(X.isString(s))try{return(0,JSON.parse)(s),X.trim(s)}catch(e){if("SyntaxError"!==e.name)throw e}return(0,JSON.stringify)(s)}return e}],transformResponse:[function(e){let a=eK(this,"transitional")||eJ.transitional,i=a&&a.forcedJSONParsing,n=eK(this,"responseType"),t="json"===n;if(X.isResponse(e)||X.isReadableStream(e))return e;if(e&&X.isString(e)&&(i&&!n||t)){let i=a&&a.silentJSONParsing;try{return JSON.parse(e,eK(this,"parseReviver"))}catch(e){if(!i&&t){if("SyntaxError"===e.name)throw em.from(e,em.ERR_BAD_RESPONSE,this,null,eK(this,"response"));throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:eH.classes.FormData,Blob:eH.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};function eY(e,a){let i=this||eJ,n=a||i,t=ep.from(n.headers),o=n.data;return X.forEach(e,function(e){o=e.call(i,o,t.normalize(),a?a.status:void 0)}),t.normalize(),o}function eX(e){return!!(e&&e.__CANCEL__)}X.forEach(eG,e=>{eJ.headers[e]={}});let eZ=class extends em{constructor(e,a,i){super(null==e?"canceled":e,em.ERR_CANCELED,a,i),this.name="CanceledError",this.__CANCEL__=!0}};function eQ(e,a,i){let n=i.config.validateStatus;!i.status||!n||n(i.status)?e(i):a(new em("Request failed with status code "+i.status,i.status>=400&&i.status<500?em.ERR_BAD_REQUEST:em.ERR_BAD_RESPONSE,i.config,i.request,i))}let e0=/[\t\n\r]/g;function e1(e){if("string"!=typeof e)return e;let a=0;for(;a<e.length&&32>=e.charCodeAt(a);)a++;return e.slice(a).replace(e0,"")}let e2=/^https?:(?!\/\/)/i;function e3(e,a){if("string"==typeof e){let n=e1(e);if(e2.test(n)){var i;let e,t,o;throw new em(`Invalid URL ${JSON.stringify((o=(-1===(t=(e=n.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${el}@`)).indexOf("#"))?e:e.slice(0,t)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${el}`),-1===t?o:`${o}#${!(i=e.slice(t+1))?i:i.replace(/(^|&)([^=&]*=)?[^&]+/g,(e,a,i="")=>`${a}${i}${el}`)}`))}: missing "//" after protocol`,em.ERR_INVALID_URL,a)}}}function e4(e,a,i,n){e3(a,n);let t=!("string"==typeof a&&/^([a-z][a-z\d+\-.]*:)?\/\//i.test(a));if(e&&(t||!1===i)){e3(e,n);if(!a)return e;let i=e.length;for(;i>0&&47===e.charCodeAt(i-1);)i--;return e.slice(0,i)+"/"+a.replace(/^\/+/,"")}return a}var e6={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function e8(e){return process.env[e.toLowerCase()]||process.env[e.toUpperCase()]||""}var e5=e.i(70513),e9=e.i(21517),e7=e.i(24836),ae=e.i(25328),aa=e.i(24361),ai=e.i(14747),an=e.i(82637),at=e.i(6461);let ao="1.20.0";function as(e){let a=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return a&&a[1]||""}let ar=/^([^,;/]+\/[^,;/]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;var ac=e.i(88947);let ap=["content-type","content-length"];function al(e,a,i){"content-only"!==i?e.set(a):Object.entries(a||{}).forEach(([a,i])=>{ap.includes(a.toLowerCase())&&e.set(a,i)})}var au=ac;let ad=Symbol("internals");class am extends au.default.Transform{constructor(e){super({readableHighWaterMark:(e=X.toFlatObject(e,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(e,a)=>!X.isUndefined(a[e]))).chunkSize});const a=this[ad]={timeWindow:e.timeWindow,chunkSize:e.chunkSize,maxRate:e.maxRate,minChunkSize:e.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",e=>{"progress"!==e||a.isCaptured||(a.isCaptured=!0)})}_read(e){let a=this[ad];return a.onReadCallback&&a.onReadCallback(),super._read(e)}_transform(e,a,i){let n=this[ad],t=n.maxRate,o=this.readableHighWaterMark,s=n.timeWindow,r=t/(1e3/s),c=!1!==n.minChunkSize?Math.max(n.minChunkSize,.01*r):0,p=(e,a)=>{let i=Buffer.byteLength(e);n.bytesSeen+=i,n.bytes+=i,n.isCaptured&&this.emit("progress",n.bytesSeen),this.push(e)?process.nextTick(a):n.onReadCallback=()=>{n.onReadCallback=null,process.nextTick(a)}},l=(e,a)=>{let i,l=Buffer.byteLength(e),u=null,d=o,m=0;if(t){let e=Date.now();(!n.ts||(m=e-n.ts)>=s)&&(n.ts=e,i=r-n.bytes,n.bytes=i<0?-i:0,m=0),i=r-n.bytes}if(t){if(i<=0)return setTimeout(()=>{a(null,e)},s-m);i<d&&(d=i)}d&&l>d&&l-d>c&&(u=e.subarray(d),e=e.subarray(0,d)),p(e,u?()=>{process.nextTick(a,null,u)}:a)};l(e,function e(a,n){if(a)return i(a);n?l(n,e):i(null)})}}var af=e.i(27699);let{asyncIterator:ax}=Symbol,ah=async function*(e){e.stream?yield*e.stream():e.arrayBuffer?yield await e.arrayBuffer():e[ax]?yield*e[ax]():yield e},av=eH.ALPHABET.ALPHA_DIGIT+"-_",ab="function"==typeof TextEncoder?new TextEncoder:new aa.default.TextEncoder,ag=ab.encode("\r\n");class ay{constructor(e,a){const{escapeName:i}=this.constructor,n=X.isString(a);let t=`Content-Disposition: form-data; name="${i(e)}"${!n&&a.name?`; filename="${i(a.name)}"`:""}\r
@@ -1,3 +1,3 @@
1
- module.exports=[47872,a=>{"use strict";var b=a.i(47350),c=a.i(75086),d=a.i(3130),e=a.i(40695),f=a.i(5522);let g=[{id:"gemini",label:"Google Gemini",help:"Create a key at aistudio.google.com/apikey."},{id:"claude",label:"Anthropic Claude",help:"Create a key at console.anthropic.com > API keys."},{id:"openai",label:"OpenAI",help:"Create a key at platform.openai.com/api-keys."}];a.s(["AiKeyForm",0,function(){let[a,h]=(0,c.useState)(g[0].id),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)({}),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(!1);async function s(b){b.preventDefault(),r(!0),p(null);try{let b=await fetch("/api/setup/ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a,key:i})}),c=await b.json();c.saved?(j(""),l(a),n({...m,[a]:!0}),p({ok:!0,text:"Saved. AI suggestions now use this provider. No restart needed."})):p({ok:!1,text:c.error??"Nothing was saved."})}catch{p({ok:!1,text:"Could not reach the dashboard server."})}finally{r(!1)}}(0,c.useEffect)(()=>{fetch("/api/setup/ai").then(a=>a.json()).then(a=>{a.keys&&(n(a.keys),l(a.provider),a.provider&&h(a.provider))}).catch(()=>{})},[]);let t=g.find(b=>b.id===a);return(0,b.jsxs)(d.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md max-w-2xl mt-6",children:[(0,b.jsxs)(d.CardHeader,{children:[(0,b.jsx)(d.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight",children:"AI suggestions (optional)"}),(0,b.jsx)(d.CardDescription,{className:"text-sm text-gray-400",children:"Add a Gemini, Claude or OpenAI key to get AI insights and recommendations for your pages. Only page names, load times and error counts are sent to the provider you pick. Without a key, the dashboard shows sample suggestions."})]}),(0,b.jsx)(d.CardContent,{children:(0,b.jsxs)("form",{onSubmit:s,className:"flex flex-col gap-5",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"ai-provider",className:"text-sm font-medium text-gray-300",children:"Provider"}),(0,b.jsx)("select",{id:"ai-provider",value:a,onChange:a=>h(a.target.value),className:"h-9 rounded-md border border-[#2d3748] bg-[#0f1419] px-3 text-sm text-gray-200",children:g.map(a=>(0,b.jsxs)("option",{value:a.id,children:[a.label,k===a.id?" (in use)":m[a.id]?" (key saved)":""]},a.id))})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsxs)("label",{htmlFor:"ai-key",className:"text-sm font-medium text-gray-300",children:[t.label," API key ",m[a]&&(0,b.jsx)("span",{className:"ml-2 text-xs text-[#3ee0a1]",children:"✓ Set"})]}),(0,b.jsx)(f.Input,{id:"ai-key",type:"password",autoComplete:"off",spellCheck:!1,placeholder:m[a]?"•••••••• (type to replace)":"",value:i,onChange:a=>j(a.target.value),"aria-describedby":"ai-key-help",className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,b.jsx)("p",{id:"ai-key-help",className:"text-xs text-gray-400",children:t.help})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(e.Button,{type:"submit",disabled:q||!i.trim(),children:q?"Checking…":"Check and save"}),(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${o?.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:o?.text})]})]})})]})}])},46334,a=>{"use strict";var b=a.i(47350),c=a.i(75086),d=a.i(56561),e=a.i(3130),f=a.i(40695),g=a.i(5522);let h=[{name:"NEWRELIC_API_KEY",label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},{name:"NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID",label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},{name:"SENTRY_API_KEY",label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},{name:"SENTRY_ORG_SLUG",label:"Sentry organization slug",secret:!1,help:"The name in your Sentry URL: sentry.io/organizations/<slug>/."},{name:"SENTRY_PROJECT_ID",label:"Sentry project slug",secret:!1,help:"The project's slug from Project settings."}];a.s(["SetupForm",0,function(){let[a,i]=(0,c.useState)({}),[j,k]=(0,c.useState)({}),[l,m]=(0,c.useState)({}),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(!1),t=(0,c.useRef)(null);async function u(b){b.preventDefault(),q(!0),o(null);try{let b=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json(),d=c.results??{};m(d);let e=h.find(a=>d[a.name]&&!d[a.name].ok);e&&setTimeout(()=>t.current?.querySelector(`#${e.name}`)?.focus(),0),c.saved?(s(!0),i({}),k(Object.fromEntries(h.map(a=>[a.name,!0]))),o({ok:!0,text:"Saved. Your keys are valid and stored in .env.local. No restart needed."})):o({ok:!1,text:c.error??"Nothing was saved. Fix the fields marked below."})}catch{o({ok:!1,text:"Could not reach the dashboard server."})}finally{q(!1)}}return(0,c.useEffect)(()=>{fetch("/api/setup").then(a=>a.json()).then(a=>{a.keys?k(a.keys):a.error&&o({ok:!1,text:a.error})}).catch(()=>{})},[]),(0,b.jsxs)(e.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md max-w-2xl",children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight",children:"Connect New Relic and Sentry"}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:"Keys are checked once, saved to .env.local in this folder, and never shown again. The key that sends events (Ingest - License) is separate and is added later on the Connect page."})]}),(0,b.jsx)(e.CardContent,{children:(0,b.jsxs)("form",{ref:t,onSubmit:u,className:"flex flex-col gap-5",children:[h.map(c=>{let d=l[c.name];return(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsxs)("label",{htmlFor:c.name,className:"text-sm font-medium text-gray-300",children:[c.label," ",j[c.name]&&(0,b.jsx)("span",{className:"ml-2 text-xs text-[#3ee0a1]",children:"✓ Set"})]}),(0,b.jsx)(g.Input,{id:c.name,name:c.name,type:c.secret?"password":"text",autoComplete:"off",spellCheck:!1,placeholder:j[c.name]?"•••••••• (leave blank to keep, type to replace)":"",value:a[c.name]??"",onChange:b=>i({...a,[c.name]:b.target.value}),"aria-invalid":!!d&&!d.ok||void 0,"aria-describedby":`${c.name}-help ${c.name}-result`,className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,b.jsx)("p",{id:`${c.name}-help`,className:"text-xs text-gray-400",children:c.help}),(0,b.jsxs)("div",{id:`${c.name}-result`,"aria-live":"polite",children:[d&&!d.ok&&(0,b.jsxs)("p",{className:"text-xs text-[#f87171]",children:["✗ ",d.error]}),d?.ok&&(0,b.jsx)("p",{className:"text-xs text-[#3ee0a1]",children:"✓ Checked"})]})]},c.name)}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(f.Button,{type:"submit",disabled:p,children:p?"Checking…":"Check and save"}),(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${n?.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:n?.text}),r&&(0,b.jsx)(d.default,{href:"/connect",className:(0,f.buttonVariants)({variant:"outline"}),children:"Next: connect your app"})]})]})})]})}])},3130,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...e})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-(--card-spacing)",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-sm text-muted-foreground",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},23904,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={actionAsyncStorage:function(){return f.actionAsyncStorage},workAsyncStorage:function(){return g.workAsyncStorage},workUnitAsyncStorage:function(){return h.workUnitAsyncStorage}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(20635),g=a.r(56704),h=a.r(32319);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)}];
1
+ module.exports=[47872,a=>{"use strict";var b=a.i(47350),c=a.i(75086),d=a.i(3130),e=a.i(40695),f=a.i(5522);let g=[{id:"gemini",label:"Google Gemini",help:"Create a key at aistudio.google.com/apikey."},{id:"claude",label:"Anthropic Claude",help:"Create a key at console.anthropic.com > API keys."},{id:"openai",label:"OpenAI",help:"Create a key at platform.openai.com/api-keys."}];a.s(["AiKeyForm",0,function(){let[a,h]=(0,c.useState)(g[0].id),[i,j]=(0,c.useState)(""),[k,l]=(0,c.useState)(null),[m,n]=(0,c.useState)({}),[o,p]=(0,c.useState)(null),[q,r]=(0,c.useState)(!1);async function s(b){b.preventDefault(),r(!0),p(null);try{let b=await fetch("/api/setup/ai",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({provider:a,key:i})}),c=await b.json();c.saved?(j(""),l(a),n({...m,[a]:!0}),p({ok:!0,text:"Saved. AI suggestions now use this provider. No restart needed."})):p({ok:!1,text:c.error??"Nothing was saved."})}catch{p({ok:!1,text:"Could not reach the dashboard server."})}finally{r(!1)}}(0,c.useEffect)(()=>{fetch("/api/setup/ai").then(a=>a.json()).then(a=>{a.keys&&(n(a.keys),l(a.provider),a.provider&&h(a.provider))}).catch(()=>{})},[]);let t=g.find(b=>b.id===a);return(0,b.jsxs)(d.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md max-w-2xl mt-6",children:[(0,b.jsxs)(d.CardHeader,{children:[(0,b.jsx)(d.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight",children:"AI suggestions (optional)"}),(0,b.jsx)(d.CardDescription,{className:"text-sm text-gray-400",children:"Add a Gemini, Claude or OpenAI key to get AI insights and recommendations for your pages. Only page names, load times and error counts are sent to the provider you pick. Without a key, the dashboard shows sample suggestions."})]}),(0,b.jsx)(d.CardContent,{children:(0,b.jsxs)("form",{onSubmit:s,className:"flex flex-col gap-5",children:[(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsx)("label",{htmlFor:"ai-provider",className:"text-sm font-medium text-gray-300",children:"Provider"}),(0,b.jsx)("select",{id:"ai-provider",value:a,onChange:a=>h(a.target.value),className:"h-9 rounded-md border border-[#2d3748] bg-[#0f1419] px-3 text-sm text-gray-200",children:g.map(a=>(0,b.jsxs)("option",{value:a.id,children:[a.label,k===a.id?" (in use)":m[a.id]?" (key saved)":""]},a.id))})]}),(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsxs)("label",{htmlFor:"ai-key",className:"text-sm font-medium text-gray-300",children:[t.label," API key ",m[a]&&(0,b.jsx)("span",{className:"ml-2 text-xs text-[#3ee0a1]",children:"✓ Set"})]}),(0,b.jsx)(f.Input,{id:"ai-key",type:"password",autoComplete:"off",spellCheck:!1,placeholder:m[a]?"•••••••• (type to replace)":"",value:i,onChange:a=>j(a.target.value),"aria-describedby":"ai-key-help",className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,b.jsx)("p",{id:"ai-key-help",className:"text-xs text-gray-400",children:t.help})]}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(e.Button,{type:"submit",disabled:q||!i.trim(),children:q?"Checking…":"Check and save"}),(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${o?.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:o?.text})]})]})})]})}])},46334,a=>{"use strict";var b=a.i(47350),c=a.i(75086),d=a.i(56561),e=a.i(3130),f=a.i(40695),g=a.i(5522);let h=[{name:"NEWRELIC_API_KEY",label:"New Relic User API key",secret:!0,help:'READS your data (starts NRAK-). Create it under API keys > key type "User".'},{name:"NEXT_PUBLIC_NEWRELIC_ACCOUNT_ID",label:"New Relic account ID",secret:!1,help:"A plain number, shown next to your keys in New Relic."},{name:"SENTRY_API_KEY",label:"Sentry auth token",secret:!0,help:"Lets the dashboard read issues (scopes: project:read, event:read)."},{name:"SENTRY_DSN",label:"Sentry DSN",secret:!1,help:"Project settings, then Client Keys (DSN). The project and host are read from it."}];a.s(["SetupForm",0,function(){let[a,i]=(0,c.useState)({}),[j,k]=(0,c.useState)({}),[l,m]=(0,c.useState)({}),[n,o]=(0,c.useState)(null),[p,q]=(0,c.useState)(!1),[r,s]=(0,c.useState)(!1),t=(0,c.useRef)(null);async function u(b){b.preventDefault(),q(!0),o(null);try{let b=await fetch("/api/setup",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),c=await b.json(),d=c.results??{};m(d);let e=h.find(a=>d[a.name]&&!d[a.name].ok);e&&setTimeout(()=>t.current?.querySelector(`#${e.name}`)?.focus(),0),c.saved?(s(!0),i({}),k(Object.fromEntries(h.map(a=>[a.name,!0]))),o({ok:!0,text:"Saved. Your keys are valid and stored in .env.local. No restart needed."})):o({ok:!1,text:c.error??"Nothing was saved. Fix the fields marked below."})}catch{o({ok:!1,text:"Could not reach the dashboard server."})}finally{q(!1)}}return(0,c.useEffect)(()=>{fetch("/api/setup").then(a=>a.json()).then(a=>{a.keys?k(a.keys):a.error&&o({ok:!1,text:a.error})}).catch(()=>{})},[]),(0,b.jsxs)(e.Card,{className:"border-[#2d3748] bg-[#1a202c] shadow-md max-w-2xl",children:[(0,b.jsxs)(e.CardHeader,{children:[(0,b.jsx)(e.CardTitle,{className:"text-[18px] font-bold text-white tracking-tight",children:"Connect New Relic and Sentry"}),(0,b.jsx)(e.CardDescription,{className:"text-sm text-gray-400",children:"Keys are checked once, saved to .env.local in this folder, and never shown again. The key that sends events (Ingest - License) is separate and is added later on the Connect page."})]}),(0,b.jsx)(e.CardContent,{children:(0,b.jsxs)("form",{ref:t,onSubmit:u,className:"flex flex-col gap-5",children:[h.map(c=>{let d=l[c.name];return(0,b.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,b.jsxs)("label",{htmlFor:c.name,className:"text-sm font-medium text-gray-300",children:[c.label," ",j[c.name]&&(0,b.jsx)("span",{className:"ml-2 text-xs text-[#3ee0a1]",children:"✓ Set"})]}),(0,b.jsx)(g.Input,{id:c.name,name:c.name,type:c.secret?"password":"text",autoComplete:"off",spellCheck:!1,placeholder:j[c.name]?"•••••••• (leave blank to keep, type to replace)":"",value:a[c.name]??"",onChange:b=>i({...a,[c.name]:b.target.value}),"aria-invalid":!!d&&!d.ok||void 0,"aria-describedby":`${c.name}-help ${c.name}-result`,className:"bg-[#0f1419] border-[#2d3748] text-gray-200 font-mono text-xs"}),(0,b.jsx)("p",{id:`${c.name}-help`,className:"text-xs text-gray-400",children:c.help}),(0,b.jsxs)("div",{id:`${c.name}-result`,"aria-live":"polite",children:[d&&!d.ok&&(0,b.jsxs)("p",{className:"text-xs text-[#f87171]",children:["✗ ",d.error]}),d?.ok&&(0,b.jsx)("p",{className:"text-xs text-[#3ee0a1]",children:"✓ Checked"})]})]},c.name)}),(0,b.jsxs)("div",{className:"flex items-center gap-4",children:[(0,b.jsx)(f.Button,{type:"submit",disabled:p,children:p?"Checking…":"Check and save"}),(0,b.jsx)("span",{"aria-live":"polite",className:`text-sm ${n?.ok?"text-[#3ee0a1]":"text-[#f87171]"}`,children:n?.text}),r&&(0,b.jsx)(d.default,{href:"/connect",className:(0,f.buttonVariants)({variant:"outline"}),children:"Next: connect your app"})]})]})})]})}])},3130,a=>{"use strict";var b=a.i(47350),c=a.i(85198);a.s(["Card",0,function({className:a,size:d="default",...e}){return(0,b.jsx)("div",{"data-slot":"card","data-size":d,className:(0,c.cn)("group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-xl bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-foreground/10 [--card-spacing:--spacing(4)] has-data-[slot=card-footer]:pb-0 has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] data-[size=sm]:has-data-[slot=card-footer]:pb-0 *:[img:first-child]:rounded-t-xl *:[img:last-child]:rounded-b-xl",a),...e})},"CardContent",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-content",className:(0,c.cn)("px-(--card-spacing)",a),...d})},"CardDescription",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-description",className:(0,c.cn)("text-sm text-muted-foreground",a),...d})},"CardHeader",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-header",className:(0,c.cn)("group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-xl px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)",a),...d})},"CardTitle",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"card-title",className:(0,c.cn)("font-heading text-base leading-snug font-medium group-data-[size=sm]/card:text-sm",a),...d})}])},23904,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={actionAsyncStorage:function(){return f.actionAsyncStorage},workAsyncStorage:function(){return g.workAsyncStorage},workUnitAsyncStorage:function(){return h.workUnitAsyncStorage}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(20635),g=a.r(56704),h=a.r(32319);("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)}];
2
2
 
3
3
  //# sourceMappingURL=_0defuav._.js.map