From 7f830c553f977b3930a094a22a9413fab68eddd3 Mon Sep 17 00:00:00 2001 From: lvalics Date: Mon, 23 Oct 2023 09:20:48 +0000 Subject: [PATCH 1/2] TO DO Updated --- dj_backend_server/docs/todo.md | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/dj_backend_server/docs/todo.md b/dj_backend_server/docs/todo.md index b15a1d5f..1f1b3f4e 100644 --- a/dj_backend_server/docs/todo.md +++ b/dj_backend_server/docs/todo.md @@ -2,24 +2,32 @@ TODO list of tasks to be completed. -# PDF +### PDF - Enable the "Delete" button and display a confirmation popup to remove the file (or folder), the corresponding database record, and any related data in the Vector Database.s - Evaluate the necessity of the "Resync on PDF" feature; consider discontinuing it if not needed. - Implement various statuses for PDF uploads, such as "Uploaded," "Parsed," "Successful," and "Failed." - Display error messages if the upload job fails. - Retrieve and possibly modify data from the Vector Database for review. +- When uploading a new PDF, check if the filename already exists and whether the hash is identical; if so, skip the upload. +- If the file exists but the hash differs when uploading a new PDF, delete the old data from the Vector Database (VD) and restart the job with the new file. +- Capture errors and warnings and log them into the database. -# WEBSITE +### WEBSITE - Implement a "Resync on Website" feature. - Investigate why PNG or other binary files are being parsed from a website. - If a PDF or DOC file is discovered during parsing, push it to the database via the PDF Handler. +- Implement a Smart Resync feature. +- Investigate why the sync occasionally stops and implement a restart mechanism if this occurs. +- Determine why the pages that have been crawled are not being displayed from the database. +- Capture errors and warnings and log them into the database. -# CHAT +### CHAT - Check why have localhost inside of JS and replace programatically with real URL. -# SERVER - DOCKER +### SERVER - DOCKER -- Implement NGINX to have a possibility to add SSL. \ No newline at end of file +- Implement NGINX to have a possibility to add SSL. +- Move the website_data_sources directory to an external volume to facilitate mounting on larger data storage and to ensure data persistence after system restarts. \ No newline at end of file From 008afe1b2fdc6547e857ea8f1e489db8f46c63d9 Mon Sep 17 00:00:00 2001 From: lvalics Date: Mon, 23 Oct 2023 10:18:27 +0000 Subject: [PATCH 2/2] FIX in the JS files, deleted http://localhost:8000/ --- dj_backend_server/web/static/chat.js | 6 +++--- dj_backend_server/web/static/search.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dj_backend_server/web/static/chat.js b/dj_backend_server/web/static/chat.js index af22caf1..cda7a9bd 100644 --- a/dj_backend_server/web/static/chat.js +++ b/dj_backend_server/web/static/chat.js @@ -46,7 +46,7 @@ Error generating stack: `+a.message+` * LICENSE.md file in the root directory of this source tree. * * @license MIT - */function kl(){return kl=Object.assign?Object.assign.bind():function(e){for(var n=1;nu(c,typeof c=="string"?null:c.state,h===0?"default":void 0));let a=l(t??r.length-1),o=li.Pop,s=null;function l(c){return Math.min(Math.max(c,0),r.length-1)}function f(){return r[a]}function u(c,h,m){h===void 0&&(h=null);let w=wx(r?f().pathname:"/",c,h,m);return cf(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(c)),w}function d(c){return typeof c=="string"?c:ac(c)}return{get index(){return a},get action(){return o},get location(){return f()},createHref:d,createURL(c){return new URL(d(c),"http://localhost:8000/api")},encodeLocation(c){let h=typeof c=="string"?ar(c):c;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(c,h){o=li.Push;let m=u(c,h);a+=1,r.splice(a,r.length,m),i&&s&&s({action:o,location:m,delta:1})},replace(c,h){o=li.Replace;let m=u(c,h);r[a]=m,i&&s&&s({action:o,location:m,delta:0})},go(c){o=li.Pop;let h=l(a+c),m=r[h];a=h,s&&s({action:o,location:m,delta:c})},listen(c){return s=c,()=>{s=null}}}}function Ke(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function cf(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function yx(){return Math.random().toString(36).substr(2,8)}function wx(e,n,t,i){return t===void 0&&(t=null),kl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?ar(n):n,{state:t,key:n&&n.key||i||yx()})}function ac(e){let{pathname:n="/",search:t="",hash:i=""}=e;return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function ar(e){let n={};if(e){let t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));let i=e.indexOf("?");i>=0&&(n.search=e.substr(i),e=e.substr(0,i)),e&&(n.pathname=e)}return n}var lm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(lm||(lm={}));function kx(e,n,t){t===void 0&&(t="/");let i=typeof n=="string"?ar(n):n,r=i1(i.pathname||"/",t);if(r==null)return null;let a=xk(e);bx(a);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Ke(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let f=wi([i,l.relativePath]),u=t.concat(l);a.children&&a.children.length>0&&(Ke(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),xk(a.children,n,u,f)),!(a.path==null&&!a.index)&&n.push({path:f,score:$x(f,a.index),routesMeta:u})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))r(a,o);else for(let l of Sk(a.path))r(a,o,l)}),n}function Sk(e){let n=e.split("/");if(n.length===0)return[];let[t,...i]=n,r=t.endsWith("?"),a=t.replace(/\?$/,"");if(i.length===0)return r?[a,""]:[a];let o=Sk(i.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),r&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function bx(e){e.sort((n,t)=>n.score!==t.score?t.score-n.score:Tx(n.routesMeta.map(i=>i.childrenIndex),t.routesMeta.map(i=>i.childrenIndex)))}const _x=/^:\w+$/,xx=3,Sx=2,Cx=1,Ex=10,Px=-2,fm=e=>e==="*";function $x(e,n){let t=e.split("/"),i=t.length;return t.some(fm)&&(i+=Px),n&&(i+=Sx),t.filter(r=>!fm(r)).reduce((r,a)=>r+(_x.test(a)?xx:a===""?Cx:Ex),i)}function Tx(e,n){return e.length===n.length&&e.slice(0,-1).every((i,r)=>i===n[r])?e[e.length-1]-n[n.length-1]:0}function Ox(e,n){let{routesMeta:t}=e,i={},r="/",a=[];for(let o=0;o{if(u==="*"){let p=s[d]||"";o=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}return f[u]=Ax(s[d]||"",u),f},{}),pathname:a,pathnameBase:o,pattern:e}}function Fx(e,n,t){n===void 0&&(n=!1),t===void 0&&(t=!0),cf(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let i=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,s)=>(i.push(s),"/([^\\/]+)"));return e.endsWith("*")?(i.push("*"),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,n?void 0:"i"),i]}function jx(e){try{return decodeURI(e)}catch(n){return cf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function Ax(e,n){try{return decodeURIComponent(e)}catch(t){return cf(!1,'The value for the URL param "'+n+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),e}}function i1(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let t=n.endsWith("/")?n.length-1:n.length,i=e.charAt(t);return i&&i!=="/"?null:e.slice(t)||"/"}function Rx(e,n){n===void 0&&(n="/");let{pathname:t,search:i="",hash:r=""}=typeof e=="string"?ar(e):e;return{pathname:t?t.startsWith("/")?t:zx(t,n):n,search:Lx(i),hash:Nx(r)}}function zx(e,n){let t=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function $u(e,n,t,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Ek(e){return e.filter((n,t)=>t===0||n.route.path&&n.route.path.length>0)}function Pk(e,n,t,i){i===void 0&&(i=!1);let r;typeof e=="string"?r=ar(e):(r=kl({},e),Ke(!r.pathname||!r.pathname.includes("?"),$u("?","pathname","search",r)),Ke(!r.pathname||!r.pathname.includes("#"),$u("#","pathname","hash",r)),Ke(!r.search||!r.search.includes("#"),$u("#","search","hash",r)));let a=e===""||r.pathname==="",o=a?"/":r.pathname,s;if(i||o==null)s=t;else{let d=n.length-1;if(o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;r.pathname=p.join("/")}s=d>=0?n[d]:"/"}let l=Rx(r,s),f=o&&o!=="/"&&o.endsWith("/"),u=(a||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(f||u)&&(l.pathname+="/"),l}const wi=e=>e.join("/").replace(/\/\/+/g,"/"),Mx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Nx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Dx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $k=["post","put","patch","delete"];new Set($k);const Ix=["get",...$k];new Set(Ix);/** + */function kl(){return kl=Object.assign?Object.assign.bind():function(e){for(var n=1;nu(c,typeof c=="string"?null:c.state,h===0?"default":void 0));let a=l(t??r.length-1),o=li.Pop,s=null;function l(c){return Math.min(Math.max(c,0),r.length-1)}function f(){return r[a]}function u(c,h,m){h===void 0&&(h=null);let w=wx(r?f().pathname:"/",c,h,m);return cf(w.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(c)),w}function d(c){return typeof c=="string"?c:ac(c)}return{get index(){return a},get action(){return o},get location(){return f()},createHref:d,createURL(c){return new URL(d(c),"/api")},encodeLocation(c){let h=typeof c=="string"?ar(c):c;return{pathname:h.pathname||"",search:h.search||"",hash:h.hash||""}},push(c,h){o=li.Push;let m=u(c,h);a+=1,r.splice(a,r.length,m),i&&s&&s({action:o,location:m,delta:1})},replace(c,h){o=li.Replace;let m=u(c,h);r[a]=m,i&&s&&s({action:o,location:m,delta:0})},go(c){o=li.Pop;let h=l(a+c),m=r[h];a=h,s&&s({action:o,location:m,delta:c})},listen(c){return s=c,()=>{s=null}}}}function Ke(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function cf(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function yx(){return Math.random().toString(36).substr(2,8)}function wx(e,n,t,i){return t===void 0&&(t=null),kl({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof n=="string"?ar(n):n,{state:t,key:n&&n.key||i||yx()})}function ac(e){let{pathname:n="/",search:t="",hash:i=""}=e;return t&&t!=="?"&&(n+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function ar(e){let n={};if(e){let t=e.indexOf("#");t>=0&&(n.hash=e.substr(t),e=e.substr(0,t));let i=e.indexOf("?");i>=0&&(n.search=e.substr(i),e=e.substr(0,i)),e&&(n.pathname=e)}return n}var lm;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(lm||(lm={}));function kx(e,n,t){t===void 0&&(t="/");let i=typeof n=="string"?ar(n):n,r=i1(i.pathname||"/",t);if(r==null)return null;let a=xk(e);bx(a);let o=null;for(let s=0;o==null&&s{let l={relativePath:s===void 0?a.path||"":s,caseSensitive:a.caseSensitive===!0,childrenIndex:o,route:a};l.relativePath.startsWith("/")&&(Ke(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let f=wi([i,l.relativePath]),u=t.concat(l);a.children&&a.children.length>0&&(Ke(a.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),xk(a.children,n,u,f)),!(a.path==null&&!a.index)&&n.push({path:f,score:$x(f,a.index),routesMeta:u})};return e.forEach((a,o)=>{var s;if(a.path===""||!((s=a.path)!=null&&s.includes("?")))r(a,o);else for(let l of Sk(a.path))r(a,o,l)}),n}function Sk(e){let n=e.split("/");if(n.length===0)return[];let[t,...i]=n,r=t.endsWith("?"),a=t.replace(/\?$/,"");if(i.length===0)return r?[a,""]:[a];let o=Sk(i.join("/")),s=[];return s.push(...o.map(l=>l===""?a:[a,l].join("/"))),r&&s.push(...o),s.map(l=>e.startsWith("/")&&l===""?"/":l)}function bx(e){e.sort((n,t)=>n.score!==t.score?t.score-n.score:Tx(n.routesMeta.map(i=>i.childrenIndex),t.routesMeta.map(i=>i.childrenIndex)))}const _x=/^:\w+$/,xx=3,Sx=2,Cx=1,Ex=10,Px=-2,fm=e=>e==="*";function $x(e,n){let t=e.split("/"),i=t.length;return t.some(fm)&&(i+=Px),n&&(i+=Sx),t.filter(r=>!fm(r)).reduce((r,a)=>r+(_x.test(a)?xx:a===""?Cx:Ex),i)}function Tx(e,n){return e.length===n.length&&e.slice(0,-1).every((i,r)=>i===n[r])?e[e.length-1]-n[n.length-1]:0}function Ox(e,n){let{routesMeta:t}=e,i={},r="/",a=[];for(let o=0;o{if(u==="*"){let p=s[d]||"";o=a.slice(0,a.length-p.length).replace(/(.)\/+$/,"$1")}return f[u]=Ax(s[d]||"",u),f},{}),pathname:a,pathnameBase:o,pattern:e}}function Fx(e,n,t){n===void 0&&(n=!1),t===void 0&&(t=!0),cf(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let i=[],r="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(o,s)=>(i.push(s),"/([^\\/]+)"));return e.endsWith("*")?(i.push("*"),r+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":e!==""&&e!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,n?void 0:"i"),i]}function jx(e){try{return decodeURI(e)}catch(n){return cf(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+n+").")),e}}function Ax(e,n){try{return decodeURIComponent(e)}catch(t){return cf(!1,'The value for the URL param "'+n+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+t+").")),e}}function i1(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let t=n.endsWith("/")?n.length-1:n.length,i=e.charAt(t);return i&&i!=="/"?null:e.slice(t)||"/"}function Rx(e,n){n===void 0&&(n="/");let{pathname:t,search:i="",hash:r=""}=typeof e=="string"?ar(e):e;return{pathname:t?t.startsWith("/")?t:zx(t,n):n,search:Lx(i),hash:Nx(r)}}function zx(e,n){let t=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function $u(e,n,t,i){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+n+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function Ek(e){return e.filter((n,t)=>t===0||n.route.path&&n.route.path.length>0)}function Pk(e,n,t,i){i===void 0&&(i=!1);let r;typeof e=="string"?r=ar(e):(r=kl({},e),Ke(!r.pathname||!r.pathname.includes("?"),$u("?","pathname","search",r)),Ke(!r.pathname||!r.pathname.includes("#"),$u("#","pathname","hash",r)),Ke(!r.search||!r.search.includes("#"),$u("#","search","hash",r)));let a=e===""||r.pathname==="",o=a?"/":r.pathname,s;if(i||o==null)s=t;else{let d=n.length-1;if(o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;r.pathname=p.join("/")}s=d>=0?n[d]:"/"}let l=Rx(r,s),f=o&&o!=="/"&&o.endsWith("/"),u=(a||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(f||u)&&(l.pathname+="/"),l}const wi=e=>e.join("/").replace(/\/\/+/g,"/"),Mx=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Lx=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Nx=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;function Dx(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const $k=["post","put","patch","delete"];new Set($k);const Ix=["get",...$k];new Set(Ix);/** * React Router v6.14.0 * * Copyright (c) Remix Software Inc. @@ -66,7 +66,7 @@ Error generating stack: `+a.message+` * @license MIT */function lc(){return lc=Object.assign?Object.assign.bind():function(e){for(var n=1;n=0)&&(t[r]=e[r]);return t}function f9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function u9(e,n){return e.button===0&&(!n||n==="_self")&&!f9(e)}const d9=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],c9=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",p9=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_l=k.forwardRef(function(n,t){let{onClick:i,relative:r,reloadDocument:a,replace:o,state:s,target:l,to:f,preventScrollReset:u}=n,d=l9(n,d9),{basename:p}=k.useContext(oa),c,h=!1;if(typeof f=="string"&&p9.test(f)&&(c=f,c9))try{let g=new URL(window.location.href),y=f.startsWith("//")?new URL(g.protocol+f):new URL(f),S=i1(y.pathname,p);y.origin===g.origin&&S!=null?f=S+y.search+y.hash:h=!0}catch{}let m=Hx(f,{relative:r}),w=h9(f,{replace:o,state:s,target:l,preventScrollReset:u,relative:r});function v(g){i&&i(g),g.defaultPrevented||w(g)}return k.createElement("a",lc({},d,{href:c||m,onClick:h||a?i:v,ref:t,target:l}))});var cm;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher"})(cm||(cm={}));var pm;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(pm||(pm={}));function h9(e,n){let{target:t,replace:i,state:r,preventScrollReset:a,relative:o}=n===void 0?{}:n,s=hf(),l=la(),f=Fk(e,{relative:o});return k.useCallback(u=>{if(u9(u,t)){u.preventDefault();let d=i!==void 0?i:ac(l)===ac(f);s(e,{replace:d,state:r,preventScrollReset:a,relative:o})}},[l,s,f,i,r,t,e,a,o])}function m9({label:e,id:n}){return b.jsx("li",{className:"openchat-w-full openchat-mb-1.5",children:b.jsxs(_l,{to:`/article/${n}`,className:"openchat-flex openchat-w-full openchat-group hover:openchat-bg-primary-light openchat-text-start openchat-justify-between openchat-box-border openchat-p-2 openchat-px-3 openchat-items-center openchat-transition-colors openchat-duration-250 openchat-rounded-lg openchat-opacity-100 openchat-cursor-pointer",children:[b.jsx("div",{className:"openchat-mr-auto openchat-flex-1 openchat-group-hover:openchat-text-primary openchat-transition-colors openchat-text-[14px] openchat-leading-6 openchat-min-w-0",children:e}),b.jsx("span",{className:"openchat-ml-2 openchat-self-center openchat-text-primary",children:b.jsx(_k,{})})]})})}function Ak(e){const[n,t]=k.useState(!!e),i=k.useCallback(()=>t(r=>!r),[]);return[n,i,t]}const Rk=k.createContext(void 0);function v9({children:e,...n}){return b.jsx(Rk.Provider,{value:n,children:e})}function or(){const e=k.useContext(Rk);if(!e)throw new Error("useConfigData must be used within a ConfigDataProvider");return e}const zk=k.createContext(void 0);function mf(){const e=k.useContext(zk);if(!e)throw new Error("useAppContext must be used within an AppProvider");return e}function g9({children:e}){const n=or(),t=Ak(n!=null&&n.isFullScreen?n==null?void 0:n.isFullScreen:!1);return b.jsx(zk.Provider,{value:t,children:e})}function Mk(e,n){return function(){return e.apply(n,arguments)}}const{toString:y9}=Object.prototype,{getPrototypeOf:a1}=Object,vf=(e=>n=>{const t=y9.call(n);return e[t]||(e[t]=t.slice(8,-1).toLowerCase())})(Object.create(null)),kt=e=>(e=e.toLowerCase(),n=>vf(n)===e),gf=e=>n=>typeof n===e,{isArray:fa}=Array,yo=gf("undefined");function w9(e){return e!==null&&!yo(e)&&e.constructor!==null&&!yo(e.constructor)&&Bn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Lk=kt("ArrayBuffer");function k9(e){let n;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?n=ArrayBuffer.isView(e):n=e&&e.buffer&&Lk(e.buffer),n}const b9=gf("string"),Bn=gf("function"),Nk=gf("number"),yf=e=>e!==null&&typeof e=="object",_9=e=>e===!0||e===!1,Ns=e=>{if(vf(e)!=="object")return!1;const n=a1(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},x9=kt("Date"),S9=kt("File"),C9=kt("Blob"),E9=kt("FileList"),P9=e=>yf(e)&&Bn(e.pipe),$9=e=>{let n;return e&&(typeof FormData=="function"&&e instanceof FormData||Bn(e.append)&&((n=vf(e))==="formdata"||n==="object"&&Bn(e.toString)&&e.toString()==="[object FormData]"))},T9=kt("URLSearchParams"),O9=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zo(e,n,{allOwnKeys:t=!1}={}){if(e===null||typeof e>"u")return;let i,r;if(typeof e!="object"&&(e=[e]),fa(e))for(i=0,r=e.length;i0;)if(r=t[i],n===r.toLowerCase())return r;return null}const Ik=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),Bk=e=>!yo(e)&&e!==Ik;function fc(){const{caseless:e}=Bk(this)&&this||{},n={},t=(i,r)=>{const a=e&&Dk(n,r)||r;Ns(n[a])&&Ns(i)?n[a]=fc(n[a],i):Ns(i)?n[a]=fc({},i):fa(i)?n[a]=i.slice():n[a]=i};for(let i=0,r=arguments.length;i(zo(n,(r,a)=>{t&&Bn(r)?e[a]=Mk(r,t):e[a]=r},{allOwnKeys:i}),e),j9=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),A9=(e,n,t,i)=>{e.prototype=Object.create(n.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:n.prototype}),t&&Object.assign(e.prototype,t)},R9=(e,n,t,i)=>{let r,a,o;const s={};if(n=n||{},e==null)return n;do{for(r=Object.getOwnPropertyNames(e),a=r.length;a-- >0;)o=r[a],(!i||i(o,e,n))&&!s[o]&&(n[o]=e[o],s[o]=!0);e=t!==!1&&a1(e)}while(e&&(!t||t(e,n))&&e!==Object.prototype);return n},z9=(e,n,t)=>{e=String(e),(t===void 0||t>e.length)&&(t=e.length),t-=n.length;const i=e.indexOf(n,t);return i!==-1&&i===t},M9=e=>{if(!e)return null;if(fa(e))return e;let n=e.length;if(!Nk(n))return null;const t=new Array(n);for(;n-- >0;)t[n]=e[n];return t},L9=(e=>n=>e&&n instanceof e)(typeof Uint8Array<"u"&&a1(Uint8Array)),N9=(e,n)=>{const i=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=i.next())&&!r.done;){const a=r.value;n.call(e,a[0],a[1])}},D9=(e,n)=>{let t;const i=[];for(;(t=e.exec(n))!==null;)i.push(t);return i},I9=kt("HTMLFormElement"),B9=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(t,i,r){return i.toUpperCase()+r}),hm=(({hasOwnProperty:e})=>(n,t)=>e.call(n,t))(Object.prototype),H9=kt("RegExp"),Hk=(e,n)=>{const t=Object.getOwnPropertyDescriptors(e),i={};zo(t,(r,a)=>{n(r,a,e)!==!1&&(i[a]=r)}),Object.defineProperties(e,i)},W9=e=>{Hk(e,(n,t)=>{if(Bn(e)&&["arguments","caller","callee"].indexOf(t)!==-1)return!1;const i=e[t];if(Bn(i)){if(n.enumerable=!1,"writable"in n){n.writable=!1;return}n.set||(n.set=()=>{throw Error("Can not rewrite read-only method '"+t+"'")})}})},U9=(e,n)=>{const t={},i=r=>{r.forEach(a=>{t[a]=!0})};return fa(e)?i(e):i(String(e).split(n)),t},q9=()=>{},V9=(e,n)=>(e=+e,Number.isFinite(e)?e:n),Tu="abcdefghijklmnopqrstuvwxyz",mm="0123456789",Wk={DIGIT:mm,ALPHA:Tu,ALPHA_DIGIT:Tu+Tu.toUpperCase()+mm},G9=(e=16,n=Wk.ALPHA_DIGIT)=>{let t="";const{length:i}=n;for(;e--;)t+=n[Math.random()*i|0];return t};function K9(e){return!!(e&&Bn(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const Y9=e=>{const n=new Array(10),t=(i,r)=>{if(yf(i)){if(n.indexOf(i)>=0)return;if(!("toJSON"in i)){n[r]=i;const a=fa(i)?[]:{};return zo(i,(o,s)=>{const l=t(o,r+1);!yo(l)&&(a[s]=l)}),n[r]=void 0,a}}return i};return t(e,0)},Q9=kt("AsyncFunction"),X9=e=>e&&(yf(e)||Bn(e))&&Bn(e.then)&&Bn(e.catch),R={isArray:fa,isArrayBuffer:Lk,isBuffer:w9,isFormData:$9,isArrayBufferView:k9,isString:b9,isNumber:Nk,isBoolean:_9,isObject:yf,isPlainObject:Ns,isUndefined:yo,isDate:x9,isFile:S9,isBlob:C9,isRegExp:H9,isFunction:Bn,isStream:P9,isURLSearchParams:T9,isTypedArray:L9,isFileList:E9,forEach:zo,merge:fc,extend:F9,trim:O9,stripBOM:j9,inherits:A9,toFlatObject:R9,kindOf:vf,kindOfTest:kt,endsWith:z9,toArray:M9,forEachEntry:N9,matchAll:D9,isHTMLForm:I9,hasOwnProperty:hm,hasOwnProp:hm,reduceDescriptors:Hk,freezeMethods:W9,toObjectSet:U9,toCamelCase:B9,noop:q9,toFiniteNumber:V9,findKey:Dk,global:Ik,isContextDefined:Bk,ALPHABET:Wk,generateString:G9,isSpecCompliantForm:K9,toJSONObject:Y9,isAsyncFn:Q9,isThenable:X9};function ge(e,n,t,i,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",n&&(this.code=n),t&&(this.config=t),i&&(this.request=i),r&&(this.response=r)}R.inherits(ge,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:R.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const Uk=ge.prototype,qk={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{qk[e]={value:e}});Object.defineProperties(ge,qk);Object.defineProperty(Uk,"isAxiosError",{value:!0});ge.from=(e,n,t,i,r,a)=>{const o=Object.create(Uk);return R.toFlatObject(e,o,function(l){return l!==Error.prototype},s=>s!=="isAxiosError"),ge.call(o,e.message,n,t,i,r),o.cause=e,o.name=e.name,a&&Object.assign(o,a),o};const J9=null;function uc(e){return R.isPlainObject(e)||R.isArray(e)}function Vk(e){return R.endsWith(e,"[]")?e.slice(0,-2):e}function vm(e,n,t){return e?e.concat(n).map(function(r,a){return r=Vk(r),!t&&a?"["+r+"]":r}).join(t?".":""):n}function Z9(e){return R.isArray(e)&&!e.some(uc)}const e5=R.toFlatObject(R,{},null,function(n){return/^is[A-Z]/.test(n)});function wf(e,n,t){if(!R.isObject(e))throw new TypeError("target must be an object");n=n||new FormData,t=R.toFlatObject(t,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,w){return!R.isUndefined(w[m])});const i=t.metaTokens,r=t.visitor||u,a=t.dots,o=t.indexes,l=(t.Blob||typeof Blob<"u"&&Blob)&&R.isSpecCompliantForm(n);if(!R.isFunction(r))throw new TypeError("visitor must be a function");function f(h){if(h===null)return"";if(R.isDate(h))return h.toISOString();if(!l&&R.isBlob(h))throw new ge("Blob is not supported. Use a Buffer instead.");return R.isArrayBuffer(h)||R.isTypedArray(h)?l&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,m,w){let v=h;if(h&&!w&&typeof h=="object"){if(R.endsWith(m,"{}"))m=i?m:m.slice(0,-2),h=JSON.stringify(h);else if(R.isArray(h)&&Z9(h)||(R.isFileList(h)||R.endsWith(m,"[]"))&&(v=R.toArray(h)))return m=Vk(m),v.forEach(function(y,S){!(R.isUndefined(y)||y===null)&&n.append(o===!0?vm([m],S,a):o===null?m:m+"[]",f(y))}),!1}return uc(h)?!0:(n.append(vm(w,m,a),f(h)),!1)}const d=[],p=Object.assign(e5,{defaultVisitor:u,convertValue:f,isVisitable:uc});function c(h,m){if(!R.isUndefined(h)){if(d.indexOf(h)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(h),R.forEach(h,function(v,g){(!(R.isUndefined(v)||v===null)&&r.call(n,v,R.isString(g)?g.trim():g,m,p))===!0&&c(v,m?m.concat(g):[g])}),d.pop()}}if(!R.isObject(e))throw new TypeError("data must be an object");return c(e),n}function gm(e){const n={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return n[i]})}function o1(e,n){this._pairs=[],e&&wf(e,this,n)}const Gk=o1.prototype;Gk.append=function(n,t){this._pairs.push([n,t])};Gk.toString=function(n){const t=n?function(i){return n.call(this,i,gm)}:gm;return this._pairs.map(function(r){return t(r[0])+"="+t(r[1])},"").join("&")};function n5(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function Kk(e,n,t){if(!n)return e;const i=t&&t.encode||n5,r=t&&t.serialize;let a;if(r?a=r(n,t):a=R.isURLSearchParams(n)?n.toString():new o1(n,t).toString(i),a){const o=e.indexOf("#");o!==-1&&(e=e.slice(0,o)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class t5{constructor(){this.handlers=[]}use(n,t,i){return this.handlers.push({fulfilled:n,rejected:t,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(n){this.handlers[n]&&(this.handlers[n]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(n){R.forEach(this.handlers,function(i){i!==null&&n(i)})}}const ym=t5,Yk={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},i5=typeof URLSearchParams<"u"?URLSearchParams:o1,r5=typeof FormData<"u"?FormData:null,a5=typeof Blob<"u"?Blob:null,o5=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),s5=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),mt={isBrowser:!0,classes:{URLSearchParams:i5,FormData:r5,Blob:a5},isStandardBrowserEnv:o5,isStandardBrowserWebWorkerEnv:s5,protocols:["http","https","file","blob","url","data"]};function l5(e,n){return wf(e,new mt.classes.URLSearchParams,Object.assign({visitor:function(t,i,r,a){return mt.isNode&&R.isBuffer(t)?(this.append(i,t.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},n))}function f5(e){return R.matchAll(/\w+|\[(\w*)]/g,e).map(n=>n[0]==="[]"?"":n[1]||n[0])}function u5(e){const n={},t=Object.keys(e);let i;const r=t.length;let a;for(i=0;i=t.length;return o=!o&&R.isArray(r)?r.length:o,l?(R.hasOwnProp(r,o)?r[o]=[r[o],i]:r[o]=i,!s):((!r[o]||!R.isObject(r[o]))&&(r[o]=[]),n(t,i,r[o],a)&&R.isArray(r[o])&&(r[o]=u5(r[o])),!s)}if(R.isFormData(e)&&R.isFunction(e.entries)){const t={};return R.forEachEntry(e,(i,r)=>{n(f5(i),r,t,0)}),t}return null}const d5={"Content-Type":void 0};function c5(e,n,t){if(R.isString(e))try{return(n||JSON.parse)(e),R.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(t||JSON.stringify)(e)}const kf={transitional:Yk,adapter:["xhr","http"],transformRequest:[function(n,t){const i=t.getContentType()||"",r=i.indexOf("application/json")>-1,a=R.isObject(n);if(a&&R.isHTMLForm(n)&&(n=new FormData(n)),R.isFormData(n))return r&&r?JSON.stringify(Qk(n)):n;if(R.isArrayBuffer(n)||R.isBuffer(n)||R.isStream(n)||R.isFile(n)||R.isBlob(n))return n;if(R.isArrayBufferView(n))return n.buffer;if(R.isURLSearchParams(n))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),n.toString();let s;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return l5(n,this.formSerializer).toString();if((s=R.isFileList(n))||i.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return wf(s?{"files[]":n}:n,l&&new l,this.formSerializer)}}return a||r?(t.setContentType("application/json",!1),c5(n)):n}],transformResponse:[function(n){const t=this.transitional||kf.transitional,i=t&&t.forcedJSONParsing,r=this.responseType==="json";if(n&&R.isString(n)&&(i&&!this.responseType||r)){const o=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(n)}catch(s){if(o)throw s.name==="SyntaxError"?ge.from(s,ge.ERR_BAD_RESPONSE,this,null,this.response):s}}return n}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:mt.classes.FormData,Blob:mt.classes.Blob},validateStatus:function(n){return n>=200&&n<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};R.forEach(["delete","get","head"],function(n){kf.headers[n]={}});R.forEach(["post","put","patch"],function(n){kf.headers[n]=R.merge(d5)});const s1=kf,p5=R.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"]),h5=e=>{const n={};let t,i,r;return e&&e.split(` `).forEach(function(o){r=o.indexOf(":"),t=o.substring(0,r).trim().toLowerCase(),i=o.substring(r+1).trim(),!(!t||n[t]&&p5[t])&&(t==="set-cookie"?n[t]?n[t].push(i):n[t]=[i]:n[t]=n[t]?n[t]+", "+i:i)}),n},wm=Symbol("internals");function $a(e){return e&&String(e).trim().toLowerCase()}function Ds(e){return e===!1||e==null?e:R.isArray(e)?e.map(Ds):String(e)}function m5(e){const n=Object.create(null),t=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=t.exec(e);)n[i[1]]=i[2];return n}const v5=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Ou(e,n,t,i,r){if(R.isFunction(i))return i.call(this,n,t);if(r&&(n=t),!!R.isString(n)){if(R.isString(i))return n.indexOf(i)!==-1;if(R.isRegExp(i))return i.test(n)}}function g5(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(n,t,i)=>t.toUpperCase()+i)}function y5(e,n){const t=R.toCamelCase(" "+n);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+t,{value:function(r,a,o){return this[i].call(this,n,r,a,o)},configurable:!0})})}class bf{constructor(n){n&&this.set(n)}set(n,t,i){const r=this;function a(s,l,f){const u=$a(l);if(!u)throw new Error("header name must be a non-empty string");const d=R.findKey(r,u);(!d||r[d]===void 0||f===!0||f===void 0&&r[d]!==!1)&&(r[d||l]=Ds(s))}const o=(s,l)=>R.forEach(s,(f,u)=>a(f,u,l));return R.isPlainObject(n)||n instanceof this.constructor?o(n,t):R.isString(n)&&(n=n.trim())&&!v5(n)?o(h5(n),t):n!=null&&a(t,n,i),this}get(n,t){if(n=$a(n),n){const i=R.findKey(this,n);if(i){const r=this[i];if(!t)return r;if(t===!0)return m5(r);if(R.isFunction(t))return t.call(this,r,i);if(R.isRegExp(t))return t.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(n,t){if(n=$a(n),n){const i=R.findKey(this,n);return!!(i&&this[i]!==void 0&&(!t||Ou(this,this[i],i,t)))}return!1}delete(n,t){const i=this;let r=!1;function a(o){if(o=$a(o),o){const s=R.findKey(i,o);s&&(!t||Ou(i,i[s],s,t))&&(delete i[s],r=!0)}}return R.isArray(n)?n.forEach(a):a(n),r}clear(n){const t=Object.keys(this);let i=t.length,r=!1;for(;i--;){const a=t[i];(!n||Ou(this,this[a],a,n,!0))&&(delete this[a],r=!0)}return r}normalize(n){const t=this,i={};return R.forEach(this,(r,a)=>{const o=R.findKey(i,a);if(o){t[o]=Ds(r),delete t[a];return}const s=n?g5(a):String(a).trim();s!==a&&delete t[a],t[s]=Ds(r),i[s]=!0}),this}concat(...n){return this.constructor.concat(this,...n)}toJSON(n){const t=Object.create(null);return R.forEach(this,(i,r)=>{i!=null&&i!==!1&&(t[r]=n&&R.isArray(i)?i.join(", "):i)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([n,t])=>n+": "+t).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(n){return n instanceof this?n:new this(n)}static concat(n,...t){const i=new this(n);return t.forEach(r=>i.set(r)),i}static accessor(n){const i=(this[wm]=this[wm]={accessors:{}}).accessors,r=this.prototype;function a(o){const s=$a(o);i[s]||(y5(r,o),i[s]=!0)}return R.isArray(n)?n.forEach(a):a(n),this}}bf.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.freezeMethods(bf.prototype);R.freezeMethods(bf);const Rt=bf;function Fu(e,n){const t=this||s1,i=n||t,r=Rt.from(i.headers);let a=i.data;return R.forEach(e,function(s){a=s.call(t,a,r.normalize(),n?n.status:void 0)}),r.normalize(),a}function Xk(e){return!!(e&&e.__CANCEL__)}function Mo(e,n,t){ge.call(this,e??"canceled",ge.ERR_CANCELED,n,t),this.name="CanceledError"}R.inherits(Mo,ge,{__CANCEL__:!0});function w5(e,n,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?e(t):n(new ge("Request failed with status code "+t.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const k5=mt.isStandardBrowserEnv?function(){return{write:function(t,i,r,a,o,s){const l=[];l.push(t+"="+encodeURIComponent(i)),R.isNumber(r)&&l.push("expires="+new Date(r).toGMTString()),R.isString(a)&&l.push("path="+a),R.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(t){const i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function b5(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _5(e,n){return n?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e}function Jk(e,n){return e&&!b5(n)?_5(e,n):n}const x5=mt.isStandardBrowserEnv?function(){const n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function r(a){let o=a;return n&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=r(window.location.href),function(o){const s=R.isString(o)?r(o):o;return s.protocol===i.protocol&&s.host===i.host}}():function(){return function(){return!0}}();function S5(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function C5(e,n){e=e||10;const t=new Array(e),i=new Array(e);let r=0,a=0,o;return n=n!==void 0?n:1e3,function(l){const f=Date.now(),u=i[a];o||(o=f),t[r]=l,i[r]=f;let d=a,p=0;for(;d!==r;)p+=t[d++],d=d%e;if(r=(r+1)%e,r===a&&(a=(a+1)%e),f-o{const a=r.loaded,o=r.lengthComputable?r.total:void 0,s=a-t,l=i(s),f=a<=o;t=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&f?(o-a)/l:void 0,event:r};u[n?"download":"upload"]=!0,e(u)}}const E5=typeof XMLHttpRequest<"u",P5=E5&&function(e){return new Promise(function(t,i){let r=e.data;const a=Rt.from(e.headers).normalize(),o=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}R.isFormData(r)&&(mt.isStandardBrowserEnv||mt.isStandardBrowserWebWorkerEnv?a.setContentType(!1):a.setContentType("multipart/form-data;",!1));let f=new XMLHttpRequest;if(e.auth){const c=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(c+":"+h))}const u=Jk(e.baseURL,e.url);f.open(e.method.toUpperCase(),Kk(u,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function d(){if(!f)return;const c=Rt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:c,config:e,request:f};w5(function(v){t(v),l()},function(v){i(v),l()},m),f=null}if("onloadend"in f?f.onloadend=d:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(d)},f.onabort=function(){f&&(i(new ge("Request aborted",ge.ECONNABORTED,e,f)),f=null)},f.onerror=function(){i(new ge("Network Error",ge.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||Yk;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),i(new ge(h,m.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,e,f)),f=null},mt.isStandardBrowserEnv){const c=(e.withCredentials||x5(u))&&e.xsrfCookieName&&k5.read(e.xsrfCookieName);c&&a.set(e.xsrfHeaderName,c)}r===void 0&&a.setContentType(null),"setRequestHeader"in f&&R.forEach(a.toJSON(),function(h,m){f.setRequestHeader(m,h)}),R.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),o&&o!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",km(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",km(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=c=>{f&&(i(!c||c.type?new Mo(null,e,f):c),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=S5(u);if(p&&mt.protocols.indexOf(p)===-1){i(new ge("Unsupported protocol "+p+":",ge.ERR_BAD_REQUEST,e));return}f.send(r||null)})},Is={http:J9,xhr:P5};R.forEach(Is,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const $5={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:n}=e;let t,i;for(let r=0;re instanceof Rt?e.toJSON():e;function Yr(e,n){n=n||{};const t={};function i(f,u,d){return R.isPlainObject(f)&&R.isPlainObject(u)?R.merge.call({caseless:d},f,u):R.isPlainObject(u)?R.merge({},u):R.isArray(u)?u.slice():u}function r(f,u,d){if(R.isUndefined(u)){if(!R.isUndefined(f))return i(void 0,f,d)}else return i(f,u,d)}function a(f,u){if(!R.isUndefined(u))return i(void 0,u)}function o(f,u){if(R.isUndefined(u)){if(!R.isUndefined(f))return i(void 0,f)}else return i(void 0,u)}function s(f,u,d){if(d in n)return i(f,u);if(d in e)return i(void 0,f)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(f,u)=>r(_m(f),_m(u),!0)};return R.forEach(Object.keys(Object.assign({},e,n)),function(u){const d=l[u]||r,p=d(e[u],n[u],u);R.isUndefined(p)&&d!==s||(t[u]=p)}),t}const Zk="1.4.0",l1={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{l1[e]=function(i){return typeof i===e||"a"+(n<1?"n ":" ")+e}});const xm={};l1.transitional=function(n,t,i){function r(a,o){return"[Axios v"+Zk+"] Transitional option '"+a+"'"+o+(i?". "+i:"")}return(a,o,s)=>{if(n===!1)throw new ge(r(o," has been removed"+(t?" in "+t:"")),ge.ERR_DEPRECATED);return t&&!xm[o]&&(xm[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(a,o,s):!0}};function T5(e,n,t){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const a=i[r],o=n[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new ge("option "+a+" must be "+l,ge.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ge("Unknown option "+a,ge.ERR_BAD_OPTION)}}const dc={assertOptions:T5,validators:l1},Jt=dc.validators;class xl{constructor(n){this.defaults=n,this.interceptors={request:new ym,response:new ym}}request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=Yr(this.defaults,t);const{transitional:i,paramsSerializer:r,headers:a}=t;i!==void 0&&dc.assertOptions(i,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),r!=null&&(R.isFunction(r)?t.paramsSerializer={serialize:r}:dc.assertOptions(r,{encode:Jt.function,serialize:Jt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o;o=a&&R.merge(a.common,a[t.method]),o&&R.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),t.headers=Rt.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let u,d=0,p;if(!l){const h=[bm.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,f),p=h.length,u=Promise.resolve(t);d{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](r);i._listeners=null}),this.promise.then=r=>{let a;const o=new Promise(s=>{i.subscribe(s),a=s}).then(r);return o.cancel=function(){i.unsubscribe(a)},o},n(function(a,o,s){i.reason||(i.reason=new Mo(a,o,s),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}static source(){let n;return{token:new f1(function(r){n=r}),cancel:n}}}const O5=f1;function F5(e){return function(t){return e.apply(null,t)}}function j5(e){return R.isObject(e)&&e.isAxiosError===!0}const cc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(cc).forEach(([e,n])=>{cc[n]=e});const A5=cc;function eb(e){const n=new Bs(e),t=Mk(Bs.prototype.request,n);return R.extend(t,Bs.prototype,n,{allOwnKeys:!0}),R.extend(t,n,null,{allOwnKeys:!0}),t.create=function(r){return eb(Yr(e,r))},t}const Xe=eb(s1);Xe.Axios=Bs;Xe.CanceledError=Mo;Xe.CancelToken=O5;Xe.isCancel=Xk;Xe.VERSION=Zk;Xe.toFormData=wf;Xe.AxiosError=ge;Xe.Cancel=Xe.CanceledError;Xe.all=function(n){return Promise.all(n)};Xe.spread=F5;Xe.isAxiosError=j5;Xe.mergeConfig=Yr;Xe.AxiosHeaders=Rt;Xe.formToJSON=e=>Qk(R.isHTMLForm(e)?new FormData(e):e);Xe.HttpStatusCode=A5;Xe.default=Xe;const R5=Xe,nb=k.createContext(void 0);function z5({children:e}){const n=or(),t=R5.create({baseURL:"http://localhost:8000/api"});return n!=null&&n.token?t.defaults.headers["X-Bot-Token"]=n==null?void 0:n.token:console.warn("No token!"),b.jsx(nb.Provider,{value:{axiosInstance:t},children:e})}const tb=()=>{const e=k.useContext(nb);if(!e)throw new Error("useAxiosInstance must be used within a AxiosProvider");return e},ib=k.createContext(void 0);function M5({children:e}){const{axiosInstance:n}=tb(),[t,i]=k.useState();async function r(){try{n.get("/chat/init").then(({data:a})=>i(a))}catch(a){console.log(a)}}return k.useEffect(()=>{r()},[]),b.jsx(ib.Provider,{value:t,children:e})}const ua=()=>{const e=k.useContext(ib);return e||console.warn("Error loading initial data...."),e};function L5(){const e=k.useRef(null),{y:n}=bk(e),t=1-n+.4,[,i]=mf(),r=ua(),a=or();return b.jsx("div",{className:"screen-home fade-in-bottom openchat-h-full openchat-max-h-full openchat-overflow-hidden",children:b.jsxs("div",{className:"openchat-h-full openchat-w-full openchat-relative openchat-max-h-full ",children:[b.jsx("div",{className:"openchat-max-h-96 openchat-bg-primary openchat-absolute openchat-inset-0 openchat-z-[1000000]"}),b.jsx("div",{style:{background:"url(https://www.magicpattern.design/_next/image?url=https%3A%2F%2Fstorage.googleapis.com%2Fbrandbird%2Fmagicpattern%2Fwallpapers%2Fmagicpattern-mesh-gradient-1635770864474-preview.jpg&w=3840&q=75)",backgroundSize:"cover"},className:"openchat-absolute openchat-inset-0 openchat-z-[10000000] openchat-max-h-96",children:b.jsx("div",{className:"openchat-absolute openchat-bottom-0 openchat-left-0 openchat-w-full openchat-h-full",style:{background:"linear-gradient(rgba(255, 255, 255, 0) 30%, rgb(255, 255, 255) 100%)"}})}),b.jsxs("div",{className:"openchat-absolute openchat-inset-0 openchat-z-[10000000] openchat-p-7 openchat-pb-0 openchat-h-full openchat-w-full openchat-max-h-full openchat-overflow-y-auto openchat-scrollbar-track-transparent openchat-scrollbar-thumb-accent openchat-scrollbar-thin",ref:e,children:[b.jsxs("header",{className:"openchat-relative",children:[b.jsxs("div",{className:"openchat-flex openchat-w-full openchat-items-start openchat-flex-col openchat-gap-24",children:[b.jsx("div",{className:"openchat-w-full openchat-flex openchat-items-center openchat-justify-between",children:b.jsx("div",{style:{opacity:t},className:"logo openchat-text-4xl openchat-text-white",children:b.jsx(rc,{})})}),b.jsx("div",{style:{opacity:t},className:"name",children:b.jsxs("div",{className:"openchat-font-bold openchat-text-white openchat-text-4xl",children:[b.jsx("h1",{className:"openchat-opacity-75",style:{textShadow:"rgba(255, 255, 255, 0.3) 0px 0px 30px"},children:"Hello there."}),b.jsx("h1",{style:{textShadow:"rgba(255, 255, 255, 0.3) 0px 0px 30px"},children:"How can we help?"})]})})]}),!(a!=null&&a.isFullScreen)&&b.jsx("button",{onClick:i,style:{backgroundColor:n>0?`rgba(0,0,0,${n-.1})`:""},className:hn("close-btn openchat-fixed openchat-right-6 openchat-top-6 sm:openchat-hidden openchat-text-white openchat-transition-all openchat-text-2xl openchat-w-12 openchat-h-12 openchat-flex-shrink-0 openchat-rounded-lg flex-center",n===0?"hover:openchat-bg-black/20":""),children:b.jsx(t1,{})})]}),b.jsx("section",{className:"openchat-w-full openchat-mt-5 openchat-shadow",children:b.jsxs(_l,{to:"/chat",className:"openchat-w-full openchat-px-5 openchat-py-4 openchat-flex openchat-items-center openchat-gap-2 openchat-bg-white openchat-rounded-lg openchat-group",children:[b.jsxs("div",{className:"openchat-flex-1 openchat-text-start openchat-leading-5 openchat-text-sm",children:[b.jsx("h2",{className:"openchat-text-sm openchat-text-black openchat-font-semibold group-hover:openchat-text-primary openchat-transition-colors",children:"Ask our bot a question"}),b.jsx("span",{className:"openchat-text-accent2 openchat-font-normal openchat-text-sm",children:"the team can help if needed"})]}),b.jsx("div",{className:"openchat-text-lg openchat-text-black",children:b.jsx(rc,{})})]})}),b.jsxs("section",{className:"openchat-w-full openchat-bg-white openchat-flex openchat-flex-col openchat-gap-2 openchat-p-2 openchat-text-base openchat-leading-6 openchat-mt-5 openchat-rounded-lg openchat-shadow",children:[b.jsxs(_l,{to:"/articles",className:"openchat-flex openchat-justify-between openchat-items-center openchat-w-full openchat-h-10 openchat-rounded-lg openchat-bg-accent openchat-p-2 openchat-font-semibold",children:[b.jsx("span",{className:"openchat-text-sm",children:"Search for help"}),b.jsx("span",{className:"openchat-text-primary",children:b.jsx(N6,{})})]}),b.jsx("div",{className:"openchat-mt-1",children:(r==null?void 0:r.faq)&&b.jsx("ul",{children:r.faq.slice(0,3).map(({id:o,title:s},l)=>b.jsx(m9,{label:s,id:o.toString()},l))})})]}),b.jsx("footer",{className:"openchat-w-full openchat-text-xs openchat-clear-both openchat-py-3",children:b.jsxs("p",{children:["Powered by"," ",b.jsx("a",{href:"https://openchat.so/?ref=powered-by",className:"openchat-text-primary",children:"OpenChat"})]})})]})]})})}function N5(e){return yn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z"}}]})(e)}function u1(e){return yn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"}}]})(e)}function D5(e){return yn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}}]})(e)}function I5(e){return yn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"}}]})(e)}function pc({id:e,title:n,to:t,className:i}){return b.jsxs(_l,{to:t||`/article/${e}`,className:hn("openchat-flex openchat-items-center openchat-justify-between openchat-gap-3 openchat-py-3 openchat-px-5 openchat-w-full hover:openchat-bg-primary-light openchat-group",i),children:[b.jsx("span",{className:"openchat-text-sm group-hover:openchat-text-primary",children:n}),b.jsx("span",{className:"openchat-text-primary",children:b.jsx(D5,{})})]})}function B5(){const e=hf(),[n,t]=k.useState(""),i=ua(),r=i==null?void 0:i.faq.filter(a=>a.title.toLowerCase().includes(n.toLowerCase()));return b.jsxs("div",{className:"openchat-h-full openchat-w-full openchat-max-h-full openchat-flex openchat-items-start openchat-flex-col openchat-relative",children:[b.jsx("div",{className:"openchat-flex openchat-w-full",children:b.jsxs("nav",{className:"openchat-bg-primary openchat-w-full openchat-p-2",children:[b.jsxs("div",{className:"openchat-flex openchat-flex-grow openchat-flex-row openchat-items-center openchat-justify-between openchat-gap-2 openchat-text-base openchat-text-white",children:[b.jsx("div",{className:"openchat-flex openchat-flex-1 openchat-justify-start",children:b.jsx("button",{className:"openchat-rounded-lg openchat-flex openchat-items-center openchat-justify-center openchat-text-xl hover:openchat-bg-black/20 openchat-transition-all openchat-text-white openchat-w-12 openchat-h-12",onClick:()=>e(-1),children:b.jsx(u1,{})})}),b.jsx("h1",{className:"openchat-px-2 openchat-py-1 openchat-font-bold openchat-text-center openchat-text-base openchat-overflow-hidden openchat-truncate",children:"Help"}),b.jsx("div",{className:"openchat-flex openchat-flex-1 openchat-justify-end",children:b.jsx("button",{className:"close-btn openchat-w-12 openchat-h-12 openchat-rounded-lg openchat-bg-primary-light openchat-text-2xl hover:openchat-bg-black/20 openchat-transition-all sm:openchat-hidden openchat-flex-center",children:b.jsx(t1,{})})})]}),b.jsx("div",{className:"openchat-bg-white openchat-rounded-lg openchat-flex openchat-my-2 openchat-items-center openchat-justify-center openchat-relative openchat-transition-all openchat-duration-250 openchat-border-none",children:b.jsxs("div",{className:"openchat-cursor-text openchat-flex openchat-gap-2 openchat-items-center openchat-w-full openchat-overflow-hidden openchat-rounded-lg openchat-bg-white openchat-mx-1",children:[b.jsx("input",{value:n,onChange:a=>t(a.target.value),type:"text",placeholder:"search for help",className:"openchat-flex-1 openchat-h-full openchat-border-0 openchat-text-sm openchat-p-2.5 placeholder:openchat-transition-all placeholder:openchat-text-accent2 placeholder:openchat-text-xs openchat-bg-transparent openchat-peer openchat-outline-none focus-within:openchat-outline-none"}),b.jsx("button",{className:"openchat-p-1.5 openchat-text-primary",children:b.jsx(vx,{})})]})})]})}),b.jsx("div",{className:"openchat-absolute openchat-bottom-0 openchat-left-0 openchat-right-0 openchat-w-full openchat-h-4 openchat-bg-gradient-to-t openchat-from-black/5 openchat-to-transparent"}),(i==null?void 0:i.faq)&&r&&b.jsx("div",{className:"openchat-flex-1 openchat-h-max openchat-fade-in-bottom openchat-w-full openchat-overflow-y-auto openchat-scrollbar-thin",children:b.jsxs("div",{className:"openchat-w-full openchat-h-fit openchat-max-h-full",children:[b.jsx("header",{className:"openchat-py-4 openchat-px-5 openchat-border-b-black/10 openchat-border-b openchat-w-full",children:b.jsxs("h1",{className:"openchat-font-bold openchat-text-black/60 openchat-text-sm openchat-leading-6 ",children:[b.jsx("span",{className:"openchat-tabular-nums",children:n.trim().length>0?`${r==null?void 0:r.length}`:`${i.faq.length}`})," ","articles"]})}),b.jsx("main",{className:"openchat-divide-y openchat-divide-black/5 openchat-max-h-full openchat-h-fit",children:n.trim().length>0?r.map((a,o)=>b.jsx(pc,{title:a.title,id:a.id.toString()},o)):i.faq.map((a,o)=>b.jsx(pc,{title:a.title,id:a.id.toString()},o))})]})}),!(i!=null&&i.faq)&&b.jsx("div",{className:"openchat-w-full openchat-p-5",children:b.jsx("h2",{className:"openchat-text-sm openchat-text-center openchat-w-fit openchat-mx-auto openchat-mt-5",children:"There is no FAQ right now"})})]})}function H5({canExpand:e}){const[n,t]=Ak(!0),i=hf(),[,r]=mf(),a=e&&n,o=ua(),s=or();return b.jsx("header",{className:"openchat-fade-in-top openchat-border-b openchat-border-b-black/10 openchat-w-full openchat-p-2",children:b.jsxs("div",{className:hn("openchat-w-full openchat-flex openchat-items-start openchat-gap-3 openchat-relative openchat-transition-all",a?"openchat-flex-row":"openchat-flex-col"),children:[b.jsx("button",{onClick:()=>i(-1),className:"openchat-w-12 openchat-h-12 openchat-shrink-0 openchat-rounded-xl flex-center openchat-text-xl openchat-text-primary hover:openchat-bg-primary-light openchat-transition-all",children:b.jsx("span",{children:b.jsx(u1,{})})}),b.jsxs("button",{onClick:t,className:hn("openchat-text-white openchat-h-12 openchat-shrink-0 openchat-bg-transparent openchat-leading-none openchat-transition-all openchat-p-1.5 openchat-border-none openchat-rounded-lg openchat-flex openchat-items-center openchat-gap-3 openchat-flex-1",!a&&"openchat-hidden openchat-pointer-events-none",e&&"hover:openchat-bg-black/20"),children:[b.jsx("div",{className:"openchat-w-8 openchat-aspect-square openchat-bg-primary openchat-rounded-lg"}),b.jsxs("div",{className:"openchat-flex openchat-flex-1 openchat-flex-col openchat-items-start openchat-justify-center openchat-leading-none",children:[b.jsx("h1",{className:"openchat-text-base openchat-font-semibold openchat-text-[rgb(26,26,26)]",children:o==null?void 0:o.bot_name}),b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-1",children:[b.jsx("span",{className:"openchat-bg-accent2 openchat-text-white openchat-rounded-md openchat-text-[9px] openchat-px-[3.5px] openchat-py-[3px] openchat-font-semibold",children:"AI"}),b.jsx("span",{className:"openchat-text-sm openchat-font-normal openchat-text-accent2",children:"Bot"})]})]})]}),!a&&b.jsx("div",{className:"fade-in openchat-px-2 openchat-py-1 openchat-font-bold openchat-text-center openchat-text-lg openchat-overflow-hidden openchat-truncate openchat-absolute openchat-left-1/2 openchat-top-6 -openchat-translate-x-1/2 -openchat-translate-y-1/2",children:o==null?void 0:o.bot_name}),!a&&b.jsx("button",{onClick:t,style:{animationDuration:"0.1s"},className:hn("fade-in openchat-w-full openchat-p-2 openchat-transition-colors openchat-rounded-lg openchat-pointer-events-none",e&&"hover:openchat-bg-black/20 openchat-pointer-events-auto"),children:b.jsxs("div",{className:"openchat-w-full openchat-flex openchat-items-center openchat-flex-col openchat-text-sm openchat-text-black",children:[b.jsxs("div",{className:"openchat-flex openchat-items-center",children:[b.jsx("div",{className:"openchat-h-12 openchat-w-12 openchat-shrink-0 openchat-bg-black/50 openchat-rounded-full openchat-static openchat-z-[2]"}),b.jsx("div",{className:"openchat-bg-primary openchat-rounded-lg openchat-p-3 openchat-text-4xl openchat-text-white -openchat-mx-2 openchat-border-4 openchat-border-white openchat-static openchat-z-[3]",children:b.jsx(rc,{})}),b.jsx("div",{className:"openchat-h-12 openchat-w-12 openchat-shrink-0 openchat-bg-black/50 openchat-rounded-full openchat-static openchat-z-[2]"})]}),b.jsxs("div",{className:"openchat-mt-1.5",children:[b.jsx("h2",{className:"openchat-mb-1",children:"Ask our bot a question"}),b.jsx("p",{className:"openchat-text-accent2",children:"The team can help if needed"})]})]})}),!(s!=null&&s.isFullScreen)&&b.jsx("button",{onClick:r,className:hn("close-btn openchat-w-12 sm:openchat-hidden openchat-h-12 openchat-shrink-0 openchat-rounded-xl openchat-flex openchat-items-center openchat-justify-center openchat-text-xl openchat-text-primary hover:openchat-bg-black/20 openchat-transition-all",!a&&"openchat-absolute openchat-right-0 "),children:b.jsx("span",{children:b.jsx(t1,{})})})]})})}var rb="en",d1={},hc={};function ab(){return rb}function W5(e){rb=e}function U5(e){return d1[e]}function q5(e){if(!e)throw new Error("No locale data passed");d1[e.locale]=e,hc[e.locale.toLowerCase()]=e.locale}function Sm(e){if(d1[e])return e;if(hc[e.toLowerCase()])return hc[e.toLowerCase()]}function ob(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=n.localeMatcher||"lookup";switch(t){case"lookup":return Cm(e);case"best fit":return Cm(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(t))}}function Cm(e){var n=Sm(e);if(n)return n;for(var t=e.split("-");e.length>1;){t.pop(),e=t.join("-");var i=Sm(e);if(i)return i}}var T={af:function(n){return n==1?"one":"other"},am:function(n){return n>=0&&n<=1?"one":"other"},ar:function(n){var t=String(n).split("."),i=Number(t[0])==n,r=i&&t[0].slice(-2);return n==0?"zero":n==1?"one":n==2?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ast:function(n){var t=String(n).split("."),i=!t[1];return n==1&&i?"one":"other"},be:function(n){var t=String(n).split("."),i=Number(t[0])==n,r=i&&t[0].slice(-1),a=i&&t[0].slice(-2);return r==1&&a!=11?"one":r>=2&&r<=4&&(a<12||a>14)?"few":i&&r==0||r>=5&&r<=9||a>=11&&a<=14?"many":"other"},br:function(n){var t=String(n).split("."),i=Number(t[0])==n,r=i&&t[0].slice(-1),a=i&&t[0].slice(-2),o=i&&t[0].slice(-6);return r==1&&a!=11&&a!=71&&a!=91?"one":r==2&&a!=12&&a!=72&&a!=92?"two":(r==3||r==4||r==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":n!=0&&i&&o==0?"many":"other"},bs:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"",a=!t[1],o=i.slice(-1),s=i.slice(-2),l=r.slice(-1),f=r.slice(-2);return a&&o==1&&s!=11||l==1&&f!=11?"one":a&&o>=2&&o<=4&&(s<12||s>14)||l>=2&&l<=4&&(f<12||f>14)?"few":"other"},ca:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-6);return n==1&&r?"one":i!=0&&a==0&&r?"many":"other"},ceb:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"",a=!t[1],o=i.slice(-1),s=r.slice(-1);return a&&(i==1||i==2||i==3)||a&&o!=4&&o!=6&&o!=9||!a&&s!=4&&s!=6&&s!=9?"one":"other"},cs:function(n){var t=String(n).split("."),i=t[0],r=!t[1];return n==1&&r?"one":i>=2&&i<=4&&r?"few":r?"other":"many"},cy:function(n){return n==0?"zero":n==1?"one":n==2?"two":n==3?"few":n==6?"many":"other"},da:function(n){var t=String(n).split("."),i=t[0],r=Number(t[0])==n;return n==1||!r&&(i==0||i==1)?"one":"other"},dsb:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"",a=!t[1],o=i.slice(-2),s=r.slice(-2);return a&&o==1||s==1?"one":a&&o==2||s==2?"two":a&&(o==3||o==4)||s==3||s==4?"few":"other"},dz:function(n){return"other"},es:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-6);return n==1?"one":i!=0&&a==0&&r?"many":"other"},ff:function(n){return n>=0&&n<2?"one":"other"},fr:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-6);return n>=0&&n<2?"one":i!=0&&a==0&&r?"many":"other"},ga:function(n){var t=String(n).split("."),i=Number(t[0])==n;return n==1?"one":n==2?"two":i&&n>=3&&n<=6?"few":i&&n>=7&&n<=10?"many":"other"},gd:function(n){var t=String(n).split("."),i=Number(t[0])==n;return n==1||n==11?"one":n==2||n==12?"two":i&&n>=3&&n<=10||i&&n>=13&&n<=19?"few":"other"},he:function(n){var t=String(n).split("."),i=t[0],r=!t[1];return i==1&&r||i==0&&!r?"one":i==2&&r?"two":"other"},is:function(n){var t=String(n).split("."),i=t[0],r=(t[1]||"").replace(/0+$/,""),a=Number(t[0])==n,o=i.slice(-1),s=i.slice(-2);return a&&o==1&&s!=11||r%10==1&&r%100!=11?"one":"other"},ksh:function(n){return n==0?"zero":n==1?"one":"other"},lt:function(n){var t=String(n).split("."),i=t[1]||"",r=Number(t[0])==n,a=r&&t[0].slice(-1),o=r&&t[0].slice(-2);return a==1&&(o<11||o>19)?"one":a>=2&&a<=9&&(o<11||o>19)?"few":i!=0?"many":"other"},lv:function(n){var t=String(n).split("."),i=t[1]||"",r=i.length,a=Number(t[0])==n,o=a&&t[0].slice(-1),s=a&&t[0].slice(-2),l=i.slice(-2),f=i.slice(-1);return a&&o==0||s>=11&&s<=19||r==2&&l>=11&&l<=19?"zero":o==1&&s!=11||r==2&&f==1&&l!=11||r!=2&&f==1?"one":"other"},mk:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"",a=!t[1],o=i.slice(-1),s=i.slice(-2),l=r.slice(-1),f=r.slice(-2);return a&&o==1&&s!=11||l==1&&f!=11?"one":"other"},mt:function(n){var t=String(n).split("."),i=Number(t[0])==n,r=i&&t[0].slice(-2);return n==1?"one":n==2?"two":n==0||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},pa:function(n){return n==0||n==1?"one":"other"},pl:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-1),o=i.slice(-2);return n==1&&r?"one":r&&a>=2&&a<=4&&(o<12||o>14)?"few":r&&i!=1&&(a==0||a==1)||r&&a>=5&&a<=9||r&&o>=12&&o<=14?"many":"other"},pt:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-6);return i==0||i==1?"one":i!=0&&a==0&&r?"many":"other"},ro:function(n){var t=String(n).split("."),i=!t[1],r=Number(t[0])==n,a=r&&t[0].slice(-2);return n==1&&i?"one":!i||n==0||n!=1&&a>=1&&a<=19?"few":"other"},ru:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-1),o=i.slice(-2);return r&&a==1&&o!=11?"one":r&&a>=2&&a<=4&&(o<12||o>14)?"few":r&&a==0||r&&a>=5&&a<=9||r&&o>=11&&o<=14?"many":"other"},se:function(n){return n==1?"one":n==2?"two":"other"},si:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"";return n==0||n==1||i==0&&r==1?"one":"other"},sl:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-2);return r&&a==1?"one":r&&a==2?"two":r&&(a==3||a==4)||!r?"few":"other"}};T.as=T.am;T.az=T.af;T.bg=T.af;T.bn=T.am;T.brx=T.af;T.ce=T.af;T.chr=T.af;T.de=T.ast;T.ee=T.af;T.el=T.af;T.en=T.ast;T.et=T.ast;T.eu=T.af;T.fa=T.am;T.fi=T.ast;T.fil=T.ceb;T.fo=T.af;T.fur=T.af;T.fy=T.ast;T.gl=T.ast;T.gu=T.am;T.ha=T.af;T.hi=T.am;T.hr=T.bs;T.hsb=T.dsb;T.hu=T.af;T.hy=T.ff;T.ia=T.ast;T.id=T.dz;T.ig=T.dz;T.it=T.ca;T.ja=T.dz;T.jgo=T.af;T.jv=T.dz;T.ka=T.af;T.kea=T.dz;T.kk=T.af;T.kl=T.af;T.km=T.dz;T.kn=T.am;T.ko=T.dz;T.ks=T.af;T.ku=T.af;T.ky=T.af;T.lb=T.af;T.lkt=T.dz;T.lo=T.dz;T.ml=T.af;T.mn=T.af;T.mr=T.af;T.ms=T.dz;T.my=T.dz;T.nb=T.af;T.ne=T.af;T.nl=T.ast;T.nn=T.af;T.no=T.af;T.or=T.af;T.pcm=T.am;T.ps=T.af;T.rm=T.af;T.sah=T.dz;T.sc=T.ast;T.sd=T.af;T.sk=T.cs;T.so=T.af;T.sq=T.af;T.sr=T.bs;T.su=T.dz;T.sv=T.ast;T.sw=T.ast;T.ta=T.af;T.te=T.af;T.th=T.dz;T.ti=T.pa;T.tk=T.af;T.to=T.dz;T.tr=T.af;T.ug=T.af;T.uk=T.ru;T.ur=T.ast;T.uz=T.af;T.vi=T.dz;T.wae=T.af;T.wo=T.dz;T.xh=T.af;T.yi=T.ast;T.yo=T.dz;T.yue=T.dz;T.zh=T.dz;T.zu=T.am;const Em=T;function Pm(e){return e==="pt-PT"?e:G5(e)}var V5=/^([a-z0-9]+)/i;function G5(e){var n=e.match(V5);if(!n)throw new TypeError("Invalid locale: ".concat(e));return n[1]}function K5(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function $m(e,n){for(var t=0;ti.set(r)),i}static accessor(n){const i=(this[wm]=this[wm]={accessors:{}}).accessors,r=this.prototype;function a(o){const s=$a(o);i[s]||(y5(r,o),i[s]=!0)}return R.isArray(n)?n.forEach(a):a(n),this}}bf.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);R.freezeMethods(bf.prototype);R.freezeMethods(bf);const Rt=bf;function Fu(e,n){const t=this||s1,i=n||t,r=Rt.from(i.headers);let a=i.data;return R.forEach(e,function(s){a=s.call(t,a,r.normalize(),n?n.status:void 0)}),r.normalize(),a}function Xk(e){return!!(e&&e.__CANCEL__)}function Mo(e,n,t){ge.call(this,e??"canceled",ge.ERR_CANCELED,n,t),this.name="CanceledError"}R.inherits(Mo,ge,{__CANCEL__:!0});function w5(e,n,t){const i=t.config.validateStatus;!t.status||!i||i(t.status)?e(t):n(new ge("Request failed with status code "+t.status,[ge.ERR_BAD_REQUEST,ge.ERR_BAD_RESPONSE][Math.floor(t.status/100)-4],t.config,t.request,t))}const k5=mt.isStandardBrowserEnv?function(){return{write:function(t,i,r,a,o,s){const l=[];l.push(t+"="+encodeURIComponent(i)),R.isNumber(r)&&l.push("expires="+new Date(r).toGMTString()),R.isString(a)&&l.push("path="+a),R.isString(o)&&l.push("domain="+o),s===!0&&l.push("secure"),document.cookie=l.join("; ")},read:function(t){const i=document.cookie.match(new RegExp("(^|;\\s*)("+t+")=([^;]*)"));return i?decodeURIComponent(i[3]):null},remove:function(t){this.write(t,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function b5(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function _5(e,n){return n?e.replace(/\/+$/,"")+"/"+n.replace(/^\/+/,""):e}function Jk(e,n){return e&&!b5(n)?_5(e,n):n}const x5=mt.isStandardBrowserEnv?function(){const n=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a");let i;function r(a){let o=a;return n&&(t.setAttribute("href",o),o=t.href),t.setAttribute("href",o),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return i=r(window.location.href),function(o){const s=R.isString(o)?r(o):o;return s.protocol===i.protocol&&s.host===i.host}}():function(){return function(){return!0}}();function S5(e){const n=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return n&&n[1]||""}function C5(e,n){e=e||10;const t=new Array(e),i=new Array(e);let r=0,a=0,o;return n=n!==void 0?n:1e3,function(l){const f=Date.now(),u=i[a];o||(o=f),t[r]=l,i[r]=f;let d=a,p=0;for(;d!==r;)p+=t[d++],d=d%e;if(r=(r+1)%e,r===a&&(a=(a+1)%e),f-o{const a=r.loaded,o=r.lengthComputable?r.total:void 0,s=a-t,l=i(s),f=a<=o;t=a;const u={loaded:a,total:o,progress:o?a/o:void 0,bytes:s,rate:l||void 0,estimated:l&&o&&f?(o-a)/l:void 0,event:r};u[n?"download":"upload"]=!0,e(u)}}const E5=typeof XMLHttpRequest<"u",P5=E5&&function(e){return new Promise(function(t,i){let r=e.data;const a=Rt.from(e.headers).normalize(),o=e.responseType;let s;function l(){e.cancelToken&&e.cancelToken.unsubscribe(s),e.signal&&e.signal.removeEventListener("abort",s)}R.isFormData(r)&&(mt.isStandardBrowserEnv||mt.isStandardBrowserWebWorkerEnv?a.setContentType(!1):a.setContentType("multipart/form-data;",!1));let f=new XMLHttpRequest;if(e.auth){const c=e.auth.username||"",h=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.set("Authorization","Basic "+btoa(c+":"+h))}const u=Jk(e.baseURL,e.url);f.open(e.method.toUpperCase(),Kk(u,e.params,e.paramsSerializer),!0),f.timeout=e.timeout;function d(){if(!f)return;const c=Rt.from("getAllResponseHeaders"in f&&f.getAllResponseHeaders()),m={data:!o||o==="text"||o==="json"?f.responseText:f.response,status:f.status,statusText:f.statusText,headers:c,config:e,request:f};w5(function(v){t(v),l()},function(v){i(v),l()},m),f=null}if("onloadend"in f?f.onloadend=d:f.onreadystatechange=function(){!f||f.readyState!==4||f.status===0&&!(f.responseURL&&f.responseURL.indexOf("file:")===0)||setTimeout(d)},f.onabort=function(){f&&(i(new ge("Request aborted",ge.ECONNABORTED,e,f)),f=null)},f.onerror=function(){i(new ge("Network Error",ge.ERR_NETWORK,e,f)),f=null},f.ontimeout=function(){let h=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||Yk;e.timeoutErrorMessage&&(h=e.timeoutErrorMessage),i(new ge(h,m.clarifyTimeoutError?ge.ETIMEDOUT:ge.ECONNABORTED,e,f)),f=null},mt.isStandardBrowserEnv){const c=(e.withCredentials||x5(u))&&e.xsrfCookieName&&k5.read(e.xsrfCookieName);c&&a.set(e.xsrfHeaderName,c)}r===void 0&&a.setContentType(null),"setRequestHeader"in f&&R.forEach(a.toJSON(),function(h,m){f.setRequestHeader(m,h)}),R.isUndefined(e.withCredentials)||(f.withCredentials=!!e.withCredentials),o&&o!=="json"&&(f.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&f.addEventListener("progress",km(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&f.upload&&f.upload.addEventListener("progress",km(e.onUploadProgress)),(e.cancelToken||e.signal)&&(s=c=>{f&&(i(!c||c.type?new Mo(null,e,f):c),f.abort(),f=null)},e.cancelToken&&e.cancelToken.subscribe(s),e.signal&&(e.signal.aborted?s():e.signal.addEventListener("abort",s)));const p=S5(u);if(p&&mt.protocols.indexOf(p)===-1){i(new ge("Unsupported protocol "+p+":",ge.ERR_BAD_REQUEST,e));return}f.send(r||null)})},Is={http:J9,xhr:P5};R.forEach(Is,(e,n)=>{if(e){try{Object.defineProperty(e,"name",{value:n})}catch{}Object.defineProperty(e,"adapterName",{value:n})}});const $5={getAdapter:e=>{e=R.isArray(e)?e:[e];const{length:n}=e;let t,i;for(let r=0;re instanceof Rt?e.toJSON():e;function Yr(e,n){n=n||{};const t={};function i(f,u,d){return R.isPlainObject(f)&&R.isPlainObject(u)?R.merge.call({caseless:d},f,u):R.isPlainObject(u)?R.merge({},u):R.isArray(u)?u.slice():u}function r(f,u,d){if(R.isUndefined(u)){if(!R.isUndefined(f))return i(void 0,f,d)}else return i(f,u,d)}function a(f,u){if(!R.isUndefined(u))return i(void 0,u)}function o(f,u){if(R.isUndefined(u)){if(!R.isUndefined(f))return i(void 0,f)}else return i(void 0,u)}function s(f,u,d){if(d in n)return i(f,u);if(d in e)return i(void 0,f)}const l={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,beforeRedirect:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:s,headers:(f,u)=>r(_m(f),_m(u),!0)};return R.forEach(Object.keys(Object.assign({},e,n)),function(u){const d=l[u]||r,p=d(e[u],n[u],u);R.isUndefined(p)&&d!==s||(t[u]=p)}),t}const Zk="1.4.0",l1={};["object","boolean","number","function","string","symbol"].forEach((e,n)=>{l1[e]=function(i){return typeof i===e||"a"+(n<1?"n ":" ")+e}});const xm={};l1.transitional=function(n,t,i){function r(a,o){return"[Axios v"+Zk+"] Transitional option '"+a+"'"+o+(i?". "+i:"")}return(a,o,s)=>{if(n===!1)throw new ge(r(o," has been removed"+(t?" in "+t:"")),ge.ERR_DEPRECATED);return t&&!xm[o]&&(xm[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),n?n(a,o,s):!0}};function T5(e,n,t){if(typeof e!="object")throw new ge("options must be an object",ge.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let r=i.length;for(;r-- >0;){const a=i[r],o=n[a];if(o){const s=e[a],l=s===void 0||o(s,a,e);if(l!==!0)throw new ge("option "+a+" must be "+l,ge.ERR_BAD_OPTION_VALUE);continue}if(t!==!0)throw new ge("Unknown option "+a,ge.ERR_BAD_OPTION)}}const dc={assertOptions:T5,validators:l1},Jt=dc.validators;class xl{constructor(n){this.defaults=n,this.interceptors={request:new ym,response:new ym}}request(n,t){typeof n=="string"?(t=t||{},t.url=n):t=n||{},t=Yr(this.defaults,t);const{transitional:i,paramsSerializer:r,headers:a}=t;i!==void 0&&dc.assertOptions(i,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),r!=null&&(R.isFunction(r)?t.paramsSerializer={serialize:r}:dc.assertOptions(r,{encode:Jt.function,serialize:Jt.function},!0)),t.method=(t.method||this.defaults.method||"get").toLowerCase();let o;o=a&&R.merge(a.common,a[t.method]),o&&R.forEach(["delete","get","head","post","put","patch","common"],h=>{delete a[h]}),t.headers=Rt.concat(o,a);const s=[];let l=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(t)===!1||(l=l&&m.synchronous,s.unshift(m.fulfilled,m.rejected))});const f=[];this.interceptors.response.forEach(function(m){f.push(m.fulfilled,m.rejected)});let u,d=0,p;if(!l){const h=[bm.bind(this),void 0];for(h.unshift.apply(h,s),h.push.apply(h,f),p=h.length,u=Promise.resolve(t);d{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](r);i._listeners=null}),this.promise.then=r=>{let a;const o=new Promise(s=>{i.subscribe(s),a=s}).then(r);return o.cancel=function(){i.unsubscribe(a)},o},n(function(a,o,s){i.reason||(i.reason=new Mo(a,o,s),t(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(n){if(this.reason){n(this.reason);return}this._listeners?this._listeners.push(n):this._listeners=[n]}unsubscribe(n){if(!this._listeners)return;const t=this._listeners.indexOf(n);t!==-1&&this._listeners.splice(t,1)}static source(){let n;return{token:new f1(function(r){n=r}),cancel:n}}}const O5=f1;function F5(e){return function(t){return e.apply(null,t)}}function j5(e){return R.isObject(e)&&e.isAxiosError===!0}const cc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(cc).forEach(([e,n])=>{cc[n]=e});const A5=cc;function eb(e){const n=new Bs(e),t=Mk(Bs.prototype.request,n);return R.extend(t,Bs.prototype,n,{allOwnKeys:!0}),R.extend(t,n,null,{allOwnKeys:!0}),t.create=function(r){return eb(Yr(e,r))},t}const Xe=eb(s1);Xe.Axios=Bs;Xe.CanceledError=Mo;Xe.CancelToken=O5;Xe.isCancel=Xk;Xe.VERSION=Zk;Xe.toFormData=wf;Xe.AxiosError=ge;Xe.Cancel=Xe.CanceledError;Xe.all=function(n){return Promise.all(n)};Xe.spread=F5;Xe.isAxiosError=j5;Xe.mergeConfig=Yr;Xe.AxiosHeaders=Rt;Xe.formToJSON=e=>Qk(R.isHTMLForm(e)?new FormData(e):e);Xe.HttpStatusCode=A5;Xe.default=Xe;const R5=Xe,nb=k.createContext(void 0);function z5({children:e}){const n=or(),t=R5.create({baseURL:"/api"});return n!=null&&n.token?t.defaults.headers["X-Bot-Token"]=n==null?void 0:n.token:console.warn("No token!"),b.jsx(nb.Provider,{value:{axiosInstance:t},children:e})}const tb=()=>{const e=k.useContext(nb);if(!e)throw new Error("useAxiosInstance must be used within a AxiosProvider");return e},ib=k.createContext(void 0);function M5({children:e}){const{axiosInstance:n}=tb(),[t,i]=k.useState();async function r(){try{n.get("/chat/init").then(({data:a})=>i(a))}catch(a){console.log(a)}}return k.useEffect(()=>{r()},[]),b.jsx(ib.Provider,{value:t,children:e})}const ua=()=>{const e=k.useContext(ib);return e||console.warn("Error loading initial data...."),e};function L5(){const e=k.useRef(null),{y:n}=bk(e),t=1-n+.4,[,i]=mf(),r=ua(),a=or();return b.jsx("div",{className:"screen-home fade-in-bottom openchat-h-full openchat-max-h-full openchat-overflow-hidden",children:b.jsxs("div",{className:"openchat-h-full openchat-w-full openchat-relative openchat-max-h-full ",children:[b.jsx("div",{className:"openchat-max-h-96 openchat-bg-primary openchat-absolute openchat-inset-0 openchat-z-[1000000]"}),b.jsx("div",{style:{background:"url(https://www.magicpattern.design/_next/image?url=https%3A%2F%2Fstorage.googleapis.com%2Fbrandbird%2Fmagicpattern%2Fwallpapers%2Fmagicpattern-mesh-gradient-1635770864474-preview.jpg&w=3840&q=75)",backgroundSize:"cover"},className:"openchat-absolute openchat-inset-0 openchat-z-[10000000] openchat-max-h-96",children:b.jsx("div",{className:"openchat-absolute openchat-bottom-0 openchat-left-0 openchat-w-full openchat-h-full",style:{background:"linear-gradient(rgba(255, 255, 255, 0) 30%, rgb(255, 255, 255) 100%)"}})}),b.jsxs("div",{className:"openchat-absolute openchat-inset-0 openchat-z-[10000000] openchat-p-7 openchat-pb-0 openchat-h-full openchat-w-full openchat-max-h-full openchat-overflow-y-auto openchat-scrollbar-track-transparent openchat-scrollbar-thumb-accent openchat-scrollbar-thin",ref:e,children:[b.jsxs("header",{className:"openchat-relative",children:[b.jsxs("div",{className:"openchat-flex openchat-w-full openchat-items-start openchat-flex-col openchat-gap-24",children:[b.jsx("div",{className:"openchat-w-full openchat-flex openchat-items-center openchat-justify-between",children:b.jsx("div",{style:{opacity:t},className:"logo openchat-text-4xl openchat-text-white",children:b.jsx(rc,{})})}),b.jsx("div",{style:{opacity:t},className:"name",children:b.jsxs("div",{className:"openchat-font-bold openchat-text-white openchat-text-4xl",children:[b.jsx("h1",{className:"openchat-opacity-75",style:{textShadow:"rgba(255, 255, 255, 0.3) 0px 0px 30px"},children:"Hello there."}),b.jsx("h1",{style:{textShadow:"rgba(255, 255, 255, 0.3) 0px 0px 30px"},children:"How can we help?"})]})})]}),!(a!=null&&a.isFullScreen)&&b.jsx("button",{onClick:i,style:{backgroundColor:n>0?`rgba(0,0,0,${n-.1})`:""},className:hn("close-btn openchat-fixed openchat-right-6 openchat-top-6 sm:openchat-hidden openchat-text-white openchat-transition-all openchat-text-2xl openchat-w-12 openchat-h-12 openchat-flex-shrink-0 openchat-rounded-lg flex-center",n===0?"hover:openchat-bg-black/20":""),children:b.jsx(t1,{})})]}),b.jsx("section",{className:"openchat-w-full openchat-mt-5 openchat-shadow",children:b.jsxs(_l,{to:"/chat",className:"openchat-w-full openchat-px-5 openchat-py-4 openchat-flex openchat-items-center openchat-gap-2 openchat-bg-white openchat-rounded-lg openchat-group",children:[b.jsxs("div",{className:"openchat-flex-1 openchat-text-start openchat-leading-5 openchat-text-sm",children:[b.jsx("h2",{className:"openchat-text-sm openchat-text-black openchat-font-semibold group-hover:openchat-text-primary openchat-transition-colors",children:"Ask our bot a question"}),b.jsx("span",{className:"openchat-text-accent2 openchat-font-normal openchat-text-sm",children:"the team can help if needed"})]}),b.jsx("div",{className:"openchat-text-lg openchat-text-black",children:b.jsx(rc,{})})]})}),b.jsxs("section",{className:"openchat-w-full openchat-bg-white openchat-flex openchat-flex-col openchat-gap-2 openchat-p-2 openchat-text-base openchat-leading-6 openchat-mt-5 openchat-rounded-lg openchat-shadow",children:[b.jsxs(_l,{to:"/articles",className:"openchat-flex openchat-justify-between openchat-items-center openchat-w-full openchat-h-10 openchat-rounded-lg openchat-bg-accent openchat-p-2 openchat-font-semibold",children:[b.jsx("span",{className:"openchat-text-sm",children:"Search for help"}),b.jsx("span",{className:"openchat-text-primary",children:b.jsx(N6,{})})]}),b.jsx("div",{className:"openchat-mt-1",children:(r==null?void 0:r.faq)&&b.jsx("ul",{children:r.faq.slice(0,3).map(({id:o,title:s},l)=>b.jsx(m9,{label:s,id:o.toString()},l))})})]}),b.jsx("footer",{className:"openchat-w-full openchat-text-xs openchat-clear-both openchat-py-3",children:b.jsxs("p",{children:["Powered by"," ",b.jsx("a",{href:"https://openchat.so/?ref=powered-by",className:"openchat-text-primary",children:"OpenChat"})]})})]})]})})}function N5(e){return yn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M12.736 3.97a.733.733 0 0 1 1.047 0c.286.289.29.756.01 1.05L7.88 12.01a.733.733 0 0 1-1.065.02L3.217 8.384a.757.757 0 0 1 0-1.06.733.733 0 0 1 1.047 0l3.052 3.093 5.4-6.425a.247.247 0 0 1 .02-.022Z"}}]})(e)}function u1(e){return yn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0z"}}]})(e)}function D5(e){return yn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z"}}]})(e)}function I5(e){return yn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"}}]})(e)}function pc({id:e,title:n,to:t,className:i}){return b.jsxs(_l,{to:t||`/article/${e}`,className:hn("openchat-flex openchat-items-center openchat-justify-between openchat-gap-3 openchat-py-3 openchat-px-5 openchat-w-full hover:openchat-bg-primary-light openchat-group",i),children:[b.jsx("span",{className:"openchat-text-sm group-hover:openchat-text-primary",children:n}),b.jsx("span",{className:"openchat-text-primary",children:b.jsx(D5,{})})]})}function B5(){const e=hf(),[n,t]=k.useState(""),i=ua(),r=i==null?void 0:i.faq.filter(a=>a.title.toLowerCase().includes(n.toLowerCase()));return b.jsxs("div",{className:"openchat-h-full openchat-w-full openchat-max-h-full openchat-flex openchat-items-start openchat-flex-col openchat-relative",children:[b.jsx("div",{className:"openchat-flex openchat-w-full",children:b.jsxs("nav",{className:"openchat-bg-primary openchat-w-full openchat-p-2",children:[b.jsxs("div",{className:"openchat-flex openchat-flex-grow openchat-flex-row openchat-items-center openchat-justify-between openchat-gap-2 openchat-text-base openchat-text-white",children:[b.jsx("div",{className:"openchat-flex openchat-flex-1 openchat-justify-start",children:b.jsx("button",{className:"openchat-rounded-lg openchat-flex openchat-items-center openchat-justify-center openchat-text-xl hover:openchat-bg-black/20 openchat-transition-all openchat-text-white openchat-w-12 openchat-h-12",onClick:()=>e(-1),children:b.jsx(u1,{})})}),b.jsx("h1",{className:"openchat-px-2 openchat-py-1 openchat-font-bold openchat-text-center openchat-text-base openchat-overflow-hidden openchat-truncate",children:"Help"}),b.jsx("div",{className:"openchat-flex openchat-flex-1 openchat-justify-end",children:b.jsx("button",{className:"close-btn openchat-w-12 openchat-h-12 openchat-rounded-lg openchat-bg-primary-light openchat-text-2xl hover:openchat-bg-black/20 openchat-transition-all sm:openchat-hidden openchat-flex-center",children:b.jsx(t1,{})})})]}),b.jsx("div",{className:"openchat-bg-white openchat-rounded-lg openchat-flex openchat-my-2 openchat-items-center openchat-justify-center openchat-relative openchat-transition-all openchat-duration-250 openchat-border-none",children:b.jsxs("div",{className:"openchat-cursor-text openchat-flex openchat-gap-2 openchat-items-center openchat-w-full openchat-overflow-hidden openchat-rounded-lg openchat-bg-white openchat-mx-1",children:[b.jsx("input",{value:n,onChange:a=>t(a.target.value),type:"text",placeholder:"search for help",className:"openchat-flex-1 openchat-h-full openchat-border-0 openchat-text-sm openchat-p-2.5 placeholder:openchat-transition-all placeholder:openchat-text-accent2 placeholder:openchat-text-xs openchat-bg-transparent openchat-peer openchat-outline-none focus-within:openchat-outline-none"}),b.jsx("button",{className:"openchat-p-1.5 openchat-text-primary",children:b.jsx(vx,{})})]})})]})}),b.jsx("div",{className:"openchat-absolute openchat-bottom-0 openchat-left-0 openchat-right-0 openchat-w-full openchat-h-4 openchat-bg-gradient-to-t openchat-from-black/5 openchat-to-transparent"}),(i==null?void 0:i.faq)&&r&&b.jsx("div",{className:"openchat-flex-1 openchat-h-max openchat-fade-in-bottom openchat-w-full openchat-overflow-y-auto openchat-scrollbar-thin",children:b.jsxs("div",{className:"openchat-w-full openchat-h-fit openchat-max-h-full",children:[b.jsx("header",{className:"openchat-py-4 openchat-px-5 openchat-border-b-black/10 openchat-border-b openchat-w-full",children:b.jsxs("h1",{className:"openchat-font-bold openchat-text-black/60 openchat-text-sm openchat-leading-6 ",children:[b.jsx("span",{className:"openchat-tabular-nums",children:n.trim().length>0?`${r==null?void 0:r.length}`:`${i.faq.length}`})," ","articles"]})}),b.jsx("main",{className:"openchat-divide-y openchat-divide-black/5 openchat-max-h-full openchat-h-fit",children:n.trim().length>0?r.map((a,o)=>b.jsx(pc,{title:a.title,id:a.id.toString()},o)):i.faq.map((a,o)=>b.jsx(pc,{title:a.title,id:a.id.toString()},o))})]})}),!(i!=null&&i.faq)&&b.jsx("div",{className:"openchat-w-full openchat-p-5",children:b.jsx("h2",{className:"openchat-text-sm openchat-text-center openchat-w-fit openchat-mx-auto openchat-mt-5",children:"There is no FAQ right now"})})]})}function H5({canExpand:e}){const[n,t]=Ak(!0),i=hf(),[,r]=mf(),a=e&&n,o=ua(),s=or();return b.jsx("header",{className:"openchat-fade-in-top openchat-border-b openchat-border-b-black/10 openchat-w-full openchat-p-2",children:b.jsxs("div",{className:hn("openchat-w-full openchat-flex openchat-items-start openchat-gap-3 openchat-relative openchat-transition-all",a?"openchat-flex-row":"openchat-flex-col"),children:[b.jsx("button",{onClick:()=>i(-1),className:"openchat-w-12 openchat-h-12 openchat-shrink-0 openchat-rounded-xl flex-center openchat-text-xl openchat-text-primary hover:openchat-bg-primary-light openchat-transition-all",children:b.jsx("span",{children:b.jsx(u1,{})})}),b.jsxs("button",{onClick:t,className:hn("openchat-text-white openchat-h-12 openchat-shrink-0 openchat-bg-transparent openchat-leading-none openchat-transition-all openchat-p-1.5 openchat-border-none openchat-rounded-lg openchat-flex openchat-items-center openchat-gap-3 openchat-flex-1",!a&&"openchat-hidden openchat-pointer-events-none",e&&"hover:openchat-bg-black/20"),children:[b.jsx("div",{className:"openchat-w-8 openchat-aspect-square openchat-bg-primary openchat-rounded-lg"}),b.jsxs("div",{className:"openchat-flex openchat-flex-1 openchat-flex-col openchat-items-start openchat-justify-center openchat-leading-none",children:[b.jsx("h1",{className:"openchat-text-base openchat-font-semibold openchat-text-[rgb(26,26,26)]",children:o==null?void 0:o.bot_name}),b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-1",children:[b.jsx("span",{className:"openchat-bg-accent2 openchat-text-white openchat-rounded-md openchat-text-[9px] openchat-px-[3.5px] openchat-py-[3px] openchat-font-semibold",children:"AI"}),b.jsx("span",{className:"openchat-text-sm openchat-font-normal openchat-text-accent2",children:"Bot"})]})]})]}),!a&&b.jsx("div",{className:"fade-in openchat-px-2 openchat-py-1 openchat-font-bold openchat-text-center openchat-text-lg openchat-overflow-hidden openchat-truncate openchat-absolute openchat-left-1/2 openchat-top-6 -openchat-translate-x-1/2 -openchat-translate-y-1/2",children:o==null?void 0:o.bot_name}),!a&&b.jsx("button",{onClick:t,style:{animationDuration:"0.1s"},className:hn("fade-in openchat-w-full openchat-p-2 openchat-transition-colors openchat-rounded-lg openchat-pointer-events-none",e&&"hover:openchat-bg-black/20 openchat-pointer-events-auto"),children:b.jsxs("div",{className:"openchat-w-full openchat-flex openchat-items-center openchat-flex-col openchat-text-sm openchat-text-black",children:[b.jsxs("div",{className:"openchat-flex openchat-items-center",children:[b.jsx("div",{className:"openchat-h-12 openchat-w-12 openchat-shrink-0 openchat-bg-black/50 openchat-rounded-full openchat-static openchat-z-[2]"}),b.jsx("div",{className:"openchat-bg-primary openchat-rounded-lg openchat-p-3 openchat-text-4xl openchat-text-white -openchat-mx-2 openchat-border-4 openchat-border-white openchat-static openchat-z-[3]",children:b.jsx(rc,{})}),b.jsx("div",{className:"openchat-h-12 openchat-w-12 openchat-shrink-0 openchat-bg-black/50 openchat-rounded-full openchat-static openchat-z-[2]"})]}),b.jsxs("div",{className:"openchat-mt-1.5",children:[b.jsx("h2",{className:"openchat-mb-1",children:"Ask our bot a question"}),b.jsx("p",{className:"openchat-text-accent2",children:"The team can help if needed"})]})]})}),!(s!=null&&s.isFullScreen)&&b.jsx("button",{onClick:r,className:hn("close-btn openchat-w-12 sm:openchat-hidden openchat-h-12 openchat-shrink-0 openchat-rounded-xl openchat-flex openchat-items-center openchat-justify-center openchat-text-xl openchat-text-primary hover:openchat-bg-black/20 openchat-transition-all",!a&&"openchat-absolute openchat-right-0 "),children:b.jsx("span",{children:b.jsx(t1,{})})})]})})}var rb="en",d1={},hc={};function ab(){return rb}function W5(e){rb=e}function U5(e){return d1[e]}function q5(e){if(!e)throw new Error("No locale data passed");d1[e.locale]=e,hc[e.locale.toLowerCase()]=e.locale}function Sm(e){if(d1[e])return e;if(hc[e.toLowerCase()])return hc[e.toLowerCase()]}function ob(e){var n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=n.localeMatcher||"lookup";switch(t){case"lookup":return Cm(e);case"best fit":return Cm(e);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(t))}}function Cm(e){var n=Sm(e);if(n)return n;for(var t=e.split("-");e.length>1;){t.pop(),e=t.join("-");var i=Sm(e);if(i)return i}}var T={af:function(n){return n==1?"one":"other"},am:function(n){return n>=0&&n<=1?"one":"other"},ar:function(n){var t=String(n).split("."),i=Number(t[0])==n,r=i&&t[0].slice(-2);return n==0?"zero":n==1?"one":n==2?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ast:function(n){var t=String(n).split("."),i=!t[1];return n==1&&i?"one":"other"},be:function(n){var t=String(n).split("."),i=Number(t[0])==n,r=i&&t[0].slice(-1),a=i&&t[0].slice(-2);return r==1&&a!=11?"one":r>=2&&r<=4&&(a<12||a>14)?"few":i&&r==0||r>=5&&r<=9||a>=11&&a<=14?"many":"other"},br:function(n){var t=String(n).split("."),i=Number(t[0])==n,r=i&&t[0].slice(-1),a=i&&t[0].slice(-2),o=i&&t[0].slice(-6);return r==1&&a!=11&&a!=71&&a!=91?"one":r==2&&a!=12&&a!=72&&a!=92?"two":(r==3||r==4||r==9)&&(a<10||a>19)&&(a<70||a>79)&&(a<90||a>99)?"few":n!=0&&i&&o==0?"many":"other"},bs:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"",a=!t[1],o=i.slice(-1),s=i.slice(-2),l=r.slice(-1),f=r.slice(-2);return a&&o==1&&s!=11||l==1&&f!=11?"one":a&&o>=2&&o<=4&&(s<12||s>14)||l>=2&&l<=4&&(f<12||f>14)?"few":"other"},ca:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-6);return n==1&&r?"one":i!=0&&a==0&&r?"many":"other"},ceb:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"",a=!t[1],o=i.slice(-1),s=r.slice(-1);return a&&(i==1||i==2||i==3)||a&&o!=4&&o!=6&&o!=9||!a&&s!=4&&s!=6&&s!=9?"one":"other"},cs:function(n){var t=String(n).split("."),i=t[0],r=!t[1];return n==1&&r?"one":i>=2&&i<=4&&r?"few":r?"other":"many"},cy:function(n){return n==0?"zero":n==1?"one":n==2?"two":n==3?"few":n==6?"many":"other"},da:function(n){var t=String(n).split("."),i=t[0],r=Number(t[0])==n;return n==1||!r&&(i==0||i==1)?"one":"other"},dsb:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"",a=!t[1],o=i.slice(-2),s=r.slice(-2);return a&&o==1||s==1?"one":a&&o==2||s==2?"two":a&&(o==3||o==4)||s==3||s==4?"few":"other"},dz:function(n){return"other"},es:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-6);return n==1?"one":i!=0&&a==0&&r?"many":"other"},ff:function(n){return n>=0&&n<2?"one":"other"},fr:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-6);return n>=0&&n<2?"one":i!=0&&a==0&&r?"many":"other"},ga:function(n){var t=String(n).split("."),i=Number(t[0])==n;return n==1?"one":n==2?"two":i&&n>=3&&n<=6?"few":i&&n>=7&&n<=10?"many":"other"},gd:function(n){var t=String(n).split("."),i=Number(t[0])==n;return n==1||n==11?"one":n==2||n==12?"two":i&&n>=3&&n<=10||i&&n>=13&&n<=19?"few":"other"},he:function(n){var t=String(n).split("."),i=t[0],r=!t[1];return i==1&&r||i==0&&!r?"one":i==2&&r?"two":"other"},is:function(n){var t=String(n).split("."),i=t[0],r=(t[1]||"").replace(/0+$/,""),a=Number(t[0])==n,o=i.slice(-1),s=i.slice(-2);return a&&o==1&&s!=11||r%10==1&&r%100!=11?"one":"other"},ksh:function(n){return n==0?"zero":n==1?"one":"other"},lt:function(n){var t=String(n).split("."),i=t[1]||"",r=Number(t[0])==n,a=r&&t[0].slice(-1),o=r&&t[0].slice(-2);return a==1&&(o<11||o>19)?"one":a>=2&&a<=9&&(o<11||o>19)?"few":i!=0?"many":"other"},lv:function(n){var t=String(n).split("."),i=t[1]||"",r=i.length,a=Number(t[0])==n,o=a&&t[0].slice(-1),s=a&&t[0].slice(-2),l=i.slice(-2),f=i.slice(-1);return a&&o==0||s>=11&&s<=19||r==2&&l>=11&&l<=19?"zero":o==1&&s!=11||r==2&&f==1&&l!=11||r!=2&&f==1?"one":"other"},mk:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"",a=!t[1],o=i.slice(-1),s=i.slice(-2),l=r.slice(-1),f=r.slice(-2);return a&&o==1&&s!=11||l==1&&f!=11?"one":"other"},mt:function(n){var t=String(n).split("."),i=Number(t[0])==n,r=i&&t[0].slice(-2);return n==1?"one":n==2?"two":n==0||r>=3&&r<=10?"few":r>=11&&r<=19?"many":"other"},pa:function(n){return n==0||n==1?"one":"other"},pl:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-1),o=i.slice(-2);return n==1&&r?"one":r&&a>=2&&a<=4&&(o<12||o>14)?"few":r&&i!=1&&(a==0||a==1)||r&&a>=5&&a<=9||r&&o>=12&&o<=14?"many":"other"},pt:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-6);return i==0||i==1?"one":i!=0&&a==0&&r?"many":"other"},ro:function(n){var t=String(n).split("."),i=!t[1],r=Number(t[0])==n,a=r&&t[0].slice(-2);return n==1&&i?"one":!i||n==0||n!=1&&a>=1&&a<=19?"few":"other"},ru:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-1),o=i.slice(-2);return r&&a==1&&o!=11?"one":r&&a>=2&&a<=4&&(o<12||o>14)?"few":r&&a==0||r&&a>=5&&a<=9||r&&o>=11&&o<=14?"many":"other"},se:function(n){return n==1?"one":n==2?"two":"other"},si:function(n){var t=String(n).split("."),i=t[0],r=t[1]||"";return n==0||n==1||i==0&&r==1?"one":"other"},sl:function(n){var t=String(n).split("."),i=t[0],r=!t[1],a=i.slice(-2);return r&&a==1?"one":r&&a==2?"two":r&&(a==3||a==4)||!r?"few":"other"}};T.as=T.am;T.az=T.af;T.bg=T.af;T.bn=T.am;T.brx=T.af;T.ce=T.af;T.chr=T.af;T.de=T.ast;T.ee=T.af;T.el=T.af;T.en=T.ast;T.et=T.ast;T.eu=T.af;T.fa=T.am;T.fi=T.ast;T.fil=T.ceb;T.fo=T.af;T.fur=T.af;T.fy=T.ast;T.gl=T.ast;T.gu=T.am;T.ha=T.af;T.hi=T.am;T.hr=T.bs;T.hsb=T.dsb;T.hu=T.af;T.hy=T.ff;T.ia=T.ast;T.id=T.dz;T.ig=T.dz;T.it=T.ca;T.ja=T.dz;T.jgo=T.af;T.jv=T.dz;T.ka=T.af;T.kea=T.dz;T.kk=T.af;T.kl=T.af;T.km=T.dz;T.kn=T.am;T.ko=T.dz;T.ks=T.af;T.ku=T.af;T.ky=T.af;T.lb=T.af;T.lkt=T.dz;T.lo=T.dz;T.ml=T.af;T.mn=T.af;T.mr=T.af;T.ms=T.dz;T.my=T.dz;T.nb=T.af;T.ne=T.af;T.nl=T.ast;T.nn=T.af;T.no=T.af;T.or=T.af;T.pcm=T.am;T.ps=T.af;T.rm=T.af;T.sah=T.dz;T.sc=T.ast;T.sd=T.af;T.sk=T.cs;T.so=T.af;T.sq=T.af;T.sr=T.bs;T.su=T.dz;T.sv=T.ast;T.sw=T.ast;T.ta=T.af;T.te=T.af;T.th=T.dz;T.ti=T.pa;T.tk=T.af;T.to=T.dz;T.tr=T.af;T.ug=T.af;T.uk=T.ru;T.ur=T.ast;T.uz=T.af;T.vi=T.dz;T.wae=T.af;T.wo=T.dz;T.xh=T.af;T.yi=T.ast;T.yo=T.dz;T.yue=T.dz;T.zh=T.dz;T.zu=T.am;const Em=T;function Pm(e){return e==="pt-PT"?e:G5(e)}var V5=/^([a-z0-9]+)/i;function G5(e){var n=e.match(V5);if(!n)throw new TypeError("Invalid locale: ".concat(e));return n[1]}function K5(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function $m(e,n){for(var t=0;te.length)&&(n=e.length);for(var t=0,i=new Array(n);t0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};n7(this,e);var i=t.numeric,r=t.style,a=t.localeMatcher;if(this.numeric="always",this.style="long",this.localeMatcher="lookup",i!==void 0){if(r7.indexOf(i)<0)throw new RangeError('Invalid "numeric" option: '.concat(i));this.numeric=i}if(r!==void 0){if(a7.indexOf(r)<0)throw new RangeError('Invalid "style" option: '.concat(r));this.style=r}if(a!==void 0){if(o7.indexOf(a)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(a));this.localeMatcher=a}if(typeof n=="string"&&(n=[n]),n.push(ab()),this.locale=e.supportedLocalesOf(n,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("No supported locale was found");mc.supportedLocalesOf(this.locale).length>0?this.pluralRules=new mc(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),typeof Intl<"u"&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=ob(this.locale,{localeMatcher:this.localeMatcher})}return t7(e,[{key:"format",value:function(){var t=Rm(arguments),i=Fm(t,2),r=i[0],a=i[1];return this.getRule(r,a).replace("{0}",this.formatNumber(Math.abs(r)))}},{key:"formatToParts",value:function(){var t=Rm(arguments),i=Fm(t,2),r=i[0],a=i[1],o=this.getRule(r,a),s=o.indexOf("{0}");if(s<0)return[{type:"literal",value:o}];var l=[];return s>0&&l.push({type:"literal",value:o.slice(0,s)}),l=l.concat(this.formatNumberToParts(Math.abs(r)).map(function(f){return Om(Om({},f),{},{unit:a})})),s+31&&arguments[1]!==void 0?arguments[1]:{};if(typeof e=="string")e=[e];else if(!Array.isArray(e))throw new TypeError('Invalid "locales" argument');return e.filter(function(t){return ob(t,n)})};Si.addLocale=q5;Si.setDefaultLocale=W5;Si.getDefaultLocale=ab;Si.PluralRules=mc;var Au='Invalid "unit" argument';function s7(e){if(vc(e)==="symbol")throw new TypeError(Au);if(typeof e!="string")throw new RangeError("".concat(Au,": ").concat(e));if(e[e.length-1]==="s"&&(e=e.slice(0,e.length-1)),i7.indexOf(e)<0)throw new RangeError("".concat(Au,": ").concat(e));return e}var l7='Invalid "number" argument';function f7(e){if(e=Number(e),Number.isFinite&&!Number.isFinite(e))throw new RangeError("".concat(l7,": ").concat(e));return e}function u7(e){return 1/e===-1/0}function d7(e){return e<0||e===0&&u7(e)}function Rm(e){if(e.length<2)throw new TypeError('"unit" argument is required');return[f7(e[0]),s7(e[1])]}function Sl(e){"@babel/helpers - typeof";return Sl=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},Sl(e)}function c7(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}function zm(e,n){for(var t=0;t=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function m7(e,n){if(e){if(typeof e=="string")return Lm(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Lm(e,n)}}function Lm(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,i=new Array(n);t1;)if(a.pop(),r=a.join("-"),n(r))return r}throw new Error("No locale data has been registered for any of the locales: ".concat(e.join(", ")))}function g7(){var e=(typeof Intl>"u"?"undefined":gc(Intl))==="object";return e&&typeof Intl.DateTimeFormat=="function"}function yc(e){"@babel/helpers - typeof";return yc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},yc(e)}function y7(e){return k7(e)&&(Array.isArray(e.steps)||Array.isArray(e.gradation)||Array.isArray(e.flavour)||typeof e.flavour=="string"||Array.isArray(e.labels)||typeof e.labels=="string"||Array.isArray(e.units)||typeof e.custom=="function")}var w7={}.constructor;function k7(e){return yc(e)!==void 0&&e!==null&&e.constructor===w7}var $t=60,Cl=60*$t,Vi=24*Cl,wc=7*Vi,kc=30.44*Vi,sb=146097/400*Vi;function Mr(e){switch(e){case"second":return 1;case"minute":return $t;case"hour":return Cl;case"day":return Vi;case"week":return wc;case"month":return kc;case"year":return sb}}function lb(e){return e.factor!==void 0?e.factor:Mr(e.unit||e.formatAs)||1}function wo(e){switch(e){case"floor":return Math.floor;default:return Math.round}}function c1(e){switch(e){case"floor":return 1;default:return .5}}function bc(e){"@babel/helpers - typeof";return bc=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},bc(e)}function fb(e,n){var t=n.prevStep,i=n.timestamp,r=n.now,a=n.future,o=n.round,s;return t&&(t.id||t.unit)&&(s=e["threshold_for_".concat(t.id||t.unit)]),s===void 0&&e.threshold!==void 0&&(s=e.threshold,typeof s=="function"&&(s=s(r,a))),s===void 0&&(s=e.minTime),bc(s)==="object"&&(t&&t.id&&s[t.id]!==void 0?s=s[t.id]:s=s.default),typeof s=="function"&&(s=s(i,{future:a,getMinTimeForUnit:function(f,u){return Nm(f,u||t&&t.formatAs,{round:o})}})),s===void 0&&e.test&&(e.test(i,{now:r,future:a})?s=0:s=9007199254740991),s===void 0&&(t?e.formatAs&&t.formatAs&&(s=Nm(e.formatAs,t.formatAs,{round:o})):s=0),s===void 0&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(e,null,2)),s}function Nm(e,n,t){var i=t.round,r=Mr(e),a;if(n==="now"?a=Mr(e):a=Mr(n),r!==void 0&&a!==void 0)return r-a*(1-c1(i))}function Dm(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function b7(e){for(var n=1;n0)return e[o-1]}return s}}}function ub(e,n,t){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,r=fb(e[i],b7({prevStep:e[i-1],timestamp:t.now-n*1e3},t));return r===void 0||Math.abs(n)=0:!0})}function E7(e,n,t){var i=t.now,r=t.round;if(Mr(e)){var a=Mr(e)*1e3,o=n>i,s=Math.abs(n-i),l=wo(r)(s/a)*a;return o?l>0?s-l+$7(r,a):s-l+1:-(s-l)+P7(r,a)}}function P7(e,n){return c1(e)*n}function $7(e,n){return(1-c1(e))*n+1}var T7=365*24*60*60*1e3,db=1e3*T7;function O7(e,n,t){var i=t.prevStep,r=t.nextStep,a=t.now,o=t.future,s=t.round,l=e.getTime?e.getTime():e,f=function(h){return E7(h,l,{now:a,round:s})},u=j7(o?n:r,l,{future:o,now:a,round:s,prevStep:o?i:n});if(u!==void 0){var d;if(n&&(n.getTimeToNextUpdate&&(d=n.getTimeToNextUpdate(l,{getTimeToNextUpdateForUnit:f,getRoundFunction:wo,now:a,future:o,round:s})),d===void 0)){var p=n.unit||n.formatAs;p&&(d=f(p))}return d===void 0?u:Math.min(d,u)}}function F7(e,n,t){var i=t.now,r=t.future,a=t.round,o=t.prevStep,s=fb(e,{timestamp:n,now:i,future:r,round:a,prevStep:o});if(s!==void 0)return r?n-s*1e3+1:s===0&&n===i?db:n+s*1e3}function j7(e,n,t){var i=t.now,r=t.future,a=t.round,o=t.prevStep;if(e){var s=F7(e,n,{now:i,future:r,round:a,prevStep:o});return s===void 0?void 0:s-i}else return r?n-i+1:db}var cb={};function Pr(e){return cb[e]}function pb(e){if(!e)throw new Error("[javascript-time-ago] No locale data passed.");cb[e.locale]=e}const A7=[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],_c={steps:A7,labels:"long"};function Im(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);n&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,i)}return t}function Bm(e){for(var n=1;n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function J7(e,n){return nS(e)||eS(e,n)||vb(e,n)||Z7()}function Z7(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. @@ -281,7 +281,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `)&&f.type==="html"&&(a[a.length-1]=a[a.length-1].replace(/(\r?\n|\r)$/," "),s=" ",l=n.createTracker(t),l.move(a.join(""))),a.push(l.move(n.handle(f,e,n,{...l.current(),before:s,after:u}))),s=a[a.length-1].slice(-1)}return i.pop(),a.join("")}const WF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];g3.peek=KF;const UF={canContainEols:["delete"],enter:{strikethrough:VF},exit:{strikethrough:GF}},qF={unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:WF}],handlers:{delete:g3}};function VF(e){this.enter({type:"delete",children:[]},e)}function GF(e){this.exit(e)}function g3(e,n,t,i){const r=Qf(i),a=t.enter("strikethrough");let o=r.move("~~");return o+=v3(e,t,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),a(),o}function KF(){return"~"}y3.peek=YF;function y3(e,n,t){let i=e.value||"",r="`",a=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++al&&(l=e[f].length);++ws[w])&&(s[w]=g)}h.push(v)}a[f]=h,o[f]=m}let u=-1;if(typeof t=="object"&&"length"in t)for(;++us[u]&&(s[u]=v),p[u]=v),d[u]=g}a.splice(1,0,d),o.splice(1,0,p),f=-1;const c=[];for(;++ft==="none"?null:t),children:[]},e),this.setData("inTable",!0)}function nj(e){this.exit(e),this.setData("inTable")}function tj(e){this.enter({type:"tableRow",children:[]},e)}function Ju(e){this.exit(e)}function y0(e){this.enter({type:"tableCell",children:[]},e)}function ij(e){let n=this.resume();this.getData("inTable")&&(n=n.replace(/\\([\\|])/g,rj));const t=this.stack[this.stack.length-1];t.value=n,this.exit(e)}function rj(e,n){return n==="|"?n:e}function aj(e){const n=e||{},t=n.tableCellPadding,i=n.tablePipeAlign,r=n.stringLength,a=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{table:o,tableRow:s,tableCell:l,inlineCode:p}};function o(c,h,m,w){return f(u(c,m,w),c.align)}function s(c,h,m,w){const v=d(c,m,w),g=f([v]);return g.slice(0,g.indexOf(` -`))}function l(c,h,m,w){const v=m.enter("tableCell"),g=m.enter("phrasing"),y=v3(c,m,{...w,before:a,after:a});return g(),v(),y}function f(c,h){return QF(c,{align:h,alignDelimiters:i,padding:t,stringLength:r})}function u(c,h,m){const w=c.children;let v=-1;const g=[],y=h.enter("table");for(;++v-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=t.createTracker(i);s.move(a+" ".repeat(o-a.length)),s.shift(o);const l=t.enter("listItem"),f=t.indentLines(t.containerFlow(e,s.current()),u);return l(),f;function u(d,p,c){return p?(c?"":" ".repeat(o))+d:(c?a:a+" ".repeat(o-a.length))+d}}const fj={exit:{taskListCheckValueChecked:w0,taskListCheckValueUnchecked:w0,paragraph:dj}},uj={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cj}};function w0(e){const n=this.stack[this.stack.length-2];n.checked=e.type==="taskListCheckValueChecked"}function dj(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1],i=t.children[0];if(i&&i.type==="text"){const r=n.children;let a=-1,o;for(;++a{const[n,t]=k.useState([]),[i,r]=yj(),[a,o]=k.useState(!1),[s,l]=k.useState(!1),{axiosInstance:f}=tb(),u=h=>{var w,v;h.from==="user"?(w=r.current)==null||w.play():(v=i.current)==null||v.play();const m={...h,timestamp:h.timestamp?h.timestamp:mj()};t(g=>[...g,m])};async function d(h){const m=await f.post("/chat/send/",{type:"email",content:h});m.status===200?u(m.data):l(!0)}const c={messages:n,sendMessage:async h=>{l(!1),u(h);try{o(!0);const m=await f.post("/chat/send/",h);u({...m.data,from:"bot"})}catch{console.error("Error sending the message:"),l(!0)}finally{o(!1)}},loading:a,error:s,sendEmail:d};return b.jsx(k3.Provider,{value:c,children:e})},Bl=()=>{const e=k.useContext(k3);if(!e)throw new Error("useChat must be used within a ChatProvider");return e};function k0({messages:e,timestamp:n}){const{displayText:t}=z1({text:e[0],every:1e-4,shouldStart:e.length<2});return b.jsxs("div",{className:"openchat-clear-both openchat-w-full openchat-group",children:[b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"openchat-w-10 openchat-h-10 openchat-bg-accent2 openchat-rounded-lg openchat-shrink-0 openchat-mt-auto openchat-mb-1"}),b.jsx("div",{className:"openchat-group openchat-space-y-2 openchat-flex-1",children:e.length<2?b.jsx("div",{className:"mesg_body openchat-max-w-[90%] openchat-w-fit openchat-px-5 openchat-py-4 openchat-rounded-lg openchat-bg-accent",children:b.jsx("div",{children:b.jsx(Il,{remarkPlugins:[Xc],className:"openchat-prose prose-h1:openchat-font-medium prose-h2:openchat-font-normal prose-headings:openchat-my-1 openchat-prose-sm openchat-text-sm openchat-max-w-full",children:t})})}):e.map((i,r)=>b.jsx("div",{className:"mesg_body openchat-max-w-[90%] openchat-w-fit openchat-px-5 openchat-py-4 openchat-rounded-lg openchat-bg-accent",children:b.jsx("div",{children:b.jsx(Il,{remarkPlugins:[Xc],className:"openchat-prose prose-h1:openchat-font-medium prose-h2:openchat-font-normal prose-headings:openchat-my-1 openchat-prose-sm openchat-text-sm openchat-leading-4 openchat-max-w-full",children:i})})},r))})]}),b.jsx("div",{className:"openchat-w-full openchat-ps-[52px]",children:b.jsx("div",{children:n&&b.jsxs("span",{className:"openchat-text-xs openchat-m-0 group-last-of-type:openchat-inline openchat-hidden",children:["Bot ·"," ",b.jsx(p1,{date:n,timeStyle:"mini-minute-now",locale:"en-US"})]})})})]})}function bj(){const{displayText:e}=z1({text:"Bot is Thinking..."});return b.jsxs("div",{className:"openchat-my-2 openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"loading openchat-flex-col openchat-w-10 openchat-flex openchat-h-10 openchat-bg-black/90 openchat-text-white openchat-rounded-lg openchat-shrink-0 openchat-mt-auto openchat-mb-1 flex-center",children:b.jsx(t8,{height:"24",width:"24",color:"white",visible:!0})}),b.jsx("div",{className:"openchat-group openchat-space-y-2 openchat-flex-1",children:b.jsx("div",{className:"mesg_body openchat-w-fit openchat-whitespace-nowrap openchat-max-w-[80%] openchat-px-5 openchat-py-4 openchat-rounded-lg openchat-bg-accent",children:b.jsx("div",{children:b.jsx("p",{className:"openchat-text-sm openchat-lowercase",children:e})})})})]})}function _j({type:e,content:n,timestamp:t}){return b.jsx("div",{className:"openchat-w-full last-of-type:openchat-mb-10 ",children:b.jsx("div",{className:hn("openchat-float-right openchat-max-w-[75%] openchat-px-5 openchat-py-4 openchat-rounded-lg openchat-text-sm openchat-font-normal",e==="emoji"?"openchat-bg-transparent openchat-select-none":"openchat-bg-primary openchat-text-white"),children:b.jsx(FE,{tooltipContent:b.jsx("span",{className:"openchat-select-none data-[state=open]:openchat-fade-in openchat-rounded-sm openchat-bg-black/40 openchat-text-white openchat-p-0.5 openchat-text-xs openchat-px-1 openchat-leading-none",children:t&&jE(t)}),children:b.jsx("p",{className:hn(e==="emoji"?"openchat-text-8xl":""),children:n})})})})}function xj({children:e,className:n,...t}){return b.jsx("button",{...t,className:hn("openchat-text-sm openchat-flex-wrap openchat-whitespace-nowrap openchat-leading-4 openchat-p-2 openchat-rounded-md openchat-bg-primary-light openchat-text-primary hover:openchat-bg-primary hover:openchat-text-white openchat-transition-colors openchat-inline-block",n),children:e})}function Sj({children:e}){return b.jsx("div",{className:"openchat-w-full openchat-clear-both",children:b.jsx("div",{className:"openchat-float-right openchat-w-full openchat-flex-wrap openchat-max-w-full openchat-flex-row openchat-justify-end openchat-py-4 openchat-rounded-lg openchat-text-sm openchat-font-normal openchat-flex openchat-items-center openchat-gap-2",children:e})})}function Cj({timestamp:e}){const[n,t]=k.useState(!1),[i,r]=k.useState(!1),[a,o]=k.useState(!1),[s,l]=k.useState(""),{sendEmail:f}=Bl(),u=()=>{const c=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s);return c||o(!0),c};function d(){!n&&!i&&u()&&(t(!0),f(s),t(!1),r(!0))}return b.jsxs("div",{className:"openchat-clear-both openchat-w-full openchat-group",children:[b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"openchat-w-10 openchat-h-10 openchat-bg-accent2 openchat-rounded-lg openchat-shrink-0 openchat-mt-auto openchat-mb-1"}),b.jsxs("div",{style:{boxShadow:"rgba(0, 0, 0, 0.1) 0px 4px 15px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px 0px, rgba(0, 87, 255, 0.5) 0px 2px 0px 0px inset"},className:"openchat-w-full openchat-flex-1 openchat-p-6 openchat-rounded-md",children:[b.jsxs("div",{className:"openchat-flex openchat-flex-col openchat-items-start openchat-gap-1",children:[b.jsx("label",{htmlFor:"emailRespInput openchat-text-sm openchat-leading-[20px]",children:"Email"}),b.jsxs("div",{style:{boxShadow:"rgba(0, 0, 0, 0.07) 0px 1px 3px 0px inset"},className:"openchat-w-full openchat-flex openchat-items-center openchat-rounded-lg openchat-overflow-hidden openchat-border openchat-border-[rgb(225,_225,_225)] ",children:[b.jsx("input",{onChange:p=>{l(p.target.value),o(!1)},value:s,type:"email",disabled:i||n,placeholder:"email@example.com",className:hn("openchat-outline-none disabled:openchat-select-none selection:disabled:openchat-bg-transparent openchat-flex-1 disabled:openchat-bg-transparent openchat-w-full placeholder:openchat-text-accent2 placeholder:openchat-text-xs openchat-bg-[rgb(250,_250,_250)] focus:openchat-bg-transparent openchat-transition-colors openchat-h-full openchat-p-2.5",a?"openchat-text-[red]":""),id:"emailRespInput",required:!0,"aria-required":!0}),!i&&!n&&b.jsx("button",{onClick:d,className:hn("send openchat-p-3 openchat-text-2xl openchat-bg-primary"),children:b.jsx("span",{className:"openchat-text-white",children:b.jsx(_k,{})})}),n&&b.jsx("button",{className:"loader openchat-p-3 openchat-text-2xl openchat-bg-primary openchat-flex-center openchat-cursor-not-allowed openchat-pointer-events-none",children:b.jsx(sC,{height:"26",width:"26",color:"#fff"})}),!a&&!n&&i&&b.jsx("button",{className:"success openchat-p-3 openchat-text-2xl openchat-cursor-not-allowed openchat-pointer-events-none",children:b.jsx("span",{className:"openchat-text-[green]",children:b.jsx(N5,{})})})]})]}),a&&b.jsx("div",{className:"openchat-mt-1",children:b.jsx("p",{className:"openchat-text-xs openchat-text-[red]",children:"this doesn't look like an email"})})]})]}),b.jsx("div",{className:"openchat-w-full openchat-ps-[52px]",children:e&&b.jsx("div",{children:b.jsxs("span",{className:"openchat-text-xs openchat-m-0 group-last-of-type:openchat-inline hidden",children:["Bot ·"," ",b.jsx(p1,{date:Date.now(),timeStyle:"mini-minute-now",locale:"en-US"})]})})})]})}function Ej({className:e,label:n,onClick:t,timestamp:i,...r}){const[a,o]=k.useState(!1);return b.jsxs("div",{hidden:a,className:"openchat-clear-both openchat-w-full openchat-group",children:[b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"openchat-w-10 openchat-h-10 openchat-bg-accent2 openchat-rounded-lg openchat-shrink-0 openchat-mt-auto"}),b.jsx("div",{className:"openchat-group openchat-space-y-2",children:b.jsx("div",{className:"mesg_body openchat-max-w-full",children:b.jsx("button",{...r,className:hn("openchat-rounded-lg openchat-text-primary hover:openchat-text-white openchat-flex-center openchat-px-2.5 openchat-py-2 openchat-whitespace-nowrap openchat-transition-all openchat-bg-primary-light hover:openchat-bg-primary openchat-cursor-pointer",e),onClick:s=>{o(!0),t&&t(s)},children:b.jsx("span",{children:n})})})})]}),b.jsx("div",{className:"openchat-w-full openchat-ps-[52px]",children:b.jsx("div",{children:i&&b.jsxs("span",{className:"openchat-text-xsopenchat- m-0 group-last-of-type:openchat-inline hidden",children:["Bot ·"," ",b.jsx(p1,{date:Date.now(),timeStyle:"mini-minute-now",locale:"en-US"})]})})})]})}function Pj(){const{displayText:e}=z1({text:"error sending the message.",every:.001});return b.jsx("div",{className:"openchat-clear-both openchat-w-full openchat-group",children:b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"openchat-w-10 openchat-h-10 openchat-bg-accent2 openchat-rounded-lg openchat-shrink-0"}),b.jsx("div",{className:"openchat-group openchat-space-y-2 openchat-text-[red] openchat-outline-[red] openchat-outline-1 openchat-outline openchat-p-2 openchat-text-sm openchat-font-normal openchat-rounded-md",children:e})]})})}const $j=e=>[(t,i)=>{if(e.current){const{scrollWidth:r,scrollHeight:a}=e.current,o=r-e.current.clientWidth,s=a-e.current.clientHeight,l=t/100*o,f=i/100*s;e.current.scrollTo(l,f)}}];let Zu=0;function Tj(){k.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:b0()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:b0()),Zu++,()=>{Zu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),Zu--}},[])}function b0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const ed="focusScope.autoFocusOnMount",nd="focusScope.autoFocusOnUnmount",_0={bubbles:!1,cancelable:!0},Oj=k.forwardRef((e,n)=>{const{loop:t=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...o}=e,[s,l]=k.useState(null),f=Ci(r),u=Ci(a),d=k.useRef(null),p=Vt(n,m=>l(m)),c=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(i){let g=function(x){if(c.paused||!s)return;const P=x.target;s.contains(P)?d.current=P:ni(d.current,{select:!0})},y=function(x){if(c.paused||!s)return;const P=x.relatedTarget;P!==null&&(s.contains(P)||ni(d.current,{select:!0}))},S=function(x){const P=document.activeElement;for(const O of x)O.removedNodes.length>0&&(s!=null&&s.contains(P)||ni(s))};var m=g,w=y,v=S;document.addEventListener("focusin",g),document.addEventListener("focusout",y);const E=new MutationObserver(S);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),E.disconnect()}}},[i,s,c.paused]),k.useEffect(()=>{if(s){S0.add(c);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(ed,_0);s.addEventListener(ed,f),s.dispatchEvent(v),v.defaultPrevented||(Fj(Mj(b3(s)),{select:!0}),document.activeElement===m&&ni(s))}return()=>{s.removeEventListener(ed,f),setTimeout(()=>{const v=new CustomEvent(nd,_0);s.addEventListener(nd,u),s.dispatchEvent(v),v.defaultPrevented||ni(m??document.body,{select:!0}),s.removeEventListener(nd,u),S0.remove(c)},0)}}},[s,f,u,c]);const h=k.useCallback(m=>{if(!t&&!i||c.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(w&&v){const g=m.currentTarget,[y,S]=jj(g);y&&S?!m.shiftKey&&v===S?(m.preventDefault(),t&&ni(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),t&&ni(S,{select:!0})):v===g&&m.preventDefault()}},[t,i,c.paused]);return k.createElement(Gt.div,Ee({tabIndex:-1},o,{ref:p,onKeyDown:h}))});function Fj(e,{select:n=!1}={}){const t=document.activeElement;for(const i of e)if(ni(i,{select:n}),document.activeElement!==t)return}function jj(e){const n=b3(e),t=x0(n,e),i=x0(n.reverse(),e);return[t,i]}function b3(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function x0(e,n){for(const t of e)if(!Aj(t,{upTo:n}))return t}function Aj(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Rj(e){return e instanceof HTMLInputElement&&"select"in e}function ni(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Rj(e)&&n&&e.select()}}const S0=zj();function zj(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=C0(e,n),e.unshift(n)},remove(n){var t;e=C0(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function C0(e,n){const t=[...e],i=t.indexOf(n);return i!==-1&&t.splice(i,1),t}function Mj(e){return e.filter(n=>n.tagName!=="A")}var Lj=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ur=new WeakMap,ws=new WeakMap,ks={},td=0,_3=function(e){return e&&(e.host||_3(e.parentNode))},Nj=function(e,n){return n.map(function(t){if(e.contains(t))return t;var i=_3(t);return i&&e.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Dj=function(e,n,t,i){var r=Nj(n,Array.isArray(e)?e:[e]);ks[t]||(ks[t]=new WeakMap);var a=ks[t],o=[],s=new Set,l=new Set(r),f=function(d){!d||s.has(d)||(s.add(d),f(d.parentNode))};r.forEach(f);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))u(p);else{var c=p.getAttribute(i),h=c!==null&&c!=="false",m=(ur.get(p)||0)+1,w=(a.get(p)||0)+1;ur.set(p,m),a.set(p,w),o.push(p),m===1&&h&&ws.set(p,!0),w===1&&p.setAttribute(t,"true"),h||p.setAttribute(i,"true")}})};return u(n),s.clear(),td++,function(){o.forEach(function(d){var p=ur.get(d)-1,c=a.get(d)-1;ur.set(d,p),a.set(d,c),p||(ws.has(d)||d.removeAttribute(i),ws.delete(d)),c||d.removeAttribute(t)}),td--,td||(ur=new WeakMap,ur=new WeakMap,ws=new WeakMap,ks={})}},Ij=function(e,n,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=n||Lj(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live]"))),Dj(i,r,t,"aria-hidden")):function(){return null}},ht=function(){return ht=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return iA;var n=rA(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},oA=E3(),sA=function(e,n,t,i){var r=e.left,a=e.top,o=e.right,s=e.gap;return t===void 0&&(t="margin"),` +`))}function l(c,h,m,w){const v=m.enter("tableCell"),g=m.enter("phrasing"),y=v3(c,m,{...w,before:a,after:a});return g(),v(),y}function f(c,h){return QF(c,{align:h,alignDelimiters:i,padding:t,stringLength:r})}function u(c,h,m){const w=c.children;let v=-1;const g=[],y=h.enter("table");for(;++v-1?n.start:1)+(t.options.incrementListMarker===!1?0:n.children.indexOf(e))+a);let o=a.length+1;(r==="tab"||r==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(o=Math.ceil(o/4)*4);const s=t.createTracker(i);s.move(a+" ".repeat(o-a.length)),s.shift(o);const l=t.enter("listItem"),f=t.indentLines(t.containerFlow(e,s.current()),u);return l(),f;function u(d,p,c){return p?(c?"":" ".repeat(o))+d:(c?a:a+" ".repeat(o-a.length))+d}}const fj={exit:{taskListCheckValueChecked:w0,taskListCheckValueUnchecked:w0,paragraph:dj}},uj={unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:cj}};function w0(e){const n=this.stack[this.stack.length-2];n.checked=e.type==="taskListCheckValueChecked"}function dj(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const t=this.stack[this.stack.length-1],i=t.children[0];if(i&&i.type==="text"){const r=n.children;let a=-1,o;for(;++a{const[n,t]=k.useState([]),[i,r]=yj(),[a,o]=k.useState(!1),[s,l]=k.useState(!1),{axiosInstance:f}=tb(),u=h=>{var w,v;h.from==="user"?(w=r.current)==null||w.play():(v=i.current)==null||v.play();const m={...h,timestamp:h.timestamp?h.timestamp:mj()};t(g=>[...g,m])};async function d(h){const m=await f.post("/chat/send/",{type:"email",content:h});m.status===200?u(m.data):l(!0)}const c={messages:n,sendMessage:async h=>{l(!1),u(h);try{o(!0);const m=await f.post("/chat/send/",h);u({...m.data,from:"bot"})}catch{console.error("Error sending the message:"),l(!0)}finally{o(!1)}},loading:a,error:s,sendEmail:d};return b.jsx(k3.Provider,{value:c,children:e})},Bl=()=>{const e=k.useContext(k3);if(!e)throw new Error("useChat must be used within a ChatProvider");return e};function k0({messages:e,timestamp:n}){const{displayText:t}=z1({text:e[0],every:1e-4,shouldStart:e.length<2});return b.jsxs("div",{className:"openchat-clear-both openchat-w-full openchat-group",children:[b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"openchat-w-10 openchat-h-10 openchat-bg-accent2 openchat-rounded-lg openchat-shrink-0 openchat-mt-auto openchat-mb-1"}),b.jsx("div",{className:"openchat-group openchat-space-y-2 openchat-flex-1",children:e.length<2?b.jsx("div",{className:"mesg_body openchat-max-w-[90%] openchat-w-fit openchat-px-5 openchat-py-4 openchat-rounded-lg openchat-bg-accent",children:b.jsx("div",{children:b.jsx(Il,{remarkPlugins:[Xc],className:"openchat-prose prose-h1:openchat-font-medium prose-h2:openchat-font-normal prose-headings:openchat-my-1 openchat-prose-sm openchat-text-sm openchat-max-w-full",children:t})})}):e.map((i,r)=>b.jsx("div",{className:"mesg_body openchat-max-w-[90%] openchat-w-fit openchat-px-5 openchat-py-4 openchat-rounded-lg openchat-bg-accent",children:b.jsx("div",{children:b.jsx(Il,{remarkPlugins:[Xc],className:"openchat-prose prose-h1:openchat-font-medium prose-h2:openchat-font-normal prose-headings:openchat-my-1 openchat-prose-sm openchat-text-sm openchat-leading-4 openchat-max-w-full",children:i})})},r))})]}),b.jsx("div",{className:"openchat-w-full openchat-ps-[52px]",children:b.jsx("div",{children:n&&b.jsxs("span",{className:"openchat-text-xs openchat-m-0 group-last-of-type:openchat-inline openchat-hidden",children:["Bot ·"," ",b.jsx(p1,{date:n,timeStyle:"mini-minute-now",locale:"en-US"})]})})})]})}function bj(){const{displayText:e}=z1({text:"Bot is Thinking..."});return b.jsxs("div",{className:"openchat-my-2 openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"loading openchat-flex-col openchat-w-10 openchat-flex openchat-h-10 openchat-bg-black/90 openchat-text-white openchat-rounded-lg openchat-shrink-0 openchat-mt-auto openchat-mb-1 flex-center",children:b.jsx(t8,{height:"24",width:"24",color:"white",visible:!0})}),b.jsx("div",{className:"openchat-group openchat-space-y-2 openchat-flex-1",children:b.jsx("div",{className:"mesg_body openchat-w-fit openchat-whitespace-nowrap openchat-max-w-[80%] openchat-px-5 openchat-py-4 openchat-rounded-lg openchat-bg-accent",children:b.jsx("div",{children:b.jsx("p",{className:"openchat-text-sm openchat-lowercase",children:e})})})})]})}function _j({type:e,content:n,timestamp:t}){return b.jsx("div",{className:"openchat-w-full last-of-type:openchat-mb-10 ",children:b.jsx("div",{className:hn("openchat-float-right openchat-max-w-[75%] openchat-px-5 openchat-py-4 openchat-rounded-lg openchat-text-sm openchat-font-normal",e==="emoji"?"openchat-bg-transparent openchat-select-none":"openchat-bg-primary openchat-text-white"),children:b.jsx(FE,{tooltipContent:b.jsx("span",{className:"openchat-select-none data-[state=open]:openchat-fade-in openchat-rounded-sm openchat-bg-black/40 openchat-text-white openchat-p-0.5 openchat-text-xs openchat-px-1 openchat-leading-none",children:t&&jE(t)}),children:b.jsx("p",{className:hn(e==="emoji"?"openchat-text-8xl":""),children:n})})})})}function xj({children:e,className:n,...t}){return b.jsx("button",{...t,className:hn("openchat-text-sm openchat-flex-wrap openchat-whitespace-nowrap openchat-leading-4 openchat-p-2 openchat-rounded-md openchat-bg-primary-light openchat-text-primary hover:openchat-bg-primary hover:openchat-text-white openchat-transition-colors openchat-inline-block",n),children:e})}function Sj({children:e}){return b.jsx("div",{className:"openchat-w-full openchat-clear-both",children:b.jsx("div",{className:"openchat-float-right openchat-w-full openchat-flex-wrap openchat-max-w-full openchat-flex-row openchat-justify-end openchat-py-4 openchat-rounded-lg openchat-text-sm openchat-font-normal openchat-flex openchat-items-center openchat-gap-2",children:e})})}function Cj({timestamp:e}){const[n,t]=k.useState(!1),[i,r]=k.useState(!1),[a,o]=k.useState(!1),[s,l]=k.useState(""),{sendEmail:f}=Bl(),u=()=>{const c=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s);return c||o(!0),c};function d(){!n&&!i&&u()&&(t(!0),f(s),t(!1),r(!0))}return b.jsxs("div",{className:"openchat-clear-both openchat-w-full openchat-group",children:[b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"openchat-w-10 openchat-h-10 openchat-bg-accent2 openchat-rounded-lg openchat-shrink-0 openchat-mt-auto openchat-mb-1"}),b.jsxs("div",{style:{boxShadow:"rgba(0, 0, 0, 0.1) 0px 4px 15px 0px, rgba(0, 0, 0, 0.1) 0px 1px 2px 0px, rgba(0, 87, 255, 0.5) 0px 2px 0px 0px inset"},className:"openchat-w-full openchat-flex-1 openchat-p-6 openchat-rounded-md",children:[b.jsxs("div",{className:"openchat-flex openchat-flex-col openchat-items-start openchat-gap-1",children:[b.jsx("label",{htmlFor:"emailRespInput openchat-text-sm openchat-leading-[20px]",children:"Email"}),b.jsxs("div",{style:{boxShadow:"rgba(0, 0, 0, 0.07) 0px 1px 3px 0px inset"},className:"openchat-w-full openchat-flex openchat-items-center openchat-rounded-lg openchat-overflow-hidden openchat-border openchat-border-[rgb(225,_225,_225)] ",children:[b.jsx("input",{onChange:p=>{l(p.target.value),o(!1)},value:s,type:"email",disabled:i||n,placeholder:"email@example.com",className:hn("openchat-outline-none disabled:openchat-select-none selection:disabled:openchat-bg-transparent openchat-flex-1 disabled:openchat-bg-transparent openchat-w-full placeholder:openchat-text-accent2 placeholder:openchat-text-xs openchat-bg-[rgb(250,_250,_250)] focus:openchat-bg-transparent openchat-transition-colors openchat-h-full openchat-p-2.5",a?"openchat-text-[red]":""),id:"emailRespInput",required:!0,"aria-required":!0}),!i&&!n&&b.jsx("button",{onClick:d,className:hn("send openchat-p-3 openchat-text-2xl openchat-bg-primary"),children:b.jsx("span",{className:"openchat-text-white",children:b.jsx(_k,{})})}),n&&b.jsx("button",{className:"loader openchat-p-3 openchat-text-2xl openchat-bg-primary openchat-flex-center openchat-cursor-not-allowed openchat-pointer-events-none",children:b.jsx(sC,{height:"26",width:"26",color:"#fff"})}),!a&&!n&&i&&b.jsx("button",{className:"success openchat-p-3 openchat-text-2xl openchat-cursor-not-allowed openchat-pointer-events-none",children:b.jsx("span",{className:"openchat-text-[green]",children:b.jsx(N5,{})})})]})]}),a&&b.jsx("div",{className:"openchat-mt-1",children:b.jsx("p",{className:"openchat-text-xs openchat-text-[red]",children:"this doesn't look like an email"})})]})]}),b.jsx("div",{className:"openchat-w-full openchat-ps-[52px]",children:e&&b.jsx("div",{children:b.jsxs("span",{className:"openchat-text-xs openchat-m-0 group-last-of-type:openchat-inline hidden",children:["Bot ·"," ",b.jsx(p1,{date:Date.now(),timeStyle:"mini-minute-now",locale:"en-US"})]})})})]})}function Ej({className:e,label:n,onClick:t,timestamp:i,...r}){const[a,o]=k.useState(!1);return b.jsxs("div",{hidden:a,className:"openchat-clear-both openchat-w-full openchat-group",children:[b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"openchat-w-10 openchat-h-10 openchat-bg-accent2 openchat-rounded-lg openchat-shrink-0 openchat-mt-auto"}),b.jsx("div",{className:"openchat-group openchat-space-y-2",children:b.jsx("div",{className:"mesg_body openchat-max-w-full",children:b.jsx("button",{...r,className:hn("openchat-rounded-lg openchat-text-primary hover:openchat-text-white openchat-flex-center openchat-px-2.5 openchat-py-2 openchat-whitespace-nowrap openchat-transition-all openchat-bg-primary-light hover:openchat-bg-primary openchat-cursor-pointer",e),onClick:s=>{o(!0),t&&t(s)},children:b.jsx("span",{children:n})})})})]}),b.jsx("div",{className:"openchat-w-full openchat-ps-[52px]",children:b.jsx("div",{children:i&&b.jsxs("span",{className:"openchat-text-xsopenchat- m-0 group-last-of-type:openchat-inline hidden",children:["Bot ·"," ",b.jsx(p1,{date:Date.now(),timeStyle:"mini-minute-now",locale:"en-US"})]})})})]})}function Pj(){const{displayText:e}=z1({text:"error sending the message.",every:.001});return b.jsx("div",{className:"openchat-clear-both openchat-w-full openchat-group",children:b.jsxs("div",{className:"openchat-flex openchat-items-center openchat-gap-3 openchat-w-full",children:[b.jsx("div",{className:"openchat-w-10 openchat-h-10 openchat-bg-accent2 openchat-rounded-lg openchat-shrink-0"}),b.jsx("div",{className:"openchat-group openchat-space-y-2 openchat-text-[red] openchat-outline-[red] openchat-outline-1 openchat-outline openchat-p-2 openchat-text-sm openchat-font-normal openchat-rounded-md",children:e})]})})}const $j=e=>[(t,i)=>{if(e.current){const{scrollWidth:r,scrollHeight:a}=e.current,o=r-e.current.clientWidth,s=a-e.current.clientHeight,l=t/100*o,f=i/100*s;e.current.scrollTo(l,f)}}];let Zu=0;function Tj(){k.useEffect(()=>{var e,n;const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",(e=t[0])!==null&&e!==void 0?e:b0()),document.body.insertAdjacentElement("beforeend",(n=t[1])!==null&&n!==void 0?n:b0()),Zu++,()=>{Zu===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(i=>i.remove()),Zu--}},[])}function b0(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const ed="focusScope.autoFocusOnMount",nd="focusScope.autoFocusOnUnmount",_0={bubbles:!1,cancelable:!0},Oj=k.forwardRef((e,n)=>{const{loop:t=!1,trapped:i=!1,onMountAutoFocus:r,onUnmountAutoFocus:a,...o}=e,[s,l]=k.useState(null),f=Ci(r),u=Ci(a),d=k.useRef(null),p=Vt(n,m=>l(m)),c=k.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;k.useEffect(()=>{if(i){let g=function(x){if(c.paused||!s)return;const P=x.target;s.contains(P)?d.current=P:ni(d.current,{select:!0})},y=function(x){if(c.paused||!s)return;const P=x.relatedTarget;P!==null&&(s.contains(P)||ni(d.current,{select:!0}))},S=function(x){const P=document.activeElement;for(const O of x)O.removedNodes.length>0&&(s!=null&&s.contains(P)||ni(s))};var m=g,w=y,v=S;document.addEventListener("focusin",g),document.addEventListener("focusout",y);const E=new MutationObserver(S);return s&&E.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",y),E.disconnect()}}},[i,s,c.paused]),k.useEffect(()=>{if(s){S0.add(c);const m=document.activeElement;if(!s.contains(m)){const v=new CustomEvent(ed,_0);s.addEventListener(ed,f),s.dispatchEvent(v),v.defaultPrevented||(Fj(Mj(b3(s)),{select:!0}),document.activeElement===m&&ni(s))}return()=>{s.removeEventListener(ed,f),setTimeout(()=>{const v=new CustomEvent(nd,_0);s.addEventListener(nd,u),s.dispatchEvent(v),v.defaultPrevented||ni(m??document.body,{select:!0}),s.removeEventListener(nd,u),S0.remove(c)},0)}}},[s,f,u,c]);const h=k.useCallback(m=>{if(!t&&!i||c.paused)return;const w=m.key==="Tab"&&!m.altKey&&!m.ctrlKey&&!m.metaKey,v=document.activeElement;if(w&&v){const g=m.currentTarget,[y,S]=jj(g);y&&S?!m.shiftKey&&v===S?(m.preventDefault(),t&&ni(y,{select:!0})):m.shiftKey&&v===y&&(m.preventDefault(),t&&ni(S,{select:!0})):v===g&&m.preventDefault()}},[t,i,c.paused]);return k.createElement(Gt.div,Ee({tabIndex:-1},o,{ref:p,onKeyDown:h}))});function Fj(e,{select:n=!1}={}){const t=document.activeElement;for(const i of e)if(ni(i,{select:n}),document.activeElement!==t)return}function jj(e){const n=b3(e),t=x0(n,e),i=x0(n.reverse(),e);return[t,i]}function b3(e){const n=[],t=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const r=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||r?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;t.nextNode();)n.push(t.currentNode);return n}function x0(e,n){for(const t of e)if(!Aj(t,{upTo:n}))return t}function Aj(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Rj(e){return e instanceof HTMLInputElement&&"select"in e}function ni(e,{select:n=!1}={}){if(e&&e.focus){const t=document.activeElement;e.focus({preventScroll:!0}),e!==t&&Rj(e)&&n&&e.select()}}const S0=zj();function zj(){let e=[];return{add(n){const t=e[0];n!==t&&(t==null||t.pause()),e=C0(e,n),e.unshift(n)},remove(n){var t;e=C0(e,n),(t=e[0])===null||t===void 0||t.resume()}}}function C0(e,n){const t=[...e],i=t.indexOf(n);return i!==-1&&t.splice(i,1),t}function Mj(e){return e.filter(n=>n.tagName!=="A")}var Lj=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ur=new WeakMap,ws=new WeakMap,ks={},td=0,_3=function(e){return e&&(e.host||_3(e.parentNode))},Nj=function(e,n){return n.map(function(t){if(e.contains(t))return t;var i=_3(t);return i&&e.contains(i)?i:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)}).filter(function(t){return!!t})},Dj=function(e,n,t,i){var r=Nj(n,Array.isArray(e)?e:[e]);ks[t]||(ks[t]=new WeakMap);var a=ks[t],o=[],s=new Set,l=new Set(r),f=function(d){!d||s.has(d)||(s.add(d),f(d.parentNode))};r.forEach(f);var u=function(d){!d||l.has(d)||Array.prototype.forEach.call(d.children,function(p){if(s.has(p))u(p);else{var c=p.getAttribute(i),h=c!==null&&c!=="false",m=(ur.get(p)||0)+1,w=(a.get(p)||0)+1;ur.set(p,m),a.set(p,w),o.push(p),m===1&&h&&ws.set(p,!0),w===1&&p.setAttribute(t,"true"),h||p.setAttribute(i,"true")}})};return u(n),s.clear(),td++,function(){o.forEach(function(d){var p=ur.get(d)-1,c=a.get(d)-1;ur.set(d,p),a.set(d,c),p||(ws.has(d)||d.removeAttribute(i),ws.delete(d)),c||d.removeAttribute(t)}),td--,td||(ur=new WeakMap,ur=new WeakMap,ws=new WeakMap,ks={})}},Ij=function(e,n,t){t===void 0&&(t="data-aria-hidden");var i=Array.from(Array.isArray(e)?e:[e]),r=n||Lj(e);return r?(i.push.apply(i,Array.from(r.querySelectorAll("[aria-live]"))),Dj(i,r,t,"aria-hidden")):function(){return null}},ht=function(){return ht=Object.assign||function(n){for(var t,i=1,r=arguments.length;i"u")return iA;var n=rA(e),t=document.documentElement.clientWidth,i=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,i-t+n[2]-n[0])}},oA=E3(),sA=function(e,n,t,i){var r=e.left,a=e.top,o=e.right,s=e.gap;return t===void 0&&(t="margin"),` .`.concat(Hj,` { overflow: hidden `).concat(i,`; padding-right: `).concat(s,"px ").concat(i,`; diff --git a/dj_backend_server/web/static/search.js b/dj_backend_server/web/static/search.js index 4fe60a89..683c6459 100644 --- a/dj_backend_server/web/static/search.js +++ b/dj_backend_server/web/static/search.js @@ -84,7 +84,7 @@ Error generating stack: `+o.message+` http://jedwatson.github.io/classnames */(function(e){(function(){var t={}.hasOwnProperty;function n(){for(var r=[],a=0;aV.jsxs(qD,{...t,ref:n,className:eM("ch-p-2 ch-text-xl ch-font-manrope ch-text-primary !ch-z-[1000000] ch-group ch-font-semibold ch-gap-1 ch-fixed ch-bottom-2 ch-transition ch-right-4 ch-flex ch-items-center ch-justify-center",e?"ch-flex-col":"ch-flex-row"),children:[V.jsx(ZD,{size:30,className:"group-hover:ch-scale-110 ch-transition-transform"}),V.jsx("span",{className:"ch-px-1.5 ch-py-1 ch-text-sm ch-rounded-md ch-bg-bg ch-text-accent",children:"/"})]}));oC.displayName="Trigger";function tM(e){return Nn({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"m12 3-1.912 5.813a2 2 0 0 1-1.275 1.275L3 12l5.813 1.912a2 2 0 0 1 1.275 1.275L12 21l1.912-5.813a2 2 0 0 1 1.275-1.275L21 12l-5.813-1.912a2 2 0 0 1-1.275-1.275L12 3Z"}},{tag:"path",attr:{d:"M5 3v4"}},{tag:"path",attr:{d:"M19 17v4"}},{tag:"path",attr:{d:"M3 5h4"}},{tag:"path",attr:{d:"M17 19h4"}}]})(e)}function nM(e){const t=e+"CollectionProvider",[n,r]=Bl(t),[a,o]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=p=>{const{scope:b,children:m}=p,E=Y.useRef(null),h=Y.useRef(new Map).current;return Y.createElement(a,{scope:b,itemMap:h,collectionRef:E},m)},l=e+"CollectionSlot",s=Y.forwardRef((p,b)=>{const{scope:m,children:E}=p,h=o(l,m),g=Cn(b,h.collectionRef);return Y.createElement(Ao,{ref:g},E)}),u=e+"CollectionItemSlot",c="data-radix-collection-item",d=Y.forwardRef((p,b)=>{const{scope:m,children:E,...h}=p,g=Y.useRef(null),y=Cn(b,g),S=o(u,m);return Y.useEffect(()=>(S.itemMap.set(g,{ref:g,...h}),()=>void S.itemMap.delete(g))),Y.createElement(Ao,{[c]:"",ref:y},E)});function f(p){const b=o(e+"CollectionConsumer",p);return Y.useCallback(()=>{const E=b.collectionRef.current;if(!E)return[];const h=Array.from(E.querySelectorAll(`[${c}]`));return Array.from(b.itemMap.values()).sort((S,w)=>h.indexOf(S.ref.current)-h.indexOf(w.ref.current))},[b.collectionRef,b.itemMap])}return[{Provider:i,Slot:s,ItemSlot:d},f,r]}const rM=C.createContext(void 0);function iC(e){const t=C.useContext(rM);return e||t||"ltr"}const ru="rovingFocusGroup.onEntryFocus",aM={bubbles:!1,cancelable:!0},$b="RovingFocusGroup",[Sh,lC,oM]=nM($b),[iM,sC]=Bl($b,[oM]),[lM,sM]=iM($b),uM=C.forwardRef((e,t)=>C.createElement(Sh.Provider,{scope:e.__scopeRovingFocusGroup},C.createElement(Sh.Slot,{scope:e.__scopeRovingFocusGroup},C.createElement(cM,ye({},e,{ref:t}))))),cM=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:a=!1,dir:o,currentTabStopId:i,defaultCurrentTabStopId:l,onCurrentTabStopIdChange:s,onEntryFocus:u,...c}=e,d=C.useRef(null),f=Cn(t,d),p=iC(o),[b=null,m]=Do({prop:i,defaultProp:l,onChange:s}),[E,h]=C.useState(!1),g=ar(u),y=lC(n),S=C.useRef(!1),[w,v]=C.useState(0);return C.useEffect(()=>{const _=d.current;if(_)return _.addEventListener(ru,g),()=>_.removeEventListener(ru,g)},[g]),C.createElement(lM,{scope:n,orientation:r,dir:p,loop:a,currentTabStopId:b,onItemFocus:C.useCallback(_=>m(_),[m]),onItemShiftTab:C.useCallback(()=>h(!0),[]),onFocusableItemAdd:C.useCallback(()=>v(_=>_+1),[]),onFocusableItemRemove:C.useCallback(()=>v(_=>_-1),[])},C.createElement(pn.div,ye({tabIndex:E||w===0?-1:0,"data-orientation":r},c,{ref:f,style:{outline:"none",...e.style},onMouseDown:vt(e.onMouseDown,()=>{S.current=!0}),onFocus:vt(e.onFocus,_=>{const x=!S.current;if(_.target===_.currentTarget&&x&&!E){const I=new CustomEvent(ru,aM);if(_.currentTarget.dispatchEvent(I),!I.defaultPrevented){const R=y().filter(W=>W.focusable),O=R.find(W=>W.active),P=R.find(W=>W.id===b),Q=[O,P,...R].filter(Boolean).map(W=>W.ref.current);uC(Q)}}S.current=!1}),onBlur:vt(e.onBlur,()=>h(!1))})))}),dM="RovingFocusGroupItem",pM=C.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:a=!1,tabStopId:o,...i}=e,l=Li(),s=o||l,u=sM(dM,n),c=u.currentTabStopId===s,d=lC(n),{onFocusableItemAdd:f,onFocusableItemRemove:p}=u;return C.useEffect(()=>{if(r)return f(),()=>p()},[r,f,p]),C.createElement(Sh.ItemSlot,{scope:n,id:s,focusable:r,active:a},C.createElement(pn.span,ye({tabIndex:c?0:-1,"data-orientation":u.orientation},i,{ref:t,onMouseDown:vt(e.onMouseDown,b=>{r?u.onItemFocus(s):b.preventDefault()}),onFocus:vt(e.onFocus,()=>u.onItemFocus(s)),onKeyDown:vt(e.onKeyDown,b=>{if(b.key==="Tab"&&b.shiftKey){u.onItemShiftTab();return}if(b.target!==b.currentTarget)return;const m=mM(b,u.orientation,u.dir);if(m!==void 0){b.preventDefault();let h=d().filter(g=>g.focusable).map(g=>g.ref.current);if(m==="last")h.reverse();else if(m==="prev"||m==="next"){m==="prev"&&h.reverse();const g=h.indexOf(b.currentTarget);h=u.loop?hM(h,g+1):h.slice(g+1)}setTimeout(()=>uC(h))}})})))}),fM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function gM(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function mM(e,t,n){const r=gM(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return fM[r]}function uC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function hM(e,t){return e.map((n,r)=>e[(t+r)%e.length])}const bM=uM,yM=pM,vM=C.forwardRef((e,t)=>{const{pressed:n,defaultPressed:r=!1,onPressedChange:a,...o}=e,[i=!1,l]=Do({prop:n,onChange:a,defaultProp:r});return C.createElement(pn.button,ye({type:"button","aria-pressed":i,"data-state":i?"on":"off","data-disabled":e.disabled?"":void 0},o,{ref:t,onClick:vt(e.onClick,()=>{e.disabled||l(!i)})}))}),Hl="ToggleGroup",[cC,GV]=Bl(Hl,[sC]),dC=sC(),SM=Y.forwardRef((e,t)=>{const{type:n,...r}=e;if(n==="single"){const a=r;return Y.createElement(EM,ye({},a,{ref:t}))}if(n==="multiple"){const a=r;return Y.createElement(wM,ye({},a,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${Hl}\``)}),[pC,fC]=cC(Hl),EM=Y.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...o}=e,[i,l]=Do({prop:n,defaultProp:r,onChange:a});return Y.createElement(pC,{scope:e.__scopeToggleGroup,type:"single",value:i?[i]:[],onItemActivate:l,onItemDeactivate:Y.useCallback(()=>l(""),[l])},Y.createElement(gC,ye({},o,{ref:t})))}),wM=Y.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:a=()=>{},...o}=e,[i=[],l]=Do({prop:n,defaultProp:r,onChange:a}),s=Y.useCallback(c=>l((d=[])=>[...d,c]),[l]),u=Y.useCallback(c=>l((d=[])=>d.filter(f=>f!==c)),[l]);return Y.createElement(pC,{scope:e.__scopeToggleGroup,type:"multiple",value:i,onItemActivate:s,onItemDeactivate:u},Y.createElement(gC,ye({},o,{ref:t})))}),[kM,AM]=cC(Hl),gC=Y.forwardRef((e,t)=>{const{__scopeToggleGroup:n,disabled:r=!1,rovingFocus:a=!0,orientation:o,dir:i,loop:l=!0,...s}=e,u=dC(n),c=iC(i),d={role:"group",dir:c,...s};return Y.createElement(kM,{scope:n,rovingFocus:a,disabled:r},a?Y.createElement(bM,ye({asChild:!0},u,{orientation:o,dir:c,loop:l}),Y.createElement(pn.div,ye({},d,{ref:t}))):Y.createElement(pn.div,ye({},d,{ref:t})))}),Eh="ToggleGroupItem",TM=Y.forwardRef((e,t)=>{const n=fC(Eh,e.__scopeToggleGroup),r=AM(Eh,e.__scopeToggleGroup),a=dC(e.__scopeToggleGroup),o=n.value.includes(e.value),i=r.disabled||e.disabled,l={...e,pressed:o,disabled:i},s=Y.useRef(null);return r.rovingFocus?Y.createElement(yM,ye({asChild:!0},a,{focusable:!i,active:o,ref:s}),Y.createElement(lS,ye({},l,{ref:t}))):Y.createElement(lS,ye({},l,{ref:t}))}),lS=Y.forwardRef((e,t)=>{const{__scopeToggleGroup:n,value:r,...a}=e,o=fC(Eh,n),i={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},l=o.type==="single"?i:void 0;return Y.createElement(vM,ye({},l,a,{ref:t,onPressedChange:s=>{s?o.onItemActivate(r):o.onItemDeactivate(r)}}))}),sS=SM,pi=TM;function _M(e){const[t,n]=C.useState(!1);return[t,async()=>{navigator!=null&&navigator.clipboard||console.warn("Clipboard not supported");try{await navigator.clipboard.writeText(e),n(!0),setTimeout(()=>{n(!1)},3*1e3)}catch(a){console.warn("Copy failed",a),n(!1)}}]}function RM(e){return Nn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M10 1.5a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5v1a.5.5 0 0 0 .5.5h3a.5.5 0 0 0 .5-.5v-1Zm-5 0A1.5 1.5 0 0 1 6.5 0h3A1.5 1.5 0 0 1 11 1.5v1A1.5 1.5 0 0 1 9.5 4h-3A1.5 1.5 0 0 1 5 2.5v-1Zm-2 0h1v1A2.5 2.5 0 0 0 6.5 5h3A2.5 2.5 0 0 0 12 2.5v-1h1a2 2 0 0 1 2 2V14a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V3.5a2 2 0 0 1 2-2Z"}}]})(e)}function xM(e){return Nn({tag:"svg",attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M10 .5a.5.5 0 0 0-.5-.5h-3a.5.5 0 0 0-.5.5.5.5 0 0 1-.5.5.5.5 0 0 0-.5.5V2a.5.5 0 0 0 .5.5h5A.5.5 0 0 0 11 2v-.5a.5.5 0 0 0-.5-.5.5.5 0 0 1-.5-.5Z"}},{tag:"path",attr:{d:"M4.085 1H3.5A1.5 1.5 0 0 0 2 2.5v12A1.5 1.5 0 0 0 3.5 16h9a1.5 1.5 0 0 0 1.5-1.5v-12A1.5 1.5 0 0 0 12.5 1h-.585c.055.156.085.325.085.5V2a1.5 1.5 0 0 1-1.5 1.5h-5A1.5 1.5 0 0 1 4 2v-.5c0-.175.03-.344.085-.5Zm6.769 6.854-3 3a.5.5 0 0 1-.708 0l-1.5-1.5a.5.5 0 1 1 .708-.708L7.5 9.793l2.646-2.647a.5.5 0 0 1 .708.708Z"}}]})(e)}function CM(e){return Nn({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M885.9 490.3c3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-28.3-9.3-55.5-26.1-77.7 3.6-12 5.4-24.4 5.4-37 0-51.6-30.7-98.1-78.3-118.4a66.1 66.1 0 0 0-26.5-5.4H273v428h.3l85.8 310.8C372.9 889 418.9 924 470.9 924c29.7 0 57.4-11.8 77.9-33.4 20.5-21.5 31-49.7 29.5-79.4l-6-122.9h239.9c12.1 0 23.9-3.2 34.3-9.3 40.4-23.5 65.5-66.1 65.5-111 0-28.3-9.3-55.5-26.1-77.7zM112 132v364c0 17.7 14.3 32 32 32h65V100h-65c-17.7 0-32 14.3-32 32z"}}]})(e)}function IM(e){return Nn({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M885.9 533.7c16.8-22.2 26.1-49.4 26.1-77.7 0-44.9-25.1-87.4-65.5-111.1a67.67 67.67 0 0 0-34.3-9.3H572.4l6-122.9c1.4-29.7-9.1-57.9-29.5-79.4A106.62 106.62 0 0 0 471 99.9c-52 0-98 35-111.8 85.1l-85.9 311h-.3v428h472.3c9.2 0 18.2-1.8 26.5-5.4 47.6-20.3 78.3-66.8 78.3-118.4 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7 0-12.6-1.8-25-5.4-37 16.8-22.2 26.1-49.4 26.1-77.7-.2-12.6-2-25.1-5.6-37.1zM112 528v364c0 17.7 14.3 32 32 32h65V496h-65c-17.7 0-32 14.3-32 32z"}}]})(e)}function NM(e){return Nn({tag:"svg",attr:{viewBox:"0 0 1024 1024"},child:[{tag:"path",attr:{d:"M868 545.5L536.1 163a31.96 31.96 0 0 0-48.3 0L156 545.5a7.97 7.97 0 0 0 6 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z"}}]})(e)}function OM(e){return Nn({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"User"},child:[{tag:"g",attr:{},child:[{tag:"path",attr:{d:"M17.438,21.937H6.562a2.5,2.5,0,0,1-2.5-2.5V18.61c0-3.969,3.561-7.2,7.938-7.2s7.938,3.229,7.938,7.2v.827A2.5,2.5,0,0,1,17.438,21.937ZM12,12.412c-3.826,0-6.938,2.78-6.938,6.2v.827a1.5,1.5,0,0,0,1.5,1.5H17.438a1.5,1.5,0,0,0,1.5-1.5V18.61C18.938,15.192,15.826,12.412,12,12.412Z"}},{tag:"path",attr:{d:"M12,9.911a3.924,3.924,0,1,1,3.923-3.924A3.927,3.927,0,0,1,12,9.911Zm0-6.847a2.924,2.924,0,1,0,2.923,2.923A2.926,2.926,0,0,0,12,3.064Z"}}]}]}]})(e)}function mC(e,t){return function(){return e.apply(t,arguments)}}const{toString:LM}=Object.prototype,{getPrototypeOf:Hb}=Object,jl=(e=>t=>{const n=LM.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fn=e=>(e=e.toLowerCase(),t=>jl(t)===e),Gl=e=>t=>typeof t===e,{isArray:wa}=Array,_o=Gl("undefined");function DM(e){return e!==null&&!_o(e)&&e.constructor!==null&&!_o(e.constructor)&&Pt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const hC=fn("ArrayBuffer");function MM(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&hC(e.buffer),t}const FM=Gl("string"),Pt=Gl("function"),bC=Gl("number"),ql=e=>e!==null&&typeof e=="object",PM=e=>e===!0||e===!1,Fi=e=>{if(jl(e)!=="object")return!1;const t=Hb(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},zM=fn("Date"),BM=fn("File"),UM=fn("Blob"),$M=fn("FileList"),HM=e=>ql(e)&&Pt(e.pipe),jM=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Pt(e.append)&&((t=jl(e))==="formdata"||t==="object"&&Pt(e.toString)&&e.toString()==="[object FormData]"))},GM=fn("URLSearchParams"),qM=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Mo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let r,a;if(typeof e!="object"&&(e=[e]),wa(e))for(r=0,a=e.length;r0;)if(a=n[r],t===a.toLowerCase())return a;return null}const vC=(()=>typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global)(),SC=e=>!_o(e)&&e!==vC;function wh(){const{caseless:e}=SC(this)&&this||{},t={},n=(r,a)=>{const o=e&&yC(t,a)||a;Fi(t[o])&&Fi(r)?t[o]=wh(t[o],r):Fi(r)?t[o]=wh({},r):wa(r)?t[o]=r.slice():t[o]=r};for(let r=0,a=arguments.length;r(Mo(t,(a,o)=>{n&&Pt(a)?e[o]=mC(a,n):e[o]=a},{allOwnKeys:r}),e),VM=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),YM=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},KM=(e,t,n,r)=>{let a,o,i;const l={};if(t=t||{},e==null)return t;do{for(a=Object.getOwnPropertyNames(e),o=a.length;o-- >0;)i=a[o],(!r||r(i,e,t))&&!l[i]&&(t[i]=e[i],l[i]=!0);e=n!==!1&&Hb(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},XM=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},ZM=e=>{if(!e)return null;if(wa(e))return e;let t=e.length;if(!bC(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},QM=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Hb(Uint8Array)),JM=(e,t)=>{const r=(e&&e[Symbol.iterator]).call(e);let a;for(;(a=r.next())&&!a.done;){const o=a.value;t.call(e,o[0],o[1])}},eF=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},tF=fn("HTMLFormElement"),nF=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,a){return r.toUpperCase()+a}),uS=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),rF=fn("RegExp"),EC=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Mo(n,(a,o)=>{t(a,o,e)!==!1&&(r[o]=a)}),Object.defineProperties(e,r)},aF=e=>{EC(e,(t,n)=>{if(Pt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Pt(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},oF=(e,t)=>{const n={},r=a=>{a.forEach(o=>{n[o]=!0})};return wa(e)?r(e):r(String(e).split(t)),n},iF=()=>{},lF=(e,t)=>(e=+e,Number.isFinite(e)?e:t),au="abcdefghijklmnopqrstuvwxyz",cS="0123456789",wC={DIGIT:cS,ALPHA:au,ALPHA_DIGIT:au+au.toUpperCase()+cS},sF=(e=16,t=wC.ALPHA_DIGIT)=>{let n="";const{length:r}=t;for(;e--;)n+=t[Math.random()*r|0];return n};function uF(e){return!!(e&&Pt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const cF=e=>{const t=new Array(10),n=(r,a)=>{if(ql(r)){if(t.indexOf(r)>=0)return;if(!("toJSON"in r)){t[a]=r;const o=wa(r)?[]:{};return Mo(r,(i,l)=>{const s=n(i,a+1);!_o(s)&&(o[l]=s)}),t[a]=void 0,o}}return r};return n(e,0)},dF=fn("AsyncFunction"),pF=e=>e&&(ql(e)||Pt(e))&&Pt(e.then)&&Pt(e.catch),F={isArray:wa,isArrayBuffer:hC,isBuffer:DM,isFormData:jM,isArrayBufferView:MM,isString:FM,isNumber:bC,isBoolean:PM,isObject:ql,isPlainObject:Fi,isUndefined:_o,isDate:zM,isFile:BM,isBlob:UM,isRegExp:rF,isFunction:Pt,isStream:HM,isURLSearchParams:GM,isTypedArray:QM,isFileList:$M,forEach:Mo,merge:wh,extend:WM,trim:qM,stripBOM:VM,inherits:YM,toFlatObject:KM,kindOf:jl,kindOfTest:fn,endsWith:XM,toArray:ZM,forEachEntry:JM,matchAll:eF,isHTMLForm:tF,hasOwnProperty:uS,hasOwnProp:uS,reduceDescriptors:EC,freezeMethods:aF,toObjectSet:oF,toCamelCase:nF,noop:iF,toFiniteNumber:lF,findKey:yC,global:vC,isContextDefined:SC,ALPHABET:wC,generateString:sF,isSpecCompliantForm:uF,toJSONObject:cF,isAsyncFn:dF,isThenable:pF};function he(e,t,n,r,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),a&&(this.response=a)}F.inherits(he,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:F.toJSONObject(this.config),code:this.code,status:this.response&&this.response.status?this.response.status:null}}});const kC=he.prototype,AC={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{AC[e]={value:e}});Object.defineProperties(he,AC);Object.defineProperty(kC,"isAxiosError",{value:!0});he.from=(e,t,n,r,a,o)=>{const i=Object.create(kC);return F.toFlatObject(e,i,function(s){return s!==Error.prototype},l=>l!=="isAxiosError"),he.call(i,e.message,t,n,r,a),i.cause=e,i.name=e.name,o&&Object.assign(i,o),i};const fF=null;function kh(e){return F.isPlainObject(e)||F.isArray(e)}function TC(e){return F.endsWith(e,"[]")?e.slice(0,-2):e}function dS(e,t,n){return e?e.concat(t).map(function(a,o){return a=TC(a),!n&&o?"["+a+"]":a}).join(n?".":""):t}function gF(e){return F.isArray(e)&&!e.some(kh)}const mF=F.toFlatObject(F,{},null,function(t){return/^is[A-Z]/.test(t)});function Wl(e,t,n){if(!F.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=F.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(m,E){return!F.isUndefined(E[m])});const r=n.metaTokens,a=n.visitor||c,o=n.dots,i=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&F.isSpecCompliantForm(t);if(!F.isFunction(a))throw new TypeError("visitor must be a function");function u(b){if(b===null)return"";if(F.isDate(b))return b.toISOString();if(!s&&F.isBlob(b))throw new he("Blob is not supported. Use a Buffer instead.");return F.isArrayBuffer(b)||F.isTypedArray(b)?s&&typeof Blob=="function"?new Blob([b]):Buffer.from(b):b}function c(b,m,E){let h=b;if(b&&!E&&typeof b=="object"){if(F.endsWith(m,"{}"))m=r?m:m.slice(0,-2),b=JSON.stringify(b);else if(F.isArray(b)&&gF(b)||(F.isFileList(b)||F.endsWith(m,"[]"))&&(h=F.toArray(b)))return m=TC(m),h.forEach(function(y,S){!(F.isUndefined(y)||y===null)&&t.append(i===!0?dS([m],S,o):i===null?m:m+"[]",u(y))}),!1}return kh(b)?!0:(t.append(dS(E,m,o),u(b)),!1)}const d=[],f=Object.assign(mF,{defaultVisitor:c,convertValue:u,isVisitable:kh});function p(b,m){if(!F.isUndefined(b)){if(d.indexOf(b)!==-1)throw Error("Circular reference detected in "+m.join("."));d.push(b),F.forEach(b,function(h,g){(!(F.isUndefined(h)||h===null)&&a.call(t,h,F.isString(g)?g.trim():g,m,f))===!0&&p(h,m?m.concat(g):[g])}),d.pop()}}if(!F.isObject(e))throw new TypeError("data must be an object");return p(e),t}function pS(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function jb(e,t){this._pairs=[],e&&Wl(e,this,t)}const _C=jb.prototype;_C.append=function(t,n){this._pairs.push([t,n])};_C.toString=function(t){const n=t?function(r){return t.call(this,r,pS)}:pS;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function hF(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function RC(e,t,n){if(!t)return e;const r=n&&n.encode||hF,a=n&&n.serialize;let o;if(a?o=a(t,n):o=F.isURLSearchParams(t)?t.toString():new jb(t,n).toString(r),o){const i=e.indexOf("#");i!==-1&&(e=e.slice(0,i)),e+=(e.indexOf("?")===-1?"?":"&")+o}return e}class bF{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){F.forEach(this.handlers,function(r){r!==null&&t(r)})}}const fS=bF,xC={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yF=typeof URLSearchParams<"u"?URLSearchParams:jb,vF=typeof FormData<"u"?FormData:null,SF=typeof Blob<"u"?Blob:null,EF=(()=>{let e;return typeof navigator<"u"&&((e=navigator.product)==="ReactNative"||e==="NativeScript"||e==="NS")?!1:typeof window<"u"&&typeof document<"u"})(),wF=(()=>typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function")(),un={isBrowser:!0,classes:{URLSearchParams:yF,FormData:vF,Blob:SF},isStandardBrowserEnv:EF,isStandardBrowserWebWorkerEnv:wF,protocols:["http","https","file","blob","url","data"]};function kF(e,t){return Wl(e,new un.classes.URLSearchParams,Object.assign({visitor:function(n,r,a,o){return un.isNode&&F.isBuffer(n)?(this.append(r,n.toString("base64")),!1):o.defaultVisitor.apply(this,arguments)}},t))}function AF(e){return F.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function TF(e){const t={},n=Object.keys(e);let r;const a=n.length;let o;for(r=0;r=n.length;return i=!i&&F.isArray(a)?a.length:i,s?(F.hasOwnProp(a,i)?a[i]=[a[i],r]:a[i]=r,!l):((!a[i]||!F.isObject(a[i]))&&(a[i]=[]),t(n,r,a[i],o)&&F.isArray(a[i])&&(a[i]=TF(a[i])),!l)}if(F.isFormData(e)&&F.isFunction(e.entries)){const n={};return F.forEachEntry(e,(r,a)=>{t(AF(r),a,n,0)}),n}return null}const _F={"Content-Type":void 0};function RF(e,t,n){if(F.isString(e))try{return(t||JSON.parse)(e),F.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Vl={transitional:xC,adapter:["xhr","http"],transformRequest:[function(t,n){const r=n.getContentType()||"",a=r.indexOf("application/json")>-1,o=F.isObject(t);if(o&&F.isHTMLForm(t)&&(t=new FormData(t)),F.isFormData(t))return a&&a?JSON.stringify(CC(t)):t;if(F.isArrayBuffer(t)||F.isBuffer(t)||F.isStream(t)||F.isFile(t)||F.isBlob(t))return t;if(F.isArrayBufferView(t))return t.buffer;if(F.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(o){if(r.indexOf("application/x-www-form-urlencoded")>-1)return kF(t,this.formSerializer).toString();if((l=F.isFileList(t))||r.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return Wl(l?{"files[]":t}:t,s&&new s,this.formSerializer)}}return o||a?(n.setContentType("application/json",!1),RF(t)):t}],transformResponse:[function(t){const n=this.transitional||Vl.transitional,r=n&&n.forcedJSONParsing,a=this.responseType==="json";if(t&&F.isString(t)&&(r&&!this.responseType||a)){const i=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t)}catch(l){if(i)throw l.name==="SyntaxError"?he.from(l,he.ERR_BAD_RESPONSE,this,null,this.response):l}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:un.classes.FormData,Blob:un.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};F.forEach(["delete","get","head"],function(t){Vl.headers[t]={}});F.forEach(["post","put","patch"],function(t){Vl.headers[t]=F.merge(_F)});const Gb=Vl,xF=F.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"]),CF=e=>{const t={};let n,r,a;return e&&e.split(` `).forEach(function(i){a=i.indexOf(":"),n=i.substring(0,a).trim().toLowerCase(),r=i.substring(a+1).trim(),!(!n||t[n]&&xF[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},gS=Symbol("internals");function Pa(e){return e&&String(e).trim().toLowerCase()}function Pi(e){return e===!1||e==null?e:F.isArray(e)?e.map(Pi):String(e)}function IF(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const NF=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ou(e,t,n,r,a){if(F.isFunction(r))return r.call(this,t,n);if(a&&(t=n),!!F.isString(t)){if(F.isString(r))return t.indexOf(r)!==-1;if(F.isRegExp(r))return r.test(t)}}function OF(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function LF(e,t){const n=F.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(a,o,i){return this[r].call(this,t,a,o,i)},configurable:!0})})}class Yl{constructor(t){t&&this.set(t)}set(t,n,r){const a=this;function o(l,s,u){const c=Pa(s);if(!c)throw new Error("header name must be a non-empty string");const d=F.findKey(a,c);(!d||a[d]===void 0||u===!0||u===void 0&&a[d]!==!1)&&(a[d||s]=Pi(l))}const i=(l,s)=>F.forEach(l,(u,c)=>o(u,c,s));return F.isPlainObject(t)||t instanceof this.constructor?i(t,n):F.isString(t)&&(t=t.trim())&&!NF(t)?i(CF(t),n):t!=null&&o(n,t,r),this}get(t,n){if(t=Pa(t),t){const r=F.findKey(this,t);if(r){const a=this[r];if(!n)return a;if(n===!0)return IF(a);if(F.isFunction(n))return n.call(this,a,r);if(F.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Pa(t),t){const r=F.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||ou(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let a=!1;function o(i){if(i=Pa(i),i){const l=F.findKey(r,i);l&&(!n||ou(r,r[l],l,n))&&(delete r[l],a=!0)}}return F.isArray(t)?t.forEach(o):o(t),a}clear(t){const n=Object.keys(this);let r=n.length,a=!1;for(;r--;){const o=n[r];(!t||ou(this,this[o],o,t,!0))&&(delete this[o],a=!0)}return a}normalize(t){const n=this,r={};return F.forEach(this,(a,o)=>{const i=F.findKey(r,o);if(i){n[i]=Pi(a),delete n[o];return}const l=t?OF(o):String(o).trim();l!==o&&delete n[o],n[l]=Pi(a),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return F.forEach(this,(r,a)=>{r!=null&&r!==!1&&(n[a]=t&&F.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(` -`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[gS]=this[gS]={accessors:{}}).accessors,a=this.prototype;function o(i){const l=Pa(i);r[l]||(LF(a,i),r[l]=!0)}return F.isArray(t)?t.forEach(o):o(t),this}}Yl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);F.freezeMethods(Yl.prototype);F.freezeMethods(Yl);const An=Yl;function iu(e,t){const n=this||Gb,r=t||n,a=An.from(r.headers);let o=r.data;return F.forEach(e,function(l){o=l.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function IC(e){return!!(e&&e.__CANCEL__)}function Fo(e,t,n){he.call(this,e??"canceled",he.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(Fo,he,{__CANCEL__:!0});function DF(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new he("Request failed with status code "+n.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const MF=un.isStandardBrowserEnv?function(){return{write:function(n,r,a,o,i,l){const s=[];s.push(n+"="+encodeURIComponent(r)),F.isNumber(a)&&s.push("expires="+new Date(a).toGMTString()),F.isString(o)&&s.push("path="+o),F.isString(i)&&s.push("domain="+i),l===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function FF(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function PF(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function NC(e,t){return e&&!FF(t)?PF(e,t):t}const zF=un.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function a(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=a(window.location.href),function(i){const l=F.isString(i)?a(i):i;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function BF(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function UF(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,o=0,i;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),c=r[o];i||(i=u),n[a]=s,r[a]=u;let d=o,f=0;for(;d!==a;)f+=n[d++],d=d%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),u-i{const o=a.loaded,i=a.lengthComputable?a.total:void 0,l=o-n,s=r(l),u=o<=i;n=o;const c={loaded:o,total:i,progress:i?o/i:void 0,bytes:l,rate:s||void 0,estimated:s&&i&&u?(i-o)/s:void 0,event:a};c[t?"download":"upload"]=!0,e(c)}}const $F=typeof XMLHttpRequest<"u",HF=$F&&function(e){return new Promise(function(n,r){let a=e.data;const o=An.from(e.headers).normalize(),i=e.responseType;let l;function s(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}F.isFormData(a)&&(un.isStandardBrowserEnv||un.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(p+":"+b))}const c=NC(e.baseURL,e.url);u.open(e.method.toUpperCase(),RC(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function d(){if(!u)return;const p=An.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),m={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};DF(function(h){n(h),s()},function(h){r(h),s()},m),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(r(new he("Request aborted",he.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new he("Network Error",he.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let b=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||xC;e.timeoutErrorMessage&&(b=e.timeoutErrorMessage),r(new he(b,m.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,u)),u=null},un.isStandardBrowserEnv){const p=(e.withCredentials||zF(c))&&e.xsrfCookieName&&MF.read(e.xsrfCookieName);p&&o.set(e.xsrfHeaderName,p)}a===void 0&&o.setContentType(null),"setRequestHeader"in u&&F.forEach(o.toJSON(),function(b,m){u.setRequestHeader(m,b)}),F.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&i!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",mS(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",mS(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=p=>{u&&(r(!p||p.type?new Fo(null,e,u):p),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const f=BF(c);if(f&&un.protocols.indexOf(f)===-1){r(new he("Unsupported protocol "+f+":",he.ERR_BAD_REQUEST,e));return}u.send(a||null)})},zi={http:fF,xhr:HF};F.forEach(zi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jF={getAdapter:e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let a=0;ae instanceof An?e.toJSON():e;function ha(e,t){t=t||{};const n={};function r(u,c,d){return F.isPlainObject(u)&&F.isPlainObject(c)?F.merge.call({caseless:d},u,c):F.isPlainObject(c)?F.merge({},c):F.isArray(c)?c.slice():c}function a(u,c,d){if(F.isUndefined(c)){if(!F.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function o(u,c){if(!F.isUndefined(c))return r(void 0,c)}function i(u,c){if(F.isUndefined(c)){if(!F.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function l(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const s={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(u,c)=>a(bS(u),bS(c),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=s[c]||a,f=d(e[c],t[c],c);F.isUndefined(f)&&d!==l||(n[c]=f)}),n}const OC="1.4.0",qb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qb[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const yS={};qb.transitional=function(t,n,r){function a(o,i){return"[Axios v"+OC+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,l)=>{if(t===!1)throw new he(a(i," has been removed"+(n?" in "+n:"")),he.ERR_DEPRECATED);return n&&!yS[i]&&(yS[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};function GF(e,t,n){if(typeof e!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=t[o];if(i){const l=e[o],s=l===void 0||i(l,o,e);if(s!==!0)throw new he("option "+o+" must be "+s,he.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new he("Unknown option "+o,he.ERR_BAD_OPTION)}}const Ah={assertOptions:GF,validators:qb},Mn=Ah.validators;class ml{constructor(t){this.defaults=t,this.interceptors={request:new fS,response:new fS}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ha(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&Ah.assertOptions(r,{silentJSONParsing:Mn.transitional(Mn.boolean),forcedJSONParsing:Mn.transitional(Mn.boolean),clarifyTimeoutError:Mn.transitional(Mn.boolean)},!1),a!=null&&(F.isFunction(a)?n.paramsSerializer={serialize:a}:Ah.assertOptions(a,{encode:Mn.function,serialize:Mn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i;i=o&&F.merge(o.common,o[n.method]),i&&F.forEach(["delete","get","head","post","put","patch","common"],b=>{delete o[b]}),n.headers=An.concat(i,o);const l=[];let s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(s=s&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!s){const b=[hS.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,u),f=b.length,c=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(l=>{r.subscribe(l),o=l}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,l){r.reason||(r.reason=new Fo(o,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Wb(function(a){t=a}),cancel:t}}}const qF=Wb;function WF(e){return function(n){return e.apply(null,n)}}function VF(e){return F.isObject(e)&&e.isAxiosError===!0}const Th={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Th).forEach(([e,t])=>{Th[t]=e});const YF=Th;function LC(e){const t=new Bi(e),n=mC(Bi.prototype.request,t);return F.extend(n,Bi.prototype,t,{allOwnKeys:!0}),F.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return LC(ha(e,a))},n}const Ve=LC(Gb);Ve.Axios=Bi;Ve.CanceledError=Fo;Ve.CancelToken=qF;Ve.isCancel=IC;Ve.VERSION=OC;Ve.toFormData=Wl;Ve.AxiosError=he;Ve.Cancel=Ve.CanceledError;Ve.all=function(t){return Promise.all(t)};Ve.spread=WF;Ve.isAxiosError=VF;Ve.mergeConfig=ha;Ve.AxiosHeaders=An;Ve.formToJSON=e=>CC(F.isHTMLForm(e)?new FormData(e):e);Ve.HttpStatusCode=YF;Ve.default=Ve;const KF=Ve,Ui=KF.create({baseURL:"http://localhost:8000/api"}),vS=["http","https","mailto","tel"];function XF(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let a=-1;for(;++aa||(a=t.indexOf("#"),a!==-1&&r>a)?t:"javascript:void(0)"}/*! +`)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(a=>r.set(a)),r}static accessor(t){const r=(this[gS]=this[gS]={accessors:{}}).accessors,a=this.prototype;function o(i){const l=Pa(i);r[l]||(LF(a,i),r[l]=!0)}return F.isArray(t)?t.forEach(o):o(t),this}}Yl.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);F.freezeMethods(Yl.prototype);F.freezeMethods(Yl);const An=Yl;function iu(e,t){const n=this||Gb,r=t||n,a=An.from(r.headers);let o=r.data;return F.forEach(e,function(l){o=l.call(n,o,a.normalize(),t?t.status:void 0)}),a.normalize(),o}function IC(e){return!!(e&&e.__CANCEL__)}function Fo(e,t,n){he.call(this,e??"canceled",he.ERR_CANCELED,t,n),this.name="CanceledError"}F.inherits(Fo,he,{__CANCEL__:!0});function DF(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new he("Request failed with status code "+n.status,[he.ERR_BAD_REQUEST,he.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}const MF=un.isStandardBrowserEnv?function(){return{write:function(n,r,a,o,i,l){const s=[];s.push(n+"="+encodeURIComponent(r)),F.isNumber(a)&&s.push("expires="+new Date(a).toGMTString()),F.isString(o)&&s.push("path="+o),F.isString(i)&&s.push("domain="+i),l===!0&&s.push("secure"),document.cookie=s.join("; ")},read:function(n){const r=document.cookie.match(new RegExp("(^|;\\s*)("+n+")=([^;]*)"));return r?decodeURIComponent(r[3]):null},remove:function(n){this.write(n,"",Date.now()-864e5)}}}():function(){return{write:function(){},read:function(){return null},remove:function(){}}}();function FF(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function PF(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}function NC(e,t){return e&&!FF(t)?PF(e,t):t}const zF=un.isStandardBrowserEnv?function(){const t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement("a");let r;function a(o){let i=o;return t&&(n.setAttribute("href",i),i=n.href),n.setAttribute("href",i),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,""):"",host:n.host,search:n.search?n.search.replace(/^\?/,""):"",hash:n.hash?n.hash.replace(/^#/,""):"",hostname:n.hostname,port:n.port,pathname:n.pathname.charAt(0)==="/"?n.pathname:"/"+n.pathname}}return r=a(window.location.href),function(i){const l=F.isString(i)?a(i):i;return l.protocol===r.protocol&&l.host===r.host}}():function(){return function(){return!0}}();function BF(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function UF(e,t){e=e||10;const n=new Array(e),r=new Array(e);let a=0,o=0,i;return t=t!==void 0?t:1e3,function(s){const u=Date.now(),c=r[o];i||(i=u),n[a]=s,r[a]=u;let d=o,f=0;for(;d!==a;)f+=n[d++],d=d%e;if(a=(a+1)%e,a===o&&(o=(o+1)%e),u-i{const o=a.loaded,i=a.lengthComputable?a.total:void 0,l=o-n,s=r(l),u=o<=i;n=o;const c={loaded:o,total:i,progress:i?o/i:void 0,bytes:l,rate:s||void 0,estimated:s&&i&&u?(i-o)/s:void 0,event:a};c[t?"download":"upload"]=!0,e(c)}}const $F=typeof XMLHttpRequest<"u",HF=$F&&function(e){return new Promise(function(n,r){let a=e.data;const o=An.from(e.headers).normalize(),i=e.responseType;let l;function s(){e.cancelToken&&e.cancelToken.unsubscribe(l),e.signal&&e.signal.removeEventListener("abort",l)}F.isFormData(a)&&(un.isStandardBrowserEnv||un.isStandardBrowserWebWorkerEnv?o.setContentType(!1):o.setContentType("multipart/form-data;",!1));let u=new XMLHttpRequest;if(e.auth){const p=e.auth.username||"",b=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";o.set("Authorization","Basic "+btoa(p+":"+b))}const c=NC(e.baseURL,e.url);u.open(e.method.toUpperCase(),RC(c,e.params,e.paramsSerializer),!0),u.timeout=e.timeout;function d(){if(!u)return;const p=An.from("getAllResponseHeaders"in u&&u.getAllResponseHeaders()),m={data:!i||i==="text"||i==="json"?u.responseText:u.response,status:u.status,statusText:u.statusText,headers:p,config:e,request:u};DF(function(h){n(h),s()},function(h){r(h),s()},m),u=null}if("onloadend"in u?u.onloadend=d:u.onreadystatechange=function(){!u||u.readyState!==4||u.status===0&&!(u.responseURL&&u.responseURL.indexOf("file:")===0)||setTimeout(d)},u.onabort=function(){u&&(r(new he("Request aborted",he.ECONNABORTED,e,u)),u=null)},u.onerror=function(){r(new he("Network Error",he.ERR_NETWORK,e,u)),u=null},u.ontimeout=function(){let b=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded";const m=e.transitional||xC;e.timeoutErrorMessage&&(b=e.timeoutErrorMessage),r(new he(b,m.clarifyTimeoutError?he.ETIMEDOUT:he.ECONNABORTED,e,u)),u=null},un.isStandardBrowserEnv){const p=(e.withCredentials||zF(c))&&e.xsrfCookieName&&MF.read(e.xsrfCookieName);p&&o.set(e.xsrfHeaderName,p)}a===void 0&&o.setContentType(null),"setRequestHeader"in u&&F.forEach(o.toJSON(),function(b,m){u.setRequestHeader(m,b)}),F.isUndefined(e.withCredentials)||(u.withCredentials=!!e.withCredentials),i&&i!=="json"&&(u.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&u.addEventListener("progress",mS(e.onDownloadProgress,!0)),typeof e.onUploadProgress=="function"&&u.upload&&u.upload.addEventListener("progress",mS(e.onUploadProgress)),(e.cancelToken||e.signal)&&(l=p=>{u&&(r(!p||p.type?new Fo(null,e,u):p),u.abort(),u=null)},e.cancelToken&&e.cancelToken.subscribe(l),e.signal&&(e.signal.aborted?l():e.signal.addEventListener("abort",l)));const f=BF(c);if(f&&un.protocols.indexOf(f)===-1){r(new he("Unsupported protocol "+f+":",he.ERR_BAD_REQUEST,e));return}u.send(a||null)})},zi={http:fF,xhr:HF};F.forEach(zi,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const jF={getAdapter:e=>{e=F.isArray(e)?e:[e];const{length:t}=e;let n,r;for(let a=0;ae instanceof An?e.toJSON():e;function ha(e,t){t=t||{};const n={};function r(u,c,d){return F.isPlainObject(u)&&F.isPlainObject(c)?F.merge.call({caseless:d},u,c):F.isPlainObject(c)?F.merge({},c):F.isArray(c)?c.slice():c}function a(u,c,d){if(F.isUndefined(c)){if(!F.isUndefined(u))return r(void 0,u,d)}else return r(u,c,d)}function o(u,c){if(!F.isUndefined(c))return r(void 0,c)}function i(u,c){if(F.isUndefined(c)){if(!F.isUndefined(u))return r(void 0,u)}else return r(void 0,c)}function l(u,c,d){if(d in t)return r(u,c);if(d in e)return r(void 0,u)}const s={url:o,method:o,data:o,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,adapter:i,responseType:i,xsrfCookieName:i,xsrfHeaderName:i,onUploadProgress:i,onDownloadProgress:i,decompress:i,maxContentLength:i,maxBodyLength:i,beforeRedirect:i,transport:i,httpAgent:i,httpsAgent:i,cancelToken:i,socketPath:i,responseEncoding:i,validateStatus:l,headers:(u,c)=>a(bS(u),bS(c),!0)};return F.forEach(Object.keys(Object.assign({},e,t)),function(c){const d=s[c]||a,f=d(e[c],t[c],c);F.isUndefined(f)&&d!==l||(n[c]=f)}),n}const OC="1.4.0",qb={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{qb[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const yS={};qb.transitional=function(t,n,r){function a(o,i){return"[Axios v"+OC+"] Transitional option '"+o+"'"+i+(r?". "+r:"")}return(o,i,l)=>{if(t===!1)throw new he(a(i," has been removed"+(n?" in "+n:"")),he.ERR_DEPRECATED);return n&&!yS[i]&&(yS[i]=!0,console.warn(a(i," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(o,i,l):!0}};function GF(e,t,n){if(typeof e!="object")throw new he("options must be an object",he.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let a=r.length;for(;a-- >0;){const o=r[a],i=t[o];if(i){const l=e[o],s=l===void 0||i(l,o,e);if(s!==!0)throw new he("option "+o+" must be "+s,he.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new he("Unknown option "+o,he.ERR_BAD_OPTION)}}const Ah={assertOptions:GF,validators:qb},Mn=Ah.validators;class ml{constructor(t){this.defaults=t,this.interceptors={request:new fS,response:new fS}}request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ha(this.defaults,n);const{transitional:r,paramsSerializer:a,headers:o}=n;r!==void 0&&Ah.assertOptions(r,{silentJSONParsing:Mn.transitional(Mn.boolean),forcedJSONParsing:Mn.transitional(Mn.boolean),clarifyTimeoutError:Mn.transitional(Mn.boolean)},!1),a!=null&&(F.isFunction(a)?n.paramsSerializer={serialize:a}:Ah.assertOptions(a,{encode:Mn.function,serialize:Mn.function},!0)),n.method=(n.method||this.defaults.method||"get").toLowerCase();let i;i=o&&F.merge(o.common,o[n.method]),i&&F.forEach(["delete","get","head","post","put","patch","common"],b=>{delete o[b]}),n.headers=An.concat(i,o);const l=[];let s=!0;this.interceptors.request.forEach(function(m){typeof m.runWhen=="function"&&m.runWhen(n)===!1||(s=s&&m.synchronous,l.unshift(m.fulfilled,m.rejected))});const u=[];this.interceptors.response.forEach(function(m){u.push(m.fulfilled,m.rejected)});let c,d=0,f;if(!s){const b=[hS.bind(this),void 0];for(b.unshift.apply(b,l),b.push.apply(b,u),f=b.length,c=Promise.resolve(n);d{if(!r._listeners)return;let o=r._listeners.length;for(;o-- >0;)r._listeners[o](a);r._listeners=null}),this.promise.then=a=>{let o;const i=new Promise(l=>{r.subscribe(l),o=l}).then(a);return i.cancel=function(){r.unsubscribe(o)},i},t(function(o,i,l){r.reason||(r.reason=new Fo(o,i,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}static source(){let t;return{token:new Wb(function(a){t=a}),cancel:t}}}const qF=Wb;function WF(e){return function(n){return e.apply(null,n)}}function VF(e){return F.isObject(e)&&e.isAxiosError===!0}const Th={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(Th).forEach(([e,t])=>{Th[t]=e});const YF=Th;function LC(e){const t=new Bi(e),n=mC(Bi.prototype.request,t);return F.extend(n,Bi.prototype,t,{allOwnKeys:!0}),F.extend(n,t,null,{allOwnKeys:!0}),n.create=function(a){return LC(ha(e,a))},n}const Ve=LC(Gb);Ve.Axios=Bi;Ve.CanceledError=Fo;Ve.CancelToken=qF;Ve.isCancel=IC;Ve.VERSION=OC;Ve.toFormData=Wl;Ve.AxiosError=he;Ve.Cancel=Ve.CanceledError;Ve.all=function(t){return Promise.all(t)};Ve.spread=WF;Ve.isAxiosError=VF;Ve.mergeConfig=ha;Ve.AxiosHeaders=An;Ve.formToJSON=e=>CC(F.isHTMLForm(e)?new FormData(e):e);Ve.HttpStatusCode=YF;Ve.default=Ve;const KF=Ve,Ui=KF.create({baseURL:"/api"}),vS=["http","https","mailto","tel"];function XF(e){const t=(e||"").trim(),n=t.charAt(0);if(n==="#"||n==="/")return t;const r=t.indexOf(":");if(r===-1)return t;let a=-1;for(;++aa||(a=t.indexOf("#"),a!==-1&&r>a)?t:"javascript:void(0)"}/*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh