react-speakeazii 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +98 -0
- package/dist/components/ContactForm.d.ts +41 -0
- package/dist/components/ReviewsComponent.d.ts +55 -0
- package/dist/components/VisitTracker.d.ts +9 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.esm.js +2 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/dist/utils/helperfunctions.d.ts +11 -0
- package/package.json +51 -0
package/README.md
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# SpeakEasy
|
|
2
|
+
|
|
3
|
+
SpeakEasy is a lightweight React package that helps you integrate visitor tracking, contact forms, and portfolio-enhancing features like blogs, reviews, and messaging into your projects.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install react-speakeasy
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
or
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
yarn add react-speakeasy
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
|
|
21
|
+
### 1. Visitor Tracker
|
|
22
|
+
|
|
23
|
+
The `VisitorTracker` component should be placed in your main entry file (e.g., `App.js`) to automatically track and record visits.
|
|
24
|
+
|
|
25
|
+
```jsx
|
|
26
|
+
import React from "react";
|
|
27
|
+
import { VisitorTracker } from "react-speakeasy";
|
|
28
|
+
|
|
29
|
+
function App() {
|
|
30
|
+
return (
|
|
31
|
+
<>
|
|
32
|
+
<VisitorTracker apikey="YOUR_API_KEY" />
|
|
33
|
+
{/* Your other app components */}
|
|
34
|
+
</>
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default App;
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
### 3. Utility Functions
|
|
44
|
+
|
|
45
|
+
You can call utility functions directly by passing your **API key**:
|
|
46
|
+
|
|
47
|
+
#### Get Blogs
|
|
48
|
+
|
|
49
|
+
```js
|
|
50
|
+
import { getBlogs } from "react-speakeasy";
|
|
51
|
+
|
|
52
|
+
async function fetchBlogs() {
|
|
53
|
+
const blogs = await getBlogs("YOUR_API_KEY");
|
|
54
|
+
console.log(blogs);
|
|
55
|
+
}
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
#### Get Reviews
|
|
59
|
+
|
|
60
|
+
```js
|
|
61
|
+
import { getReviews } from "react-speakeasy";
|
|
62
|
+
|
|
63
|
+
async function fetchReviews() {
|
|
64
|
+
const reviews = await getReviews("YOUR_API_KEY");
|
|
65
|
+
console.log(reviews);
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
#### Send Message
|
|
70
|
+
|
|
71
|
+
```js
|
|
72
|
+
import { sendMessage } from "react-speakeasy";
|
|
73
|
+
|
|
74
|
+
async function contact() {
|
|
75
|
+
const response = await sendMessage("YOUR_API_KEY", {
|
|
76
|
+
name: "John Doe",
|
|
77
|
+
email: "john@example.com",
|
|
78
|
+
message: "Hello! I love this package 🚀",
|
|
79
|
+
});
|
|
80
|
+
console.log(response);
|
|
81
|
+
}
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
---
|
|
85
|
+
|
|
86
|
+
## Props
|
|
87
|
+
|
|
88
|
+
### `VisitorTracker`
|
|
89
|
+
|
|
90
|
+
| Prop | Type | Required | Description |
|
|
91
|
+
| ------ | ------ | -------- | ------------------------------- |
|
|
92
|
+
| apikey | string | ✅ | Your API key for authentication |
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
DOM © 2025 SpeakEazii
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface FormData {
|
|
3
|
+
name?: string;
|
|
4
|
+
email: string;
|
|
5
|
+
phone?: string;
|
|
6
|
+
subject?: string;
|
|
7
|
+
message: string;
|
|
8
|
+
}
|
|
9
|
+
export interface ContactFormProps {
|
|
10
|
+
showName?: boolean;
|
|
11
|
+
showPhone?: boolean;
|
|
12
|
+
showSubject?: boolean;
|
|
13
|
+
nameLabel?: string;
|
|
14
|
+
emailLabel?: string;
|
|
15
|
+
phoneLabel?: string;
|
|
16
|
+
subjectLabel?: string;
|
|
17
|
+
messageLabel?: string;
|
|
18
|
+
namePlaceholder?: string;
|
|
19
|
+
emailPlaceholder?: string;
|
|
20
|
+
phonePlaceholder?: string;
|
|
21
|
+
subjectPlaceholder?: string;
|
|
22
|
+
messagePlaceholder?: string;
|
|
23
|
+
sectionTitle?: string;
|
|
24
|
+
sectionSubtitle?: string;
|
|
25
|
+
sectionDescription?: string;
|
|
26
|
+
submitButtonText?: string;
|
|
27
|
+
loadingText?: string;
|
|
28
|
+
onSubmit: (formData: FormData) => Promise<void> | void;
|
|
29
|
+
onSuccess?: () => void;
|
|
30
|
+
onError?: (error: any) => void;
|
|
31
|
+
className?: string;
|
|
32
|
+
containerClassName?: string;
|
|
33
|
+
formClassName?: string;
|
|
34
|
+
inputClassName?: string;
|
|
35
|
+
textareaClassName?: string;
|
|
36
|
+
buttonClassName?: string;
|
|
37
|
+
labelClassName?: string;
|
|
38
|
+
customValidation?: (formData: FormData) => string | null;
|
|
39
|
+
}
|
|
40
|
+
export declare const ContactForm: React.FC<ContactFormProps>;
|
|
41
|
+
export default ContactForm;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
export interface Testimonial {
|
|
3
|
+
id?: string | number;
|
|
4
|
+
name: string;
|
|
5
|
+
email?: string;
|
|
6
|
+
image?: string;
|
|
7
|
+
review: string;
|
|
8
|
+
}
|
|
9
|
+
export interface TestimonialsTheme {
|
|
10
|
+
primary?: string;
|
|
11
|
+
secondary?: string;
|
|
12
|
+
background?: string;
|
|
13
|
+
cardBackground?: string;
|
|
14
|
+
activeCardBackground?: string;
|
|
15
|
+
border?: string;
|
|
16
|
+
text?: string;
|
|
17
|
+
textSecondary?: string;
|
|
18
|
+
textLight?: string;
|
|
19
|
+
}
|
|
20
|
+
export type TestimonialsLayout = "horizontal" | "vertical" | "grid";
|
|
21
|
+
export interface TestimonialsProps {
|
|
22
|
+
title?: string;
|
|
23
|
+
subtitle?: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
layout?: TestimonialsLayout;
|
|
26
|
+
showNavigation?: boolean;
|
|
27
|
+
autoPlay?: boolean;
|
|
28
|
+
autoPlayInterval?: number;
|
|
29
|
+
containerClassName?: string;
|
|
30
|
+
cardClassName?: string;
|
|
31
|
+
titleClassName?: string;
|
|
32
|
+
subtitleClassName?: string;
|
|
33
|
+
descriptionClassName?: string;
|
|
34
|
+
imageClassName?: string;
|
|
35
|
+
quoteClassName?: string;
|
|
36
|
+
nameClassName?: string;
|
|
37
|
+
emailClassName?: string;
|
|
38
|
+
reviewClassName?: string;
|
|
39
|
+
navigationClassName?: string;
|
|
40
|
+
theme?: TestimonialsTheme;
|
|
41
|
+
showQuoteIcon?: boolean;
|
|
42
|
+
showImages?: boolean;
|
|
43
|
+
showEmails?: boolean;
|
|
44
|
+
animationDuration?: number;
|
|
45
|
+
hoverEffects?: boolean;
|
|
46
|
+
onTestimonialChange?: (index: number, testimonial: Testimonial) => void;
|
|
47
|
+
onTestimonialClick?: (testimonial: Testimonial, index: number) => void;
|
|
48
|
+
cardWidth?: string;
|
|
49
|
+
cardHeight?: string;
|
|
50
|
+
imageSize?: number;
|
|
51
|
+
quoteIconSize?: number;
|
|
52
|
+
}
|
|
53
|
+
declare const ReviewsComponent: React.FC<TestimonialsProps>;
|
|
54
|
+
export default ReviewsComponent;
|
|
55
|
+
export type { Testimonial, TestimonialsTheme, TestimonialsLayout, TestimonialsProps, };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface VisitorTrackerConfig {
|
|
2
|
+
api_key: string;
|
|
3
|
+
storageKey?: string;
|
|
4
|
+
expiryHours?: number;
|
|
5
|
+
enableTracking?: boolean;
|
|
6
|
+
additionalData?: Record<string, any>;
|
|
7
|
+
}
|
|
8
|
+
declare const VisitorTracker: ({ api_key, storageKey, expiryHours, enableTracking, additionalData, }: VisitorTrackerConfig) => null;
|
|
9
|
+
export default VisitorTracker;
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{useRef as e,useEffect as t}from"react";var n=function(){return n=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},n.apply(this,arguments)};function r(e,t,n,r){return new(n||(n=Promise))(function(o,s){function i(e){try{c(r.next(e))}catch(e){s(e)}}function a(e){try{c(r.throw(e))}catch(e){s(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(i,a)}c((r=r.apply(e,t||[])).next())})}function o(e,t){var n,r,o,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]},i=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return i.next=a(0),i.throw=a(1),i.return=a(2),"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function a(a){return function(c){return function(a){if(n)throw new TypeError("Generator is already executing.");for(;i&&(i=0,a[0]&&(s=0)),s;)try{if(n=1,r&&(o=2&a[0]?r.return:a[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;switch(r=0,o&&(a=[2&a[0],o.value]),a[0]){case 0:case 1:o=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(o=s.trys,(o=o.length>0&&o[o.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!o||a[1]>o[0]&&a[1]<o[3])){s.label=a[1];break}if(6===a[0]&&s.label<o[1]){s.label=o[1],o=a;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(a);break}o[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(e){a=[6,e],r=0}finally{n=o=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}"function"==typeof SuppressedError&&SuppressedError;var s=function(s){var i=s.api_key,a=s.storageKey,c=void 0===a?"visit_tracker":a,u=s.expiryHours,l=void 0===u?12:u,f=s.enableTracking,d=void 0===f||f,p=s.additionalData,h=void 0===p?{}:p,m=e(!1),y="".concat("https://speakeasy-1dxj.onrender.com/speakeasy","/profile_visits/").concat(i);return t(function(){if(d&&!m.current){var e=setTimeout(function(){return r(void 0,void 0,void 0,function(){var e,t,r,s,i,a,u,f,d;return o(this,function(o){switch(o.label){case 0:if(o.trys.push([0,3,,4]),e=function(){try{var e="__localStorage_test__";return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(e){return!1}},t=function(e){return Date.now()-e>60*l*60*1e3},r=!0,s=function(){return"".concat(Date.now(),"-").concat(Math.random().toString(36).substr(2,9))}(),e())try{i=localStorage.getItem(c),(a=i?JSON.parse(i):null)&&!t(a.timestamp)&&(r=!1,s=a.sessionId)}catch(e){console.warn("Failed to access localStorage for visit tracking:",e)}return r?(u=n({url:window.location.href,referrer:document.referrer||"direct",userAgent:navigator.userAgent,timestamp:(new Date).toISOString(),sessionId:s,viewport:JSON.stringify({width:window.innerWidth,height:window.innerHeight}),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone,language:navigator.language},h),[4,fetch(y,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(u),keepalive:!0})]):[3,2];case 1:if(!(f=o.sent()).ok)throw new Error("Tracking request failed: ".concat(f.status," ").concat(f.statusText));localStorage.setItem(c,JSON.stringify({timestamp:Date.now(),sessionId:s})),m.current=!0,o.label=2;case 2:return[3,4];case 3:return d=o.sent(),console.warn("Visit tracking failed:",d),[3,4];case 4:return[2]}})})},100);return function(){return clearTimeout(e)}}},[]),null};function i(e,t){return function(){return e.apply(t,arguments)}}const{toString:a}=Object.prototype,{getPrototypeOf:c}=Object,{iterator:u,toStringTag:l}=Symbol,f=(d=Object.create(null),e=>{const t=a.call(e);return d[t]||(d[t]=t.slice(8,-1).toLowerCase())});var d;const p=e=>(e=e.toLowerCase(),t=>f(t)===e),h=e=>t=>typeof t===e,{isArray:m}=Array,y=h("undefined");function b(e){return null!==e&&!y(e)&&null!==e.constructor&&!y(e.constructor)&&E(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const g=p("ArrayBuffer");const w=h("string"),E=h("function"),O=h("number"),v=e=>null!==e&&"object"==typeof e,S=e=>{if("object"!==f(e))return!1;const t=c(e);return!(null!==t&&t!==Object.prototype&&null!==Object.getPrototypeOf(t)||l in e||u in e)},R=p("Date"),T=p("File"),A=p("Blob"),j=p("FileList"),x=p("URLSearchParams"),[N,C,k,P]=["ReadableStream","Request","Response","Headers"].map(p);function U(e,t,{allOwnKeys:n=!1}={}){if(null==e)return;let r,o;if("object"!=typeof e&&(e=[e]),m(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(b(e))return;const o=n?Object.getOwnPropertyNames(e):Object.keys(e),s=o.length;let i;for(r=0;r<s;r++)i=o[r],t.call(null,e[i],i,e)}}function _(e,t){if(b(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r,o=n.length;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:"undefined"!=typeof window?window:global,L=e=>!y(e)&&e!==F;const B=(D="undefined"!=typeof Uint8Array&&c(Uint8Array),e=>D&&e instanceof D);var D;const q=p("HTMLFormElement"),I=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),M=p("RegExp"),z=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};U(n,(n,o)=>{let s;!1!==(s=t(n,o,e))&&(r[o]=s||n)}),Object.defineProperties(e,r)};const H=p("AsyncFunction"),J=(W="function"==typeof setImmediate,K=E(F.postMessage),W?setImmediate:K?(V=`axios@${Math.random()}`,$=[],F.addEventListener("message",({source:e,data:t})=>{e===F&&t===V&&$.length&&$.shift()()},!1),e=>{$.push(e),F.postMessage(V,"*")}):e=>setTimeout(e));var W,K,V,$;const X="undefined"!=typeof queueMicrotask?queueMicrotask.bind(F):"undefined"!=typeof process&&process.nextTick||J;var G={isArray:m,isArrayBuffer:g,isBuffer:b,isFormData:e=>{let t;return e&&("function"==typeof FormData&&e instanceof FormData||E(e.append)&&("formdata"===(t=f(e))||"object"===t&&E(e.toString)&&"[object FormData]"===e.toString()))},isArrayBufferView:function(e){let t;return t="undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&g(e.buffer),t},isString:w,isNumber:O,isBoolean:e=>!0===e||!1===e,isObject:v,isPlainObject:S,isEmptyObject:e=>{if(!v(e)||b(e))return!1;try{return 0===Object.keys(e).length&&Object.getPrototypeOf(e)===Object.prototype}catch(e){return!1}},isReadableStream:N,isRequest:C,isResponse:k,isHeaders:P,isUndefined:y,isDate:R,isFile:T,isBlob:A,isRegExp:M,isFunction:E,isStream:e=>v(e)&&E(e.pipe),isURLSearchParams:x,isTypedArray:B,isFileList:j,forEach:U,merge:function e(){const{caseless:t,skipUndefined:n}=L(this)&&this||{},r={},o=(o,s)=>{const i=t&&_(r,s)||s;S(r[i])&&S(o)?r[i]=e(r[i],o):S(o)?r[i]=e({},o):m(o)?r[i]=o.slice():n&&y(o)||(r[i]=o)};for(let e=0,t=arguments.length;e<t;e++)arguments[e]&&U(arguments[e],o);return r},extend:(e,t,n,{allOwnKeys:r}={})=>(U(t,(t,r)=>{n&&E(t)?e[r]=i(t,n):e[r]=t},{allOwnKeys:r}),e),trim:e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""),stripBOM:e=>(65279===e.charCodeAt(0)&&(e=e.slice(1)),e),inherits:(e,t,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)},toFlatObject:(e,t,n,r)=>{let o,s,i;const a={};if(t=t||{},null==e)return t;do{for(o=Object.getOwnPropertyNames(e),s=o.length;s-- >0;)i=o[s],r&&!r(i,e,t)||a[i]||(t[i]=e[i],a[i]=!0);e=!1!==n&&c(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:f,kindOfTest:p,endsWith:(e,t,n)=>{e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return-1!==r&&r===n},toArray:e=>{if(!e)return null;if(m(e))return e;let t=e.length;if(!O(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},forEachEntry:(e,t)=>{const n=(e&&e[u]).call(e);let r;for(;(r=n.next())&&!r.done;){const n=r.value;t.call(e,n[0],n[1])}},matchAll:(e,t)=>{let n;const r=[];for(;null!==(n=e.exec(t));)r.push(n);return r},isHTMLForm:q,hasOwnProperty:I,hasOwnProp:I,reduceDescriptors:z,freezeMethods:e=>{z(e,(t,n)=>{if(E(e)&&-1!==["arguments","caller","callee"].indexOf(n))return!1;const r=e[n];E(r)&&(t.enumerable=!1,"writable"in t?t.writable=!1:t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")}))})},toObjectSet:(e,t)=>{const n={},r=e=>{e.forEach(e=>{n[e]=!0})};return m(e)?r(e):r(String(e).split(t)),n},toCamelCase:e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(e,t,n){return t.toUpperCase()+n}),noop:()=>{},toFiniteNumber:(e,t)=>null!=e&&Number.isFinite(e=+e)?e:t,findKey:_,global:F,isContextDefined:L,isSpecCompliantForm:function(e){return!!(e&&E(e.append)&&"FormData"===e[l]&&e[u])},toJSONObject:e=>{const t=new Array(10),n=(e,r)=>{if(v(e)){if(t.indexOf(e)>=0)return;if(b(e))return e;if(!("toJSON"in e)){t[r]=e;const o=m(e)?[]:{};return U(e,(e,t)=>{const s=n(e,r+1);!y(s)&&(o[t]=s)}),t[r]=void 0,o}}return e};return n(e,0)},isAsyncFn:H,isThenable:e=>e&&(v(e)||E(e))&&E(e.then)&&E(e.catch),setImmediate:J,asap:X,isIterable:e=>null!=e&&E(e[u])};function Q(e,t,n,r,o){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),o&&(this.response=o,this.status=o.status?o.status:null)}G.inherits(Q,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:G.toJSONObject(this.config),code:this.code,status:this.status}}});const Z=Q.prototype,Y={};["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=>{Y[e]={value:e}}),Object.defineProperties(Q,Y),Object.defineProperty(Z,"isAxiosError",{value:!0}),Q.from=(e,t,n,r,o,s)=>{const i=Object.create(Z);G.toFlatObject(e,i,function(e){return e!==Error.prototype},e=>"isAxiosError"!==e);const a=e&&e.message?e.message:"Error",c=null==t&&e?e.code:t;return Q.call(i,a,c,n,r,o),e&&null==i.cause&&Object.defineProperty(i,"cause",{value:e,configurable:!0}),i.name=e&&e.name||"Error",s&&Object.assign(i,s),i};function ee(e){return G.isPlainObject(e)||G.isArray(e)}function te(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ne(e,t,n){return e?e.concat(t).map(function(e,t){return e=te(e),!n&&t?"["+e+"]":e}).join(n?".":""):t}const re=G.toFlatObject(G,{},null,function(e){return/^is[A-Z]/.test(e)});function oe(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(e,t){return!G.isUndefined(t[e])})).metaTokens,o=n.visitor||u,s=n.dots,i=n.indexes,a=(n.Blob||"undefined"!=typeof Blob&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(o))throw new TypeError("visitor must be a function");function c(e){if(null===e)return"";if(G.isDate(e))return e.toISOString();if(G.isBoolean(e))return e.toString();if(!a&&G.isBlob(e))throw new Q("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(e)||G.isTypedArray(e)?a&&"function"==typeof Blob?new Blob([e]):Buffer.from(e):e}function u(e,n,o){let a=e;if(e&&!o&&"object"==typeof e)if(G.endsWith(n,"{}"))n=r?n:n.slice(0,-2),e=JSON.stringify(e);else if(G.isArray(e)&&function(e){return G.isArray(e)&&!e.some(ee)}(e)||(G.isFileList(e)||G.endsWith(n,"[]"))&&(a=G.toArray(e)))return n=te(n),a.forEach(function(e,r){!G.isUndefined(e)&&null!==e&&t.append(!0===i?ne([n],r,s):null===i?n:n+"[]",c(e))}),!1;return!!ee(e)||(t.append(ne(o,n,s),c(e)),!1)}const l=[],f=Object.assign(re,{defaultVisitor:u,convertValue:c,isVisitable:ee});if(!G.isObject(e))throw new TypeError("data must be an object");return function e(n,r){if(!G.isUndefined(n)){if(-1!==l.indexOf(n))throw Error("Circular reference detected in "+r.join("."));l.push(n),G.forEach(n,function(n,s){!0===(!(G.isUndefined(n)||null===n)&&o.call(t,n,G.isString(s)?s.trim():s,r,f))&&e(n,r?r.concat(s):[s])}),l.pop()}}(e),t}function se(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(e){return t[e]})}function ie(e,t){this._pairs=[],e&&oe(e,this,t)}const ae=ie.prototype;function ce(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function ue(e,t,n){if(!t)return e;const r=n&&n.encode||ce;G.isFunction(n)&&(n={serialize:n});const o=n&&n.serialize;let s;if(s=o?o(t,n):G.isURLSearchParams(t)?t.toString():new ie(t,n).toString(r),s){const t=e.indexOf("#");-1!==t&&(e=e.slice(0,t)),e+=(-1===e.indexOf("?")?"?":"&")+s}return e}ae.append=function(e,t){this._pairs.push([e,t])},ae.toString=function(e){const t=e?function(t){return e.call(this,t,se)}:se;return this._pairs.map(function(e){return t(e[0])+"="+t(e[1])},"").join("&")};var le=class{constructor(){this.handlers=[]}use(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){G.forEach(this.handlers,function(t){null!==t&&e(t)})}},fe={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},de={isBrowser:!0,classes:{URLSearchParams:"undefined"!=typeof URLSearchParams?URLSearchParams:ie,FormData:"undefined"!=typeof FormData?FormData:null,Blob:"undefined"!=typeof Blob?Blob:null},protocols:["http","https","file","blob","url","data"]};const pe="undefined"!=typeof window&&"undefined"!=typeof document,he="object"==typeof navigator&&navigator||void 0,me=pe&&(!he||["ReactNative","NativeScript","NS"].indexOf(he.product)<0),ye="undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&"function"==typeof self.importScripts,be=pe&&window.location.href||"http://localhost";var ge={...Object.freeze({__proto__:null,hasBrowserEnv:pe,hasStandardBrowserWebWorkerEnv:ye,hasStandardBrowserEnv:me,navigator:he,origin:be}),...de};function we(e){function t(e,n,r,o){let s=e[o++];if("__proto__"===s)return!0;const i=Number.isFinite(+s),a=o>=e.length;if(s=!s&&G.isArray(r)?r.length:s,a)return G.hasOwnProp(r,s)?r[s]=[r[s],n]:r[s]=n,!i;r[s]&&G.isObject(r[s])||(r[s]=[]);return t(e,n,r[s],o)&&G.isArray(r[s])&&(r[s]=function(e){const t={},n=Object.keys(e);let r;const o=n.length;let s;for(r=0;r<o;r++)s=n[r],t[s]=e[s];return t}(r[s])),!i}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(e,r)=>{t(function(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(e=>"[]"===e[0]?"":e[1]||e[0])}(e),r,n,0)}),n}return null}const Ee={transitional:fe,adapter:["xhr","http","fetch"],transformRequest:[function(e,t){const n=t.getContentType()||"",r=n.indexOf("application/json")>-1,o=G.isObject(e);o&&G.isHTMLForm(e)&&(e=new FormData(e));if(G.isFormData(e))return r?JSON.stringify(we(e)):e;if(G.isArrayBuffer(e)||G.isBuffer(e)||G.isStream(e)||G.isFile(e)||G.isBlob(e)||G.isReadableStream(e))return e;if(G.isArrayBufferView(e))return e.buffer;if(G.isURLSearchParams(e))return t.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let s;if(o){if(n.indexOf("application/x-www-form-urlencoded")>-1)return function(e,t){return oe(e,new ge.classes.URLSearchParams,{visitor:function(e,t,n,r){return ge.isNode&&G.isBuffer(e)?(this.append(t,e.toString("base64")),!1):r.defaultVisitor.apply(this,arguments)},...t})}(e,this.formSerializer).toString();if((s=G.isFileList(e))||n.indexOf("multipart/form-data")>-1){const t=this.env&&this.env.FormData;return oe(s?{"files[]":e}:e,t&&new t,this.formSerializer)}}return o||r?(t.setContentType("application/json",!1),function(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(e){if("SyntaxError"!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){const t=this.transitional||Ee.transitional,n=t&&t.forcedJSONParsing,r="json"===this.responseType;if(G.isResponse(e)||G.isReadableStream(e))return e;if(e&&G.isString(e)&&(n&&!this.responseType||r)){const n=!(t&&t.silentJSONParsing)&&r;try{return JSON.parse(e,this.parseReviver)}catch(e){if(n){if("SyntaxError"===e.name)throw Q.from(e,Q.ERR_BAD_RESPONSE,this,null,this.response);throw e}}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ge.classes.FormData,Blob:ge.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],e=>{Ee.headers[e]={}});var Oe=Ee;const ve=G.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"]);const Se=Symbol("internals");function Re(e){return e&&String(e).trim().toLowerCase()}function Te(e){return!1===e||null==e?e:G.isArray(e)?e.map(Te):String(e)}function Ae(e,t,n,r,o){return G.isFunction(r)?r.call(this,t,n):(o&&(t=n),G.isString(t)?G.isString(r)?-1!==t.indexOf(r):G.isRegExp(r)?r.test(t):void 0:void 0)}class je{constructor(e){e&&this.set(e)}set(e,t,n){const r=this;function o(e,t,n){const o=Re(t);if(!o)throw new Error("header name must be a non-empty string");const s=G.findKey(r,o);(!s||void 0===r[s]||!0===n||void 0===n&&!1!==r[s])&&(r[s||t]=Te(e))}const s=(e,t)=>G.forEach(e,(e,n)=>o(e,n,t));if(G.isPlainObject(e)||e instanceof this.constructor)s(e,t);else if(G.isString(e)&&(e=e.trim())&&!/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim()))s((e=>{const t={};let n,r,o;return e&&e.split("\n").forEach(function(e){o=e.indexOf(":"),n=e.substring(0,o).trim().toLowerCase(),r=e.substring(o+1).trim(),!n||t[n]&&ve[n]||("set-cookie"===n?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t})(e),t);else if(G.isObject(e)&&G.isIterable(e)){let n,r,o={};for(const t of e){if(!G.isArray(t))throw TypeError("Object iterator must return a key-value pair");o[r=t[0]]=(n=o[r])?G.isArray(n)?[...n,t[1]]:[n,t[1]]:t[1]}s(o,t)}else null!=e&&o(t,e,n);return this}get(e,t){if(e=Re(e)){const n=G.findKey(this,e);if(n){const e=this[n];if(!t)return e;if(!0===t)return function(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}(e);if(G.isFunction(t))return t.call(this,e,n);if(G.isRegExp(t))return t.exec(e);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,t){if(e=Re(e)){const n=G.findKey(this,e);return!(!n||void 0===this[n]||t&&!Ae(0,this[n],n,t))}return!1}delete(e,t){const n=this;let r=!1;function o(e){if(e=Re(e)){const o=G.findKey(n,e);!o||t&&!Ae(0,n[o],o,t)||(delete n[o],r=!0)}}return G.isArray(e)?e.forEach(o):o(e),r}clear(e){const t=Object.keys(this);let n=t.length,r=!1;for(;n--;){const o=t[n];e&&!Ae(0,this[o],o,e,!0)||(delete this[o],r=!0)}return r}normalize(e){const t=this,n={};return G.forEach(this,(r,o)=>{const s=G.findKey(n,o);if(s)return t[s]=Te(r),void delete t[o];const i=e?function(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,t,n)=>t.toUpperCase()+n)}(o):String(o).trim();i!==o&&delete t[o],t[i]=Te(r),n[i]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const t=Object.create(null);return G.forEach(this,(n,r)=>{null!=n&&!1!==n&&(t[r]=e&&G.isArray(n)?n.join(", "):n)}),t}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,t])=>e+": "+t).join("\n")}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...t){const n=new this(e);return t.forEach(e=>n.set(e)),n}static accessor(e){const t=(this[Se]=this[Se]={accessors:{}}).accessors,n=this.prototype;function r(e){const r=Re(e);t[r]||(!function(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(e,n,o){return this[r].call(this,t,e,n,o)},configurable:!0})})}(n,e),t[r]=!0)}return G.isArray(e)?e.forEach(r):r(e),this}}je.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(je.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(e){this[n]=e}}}),G.freezeMethods(je);var xe=je;function Ne(e,t){const n=this||Oe,r=t||n,o=xe.from(r.headers);let s=r.data;return G.forEach(e,function(e){s=e.call(n,s,o.normalize(),t?t.status:void 0)}),o.normalize(),s}function Ce(e){return!(!e||!e.__CANCEL__)}function ke(e,t,n){Q.call(this,null==e?"canceled":e,Q.ERR_CANCELED,t,n),this.name="CanceledError"}function Pe(e,t,n){const r=n.config.validateStatus;n.status&&r&&!r(n.status)?t(new Q("Request failed with status code "+n.status,[Q.ERR_BAD_REQUEST,Q.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}G.inherits(ke,Q,{__CANCEL__:!0});const Ue=(e,t,n=3)=>{let r=0;const o=function(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o,s=0,i=0;return t=void 0!==t?t:1e3,function(a){const c=Date.now(),u=r[i];o||(o=c),n[s]=a,r[s]=c;let l=i,f=0;for(;l!==s;)f+=n[l++],l%=e;if(s=(s+1)%e,s===i&&(i=(i+1)%e),c-o<t)return;const d=u&&c-u;return d?Math.round(1e3*f/d):void 0}}(50,250);return function(e,t){let n,r,o=0,s=1e3/t;const i=(t,s=Date.now())=>{o=s,n=null,r&&(clearTimeout(r),r=null),e(...t)};return[(...e)=>{const t=Date.now(),a=t-o;a>=s?i(e,t):(n=e,r||(r=setTimeout(()=>{r=null,i(n)},s-a)))},()=>n&&i(n)]}(n=>{const s=n.loaded,i=n.lengthComputable?n.total:void 0,a=s-r,c=o(a);r=s;e({loaded:s,total:i,progress:i?s/i:void 0,bytes:a,rate:c||void 0,estimated:c&&i&&s<=i?(i-s)/c:void 0,event:n,lengthComputable:null!=i,[t?"download":"upload"]:!0})},n)},_e=(e,t)=>{const n=null!=e;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Fe=e=>(...t)=>G.asap(()=>e(...t));var Le=ge.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,ge.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(ge.origin),ge.navigator&&/(msie|trident)/i.test(ge.navigator.userAgent)):()=>!0,Be=ge.hasStandardBrowserEnv?{write(e,t,n,r,o,s){const i=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&i.push("expires="+new Date(n).toGMTString()),G.isString(r)&&i.push("path="+r),G.isString(o)&&i.push("domain="+o),!0===s&&i.push("secure"),document.cookie=i.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read:()=>null,remove(){}};function De(e,t,n){let r=!function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}(t);return e&&(r||0==n)?function(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}(e,t):t}const qe=e=>e instanceof xe?{...e}:e;function Ie(e,t){t=t||{};const n={};function r(e,t,n,r){return G.isPlainObject(e)&&G.isPlainObject(t)?G.merge.call({caseless:r},e,t):G.isPlainObject(t)?G.merge({},t):G.isArray(t)?t.slice():t}function o(e,t,n,o){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e,0,o):r(e,t,0,o)}function s(e,t){if(!G.isUndefined(t))return r(void 0,t)}function i(e,t){return G.isUndefined(t)?G.isUndefined(e)?void 0:r(void 0,e):r(void 0,t)}function a(n,o,s){return s in t?r(n,o):s in e?r(void 0,n):void 0}const c={url:s,method:s,data:s,baseURL:i,transformRequest:i,transformResponse:i,paramsSerializer:i,timeout:i,timeoutMessage:i,withCredentials:i,withXSRFToken: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:a,headers:(e,t,n)=>o(qe(e),qe(t),0,!0)};return G.forEach(Object.keys({...e,...t}),function(r){const s=c[r]||o,i=s(e[r],t[r],r);G.isUndefined(i)&&s!==a||(n[r]=i)}),n}var Me=e=>{const t=Ie({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:s,headers:i,auth:a}=t;if(t.headers=i=xe.from(i),t.url=ue(De(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),a&&i.set("Authorization","Basic "+btoa((a.username||"")+":"+(a.password?unescape(encodeURIComponent(a.password)):""))),G.isFormData(n))if(ge.hasStandardBrowserEnv||ge.hasStandardBrowserWebWorkerEnv)i.setContentType(void 0);else if(G.isFunction(n.getHeaders)){const e=n.getHeaders(),t=["content-type","content-length"];Object.entries(e).forEach(([e,n])=>{t.includes(e.toLowerCase())&&i.set(e,n)})}if(ge.hasStandardBrowserEnv&&(r&&G.isFunction(r)&&(r=r(t)),r||!1!==r&&Le(t.url))){const e=o&&s&&Be.read(s);e&&i.set(o,e)}return t};var ze="undefined"!=typeof XMLHttpRequest&&function(e){return new Promise(function(t,n){const r=Me(e);let o=r.data;const s=xe.from(r.headers).normalize();let i,a,c,u,l,{responseType:f,onUploadProgress:d,onDownloadProgress:p}=r;function h(){u&&u(),l&&l(),r.cancelToken&&r.cancelToken.unsubscribe(i),r.signal&&r.signal.removeEventListener("abort",i)}let m=new XMLHttpRequest;function y(){if(!m)return;const r=xe.from("getAllResponseHeaders"in m&&m.getAllResponseHeaders());Pe(function(e){t(e),h()},function(e){n(e),h()},{data:f&&"text"!==f&&"json"!==f?m.response:m.responseText,status:m.status,statusText:m.statusText,headers:r,config:e,request:m}),m=null}m.open(r.method.toUpperCase(),r.url,!0),m.timeout=r.timeout,"onloadend"in m?m.onloadend=y:m.onreadystatechange=function(){m&&4===m.readyState&&(0!==m.status||m.responseURL&&0===m.responseURL.indexOf("file:"))&&setTimeout(y)},m.onabort=function(){m&&(n(new Q("Request aborted",Q.ECONNABORTED,e,m)),m=null)},m.onerror=function(t){const r=new Q(t&&t.message?t.message:"Network Error",Q.ERR_NETWORK,e,m);r.event=t||null,n(r),m=null},m.ontimeout=function(){let t=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const o=r.transitional||fe;r.timeoutErrorMessage&&(t=r.timeoutErrorMessage),n(new Q(t,o.clarifyTimeoutError?Q.ETIMEDOUT:Q.ECONNABORTED,e,m)),m=null},void 0===o&&s.setContentType(null),"setRequestHeader"in m&&G.forEach(s.toJSON(),function(e,t){m.setRequestHeader(t,e)}),G.isUndefined(r.withCredentials)||(m.withCredentials=!!r.withCredentials),f&&"json"!==f&&(m.responseType=r.responseType),p&&([c,l]=Ue(p,!0),m.addEventListener("progress",c)),d&&m.upload&&([a,u]=Ue(d),m.upload.addEventListener("progress",a),m.upload.addEventListener("loadend",u)),(r.cancelToken||r.signal)&&(i=t=>{m&&(n(!t||t.type?new ke(null,e,m):t),m.abort(),m=null)},r.cancelToken&&r.cancelToken.subscribe(i),r.signal&&(r.signal.aborted?i():r.signal.addEventListener("abort",i)));const b=function(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}(r.url);b&&-1===ge.protocols.indexOf(b)?n(new Q("Unsupported protocol "+b+":",Q.ERR_BAD_REQUEST,e)):m.send(o||null)})};var He=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let n,r=new AbortController;const o=function(e){if(!n){n=!0,i();const t=e instanceof Error?e:this.reason;r.abort(t instanceof Q?t:new ke(t instanceof Error?t.message:t))}};let s=t&&setTimeout(()=>{s=null,o(new Q(`timeout ${t} of ms exceeded`,Q.ETIMEDOUT))},t);const i=()=>{e&&(s&&clearTimeout(s),s=null,e.forEach(e=>{e.unsubscribe?e.unsubscribe(o):e.removeEventListener("abort",o)}),e=null)};e.forEach(e=>e.addEventListener("abort",o));const{signal:a}=r;return a.unsubscribe=()=>G.asap(i),a}};const Je=function*(e,t){let n=e.byteLength;if(!t||n<t)return void(yield e);let r,o=0;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},We=async function*(e){if(e[Symbol.asyncIterator])return void(yield*e);const t=e.getReader();try{for(;;){const{done:e,value:n}=await t.read();if(e)break;yield n}}finally{await t.cancel()}},Ke=(e,t,n,r)=>{const o=async function*(e,t){for await(const n of We(e))yield*Je(n,t)}(e,t);let s,i=0,a=e=>{s||(s=!0,r&&r(e))};return new ReadableStream({async pull(e){try{const{done:t,value:r}=await o.next();if(t)return a(),void e.close();let s=r.byteLength;if(n){let e=i+=s;n(e)}e.enqueue(new Uint8Array(r))}catch(e){throw a(e),e}},cancel:e=>(a(e),o.return())},{highWaterMark:2})},{isFunction:Ve}=G,$e=(({Request:e,Response:t})=>({Request:e,Response:t}))(G.global),{ReadableStream:Xe,TextEncoder:Ge}=G.global,Qe=(e,...t)=>{try{return!!e(...t)}catch(e){return!1}},Ze=e=>{e=G.merge.call({skipUndefined:!0},$e,e);const{fetch:t,Request:n,Response:r}=e,o=t?Ve(t):"function"==typeof fetch,s=Ve(n),i=Ve(r);if(!o)return!1;const a=o&&Ve(Xe),c=o&&("function"==typeof Ge?(u=new Ge,e=>u.encode(e)):async e=>new Uint8Array(await new n(e).arrayBuffer()));var u;const l=s&&a&&Qe(()=>{let e=!1;const t=new n(ge.origin,{body:new Xe,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),f=i&&a&&Qe(()=>G.isReadableStream(new r("").body)),d={stream:f&&(e=>e.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(e=>{!d[e]&&(d[e]=(t,n)=>{let r=t&&t[e];if(r)return r.call(t);throw new Q(`Response type '${e}' is not supported`,Q.ERR_NOT_SUPPORT,n)})});const p=async(e,t)=>{const r=G.toFiniteNumber(e.getContentLength());return null==r?(async e=>{if(null==e)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e)){const t=new n(ge.origin,{method:"POST",body:e});return(await t.arrayBuffer()).byteLength}return G.isArrayBufferView(e)||G.isArrayBuffer(e)?e.byteLength:(G.isURLSearchParams(e)&&(e+=""),G.isString(e)?(await c(e)).byteLength:void 0)})(t):r};return async e=>{let{url:o,method:i,data:a,signal:c,cancelToken:u,timeout:h,onDownloadProgress:m,onUploadProgress:y,responseType:b,headers:g,withCredentials:w="same-origin",fetchOptions:E}=Me(e),O=t||fetch;b=b?(b+"").toLowerCase():"text";let v=He([c,u&&u.toAbortSignal()],h),S=null;const R=v&&v.unsubscribe&&(()=>{v.unsubscribe()});let T;try{if(y&&l&&"get"!==i&&"head"!==i&&0!==(T=await p(g,a))){let e,t=new n(o,{method:"POST",body:a,duplex:"half"});if(G.isFormData(a)&&(e=t.headers.get("content-type"))&&g.setContentType(e),t.body){const[e,n]=_e(T,Ue(Fe(y)));a=Ke(t.body,65536,e,n)}}G.isString(w)||(w=w?"include":"omit");const t=s&&"credentials"in n.prototype,c={...E,signal:v,method:i.toUpperCase(),headers:g.normalize().toJSON(),body:a,duplex:"half",credentials:t?w:void 0};S=s&&new n(o,c);let u=await(s?O(S,E):O(o,c));const h=f&&("stream"===b||"response"===b);if(f&&(m||h&&R)){const e={};["status","statusText","headers"].forEach(t=>{e[t]=u[t]});const t=G.toFiniteNumber(u.headers.get("content-length")),[n,o]=m&&_e(t,Ue(Fe(m),!0))||[];u=new r(Ke(u.body,65536,n,()=>{o&&o(),R&&R()}),e)}b=b||"text";let A=await d[G.findKey(d,b)||"text"](u,e);return!h&&R&&R(),await new Promise((t,n)=>{Pe(t,n,{data:A,headers:xe.from(u.headers),status:u.status,statusText:u.statusText,config:e,request:S})})}catch(t){if(R&&R(),t&&"TypeError"===t.name&&/Load failed|fetch/i.test(t.message))throw Object.assign(new Q("Network Error",Q.ERR_NETWORK,e,S),{cause:t.cause||t});throw Q.from(t,t&&t.code,e,S)}}},Ye=new Map,et=e=>{let t=e?e.env:{};const{fetch:n,Request:r,Response:o}=t,s=[r,o,n];let i,a,c=s.length,u=Ye;for(;c--;)i=s[c],a=u.get(i),void 0===a&&u.set(i,a=c?new Map:Ze(t)),u=a;return a};et();const tt={http:null,xhr:ze,fetch:{get:et}};G.forEach(tt,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(e){}Object.defineProperty(e,"adapterName",{value:t})}});const nt=e=>`- ${e}`,rt=e=>G.isFunction(e)||null===e||!1===e;var ot=(e,t)=>{e=G.isArray(e)?e:[e];const{length:n}=e;let r,o;const s={};for(let i=0;i<n;i++){let n;if(r=e[i],o=r,!rt(r)&&(o=tt[(n=String(r)).toLowerCase()],void 0===o))throw new Q(`Unknown adapter '${n}'`);if(o&&(G.isFunction(o)||(o=o.get(t))))break;s[n||"#"+i]=o}if(!o){const e=Object.entries(s).map(([e,t])=>`adapter ${e} `+(!1===t?"is not supported by the environment":"is not available in the build"));throw new Q("There is no suitable adapter to dispatch the request "+(n?e.length>1?"since :\n"+e.map(nt).join("\n"):" "+nt(e[0]):"as no adapter specified"),"ERR_NOT_SUPPORT")}return o};function st(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ke(null,e)}function it(e){st(e),e.headers=xe.from(e.headers),e.data=Ne.call(e,e.transformRequest),-1!==["post","put","patch"].indexOf(e.method)&&e.headers.setContentType("application/x-www-form-urlencoded",!1);return ot(e.adapter||Oe.adapter,e)(e).then(function(t){return st(e),t.data=Ne.call(e,e.transformResponse,t),t.headers=xe.from(t.headers),t},function(t){return Ce(t)||(st(e),t&&t.response&&(t.response.data=Ne.call(e,e.transformResponse,t.response),t.response.headers=xe.from(t.response.headers))),Promise.reject(t)})}const at="1.12.2",ct={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ct[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ut={};ct.transitional=function(e,t,n){function r(e,t){return"[Axios v"+at+"] Transitional option '"+e+"'"+t+(n?". "+n:"")}return(n,o,s)=>{if(!1===e)throw new Q(r(o," has been removed"+(t?" in "+t:"")),Q.ERR_DEPRECATED);return t&&!ut[o]&&(ut[o]=!0,console.warn(r(o," has been deprecated since v"+t+" and will be removed in the near future"))),!e||e(n,o,s)}},ct.spelling=function(e){return(t,n)=>(console.warn(`${n} is likely a misspelling of ${e}`),!0)};var lt={assertOptions:function(e,t,n){if("object"!=typeof e)throw new Q("options must be an object",Q.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const s=r[o],i=t[s];if(i){const t=e[s],n=void 0===t||i(t,s,e);if(!0!==n)throw new Q("option "+s+" must be "+n,Q.ERR_BAD_OPTION_VALUE);continue}if(!0!==n)throw new Q("Unknown option "+s,Q.ERR_BAD_OPTION)}},validators:ct};const ft=lt.validators;class dt{constructor(e){this.defaults=e||{},this.interceptors={request:new le,response:new le}}async request(e,t){try{return await this._request(e,t)}catch(e){if(e instanceof Error){let t={};Error.captureStackTrace?Error.captureStackTrace(t):t=new Error;const n=t.stack?t.stack.replace(/^.+\n/,""):"";try{e.stack?n&&!String(e.stack).endsWith(n.replace(/^.+\n.+\n/,""))&&(e.stack+="\n"+n):e.stack=n}catch(e){}}throw e}}_request(e,t){"string"==typeof e?(t=t||{}).url=e:t=e||{},t=Ie(this.defaults,t);const{transitional:n,paramsSerializer:r,headers:o}=t;void 0!==n&<.assertOptions(n,{silentJSONParsing:ft.transitional(ft.boolean),forcedJSONParsing:ft.transitional(ft.boolean),clarifyTimeoutError:ft.transitional(ft.boolean)},!1),null!=r&&(G.isFunction(r)?t.paramsSerializer={serialize:r}:lt.assertOptions(r,{encode:ft.function,serialize:ft.function},!0)),void 0!==t.allowAbsoluteUrls||(void 0!==this.defaults.allowAbsoluteUrls?t.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:t.allowAbsoluteUrls=!0),lt.assertOptions(t,{baseUrl:ft.spelling("baseURL"),withXsrfToken:ft.spelling("withXSRFToken")},!0),t.method=(t.method||this.defaults.method||"get").toLowerCase();let s=o&&G.merge(o.common,o[t.method]);o&&G.forEach(["delete","get","head","post","put","patch","common"],e=>{delete o[e]}),t.headers=xe.concat(s,o);const i=[];let a=!0;this.interceptors.request.forEach(function(e){"function"==typeof e.runWhen&&!1===e.runWhen(t)||(a=a&&e.synchronous,i.unshift(e.fulfilled,e.rejected))});const c=[];let u;this.interceptors.response.forEach(function(e){c.push(e.fulfilled,e.rejected)});let l,f=0;if(!a){const e=[it.bind(this),void 0];for(e.unshift(...i),e.push(...c),l=e.length,u=Promise.resolve(t);f<l;)u=u.then(e[f++],e[f++]);return u}l=i.length;let d=t;for(;f<l;){const e=i[f++],t=i[f++];try{d=e(d)}catch(e){t.call(this,e);break}}try{u=it.call(this,d)}catch(e){return Promise.reject(e)}for(f=0,l=c.length;f<l;)u=u.then(c[f++],c[f++]);return u}getUri(e){return ue(De((e=Ie(this.defaults,e)).baseURL,e.url,e.allowAbsoluteUrls),e.params,e.paramsSerializer)}}G.forEach(["delete","get","head","options"],function(e){dt.prototype[e]=function(t,n){return this.request(Ie(n||{},{method:e,url:t,data:(n||{}).data}))}}),G.forEach(["post","put","patch"],function(e){function t(t){return function(n,r,o){return this.request(Ie(o||{},{method:e,headers:t?{"Content-Type":"multipart/form-data"}:{},url:n,data:r}))}}dt.prototype[e]=t(),dt.prototype[e+"Form"]=t(!0)});var pt=dt;class ht{constructor(e){if("function"!=typeof e)throw new TypeError("executor must be a function.");let t;this.promise=new Promise(function(e){t=e});const n=this;this.promise.then(e=>{if(!n._listeners)return;let t=n._listeners.length;for(;t-- >0;)n._listeners[t](e);n._listeners=null}),this.promise.then=e=>{let t;const r=new Promise(e=>{n.subscribe(e),t=e}).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e(function(e,r,o){n.reason||(n.reason=new ke(e,r,o),t(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}toAbortSignal(){const e=new AbortController,t=t=>{e.abort(t)};return this.subscribe(t),e.signal.unsubscribe=()=>this.unsubscribe(t),e.signal}static source(){let e;return{token:new ht(function(t){e=t}),cancel:e}}}var mt=ht;const yt={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(yt).forEach(([e,t])=>{yt[t]=e});var bt=yt;const gt=function e(t){const n=new pt(t),r=i(pt.prototype.request,n);return G.extend(r,pt.prototype,n,{allOwnKeys:!0}),G.extend(r,n,null,{allOwnKeys:!0}),r.create=function(n){return e(Ie(t,n))},r}(Oe);gt.Axios=pt,gt.CanceledError=ke,gt.CancelToken=mt,gt.isCancel=Ce,gt.VERSION=at,gt.toFormData=oe,gt.AxiosError=Q,gt.Cancel=gt.CanceledError,gt.all=function(e){return Promise.all(e)},gt.spread=function(e){return function(t){return e.apply(null,t)}},gt.isAxiosError=function(e){return G.isObject(e)&&!0===e.isAxiosError},gt.mergeConfig=Ie,gt.AxiosHeaders=xe,gt.formToJSON=e=>we(G.isHTMLForm(e)?new FormData(e):e),gt.getAdapter=ot,gt.HttpStatusCode=bt,gt.default=gt;var wt=gt,Et="https://speakeasy-1dxj.onrender.com/speakeasy",Ot=function(e){return r(void 0,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,wt.get("".concat(Et,"/reviews/").concat(e))];case 1:return[2,t.sent().data];case 2:return[2,t.sent()];case 3:return[2]}})})},vt=function(e){return r(void 0,void 0,void 0,function(){return o(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,wt.get("".concat(Et,"/blogs/").concat(e))];case 1:return[2,t.sent().data];case 2:return[2,t.sent()];case 3:return[2]}})})},St=function(e,t){return r(void 0,[e,t],void 0,function(e,t){var n,r=t.name,s=void 0===r?"":r,i=t.email,a=t.phone,c=void 0===a?"":a,u=t.subject,l=void 0===u?"":u,f=t.message;return o(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),n={name:s,email:i,phone:c,subject:l,message:f},[4,wt.post("".concat(Et,"/message/").concat(e),n)];case 1:return[2,t.sent().data];case 2:return[2,t.sent()];case 3:return[2]}})})};export{s as VisitorTracker,vt as getBlogs,Ot as getReviews,St as sendMessage};
|
|
2
|
+
//# sourceMappingURL=index.esm.js.map
|