"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7138],{60521:(e,t,r)=>{r.d(t,{p:()=>f});var n=r(77912),o=r(35151),s=r(12115),i=r(84369),a=r(38128),l=r(89505),u=r(37597),c=r(86565);let f=(0,l.FX)(function(e,t){let r=(0,s.useId)(),f=(0,a.q)(),d=(0,i._)(),{id:h=f||"headlessui-input-".concat(r),disabled:p=d||!1,autoFocus:y=!1,invalid:m=!1,...w}=e,g=(0,c.o2)(),v=(0,u.MM)(),{isFocused:b,focusProps:x}=(0,n.o)({autoFocus:y}),{isHovered:E,hoverProps:S}=(0,o.M)({isDisabled:p}),R=(0,l.v6)({ref:t,id:h,"aria-labelledby":g,"aria-describedby":v,"aria-invalid":m?"":void 0,disabled:p||void 0,autoFocus:y},x,S),P=(0,s.useMemo)(()=>({disabled:p,invalid:m,hover:E,focus:b,autofocus:y}),[p,m,E,b,y]);return(0,l.Ci)()({ourProps:R,theirProps:w,slot:P,defaultTag:"input",name:"Input"})})},22627:()=>{},18750:(e,t,r)=>{r.d(t,{T:()=>s});let n=Symbol.for("constructDateFrom");function o(e,t){var r;return"function"==typeof(r=t||e)?r(e):r&&"object"==typeof r&&n in r?r[n](e):r instanceof Date?new r.constructor(e):new Date(e)}function s(e,t){let r=+o(e)-+o(t);return r>0?-1:r<0?1:r}},97481:(e,t,r)=>{r.d(t,{_:()=>n});function n(){return(n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(null,arguments)}},83401:(e,t,r)=>{r.d(t,{default:()=>u});var n=r(97481),o=r(48173),s=r.n(o),i=r(76046),a=r(12115),l=r(707),u=(0,a.forwardRef)(function(e,t){let{defaultLocale:r,href:o,locale:u,localeCookie:c,onClick:f,prefetch:d,unprefixed:h,...p}=e,y=(0,l.A)(),m=null!=u&&u!==y,w=u||y,g=function(){let[e,t]=(0,a.useState)();return(0,a.useEffect)(()=>{t(window.location.host)},[]),e}(),v=g&&h&&(h.domains[g]===w||!Object.keys(h.domains).includes(g)&&y===r&&!u)?h.pathname:o,b=(0,i.usePathname)();return m&&(d&&console.error("The `prefetch` prop is currently not supported when using the `locale` prop on `Link` to switch the locale.`"),d=!1),a.createElement(s(),(0,n._)({ref:t,href:v,hrefLang:m?u:void 0,onClick:function(e){(function(e,t,r,n){if(!e||!(n!==r&&null!=n)||!t)return;let o=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:window.location.pathname;return"/"===e?t:t.replace(e,"")}(t),{name:s,...i}=e;i.path||(i.path=""!==o?o:"/");let a="".concat(s,"=").concat(n,";");for(let[e,t]of Object.entries(i))a+="".concat("maxAge"===e?"max-age":e),"boolean"!=typeof t&&(a+="="+t),a+=";";document.cookie=a})(c,b,y,u),f&&f(e)},prefetch:d},p))})},78193:(e,t,r)=>{r.d(t,{default:()=>f});var n=r(97481),o=r(76046),s=r(12115),i=r(707);function a(e){return("object"==typeof e?null==e.host&&null==e.hostname:!/^[a-z]+:/i.test(e))&&!function(e){let t="object"==typeof e?e.pathname:e;return null!=t&&!t.startsWith("/")}(e)}function l(e,t){let r;return"string"==typeof e?r=u(t,e):(r={...e},e.pathname&&(r.pathname=u(t,e.pathname))),r}function u(e,t){let r=e;return/^\/(\?.*)?$/.test(t)&&(t=t.slice(1)),r+=t}r(87358);var c=r(83401);let f=(0,s.forwardRef)(function(e,t){let{href:r,locale:u,localeCookie:f,localePrefixMode:d,prefix:h,...p}=e,y=(0,o.usePathname)(),m=(0,i.A)(),w=u!==m,[g,v]=(0,s.useState)(()=>a(r)&&("never"!==d||w)?l(r,h):r);return(0,s.useEffect)(()=>{y&&v(function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:t,n=arguments.length>3?arguments[3]:void 0,o=arguments.length>4?arguments[4]:void 0;if(!a(e))return e;let s=n===o||n.startsWith("".concat(o,"/"));return(t!==r||s)&&null!=o?l(e,o):e}(r,u,m,y,h))},[m,r,u,y,h]),s.createElement(c.default,(0,n._)({ref:t,href:g,locale:u,localeCookie:f},p))});f.displayName="ClientLink"},707:(e,t,r)=>{r.d(t,{A:()=>a});var n=r(76046),o=r(30985);let s="locale",i=!1;function a(){let e;let t=(0,n.useParams)();try{e=(0,o.useLocale)()}catch(r){if("string"!=typeof(null==t?void 0:t[s]))throw r;i||(console.warn("Deprecation warning: `useLocale` has returned a default from `useParams().locale` since no `NextIntlClientProvider` ancestor was found for the calling component. This behavior will be removed in the next major version. Please ensure all Client Components that use `next-intl` are wrapped in a `NextIntlClientProvider`."),i=!0),e=t[s]}return e}},88379:(e,t,r)=>{r.d(t,{default:()=>i});var n=r(97481),o=r(12115),s=r(67878);function i(e){let{locale:t,...r}=e;if(!t)throw Error("Failed to determine locale in `NextIntlClientProvider`, please provide the `locale` prop explicitly.\n\nSee https://next-intl.dev/docs/configuration#locale");return o.createElement(s.IntlProvider,(0,n._)({locale:t},r))}},18757:(e,t,r)=>{let n,o;r.d(t,{rW:()=>T,yy:()=>N});let s=!1;class i{constructor(e){this.body=e}get[Symbol.toStringTag](){return"MultipartBody"}}n||function(e,t={auto:!1}){if(s)throw Error(`you must \`import 'openai/shims/${e.kind}'\` before importing anything else from openai`);if(n)throw Error(`can't \`import 'openai/shims/${e.kind}'\` after \`import 'openai/shims/${n}'\``);s=t.auto,n=e.kind,e.fetch,e.Request,e.Response,e.Headers,e.FormData,e.Blob,e.File,o=e.ReadableStream,e.getMultipartRequestOptions,e.getDefaultAgent,e.fileFromPath,e.isFsReadStream}(function({manuallyImported:e}={}){let t,r,n,o;let s=e?"You may need to use polyfills":`Add one of these imports before your first \`import … from 'openai'\`:
- \`import 'openai/shims/node'\` (if you're running on Node)
- \`import 'openai/shims/web'\` (otherwise)
`;try{t=fetch,r=Request,n=Response,o=Headers}catch(e){throw Error(`this environment is missing the following Web Fetch API type: ${e.message}. ${s}`)}return{kind:"web",fetch:t,Request:r,Response:n,Headers:o,FormData:"undefined"!=typeof FormData?FormData:class{constructor(){throw Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${s}`)}},Blob:"undefined"!=typeof Blob?Blob:class{constructor(){throw Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${s}`)}},File:"undefined"!=typeof File?File:class{constructor(){throw Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${s}`)}},ReadableStream:"undefined"!=typeof ReadableStream?ReadableStream:class{constructor(){throw Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${s}`)}},getMultipartRequestOptions:async(e,t)=>({...t,body:new i(e)}),getDefaultAgent:e=>void 0,fileFromPath:()=>{throw Error("The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/openai/openai-node#file-uploads")},isFsReadStream:e=>!1}}(),{auto:!0});class a extends Error{}class l extends a{constructor(e,t,r,n){super(`${l.makeMessage(e,t,r)}`),this.status=e,this.headers=n,this.request_id=n?.["x-request-id"],this.error=t,this.code=t?.code,this.param=t?.param,this.type=t?.type}static makeMessage(e,t,r){let n=t?.message?"string"==typeof t.message?t.message:JSON.stringify(t.message):t?JSON.stringify(t):r;return e&&n?`${e} ${n}`:e?`${e} status code (no body)`:n||"(no status code or body)"}static generate(e,t,r,n){if(!e||!n)return new u({message:r,cause:T(t)});let o=t?.error;return 400===e?new c(e,o,r,n):401===e?new f(e,o,r,n):403===e?new d(e,o,r,n):404===e?new h(e,o,r,n):409===e?new p(e,o,r,n):422===e?new y(e,o,r,n):429===e?new m(e,o,r,n):e>=500?new w(e,o,r,n):new l(e,o,r,n)}}class u extends l{constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}}class c extends l{}class f extends l{}class d extends l{}class h extends l{}class p extends l{}class y extends l{}class m extends l{}class w extends l{}var g,v=r(75927).hp,b=function(e,t,r,n,o){if("m"===n)throw TypeError("Private method is not writable");if("a"===n&&!o)throw TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?o.call(e,r):o?o.value=r:t.set(e,r),r},x=function(e,t,r,n){if("a"===r&&!n)throw TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};class E{constructor(){g.set(this,void 0),this.buffer=new Uint8Array,b(this,g,null,"f")}decode(e){let t;if(null==e)return[];let r=e instanceof ArrayBuffer?new Uint8Array(e):"string"==typeof e?new TextEncoder().encode(e):e,n=new Uint8Array(this.buffer.length+r.length);n.set(this.buffer),n.set(r,this.buffer.length),this.buffer=n;let o=[];for(;null!=(t=function(e,t){for(let r=t??0;r<e.length;r++){if(10===e[r])return{preceding:r,index:r+1,carriage:!1};if(13===e[r])return{preceding:r,index:r+1,carriage:!0}}return null}(this.buffer,x(this,g,"f")));){if(t.carriage&&null==x(this,g,"f")){b(this,g,t.index,"f");continue}if(null!=x(this,g,"f")&&(t.index!==x(this,g,"f")+1||t.carriage)){o.push(this.decodeText(this.buffer.slice(0,x(this,g,"f")-1))),this.buffer=this.buffer.slice(x(this,g,"f")),b(this,g,null,"f");continue}let e=null!==x(this,g,"f")?t.preceding-1:t.preceding,r=this.decodeText(this.buffer.slice(0,e));o.push(r),this.buffer=this.buffer.slice(t.index),b(this,g,null,"f")}return o}decodeText(e){if(null==e)return"";if("string"==typeof e)return e;if(void 0!==v){if(e instanceof v)return e.toString();if(e instanceof Uint8Array)return v.from(e).toString();throw new a(`Unexpected: received non-Uint8Array (${e.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if("undefined"!=typeof TextDecoder){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(e);throw new a(`Unexpected: received non-Uint8Array/ArrayBuffer (${e.constructor.name}) in a web platform. Please report this error.`)}throw new a("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){return this.buffer.length?this.decode("\n"):[]}}function S(e){if(e[Symbol.asyncIterator])return e;let t=e.getReader();return{async next(){try{let e=await t.read();return e?.done&&t.releaseLock(),e}catch(e){throw t.releaseLock(),e}},async return(){let e=t.cancel();return t.releaseLock(),await e,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}g=new WeakMap,E.NEWLINE_CHARS=new Set(["\n","\r"]),E.NEWLINE_REGEXP=/\r\n|[\n\r]/g;class R{constructor(e,t){this.iterator=e,this.controller=t}static fromSSEResponse(e,t){let r=!1;return new R(async function*(){if(r)throw Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let n=!1;try{for await(let r of P(e,t))if(!n){if(r.data.startsWith("[DONE]")){n=!0;continue}if(null===r.event){let e;try{e=JSON.parse(r.data)}catch(e){throw console.error("Could not parse message into JSON:",r.data),console.error("From chunk:",r.raw),e}if(e&&e.error)throw new l(void 0,e.error,void 0,void 0);yield e}else{let e;try{e=JSON.parse(r.data)}catch(e){throw console.error("Could not parse message into JSON:",r.data),console.error("From chunk:",r.raw),e}if("error"==r.event)throw new l(void 0,e.error,e.message,void 0);yield{event:r.event,data:e}}}n=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{n||t.abort()}},t)}static fromReadableStream(e,t){let r=!1;async function*n(){let t=new E;for await(let r of S(e))for(let e of t.decode(r))yield e;for(let e of t.flush())yield e}return new R(async function*(){if(r)throw Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let e=!1;try{for await(let t of n())!e&&t&&(yield JSON.parse(t));e=!0}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;throw e}finally{e||t.abort()}},t)}[Symbol.asyncIterator](){return this.iterator()}tee(){let e=[],t=[],r=this.iterator(),n=n=>({next:()=>{if(0===n.length){let n=r.next();e.push(n),t.push(n)}return n.shift()}});return[new R(()=>n(e),this.controller),new R(()=>n(t),this.controller)]}toReadableStream(){let e;let t=this,r=new TextEncoder;return new o({async start(){e=t[Symbol.asyncIterator]()},async pull(t){try{let{value:n,done:o}=await e.next();if(o)return t.close();let s=r.encode(JSON.stringify(n)+"\n");t.enqueue(s)}catch(e){t.error(e)}},async cancel(){await e.return?.()}})}}async function*P(e,t){if(!e.body)throw t.abort(),new a("Attempted to iterate over a response with no body");let r=new k,n=new E;for await(let t of A(S(e.body)))for(let e of n.decode(t)){let t=r.decode(e);t&&(yield t)}for(let e of n.flush()){let t=r.decode(e);t&&(yield t)}}async function*A(e){let t=new Uint8Array;for await(let r of e){let e;if(null==r)continue;let n=r instanceof ArrayBuffer?new Uint8Array(r):"string"==typeof r?new TextEncoder().encode(r):r,o=new Uint8Array(t.length+n.length);for(o.set(t),o.set(n,t.length),t=o;-1!==(e=function(e){for(let t=0;t<e.length-2;t++){if(10===e[t]&&10===e[t+1]||13===e[t]&&13===e[t+1])return t+2;if(13===e[t]&&10===e[t+1]&&t+3<e.length&&13===e[t+2]&&10===e[t+3])return t+4}return -1}(t));)yield t.slice(0,e),t=t.slice(e)}t.length>0&&(yield t)}class k{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let e={event:this.event,data:this.data.join("\n"),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],e}if(this.chunks.push(e),e.startsWith(":"))return null;let[t,r,n]=function(e,t){let r=e.indexOf(":");return -1!==r?[e.substring(0,r),":",e.substring(r+t.length)]:[e,"",""]}(e,":");return n.startsWith(" ")&&(n=n.substring(1)),"event"===t?this.event=n:"data"===t&&this.data.push(n),null}}r(75927).hp;var C=r(87358);async function D(e){let{response:t}=e;if(e.options.stream)return(I("response",t.status,t.url,t.headers,t.body),e.options.__streamClass)?e.options.__streamClass.fromSSEResponse(t,e.controller):R.fromSSEResponse(t,e.controller);if(204===t.status)return null;if(e.options.__binaryResponse)return t;let r=t.headers.get("content-type");if(r?.includes("application/json")||r?.includes("application/vnd.api+json")){let e=await t.json();return I("response",t.status,t.url,t.headers,e),F(e,t)}let n=await t.text();return I("response",t.status,t.url,t.headers,n),n}function F(e,t){return!e||"object"!=typeof e||Array.isArray(e)?e:Object.defineProperty(e,"_request_id",{value:t.headers.get("x-request-id"),enumerable:!1})}class O extends Promise{constructor(e,t=D){super(e=>{e(null)}),this.responsePromise=e,this.parseResponse=t}_thenUnwrap(e){return new O(this.responsePromise,async t=>F(e(await this.parseResponse(t),t),t.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,t]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:t,request_id:t.headers.get("x-request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(this.parseResponse)),this.parsedPromise}then(e,t){return this.parse().then(e,t)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}}new WeakMap,Symbol.asyncIterator,Symbol.asyncIterator;let N=e=>new Promise(t=>setTimeout(t,e)),T=e=>{if(e instanceof Error)return e;if("object"==typeof e&&null!==e)try{return Error(JSON.stringify(e))}catch{}return Error(e)},_=new Set(["authorization","api-key"]);function I(e,...t){void 0!==C&&C?.env?.DEBUG==="true"&&console.log(`OpenAI:DEBUG:${e}`,...t.map(e=>{if(!e)return e;if(e.headers){let t={...e,headers:{...e.headers}};for(let r in e.headers)_.has(r.toLowerCase())&&(t.headers[r]="REDACTED");return t}let t=null;for(let r in e)_.has(r.toLowerCase())&&(t??(t={...e}),t[r]="REDACTED");return t??e}))}},57957:(e,t,r)=>{r.d(t,{Wx:()=>u});var n=r(12115),o=Object.defineProperty,s=new Map,i=new WeakMap,a=0,l=void 0;function u(){var e;let{threshold:t,delay:r,trackVisibility:o,rootMargin:u,root:c,triggerOnce:f,skip:d,initialInView:h,fallbackInView:p,onChange:y}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[m,w]=n.useState(null),g=n.useRef(y),[v,b]=n.useState({inView:!!h,entry:void 0});g.current=y,n.useEffect(()=>{let e;if(!d&&m)return e=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:l;if(void 0===window.IntersectionObserver&&void 0!==n){let o=e.getBoundingClientRect();return t(n,{isIntersecting:n,target:e,intersectionRatio:"number"==typeof r.threshold?r.threshold:0,time:0,boundingClientRect:o,intersectionRect:o,rootBounds:o}),()=>{}}let{id:o,observer:u,elements:c}=function(e){let t=Object.keys(e).sort().filter(t=>void 0!==e[t]).map(t=>{var r;return"".concat(t,"_").concat("root"===t?(r=e.root)?(i.has(r)||(a+=1,i.set(r,a.toString())),i.get(r)):"0":e[t])}).toString(),r=s.get(t);if(!r){let n;let o=new Map,i=new IntersectionObserver(t=>{t.forEach(t=>{var r;let s=t.isIntersecting&&n.some(e=>t.intersectionRatio>=e);e.trackVisibility&&void 0===t.isVisible&&(t.isVisible=s),null==(r=o.get(t.target))||r.forEach(e=>{e(s,t)})})},e);n=i.thresholds||(Array.isArray(e.threshold)?e.threshold:[e.threshold||0]),r={id:t,observer:i,elements:o},s.set(t,r)}return r}(r),f=c.get(e)||[];return c.has(e)||c.set(e,f),f.push(t),u.observe(e),function(){f.splice(f.indexOf(t),1),0===f.length&&(c.delete(e),u.unobserve(e)),0===c.size&&(u.disconnect(),s.delete(o))}}(m,(t,r)=>{b({inView:t,entry:r}),g.current&&g.current(t,r),r.isIntersecting&&f&&e&&(e(),e=void 0)},{root:c,rootMargin:u,threshold:t,trackVisibility:o,delay:r},p),()=>{e&&e()}},[Array.isArray(t)?t.toString():t,m,c,u,f,d,o,p,r]);let x=null==(e=v.entry)?void 0:e.target,E=n.useRef(void 0);m||!x||f||d||E.current===x||(E.current=x,b({inView:!!h,entry:void 0}));let S=[w,v.inView,v.entry];return S.ref=S[0],S.inView=S[1],S.entry=S[2],S}n.Component}}]);