@skip-go/widget-web-component 3.14.3 → 3.17.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/build/1125.index.js +3 -0
- package/build/1133.index.js +8 -0
- package/build/1136.index.js +9 -0
- package/build/1139.index.js +18 -0
- package/build/1171.index.js +1 -1
- package/build/1189.index.js +1 -1
- package/build/1203.index.js +1 -1
- package/build/1207.index.js +1 -1
- package/build/1211.index.js +8 -0
- package/build/1226.index.js +8 -0
- package/build/1349.index.js +1 -1
- package/build/1361.index.js +1 -1
- package/build/1363.index.js +1 -1
- package/build/1370.index.js +1 -1
- package/build/1415.index.js +8 -0
- package/build/1426.index.js +3 -0
- package/build/1470.index.js +1 -1
- package/build/1572.index.js +11 -0
- package/build/1716.index.js +1 -1
- package/build/1776.index.js +8 -0
- package/build/1852.index.js +1 -1
- package/build/1881.index.js +1 -1
- package/build/1894.index.js +1 -1
- package/build/1911.index.js +1 -1
- package/build/1951.index.js +18 -0
- package/build/1979.index.js +30 -0
- package/build/2034.index.js +1 -1
- package/build/2131.index.js +1 -1
- package/build/2166.index.js +1 -1
- package/build/2202.index.js +61 -0
- package/build/2242.index.js +1 -1
- package/build/2289.index.js +8 -0
- package/build/2301.index.js +1 -1
- package/build/2410.index.js +1 -1
- package/build/2422.index.js +1 -0
- package/build/245.index.js +1 -1
- package/build/2496.index.js +1 -1
- package/build/2557.index.js +17 -0
- package/build/2699.index.js +1 -1
- package/build/2715.index.js +8 -0
- package/build/283.index.js +8 -0
- package/build/2844.index.js +13 -0
- package/build/2851.index.js +1 -0
- package/build/2902.index.js +15 -0
- package/build/3070.index.js +1 -1
- package/build/3099.index.js +8 -0
- package/build/3105.index.js +8 -0
- package/build/3131.index.js +6 -0
- package/build/3148.index.js +1 -1
- package/build/3472.index.js +1 -1
- package/build/3550.index.js +8 -0
- package/build/3574.index.js +1 -1
- package/build/362.index.js +12 -0
- package/build/3646.index.js +32 -0
- package/build/3726.index.js +1 -1
- package/build/3828.index.js +14 -0
- package/build/385.index.js +1 -1
- package/build/3857.index.js +14 -0
- package/build/3874.index.js +17 -0
- package/build/4028.index.js +1 -1
- package/build/4150.index.js +620 -0
- package/build/4194.index.js +317 -0
- package/build/4203.index.js +1 -1
- package/build/4226.index.js +14 -0
- package/build/4249.index.js +8 -0
- package/build/4264.index.js +1 -0
- package/build/428.index.js +1 -0
- package/build/4289.index.js +1 -1
- package/build/4319.index.js +1 -1
- package/build/4379.index.js +2069 -0
- package/build/4446.index.js +2 -0
- package/build/4683.index.js +1 -1
- package/build/4693.index.js +2 -2
- package/build/4729.index.js +1 -1
- package/build/4733.index.js +12 -0
- package/build/4857.index.js +12 -0
- package/build/4969.index.js +1 -1
- package/build/5069.index.js +1 -1
- package/build/5090.index.js +8 -0
- package/build/5193.index.js +1 -1
- package/build/5206.index.js +14 -0
- package/build/5218.index.js +6 -0
- package/build/5330.index.js +8 -0
- package/build/537.index.js +1 -1
- package/build/5438.index.js +9 -0
- package/build/5526.index.js +1 -1
- package/build/5572.index.js +1 -1
- package/build/5619.index.js +1 -1
- package/build/5642.index.js +2 -0
- package/build/5647.index.js +1 -1
- package/build/5737.index.js +1 -1
- package/build/577.index.js +8 -0
- package/build/5880.index.js +1 -1
- package/build/590.index.js +1 -1
- package/build/5972.index.js +622 -0
- package/build/602.index.js +9 -0
- package/build/6024.index.js +1 -1
- package/build/6036.index.js +8 -0
- package/build/6075.index.js +1 -1
- package/build/6123.index.js +1 -1
- package/build/6127.index.js +1 -1
- package/build/6138.index.js +18 -0
- package/build/6148.index.js +1 -1
- package/build/6151.index.js +1 -1
- package/build/6175.index.js +4 -0
- package/build/631.index.js +18 -0
- package/build/6323.index.js +1 -1
- package/build/6442.index.js +1 -1
- package/build/6484.index.js +1 -1
- package/build/6543.index.js +1 -1
- package/build/6553.index.js +8 -0
- package/build/6558.index.js +1 -0
- package/build/6573.index.js +1 -1
- package/build/6611.index.js +12 -0
- package/build/6639.index.js +8 -0
- package/build/6654.index.js +1 -0
- package/build/6705.index.js +12 -0
- package/build/6715.index.js +12 -0
- package/build/674.index.js +317 -0
- package/build/674.index.js.LICENSE.txt +17 -0
- package/build/6753.index.js +1 -1
- package/build/6811.index.js +8 -0
- package/build/6813.index.js +4 -0
- package/build/6869.index.js +1 -1
- package/build/6969.index.js +12 -0
- package/build/7172.index.js +1 -1
- package/build/7176.index.js +16 -0
- package/build/7201.index.js +878 -0
- package/build/7272.index.js +6 -0
- package/build/7311.index.js +11 -0
- package/build/7409.index.js +1 -0
- package/build/7428.index.js +4 -0
- package/build/7540.index.js +8 -0
- package/build/7618.index.js +1 -1
- package/build/7762.index.js +1 -1
- package/build/7780.index.js +3 -0
- package/build/7981.index.js +1 -1
- package/build/8000.index.js +1 -1
- package/build/8029.index.js +8 -0
- package/build/8036.index.js +1 -1
- package/build/8147.index.js +16 -0
- package/build/8249.index.js +8 -0
- package/build/8318.index.js +1 -1
- package/build/8367.index.js +1 -1
- package/build/8373.index.js +2082 -0
- package/build/8373.index.js.LICENSE.txt +5 -0
- package/build/8467.index.js +1 -1
- package/build/8483.index.js +1 -1
- package/build/8631.index.js +8 -0
- package/build/8645.index.js +2 -0
- package/build/8645.index.js.LICENSE.txt +11 -0
- package/build/8714.index.js +8 -0
- package/build/8717.index.js +6 -0
- package/build/8904.index.js +1 -1
- package/build/896.index.js +1 -1
- package/build/8964.index.js +26 -0
- package/build/897.index.js +11 -0
- package/build/9081.index.js +8 -0
- package/build/9120.index.js +8 -0
- package/build/913.index.js +15 -0
- package/build/9192.index.js +1 -0
- package/build/9194.index.js +878 -4
- package/build/9309.index.js +15 -0
- package/build/9313.index.js +8 -0
- package/build/9372.index.js +1 -1
- package/build/9396.index.js +12 -0
- package/build/9476.index.js +1 -1
- package/build/9607.index.js +8 -0
- package/build/967.index.js +5 -0
- package/build/984.index.js +8 -0
- package/build/9850.index.js +14 -0
- package/build/9884.index.js +1 -1
- package/build/index.js +769 -1633
- package/build/index.js.LICENSE.txt +6 -16
- package/package.json +1 -1
- package/build/1179.index.js +0 -2
- package/build/1256.index.js +0 -317
- package/build/1934.index.js +0 -2
- package/build/1934.index.js.LICENSE.txt +0 -17
- package/build/4619.index.js +0 -622
- package/build/4833.index.js +0 -2
- package/build/5902.index.js +0 -2
- package/build/6319.index.js +0 -2069
- package/build/6700.index.js +0 -1
- package/build/7084.index.js +0 -2
- package/build/7544.index.js +0 -1
- package/build/7591.index.js +0 -1
- package/build/8780.index.js +0 -1
- /package/build/{1256.index.js.LICENSE.txt → 4194.index.js.LICENSE.txt} +0 -0
- /package/build/{6319.index.js.LICENSE.txt → 4379.index.js.LICENSE.txt} +0 -0
- /package/build/{4833.index.js.LICENSE.txt → 4446.index.js.LICENSE.txt} +0 -0
- /package/build/{1179.index.js.LICENSE.txt → 5642.index.js.LICENSE.txt} +0 -0
- /package/build/{5902.index.js.LICENSE.txt → 7201.index.js.LICENSE.txt} +0 -0
- /package/build/{7084.index.js.LICENSE.txt → 9194.index.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const __webpack_esm_id__=3105;export const __webpack_esm_ids__=[3105];export const __webpack_esm_modules__={23105:(e,o,C)=>{C.r(o),C.d(o,{swapHorizontalRoundedBoldSvg:()=>_});const _=C(35842).JW`<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 20 20" fill="none">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
fill-rule="evenodd"
|
|
5
|
+
clip-rule="evenodd"
|
|
6
|
+
d="M8.3071 0.292893C8.69763 0.683417 8.69763 1.31658 8.3071 1.70711L6.41421 3.6H11.3404C13.8368 3.6 16.0533 5.1975 16.8427 7.56588L16.9487 7.88377C17.1233 8.40772 16.8402 8.97404 16.3162 9.14868C15.7923 9.32333 15.226 9.04017 15.0513 8.51623L14.9453 8.19834C14.4281 6.64664 12.976 5.6 11.3404 5.6H6.41421L8.3071 7.49289C8.69763 7.88342 8.69763 8.51658 8.3071 8.90711C7.91658 9.29763 7.28341 9.29763 6.89289 8.90711L3.29289 5.30711C2.90236 4.91658 2.90236 4.28342 3.29289 3.89289L6.89289 0.292893C7.28341 -0.0976311 7.91658 -0.0976311 8.3071 0.292893ZM3.68377 10.8513C4.20771 10.6767 4.77403 10.9598 4.94868 11.4838L5.05464 11.8017C5.57188 13.3534 7.024 14.4 8.65964 14.4L13.5858 14.4L11.6929 12.5071C11.3024 12.1166 11.3024 11.4834 11.6929 11.0929C12.0834 10.7024 12.7166 10.7024 13.1071 11.0929L16.7071 14.6929C17.0976 15.0834 17.0976 15.7166 16.7071 16.1071L13.1071 19.7071C12.7166 20.0976 12.0834 20.0976 11.6929 19.7071C11.3024 19.3166 11.3024 18.6834 11.6929 18.2929L13.5858 16.4L8.65964 16.4C6.16314 16.4 3.94674 14.8025 3.15728 12.4341L3.05131 12.1162C2.87667 11.5923 3.15983 11.026 3.68377 10.8513Z"
|
|
7
|
+
/>
|
|
8
|
+
</svg>`}};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export const __webpack_esm_id__=3131;export const __webpack_esm_ids__=[3131];export const __webpack_esm_modules__={13131:(c,_,e)=>{e.r(_),e.d(_,{etherscanSvg:()=>o});const o=e(35842).JW`<svg fill="none" viewBox="0 0 16 16">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M4.25 7a.63.63 0 0 0-.63.63v3.97c0 .28-.2.51-.47.54l-.75.07a.93.93 0 0 1-.9-.47A7.51 7.51 0 0 1 5.54.92a7.5 7.5 0 0 1 9.54 4.62c.12.35.06.72-.16 1-.74.97-1.68 1.78-2.6 2.44V4.44a.64.64 0 0 0-.63-.64h-1.06c-.35 0-.63.3-.63.64v5.5c0 .23-.12.42-.32.5l-.52.23V6.05c0-.36-.3-.64-.64-.64H7.45c-.35 0-.64.3-.64.64v4.97c0 .25-.17.46-.4.52a5.8 5.8 0 0 0-.45.11v-4c0-.36-.3-.65-.64-.65H4.25ZM14.07 12.4A7.49 7.49 0 0 1 3.6 14.08c4.09-.58 9.14-2.5 11.87-6.6v.03a7.56 7.56 0 0 1-1.41 4.91Z"
|
|
5
|
+
/>
|
|
6
|
+
</svg>`}};
|
package/build/3148.index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_id__=3148;export const __webpack_esm_ids__=[3148];export const __webpack_esm_modules__={53148:(C,e,_)=>{_.r(e),_.d(e,{sendSvg:()=>o});const o=_(52788).JW`<svg fill="none" viewBox="0 0 21 20">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|
package/build/3472.index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_id__=3472;export const __webpack_esm_ids__=[3472];export const __webpack_esm_modules__={13472:(e,_,l)=>{l.r(_),l.d(_,{closeSvg:()=>o});const o=l(52788).JW`<svg fill="none" viewBox="0 0 16 16">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export const __webpack_esm_id__=3550;export const __webpack_esm_ids__=[3550];export const __webpack_esm_modules__={3550:(l,e,_)=>{_.r(e),_.d(e,{verifyFilledSvg:()=>c});const c=_(35842).JW`<svg fill="none" viewBox="0 0 14 14">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
fill-rule="evenodd"
|
|
5
|
+
d="m4.1 12.43-.45-.78-.93-.2a1.65 1.65 0 0 1-1.31-1.8l.1-.86-.61-.71a1.65 1.65 0 0 1 0-2.16l.6-.7-.09-.85c-.1-.86.47-1.64 1.3-1.81l.94-.2.45-.78A1.65 1.65 0 0 1 6.23.9l.77.36.78-.36c.77-.36 1.69-.07 2.12.66l.47.8.91.2c.84.17 1.4.95 1.31 1.8l-.1.86.6.7c.54.62.54 1.54.01 2.16l-.6.71.09.86c.1.85-.47 1.63-1.3 1.8l-.92.2-.47.79a1.65 1.65 0 0 1-2.12.66L7 12.74l-.77.36c-.78.35-1.7.07-2.13-.67Zm5.74-6.9a1 1 0 1 0-1.68-1.07L6.32 7.3l-.55-.66a1 1 0 0 0-1.54 1.28l1.43 1.71a1 1 0 0 0 1.61-.1l2.57-4Z"
|
|
6
|
+
clip-rule="evenodd"
|
|
7
|
+
/>
|
|
8
|
+
</svg>`}};
|
package/build/3574.index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_id__=3574;export const __webpack_esm_ids__=[3574];export const __webpack_esm_modules__={23574:(e,_,o)=>{o.r(_),o.d(_,{swapHorizontalBoldSvg:()=>C});const C=o(52788).JW`<svg width="10" height="10" viewBox="0 0 10 10">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const __webpack_esm_id__=362;export const __webpack_esm_ids__=[362];export const __webpack_esm_modules__={60362:(l,_,e)=>{e.r(_),e.d(_,{xSvg:()=>p});const p=e(35842).JW`<svg fill="none" viewBox="0 0 41 40">
|
|
2
|
+
<g clip-path="url(#a)">
|
|
3
|
+
<path fill="#000" d="M.8 0h40v40H.8z" />
|
|
4
|
+
<path
|
|
5
|
+
fill="#fff"
|
|
6
|
+
d="m22.63 18.46 7.14-8.3h-1.69l-6.2 7.2-4.96-7.2H11.2l7.5 10.9-7.5 8.71h1.7l6.55-7.61 5.23 7.61h5.72l-7.77-11.31Zm-9.13-7.03h2.6l11.98 17.13h-2.6L13.5 11.43Z"
|
|
7
|
+
/>
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<clipPath id="a"><path fill="#fff" d="M.8 20a20 20 0 1 1 40 0 20 20 0 0 1-40 0Z" /></clipPath>
|
|
11
|
+
</defs>
|
|
12
|
+
</svg>`}};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export const __webpack_esm_id__=3646;export const __webpack_esm_ids__=[3646];export const __webpack_esm_modules__={63646:(a,t,l)=>{l.r(t),l.d(t,{playStoreSvg:()=>_});const _=l(35842).JW` <svg
|
|
2
|
+
width="36"
|
|
3
|
+
height="36"
|
|
4
|
+
fill="none"
|
|
5
|
+
>
|
|
6
|
+
<path
|
|
7
|
+
d="M0 8a8 8 0 0 1 8-8h20a8 8 0 0 1 8 8v20a8 8 0 0 1-8 8H8a8 8 0 0 1-8-8V8Z"
|
|
8
|
+
fill="#fff"
|
|
9
|
+
fill-opacity=".05"
|
|
10
|
+
/>
|
|
11
|
+
<path
|
|
12
|
+
d="m18.262 17.513-8.944 9.49v.01a2.417 2.417 0 0 0 3.56 1.452l.026-.017 10.061-5.803-4.703-5.132Z"
|
|
13
|
+
fill="#EA4335"
|
|
14
|
+
/>
|
|
15
|
+
<path
|
|
16
|
+
d="m27.307 15.9-.008-.008-4.342-2.52-4.896 4.36 4.913 4.912 4.325-2.494a2.42 2.42 0 0 0 .008-4.25Z"
|
|
17
|
+
fill="#FBBC04"
|
|
18
|
+
/>
|
|
19
|
+
<path
|
|
20
|
+
d="M9.318 8.997c-.05.202-.084.403-.084.622V26.39c0 .218.025.42.084.621l9.246-9.247-9.246-8.768Z"
|
|
21
|
+
fill="#4285F4"
|
|
22
|
+
/>
|
|
23
|
+
<path
|
|
24
|
+
d="m18.33 18 4.627-4.628-10.053-5.828a2.427 2.427 0 0 0-3.586 1.444L18.329 18Z"
|
|
25
|
+
fill="#34A853"
|
|
26
|
+
/>
|
|
27
|
+
<path
|
|
28
|
+
d="M8 .5h20A7.5 7.5 0 0 1 35.5 8v20a7.5 7.5 0 0 1-7.5 7.5H8A7.5 7.5 0 0 1 .5 28V8A7.5 7.5 0 0 1 8 .5Z"
|
|
29
|
+
stroke="#fff"
|
|
30
|
+
stroke-opacity=".05"
|
|
31
|
+
/>
|
|
32
|
+
</svg>`}};
|
package/build/3726.index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const __webpack_id__=3726;export const __webpack_ids__=[3726];export const __webpack_modules__={11287:e=>{e.exports=window.FormData},33726:(e,t,i)=>{i.r(t),i.d(t,{Account:()=>b,AppwriteException:()=>g,AuthenticationFactor:()=>s,AuthenticatorType:()=>r,Avatars:()=>I,Browser:()=>c,Client:()=>y,CreditCard:()=>d,Databases:()=>M,ExecutionMethod:()=>p,Flag:()=>l,Functions:()=>q,Graphql:()=>j,ID:()=>E,ImageFormat:()=>h,ImageGravity:()=>u,Locale:()=>R,Messaging:()=>U,OAuthProvider:()=>a,Permission:()=>L,Query:()=>w,Role:()=>A,Storage:()=>S,Teams:()=>k}),i(11287);var n,o,r,s,a,c,d,l,p,u,h,f=i(57582);function m(e,t,i,n){return new(i||(i=Promise))((function(o,r){function s(e){try{c(n.next(e))}catch(e){r(e)}}function a(e){try{c(n.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((n=n.apply(e,t||[])).next())}))}class v{constructor(e){this.client=e}static flatten(e,t=""){let i={};for(const[n,o]of Object.entries(e)){let e=t?t+"["+n+"]":n;Array.isArray(o)?i=Object.assign(Object.assign({},i),v.flatten(o,e)):i[e]=o}return i}}v.CHUNK_SIZE=5242880;class w{constructor(e,t,i){this.method=e,this.attribute=t,void 0!==i&&(Array.isArray(i)?this.values=i:this.values=[i])}toString(){return JSON.stringify({method:this.method,attribute:this.attribute,values:this.values})}}w.equal=(e,t)=>new w("equal",e,t).toString(),w.notEqual=(e,t)=>new w("notEqual",e,t).toString(),w.lessThan=(e,t)=>new w("lessThan",e,t).toString(),w.lessThanEqual=(e,t)=>new w("lessThanEqual",e,t).toString(),w.greaterThan=(e,t)=>new w("greaterThan",e,t).toString(),w.greaterThanEqual=(e,t)=>new w("greaterThanEqual",e,t).toString(),w.isNull=e=>new w("isNull",e).toString(),w.isNotNull=e=>new w("isNotNull",e).toString(),w.between=(e,t,i)=>new w("between",e,[t,i]).toString(),w.startsWith=(e,t)=>new w("startsWith",e,t).toString(),w.endsWith=(e,t)=>new w("endsWith",e,t).toString(),w.select=e=>new w("select",void 0,e).toString(),w.search=(e,t)=>new w("search",e,t).toString(),w.orderDesc=e=>new w("orderDesc",e).toString(),w.orderAsc=e=>new w("orderAsc",e).toString(),w.cursorAfter=e=>new w("cursorAfter",void 0,e).toString(),w.cursorBefore=e=>new w("cursorBefore",void 0,e).toString(),w.limit=e=>new w("limit",void 0,e).toString(),w.offset=e=>new w("offset",void 0,e).toString(),w.contains=(e,t)=>new w("contains",e,t).toString(),w.or=e=>new w("or",void 0,e.map((e=>JSON.parse(e)))).toString(),w.and=e=>new w("and",void 0,e.map((e=>JSON.parse(e)))).toString();class g extends Error{constructor(e,t=0,i="",n=""){super(e),this.name="AppwriteException",this.message=e,this.code=t,this.type=i,this.response=n}}class y{constructor(){this.config={endpoint:"https://cloud.appwrite.io/v1",endpointRealtime:"",project:"",jwt:"",locale:"",session:""},this.headers={"x-sdk-name":"Web","x-sdk-platform":"client","x-sdk-language":"web","x-sdk-version":"14.0.1","X-Appwrite-Response-Format":"1.5.0"},this.realtime={socket:void 0,timeout:void 0,url:"",channels:new Set,subscriptions:new Map,subscriptionsCounter:0,reconnect:!0,reconnectAttempts:0,lastMessage:void 0,connect:()=>{clearTimeout(this.realtime.timeout),this.realtime.timeout=null===window||void 0===window?void 0:window.setTimeout((()=>{this.realtime.createSocket()}),50)},getTimeout:()=>{switch(!0){case this.realtime.reconnectAttempts<5:return 1e3;case this.realtime.reconnectAttempts<15:return 5e3;case this.realtime.reconnectAttempts<100:return 1e4;default:return 6e4}},createSocket:()=>{var e,t,i;if(this.realtime.channels.size<1)return this.realtime.reconnect=!1,void(null===(e=this.realtime.socket)||void 0===e||e.close());const n=new URLSearchParams;n.set("project",this.config.project),this.realtime.channels.forEach((e=>{n.append("channels[]",e)}));const o=this.config.endpointRealtime+"/realtime?"+n.toString();(o!==this.realtime.url||!this.realtime.socket||(null===(t=this.realtime.socket)||void 0===t?void 0:t.readyState)>WebSocket.OPEN)&&(this.realtime.socket&&(null===(i=this.realtime.socket)||void 0===i?void 0:i.readyState)<WebSocket.CLOSING&&(this.realtime.reconnect=!1,this.realtime.socket.close()),this.realtime.url=o,this.realtime.socket=new WebSocket(o),this.realtime.socket.addEventListener("message",this.realtime.onMessage),this.realtime.socket.addEventListener("open",(e=>{this.realtime.reconnectAttempts=0})),this.realtime.socket.addEventListener("close",(e=>{var t,i,n;if(!this.realtime.reconnect||"error"===(null===(i=null===(t=this.realtime)||void 0===t?void 0:t.lastMessage)||void 0===i?void 0:i.type)&&1008===(null===(n=this.realtime)||void 0===n?void 0:n.lastMessage.data).code)return void(this.realtime.reconnect=!0);const o=this.realtime.getTimeout();console.error(`Realtime got disconnected. Reconnect will be attempted in ${o/1e3} seconds.`,e.reason),setTimeout((()=>{this.realtime.reconnectAttempts++,this.realtime.createSocket()}),o)})))},onMessage:e=>{var t,i;try{const n=JSON.parse(e.data);switch(this.realtime.lastMessage=n,n.type){case"connected":const e=JSON.parse(null!==(t=window.localStorage.getItem("cookieFallback"))&&void 0!==t?t:"{}"),o=null==e?void 0:e[`a_session_${this.config.project}`],r=n.data;o&&!r.user&&(null===(i=this.realtime.socket)||void 0===i||i.send(JSON.stringify({type:"authentication",data:{session:o}})));break;case"event":let s=n.data;if(null==s?void 0:s.channels){if(!s.channels.some((e=>this.realtime.channels.has(e))))return;this.realtime.subscriptions.forEach((e=>{s.channels.some((t=>e.channels.includes(t)))&&setTimeout((()=>e.callback(s)))}))}break;case"error":throw n.data}}catch(e){console.error(e)}},cleanUp:e=>{this.realtime.channels.forEach((t=>{e.includes(t)&&(Array.from(this.realtime.subscriptions).some((([e,i])=>i.channels.includes(t)))||this.realtime.channels.delete(t))}))}}}setEndpoint(e){return this.config.endpoint=e,this.config.endpointRealtime=this.config.endpointRealtime||this.config.endpoint.replace("https://","wss://").replace("http://","ws://"),this}setEndpointRealtime(e){return this.config.endpointRealtime=e,this}setProject(e){return this.headers["X-Appwrite-Project"]=e,this.config.project=e,this}setJWT(e){return this.headers["X-Appwrite-JWT"]=e,this.config.jwt=e,this}setLocale(e){return this.headers["X-Appwrite-Locale"]=e,this.config.locale=e,this}setSession(e){return this.headers["X-Appwrite-Session"]=e,this.config.session=e,this}subscribe(e,t){let i="string"==typeof e?[e]:e;i.forEach((e=>this.realtime.channels.add(e)));const n=this.realtime.subscriptionsCounter++;return this.realtime.subscriptions.set(n,{channels:i,callback:t}),this.realtime.connect(),()=>{this.realtime.subscriptions.delete(n),this.realtime.cleanUp(i),this.realtime.connect()}}call(e,t,i={},n={}){var o,r;return m(this,void 0,void 0,(function*(){e=e.toUpperCase(),i=Object.assign({},this.headers,i);let s={method:e,headers:i,credentials:"include"};if("undefined"!=typeof window&&window.localStorage&&(i["X-Fallback-Cookies"]=null!==(o=window.localStorage.getItem("cookieFallback"))&&void 0!==o?o:""),"GET"===e)for(const[e,i]of Object.entries(v.flatten(n)))t.searchParams.append(e,i);else switch(i["content-type"]){case"application/json":s.body=JSON.stringify(n);break;case"multipart/form-data":let e=new FormData;for(const t in n)Array.isArray(n[t])?n[t].forEach((i=>{e.append(t+"[]",i)})):e.append(t,n[t]);s.body=e,delete i["content-type"]}try{let e=null;const i=yield(0,f.fetch)(t.toString(),s);if(e=(null===(r=i.headers.get("content-type"))||void 0===r?void 0:r.includes("application/json"))?yield i.json():{message:yield i.text()},400<=i.status)throw new g(null==e?void 0:e.message,i.status,null==e?void 0:e.type,e);const n=i.headers.get("X-Fallback-Cookies");return"undefined"!=typeof window&&window.localStorage&&n&&(window.console.warn("Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint."),window.localStorage.setItem("cookieFallback",n)),e}catch(e){if(e instanceof g)throw e;throw new g(e.message)}}))}}class b extends v{constructor(e){super(e)}get(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}create(e,t,i,n){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "email"');if(void 0===i)throw new g('Missing required parameter: "password"');const o={};void 0!==e&&(o.userId=e),void 0!==t&&(o.email=t),void 0!==i&&(o.password=i),void 0!==n&&(o.name=n);const r=new URL(this.client.config.endpoint+"/account");return yield this.client.call("post",r,{"content-type":"application/json"},o)}))}updateEmail(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "email"');if(void 0===t)throw new g('Missing required parameter: "password"');const i={};void 0!==e&&(i.email=e),void 0!==t&&(i.password=t);const n=new URL(this.client.config.endpoint+"/account/email");return yield this.client.call("patch",n,{"content-type":"application/json"},i)}))}listIdentities(e){return m(this,void 0,void 0,(function*(){const t={};void 0!==e&&(t.queries=e);const i=new URL(this.client.config.endpoint+"/account/identities");return yield this.client.call("get",i,{"content-type":"application/json"},t)}))}deleteIdentity(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "identityId"');const t="/account/identities/{identityId}".replace("{identityId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})}))}createJWT(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/jwt");return yield this.client.call("post",e,{"content-type":"application/json"},{})}))}listLogs(e){return m(this,void 0,void 0,(function*(){const t={};void 0!==e&&(t.queries=e);const i=new URL(this.client.config.endpoint+"/account/logs");return yield this.client.call("get",i,{"content-type":"application/json"},t)}))}updateMFA(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "mfa"');const t={};void 0!==e&&(t.mfa=e);const i=new URL(this.client.config.endpoint+"/account/mfa");return yield this.client.call("patch",i,{"content-type":"application/json"},t)}))}createMfaAuthenticator(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "type"');const t="/account/mfa/authenticators/{type}".replace("{type}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("post",i,{"content-type":"application/json"},{})}))}updateMfaAuthenticator(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "type"');if(void 0===t)throw new g('Missing required parameter: "otp"');const i="/account/mfa/authenticators/{type}".replace("{type}",e),n={};void 0!==t&&(n.otp=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)}))}deleteMfaAuthenticator(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "type"');if(void 0===t)throw new g('Missing required parameter: "otp"');const i="/account/mfa/authenticators/{type}".replace("{type}",e),n={};void 0!==t&&(n.otp=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("delete",o,{"content-type":"application/json"},n)}))}createMfaChallenge(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "factor"');const t={};void 0!==e&&(t.factor=e);const i=new URL(this.client.config.endpoint+"/account/mfa/challenge");return yield this.client.call("post",i,{"content-type":"application/json"},t)}))}updateMfaChallenge(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "challengeId"');if(void 0===t)throw new g('Missing required parameter: "otp"');const i={};void 0!==e&&(i.challengeId=e),void 0!==t&&(i.otp=t);const n=new URL(this.client.config.endpoint+"/account/mfa/challenge");return yield this.client.call("put",n,{"content-type":"application/json"},i)}))}listMfaFactors(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/mfa/factors");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}getMfaRecoveryCodes(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/mfa/recovery-codes");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}createMfaRecoveryCodes(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/mfa/recovery-codes");return yield this.client.call("post",e,{"content-type":"application/json"},{})}))}updateMfaRecoveryCodes(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/mfa/recovery-codes");return yield this.client.call("patch",e,{"content-type":"application/json"},{})}))}updateName(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "name"');const t={};void 0!==e&&(t.name=e);const i=new URL(this.client.config.endpoint+"/account/name");return yield this.client.call("patch",i,{"content-type":"application/json"},t)}))}updatePassword(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "password"');const i={};void 0!==e&&(i.password=e),void 0!==t&&(i.oldPassword=t);const n=new URL(this.client.config.endpoint+"/account/password");return yield this.client.call("patch",n,{"content-type":"application/json"},i)}))}updatePhone(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "phone"');if(void 0===t)throw new g('Missing required parameter: "password"');const i={};void 0!==e&&(i.phone=e),void 0!==t&&(i.password=t);const n=new URL(this.client.config.endpoint+"/account/phone");return yield this.client.call("patch",n,{"content-type":"application/json"},i)}))}getPrefs(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/prefs");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}updatePrefs(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "prefs"');const t={};void 0!==e&&(t.prefs=e);const i=new URL(this.client.config.endpoint+"/account/prefs");return yield this.client.call("patch",i,{"content-type":"application/json"},t)}))}createRecovery(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "email"');if(void 0===t)throw new g('Missing required parameter: "url"');const i={};void 0!==e&&(i.email=e),void 0!==t&&(i.url=t);const n=new URL(this.client.config.endpoint+"/account/recovery");return yield this.client.call("post",n,{"content-type":"application/json"},i)}))}updateRecovery(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');if(void 0===i)throw new g('Missing required parameter: "password"');const n={};void 0!==e&&(n.userId=e),void 0!==t&&(n.secret=t),void 0!==i&&(n.password=i);const o=new URL(this.client.config.endpoint+"/account/recovery");return yield this.client.call("put",o,{"content-type":"application/json"},n)}))}listSessions(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/sessions");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}deleteSessions(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/sessions");return yield this.client.call("delete",e,{"content-type":"application/json"},{})}))}createAnonymousSession(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/sessions/anonymous");return yield this.client.call("post",e,{"content-type":"application/json"},{})}))}createEmailPasswordSession(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "email"');if(void 0===t)throw new g('Missing required parameter: "password"');const i={};void 0!==e&&(i.email=e),void 0!==t&&(i.password=t);const n=new URL(this.client.config.endpoint+"/account/sessions/email");return yield this.client.call("post",n,{"content-type":"application/json"},i)}))}updateMagicURLSession(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/sessions/magic-url");return yield this.client.call("put",n,{"content-type":"application/json"},i)}))}createOAuth2Session(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "provider"');const o="/account/sessions/oauth2/{provider}".replace("{provider}",e),r={};void 0!==t&&(r.success=t),void 0!==i&&(r.failure=i),void 0!==n&&(r.scopes=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);if("undefined"==typeof window||!(null===window||void 0===window?void 0:window.location))return s;window.location.href=s.toString()}updatePhoneSession(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/sessions/phone");return yield this.client.call("put",n,{"content-type":"application/json"},i)}))}createSession(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/sessions/token");return yield this.client.call("post",n,{"content-type":"application/json"},i)}))}getSession(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "sessionId"');const t="/account/sessions/{sessionId}".replace("{sessionId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("get",i,{"content-type":"application/json"},{})}))}updateSession(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "sessionId"');const t="/account/sessions/{sessionId}".replace("{sessionId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("patch",i,{"content-type":"application/json"},{})}))}deleteSession(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "sessionId"');const t="/account/sessions/{sessionId}".replace("{sessionId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})}))}updateStatus(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/status");return yield this.client.call("patch",e,{"content-type":"application/json"},{})}))}createPushTarget(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "targetId"');if(void 0===t)throw new g('Missing required parameter: "identifier"');const n={};void 0!==e&&(n.targetId=e),void 0!==t&&(n.identifier=t),void 0!==i&&(n.providerId=i);const o=new URL(this.client.config.endpoint+"/account/targets/push");return yield this.client.call("post",o,{"content-type":"application/json"},n)}))}updatePushTarget(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "targetId"');if(void 0===t)throw new g('Missing required parameter: "identifier"');const i="/account/targets/{targetId}/push".replace("{targetId}",e),n={};void 0!==t&&(n.identifier=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)}))}deletePushTarget(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "targetId"');const t="/account/targets/{targetId}/push".replace("{targetId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})}))}createEmailToken(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "email"');const n={};void 0!==e&&(n.userId=e),void 0!==t&&(n.email=t),void 0!==i&&(n.phrase=i);const o=new URL(this.client.config.endpoint+"/account/tokens/email");return yield this.client.call("post",o,{"content-type":"application/json"},n)}))}createMagicURLToken(e,t,i,n){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "email"');const o={};void 0!==e&&(o.userId=e),void 0!==t&&(o.email=t),void 0!==i&&(o.url=i),void 0!==n&&(o.phrase=n);const r=new URL(this.client.config.endpoint+"/account/tokens/magic-url");return yield this.client.call("post",r,{"content-type":"application/json"},o)}))}createOAuth2Token(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "provider"');const o="/account/tokens/oauth2/{provider}".replace("{provider}",e),r={};void 0!==t&&(r.success=t),void 0!==i&&(r.failure=i),void 0!==n&&(r.scopes=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);if("undefined"==typeof window||!(null===window||void 0===window?void 0:window.location))return s;window.location.href=s.toString()}createPhoneToken(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "phone"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.phone=t);const n=new URL(this.client.config.endpoint+"/account/tokens/phone");return yield this.client.call("post",n,{"content-type":"application/json"},i)}))}createVerification(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "url"');const t={};void 0!==e&&(t.url=e);const i=new URL(this.client.config.endpoint+"/account/verification");return yield this.client.call("post",i,{"content-type":"application/json"},t)}))}updateVerification(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/verification");return yield this.client.call("put",n,{"content-type":"application/json"},i)}))}createPhoneVerification(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/account/verification/phone");return yield this.client.call("post",e,{"content-type":"application/json"},{})}))}updatePhoneVerification(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/verification/phone");return yield this.client.call("put",n,{"content-type":"application/json"},i)}))}}class I extends v{constructor(e){super(e)}getBrowser(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "code"');const o="/avatars/browsers/{code}".replace("{code}",e),r={};void 0!==t&&(r.width=t),void 0!==i&&(r.height=i),void 0!==n&&(r.quality=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);return s}getCreditCard(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "code"');const o="/avatars/credit-cards/{code}".replace("{code}",e),r={};void 0!==t&&(r.width=t),void 0!==i&&(r.height=i),void 0!==n&&(r.quality=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);return s}getFavicon(e){if(void 0===e)throw new g('Missing required parameter: "url"');const t={};void 0!==e&&(t.url=e);const i=new URL(this.client.config.endpoint+"/avatars/favicon");t.project=this.client.config.project;for(const[e,n]of Object.entries(v.flatten(t)))i.searchParams.append(e,n);return i}getFlag(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "code"');const o="/avatars/flags/{code}".replace("{code}",e),r={};void 0!==t&&(r.width=t),void 0!==i&&(r.height=i),void 0!==n&&(r.quality=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);return s}getImage(e,t,i){if(void 0===e)throw new g('Missing required parameter: "url"');const n={};void 0!==e&&(n.url=e),void 0!==t&&(n.width=t),void 0!==i&&(n.height=i);const o=new URL(this.client.config.endpoint+"/avatars/image");n.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(n)))o.searchParams.append(e,t);return o}getInitials(e,t,i,n){const o={};void 0!==e&&(o.name=e),void 0!==t&&(o.width=t),void 0!==i&&(o.height=i),void 0!==n&&(o.background=n);const r=new URL(this.client.config.endpoint+"/avatars/initials");o.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(o)))r.searchParams.append(e,t);return r}getQR(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "text"');const o={};void 0!==e&&(o.text=e),void 0!==t&&(o.size=t),void 0!==i&&(o.margin=i),void 0!==n&&(o.download=n);const r=new URL(this.client.config.endpoint+"/avatars/qr");o.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(o)))r.searchParams.append(e,t);return r}}class M extends v{constructor(e){super(e)}listDocuments(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');const n="/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}",e).replace("{collectionId}",t),o={};void 0!==i&&(o.queries=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("get",r,{"content-type":"application/json"},o)}))}createDocument(e,t,i,n,o){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');if(void 0===i)throw new g('Missing required parameter: "documentId"');if(void 0===n)throw new g('Missing required parameter: "data"');const r="/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}",e).replace("{collectionId}",t),s={};void 0!==i&&(s.documentId=i),void 0!==n&&(s.data=n),void 0!==o&&(s.permissions=o);const a=new URL(this.client.config.endpoint+r);return yield this.client.call("post",a,{"content-type":"application/json"},s)}))}getDocument(e,t,i,n){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');if(void 0===i)throw new g('Missing required parameter: "documentId"');const o="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",e).replace("{collectionId}",t).replace("{documentId}",i),r={};void 0!==n&&(r.queries=n);const s=new URL(this.client.config.endpoint+o);return yield this.client.call("get",s,{"content-type":"application/json"},r)}))}updateDocument(e,t,i,n,o){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');if(void 0===i)throw new g('Missing required parameter: "documentId"');const r="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",e).replace("{collectionId}",t).replace("{documentId}",i),s={};void 0!==n&&(s.data=n),void 0!==o&&(s.permissions=o);const a=new URL(this.client.config.endpoint+r);return yield this.client.call("patch",a,{"content-type":"application/json"},s)}))}deleteDocument(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');if(void 0===i)throw new g('Missing required parameter: "documentId"');const n="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",e).replace("{collectionId}",t).replace("{documentId}",i),o=new URL(this.client.config.endpoint+n);return yield this.client.call("delete",o,{"content-type":"application/json"},{})}))}}class q extends v{constructor(e){super(e)}listExecutions(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "functionId"');const n="/functions/{functionId}/executions".replace("{functionId}",e),o={};void 0!==t&&(o.queries=t),void 0!==i&&(o.search=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("get",r,{"content-type":"application/json"},o)}))}createExecution(e,t,i,n,o,r){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "functionId"');const s="/functions/{functionId}/executions".replace("{functionId}",e),a={};void 0!==t&&(a.body=t),void 0!==i&&(a.async=i),void 0!==n&&(a.path=n),void 0!==o&&(a.method=o),void 0!==r&&(a.headers=r);const c=new URL(this.client.config.endpoint+s);return yield this.client.call("post",c,{"content-type":"application/json"},a)}))}getExecution(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "functionId"');if(void 0===t)throw new g('Missing required parameter: "executionId"');const i="/functions/{functionId}/executions/{executionId}".replace("{functionId}",e).replace("{executionId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("get",n,{"content-type":"application/json"},{})}))}}class j extends v{constructor(e){super(e)}query(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "query"');const t={};void 0!==e&&(t.query=e);const i=new URL(this.client.config.endpoint+"/graphql");return yield this.client.call("post",i,{"x-sdk-graphql":"true","content-type":"application/json"},t)}))}mutation(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "query"');const t={};void 0!==e&&(t.query=e);const i=new URL(this.client.config.endpoint+"/graphql/mutation");return yield this.client.call("post",i,{"x-sdk-graphql":"true","content-type":"application/json"},t)}))}}class R extends v{constructor(e){super(e)}get(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/locale");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}listCodes(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/locale/codes");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}listContinents(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/locale/continents");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}listCountries(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/locale/countries");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}listCountriesEU(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/locale/countries/eu");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}listCountriesPhones(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/locale/countries/phones");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}listCurrencies(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/locale/currencies");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}listLanguages(){return m(this,void 0,void 0,(function*(){const e=new URL(this.client.config.endpoint+"/locale/languages");return yield this.client.call("get",e,{"content-type":"application/json"},{})}))}}class U extends v{constructor(e){super(e)}createSubscriber(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "topicId"');if(void 0===t)throw new g('Missing required parameter: "subscriberId"');if(void 0===i)throw new g('Missing required parameter: "targetId"');const n="/messaging/topics/{topicId}/subscribers".replace("{topicId}",e),o={};void 0!==t&&(o.subscriberId=t),void 0!==i&&(o.targetId=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("post",r,{"content-type":"application/json"},o)}))}deleteSubscriber(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "topicId"');if(void 0===t)throw new g('Missing required parameter: "subscriberId"');const i="/messaging/topics/{topicId}/subscribers/{subscriberId}".replace("{topicId}",e).replace("{subscriberId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("delete",n,{"content-type":"application/json"},{})}))}}class S extends v{constructor(e){super(e)}listFiles(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');const n="/storage/buckets/{bucketId}/files".replace("{bucketId}",e),o={};void 0!==t&&(o.queries=t),void 0!==i&&(o.search=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("get",r,{"content-type":"application/json"},o)}))}createFile(e,t,i,n,o=e=>{}){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');if(void 0===i)throw new g('Missing required parameter: "file"');const r="/storage/buckets/{bucketId}/files".replace("{bucketId}",e),s={};void 0!==t&&(s.fileId=t),void 0!==i&&(s.file=i),void 0!==n&&(s.permissions=n);const a=new URL(this.client.config.endpoint+r);if(!(i instanceof File))throw new g('Parameter "file" has to be a File.');const c=i.size;if(c<=v.CHUNK_SIZE)return yield this.client.call("post",a,{"content-type":"multipart/form-data"},s);const d={"content-type":"multipart/form-data"};let l,p=0;if("unique()"!=t)try{l=yield this.client.call("GET",new URL(this.client.config.endpoint+r+"/"+t),d),p=l.chunksUploaded*v.CHUNK_SIZE}catch(e){}for(;p<c;){let e=Math.min(p+v.CHUNK_SIZE-1,c-1);d["content-range"]="bytes "+p+"-"+e+"/"+c,l&&l.$id&&(d["x-appwrite-id"]=l.$id);const t=i.slice(p,e+1);s.file=new File([t],i.name),l=yield this.client.call("post",a,d,s),o&&o({$id:l.$id,progress:p/c*100,sizeUploaded:p,chunksTotal:l.chunksTotal,chunksUploaded:l.chunksUploaded}),p+=v.CHUNK_SIZE}return l}))}getFile(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const i="/storage/buckets/{bucketId}/files/{fileId}".replace("{bucketId}",e).replace("{fileId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("get",n,{"content-type":"application/json"},{})}))}updateFile(e,t,i,n){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const o="/storage/buckets/{bucketId}/files/{fileId}".replace("{bucketId}",e).replace("{fileId}",t),r={};void 0!==i&&(r.name=i),void 0!==n&&(r.permissions=n);const s=new URL(this.client.config.endpoint+o);return yield this.client.call("put",s,{"content-type":"application/json"},r)}))}deleteFile(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const i="/storage/buckets/{bucketId}/files/{fileId}".replace("{bucketId}",e).replace("{fileId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("delete",n,{"content-type":"application/json"},{})}))}getFileDownload(e,t){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const i="/storage/buckets/{bucketId}/files/{fileId}/download".replace("{bucketId}",e).replace("{fileId}",t),n={},o=new URL(this.client.config.endpoint+i);n.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(n)))o.searchParams.append(e,t);return o}getFilePreview(e,t,i,n,o,r,s,a,c,d,l,p,u){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const h="/storage/buckets/{bucketId}/files/{fileId}/preview".replace("{bucketId}",e).replace("{fileId}",t),f={};void 0!==i&&(f.width=i),void 0!==n&&(f.height=n),void 0!==o&&(f.gravity=o),void 0!==r&&(f.quality=r),void 0!==s&&(f.borderWidth=s),void 0!==a&&(f.borderColor=a),void 0!==c&&(f.borderRadius=c),void 0!==d&&(f.opacity=d),void 0!==l&&(f.rotation=l),void 0!==p&&(f.background=p),void 0!==u&&(f.output=u);const m=new URL(this.client.config.endpoint+h);f.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(f)))m.searchParams.append(e,t);return m}getFileView(e,t){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const i="/storage/buckets/{bucketId}/files/{fileId}/view".replace("{bucketId}",e).replace("{fileId}",t),n={},o=new URL(this.client.config.endpoint+i);n.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(n)))o.searchParams.append(e,t);return o}}class k extends v{constructor(e){super(e)}list(e,t){return m(this,void 0,void 0,(function*(){const i={};void 0!==e&&(i.queries=e),void 0!==t&&(i.search=t);const n=new URL(this.client.config.endpoint+"/teams");return yield this.client.call("get",n,{"content-type":"application/json"},i)}))}create(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "name"');const n={};void 0!==e&&(n.teamId=e),void 0!==t&&(n.name=t),void 0!==i&&(n.roles=i);const o=new URL(this.client.config.endpoint+"/teams");return yield this.client.call("post",o,{"content-type":"application/json"},n)}))}get(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');const t="/teams/{teamId}".replace("{teamId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("get",i,{"content-type":"application/json"},{})}))}updateName(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "name"');const i="/teams/{teamId}".replace("{teamId}",e),n={};void 0!==t&&(n.name=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)}))}delete(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');const t="/teams/{teamId}".replace("{teamId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})}))}listMemberships(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');const n="/teams/{teamId}/memberships".replace("{teamId}",e),o={};void 0!==t&&(o.queries=t),void 0!==i&&(o.search=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("get",r,{"content-type":"application/json"},o)}))}createMembership(e,t,i,n,o,r,s){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "roles"');const a="/teams/{teamId}/memberships".replace("{teamId}",e),c={};void 0!==i&&(c.email=i),void 0!==n&&(c.userId=n),void 0!==o&&(c.phone=o),void 0!==t&&(c.roles=t),void 0!==r&&(c.url=r),void 0!==s&&(c.name=s);const d=new URL(this.client.config.endpoint+a);return yield this.client.call("post",d,{"content-type":"application/json"},c)}))}getMembership(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "membershipId"');const i="/teams/{teamId}/memberships/{membershipId}".replace("{teamId}",e).replace("{membershipId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("get",n,{"content-type":"application/json"},{})}))}updateMembership(e,t,i){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "membershipId"');if(void 0===i)throw new g('Missing required parameter: "roles"');const n="/teams/{teamId}/memberships/{membershipId}".replace("{teamId}",e).replace("{membershipId}",t),o={};void 0!==i&&(o.roles=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("patch",r,{"content-type":"application/json"},o)}))}deleteMembership(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "membershipId"');const i="/teams/{teamId}/memberships/{membershipId}".replace("{teamId}",e).replace("{membershipId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("delete",n,{"content-type":"application/json"},{})}))}updateMembershipStatus(e,t,i,n){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "membershipId"');if(void 0===i)throw new g('Missing required parameter: "userId"');if(void 0===n)throw new g('Missing required parameter: "secret"');const o="/teams/{teamId}/memberships/{membershipId}/status".replace("{teamId}",e).replace("{membershipId}",t),r={};void 0!==i&&(r.userId=i),void 0!==n&&(r.secret=n);const s=new URL(this.client.config.endpoint+o);return yield this.client.call("patch",s,{"content-type":"application/json"},r)}))}getPrefs(e){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');const t="/teams/{teamId}/prefs".replace("{teamId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("get",i,{"content-type":"application/json"},{})}))}updatePrefs(e,t){return m(this,void 0,void 0,(function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "prefs"');const i="/teams/{teamId}/prefs".replace("{teamId}",e),n={};void 0!==t&&(n.prefs=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)}))}}class L{}L.read=e=>`read("${e}")`,L.write=e=>`write("${e}")`,L.create=e=>`create("${e}")`,L.update=e=>`update("${e}")`,L.delete=e=>`delete("${e}")`;class A{static any(){return"any"}static user(e,t=""){return""===t?`user:${e}`:`user:${e}/${t}`}static users(e=""){return""===e?"users":`users/${e}`}static guests(){return"guests"}static team(e,t=""){return""===t?`team:${e}`:`team:${e}/${t}`}static member(e){return`member:${e}`}static label(e){return`label:${e}`}}class E{static custom(e){return e}static unique(e=7){const t=function(e,t,i,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n}(E,n,0,o).call(E);let i="";for(let t=0;t<e;t++)i+=Math.floor(16*Math.random()).toString(16);return t+i}}n=E,o=function(){const e=new Date,t=Math.floor(e.getTime()/1e3),i=e.getMilliseconds();return t.toString(16)+i.toString(16).padStart(5,"0")},function(e){e.Totp="totp"}(r||(r={})),function(e){e.Email="email",e.Phone="phone",e.Totp="totp",e.Recoverycode="recoverycode"}(s||(s={})),function(e){e.Amazon="amazon",e.Apple="apple",e.Auth0="auth0",e.Authentik="authentik",e.Autodesk="autodesk",e.Bitbucket="bitbucket",e.Bitly="bitly",e.Box="box",e.Dailymotion="dailymotion",e.Discord="discord",e.Disqus="disqus",e.Dropbox="dropbox",e.Etsy="etsy",e.Facebook="facebook",e.Github="github",e.Gitlab="gitlab",e.Google="google",e.Linkedin="linkedin",e.Microsoft="microsoft",e.Notion="notion",e.Oidc="oidc",e.Okta="okta",e.Paypal="paypal",e.PaypalSandbox="paypalSandbox",e.Podio="podio",e.Salesforce="salesforce",e.Slack="slack",e.Spotify="spotify",e.Stripe="stripe",e.Tradeshift="tradeshift",e.TradeshiftBox="tradeshiftBox",e.Twitch="twitch",e.Wordpress="wordpress",e.Yahoo="yahoo",e.Yammer="yammer",e.Yandex="yandex",e.Zoho="zoho",e.Zoom="zoom",e.Mock="mock"}(a||(a={})),function(e){e.AvantBrowser="aa",e.AndroidWebViewBeta="an",e.GoogleChrome="ch",e.GoogleChromeIOS="ci",e.GoogleChromeMobile="cm",e.Chromium="cr",e.MozillaFirefox="ff",e.Safari="sf",e.MobileSafari="mf",e.MicrosoftEdge="ps",e.MicrosoftEdgeIOS="oi",e.OperaMini="om",e.Opera="op",e.OperaNext="on"}(c||(c={})),function(e){e.AmericanExpress="amex",e.Argencard="argencard",e.Cabal="cabal",e.Consosud="censosud",e.DinersClub="diners",e.Discover="discover",e.Elo="elo",e.Hipercard="hipercard",e.JCB="jcb",e.Mastercard="mastercard",e.Naranja="naranja",e.TarjetaShopping="targeta-shopping",e.UnionChinaPay="union-china-pay",e.Visa="visa",e.MIR="mir",e.Maestro="maestro"}(d||(d={})),function(e){e.Afghanistan="af",e.Angola="ao",e.Albania="al",e.Andorra="ad",e.UnitedArabEmirates="ae",e.Argentina="ar",e.Armenia="am",e.AntiguaAndBarbuda="ag",e.Australia="au",e.Austria="at",e.Azerbaijan="az",e.Burundi="bi",e.Belgium="be",e.Benin="bj",e.BurkinaFaso="bf",e.Bangladesh="bd",e.Bulgaria="bg",e.Bahrain="bh",e.Bahamas="bs",e.BosniaAndHerzegovina="ba",e.Belarus="by",e.Belize="bz",e.Bolivia="bo",e.Brazil="br",e.Barbados="bb",e.BruneiDarussalam="bn",e.Bhutan="bt",e.Botswana="bw",e.CentralAfricanRepublic="cf",e.Canada="ca",e.Switzerland="ch",e.Chile="cl",e.China="cn",e.CoteDIvoire="ci",e.Cameroon="cm",e.DemocraticRepublicOfTheCongo="cd",e.RepublicOfTheCongo="cg",e.Colombia="co",e.Comoros="km",e.CapeVerde="cv",e.CostaRica="cr",e.Cuba="cu",e.Cyprus="cy",e.CzechRepublic="cz",e.Germany="de",e.Djibouti="dj",e.Dominica="dm",e.Denmark="dk",e.DominicanRepublic="do",e.Algeria="dz",e.Ecuador="ec",e.Egypt="eg",e.Eritrea="er",e.Spain="es",e.Estonia="ee",e.Ethiopia="et",e.Finland="fi",e.Fiji="fj",e.France="fr",e.MicronesiaFederatedStatesOf="fm",e.Gabon="ga",e.UnitedKingdom="gb",e.Georgia="ge",e.Ghana="gh",e.Guinea="gn",e.Gambia="gm",e.GuineaBissau="gw",e.EquatorialGuinea="gq",e.Greece="gr",e.Grenada="gd",e.Guatemala="gt",e.Guyana="gy",e.Honduras="hn",e.Croatia="hr",e.Haiti="ht",e.Hungary="hu",e.Indonesia="id",e.India="in",e.Ireland="ie",e.IranIslamicRepublicOf="ir",e.Iraq="iq",e.Iceland="is",e.Israel="il",e.Italy="it",e.Jamaica="jm",e.Jordan="jo",e.Japan="jp",e.Kazakhstan="kz",e.Kenya="ke",e.Kyrgyzstan="kg",e.Cambodia="kh",e.Kiribati="ki",e.SaintKittsAndNevis="kn",e.SouthKorea="kr",e.Kuwait="kw",e.LaoPeopleSDemocraticRepublic="la",e.Lebanon="lb",e.Liberia="lr",e.Libya="ly",e.SaintLucia="lc",e.Liechtenstein="li",e.SriLanka="lk",e.Lesotho="ls",e.Lithuania="lt",e.Luxembourg="lu",e.Latvia="lv",e.Morocco="ma",e.Monaco="mc",e.Moldova="md",e.Madagascar="mg",e.Maldives="mv",e.Mexico="mx",e.MarshallIslands="mh",e.NorthMacedonia="mk",e.Mali="ml",e.Malta="mt",e.Myanmar="mm",e.Montenegro="me",e.Mongolia="mn",e.Mozambique="mz",e.Mauritania="mr",e.Mauritius="mu",e.Malawi="mw",e.Malaysia="my",e.Namibia="na",e.Niger="ne",e.Nigeria="ng",e.Nicaragua="ni",e.Netherlands="nl",e.Norway="no",e.Nepal="np",e.Nauru="nr",e.NewZealand="nz",e.Oman="om",e.Pakistan="pk",e.Panama="pa",e.Peru="pe",e.Philippines="ph",e.Palau="pw",e.PapuaNewGuinea="pg",e.Poland="pl",e.NorthKorea="kp",e.Portugal="pt",e.Paraguay="py",e.Qatar="qa",e.Romania="ro",e.Russia="ru",e.Rwanda="rw",e.SaudiArabia="sa",e.Sudan="sd",e.Senegal="sn",e.Singapore="sg",e.SolomonIslands="sb",e.SierraLeone="sl",e.ElSalvador="sv",e.SanMarino="sm",e.Somalia="so",e.Serbia="rs",e.SouthSudan="ss",e.SaoTomeAndPrincipe="st",e.Suriname="sr",e.Slovakia="sk",e.Slovenia="si",e.Sweden="se",e.Eswatini="sz",e.Seychelles="sc",e.Syria="sy",e.Chad="td",e.Togo="tg",e.Thailand="th",e.Tajikistan="tj",e.Turkmenistan="tm",e.TimorLeste="tl",e.Tonga="to",e.TrinidadAndTobago="tt",e.Tunisia="tn",e.Turkey="tr",e.Tuvalu="tv",e.Tanzania="tz",e.Uganda="ug",e.Ukraine="ua",e.Uruguay="uy",e.UnitedStates="us",e.Uzbekistan="uz",e.VaticanCity="va",e.SaintVincentAndTheGrenadines="vc",e.Venezuela="ve",e.Vietnam="vn",e.Vanuatu="vu",e.Samoa="ws",e.Yemen="ye",e.SouthAfrica="za",e.Zambia="zm",e.Zimbabwe="zw"}(l||(l={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.DELETE="DELETE",e.OPTIONS="OPTIONS"}(p||(p={})),function(e){e.Center="center",e.Topleft="top-left",e.Top="top",e.Topright="top-right",e.Left="left",e.Right="right",e.Bottomleft="bottom-left",e.Bottom="bottom",e.Bottomright="bottom-right"}(u||(u={})),function(e){e.Jpg="jpg",e.Jpeg="jpeg",e.Gif="gif",e.Png="png",e.Webp="webp"}(h||(h={}))},57582:function(e,t){var i="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();!function(e){!function(t){var i="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),r="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function u(e){this.map={},e instanceof u?e.forEach((function(e,t){this.append(t,e)}),this):Array.isArray(e)?e.forEach((function(e){this.append(e[0],e[1])}),this):e&&Object.getOwnPropertyNames(e).forEach((function(t){this.append(t,e[t])}),this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise((function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}}))}function m(e){var t=new FileReader,i=f(t);return t.readAsArrayBuffer(e),i}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,i,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,i=f(t=new FileReader),t.readAsText(e),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=new Array(t.length),n=0;n<t.length;n++)i[n]=String.fromCharCode(t[n]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=d(e),t=l(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},u.prototype.delete=function(e){delete this.map[d(e)]},u.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},u.prototype.set=function(e,t){this.map[d(e)]=l(t)},u.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},u.prototype.keys=function(){var e=[];return this.forEach((function(t,i){e.push(i)})),p(e)},u.prototype.values=function(){var e=[];return this.forEach((function(t){e.push(t)})),p(e)},u.prototype.entries=function(){var e=[];return this.forEach((function(t,i){e.push([i,t])})),p(e)},n&&(u.prototype[Symbol.iterator]=u.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(e,t){var i,n,o=(t=t||{}).body;if(e instanceof y){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new u(t.headers)),this.method=(n=(i=t.method||this.method||"GET").toUpperCase(),g.indexOf(n)>-1?n:i),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function b(e){var t=new FormData;return e.trim().split("&").forEach((function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),o=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}})),t}function I(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},w.call(y.prototype),w.call(I.prototype),I.prototype.clone=function(){return new I(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},I.error=function(){var e=new I(null,{status:0,statusText:""});return e.type="error",e};var M=[301,302,303,307,308];I.redirect=function(e,t){if(-1===M.indexOf(t))throw new RangeError("Invalid status code");return new I(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function q(e,i){return new Promise((function(n,r){var s=new y(e,i);if(s.signal&&s.signal.aborted)return r(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,i={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(e){var i=e.split(":"),n=i.shift().trim();if(n){var o=i.join(":").trim();t.append(n,o)}})),t)};i.url="responseURL"in a?a.responseURL:i.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new I(o,i))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),s.headers.forEach((function(e,t){a.setRequestHeader(t,e)})),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)}))}q.polyfill=!0,e.fetch||(e.fetch=q,e.Headers=u,e.Request=y,e.Response=I),t.Headers=u,t.Request=y,t.Response=I,t.fetch=q,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}};
|
|
1
|
+
export const __webpack_esm_id__=3726;export const __webpack_esm_ids__=[3726];export const __webpack_esm_modules__={11287:e=>{e.exports=window.FormData},33726:(e,t,i)=>{i.r(t),i.d(t,{Account:()=>b,AppwriteException:()=>g,AuthenticationFactor:()=>s,AuthenticatorType:()=>r,Avatars:()=>I,Browser:()=>c,Client:()=>y,CreditCard:()=>d,Databases:()=>M,ExecutionMethod:()=>p,Flag:()=>l,Functions:()=>q,Graphql:()=>j,ID:()=>E,ImageFormat:()=>h,ImageGravity:()=>u,Locale:()=>R,Messaging:()=>U,OAuthProvider:()=>a,Permission:()=>L,Query:()=>w,Role:()=>A,Storage:()=>S,Teams:()=>k}),i(11287);var n,o,r,s,a,c,d,l,p,u,h,f=i(57582);function m(e,t,i,n){return new(i||(i=Promise))(function(o,r){function s(e){try{c(n.next(e))}catch(e){r(e)}}function a(e){try{c(n.throw(e))}catch(e){r(e)}}function c(e){var t;e.done?o(e.value):(t=e.value,t instanceof i?t:new i(function(e){e(t)})).then(s,a)}c((n=n.apply(e,t||[])).next())})}class v{constructor(e){this.client=e}static flatten(e,t=""){let i={};for(const[n,o]of Object.entries(e)){let e=t?t+"["+n+"]":n;Array.isArray(o)?i=Object.assign(Object.assign({},i),v.flatten(o,e)):i[e]=o}return i}}v.CHUNK_SIZE=5242880;class w{constructor(e,t,i){this.method=e,this.attribute=t,void 0!==i&&(Array.isArray(i)?this.values=i:this.values=[i])}toString(){return JSON.stringify({method:this.method,attribute:this.attribute,values:this.values})}}w.equal=(e,t)=>new w("equal",e,t).toString(),w.notEqual=(e,t)=>new w("notEqual",e,t).toString(),w.lessThan=(e,t)=>new w("lessThan",e,t).toString(),w.lessThanEqual=(e,t)=>new w("lessThanEqual",e,t).toString(),w.greaterThan=(e,t)=>new w("greaterThan",e,t).toString(),w.greaterThanEqual=(e,t)=>new w("greaterThanEqual",e,t).toString(),w.isNull=e=>new w("isNull",e).toString(),w.isNotNull=e=>new w("isNotNull",e).toString(),w.between=(e,t,i)=>new w("between",e,[t,i]).toString(),w.startsWith=(e,t)=>new w("startsWith",e,t).toString(),w.endsWith=(e,t)=>new w("endsWith",e,t).toString(),w.select=e=>new w("select",void 0,e).toString(),w.search=(e,t)=>new w("search",e,t).toString(),w.orderDesc=e=>new w("orderDesc",e).toString(),w.orderAsc=e=>new w("orderAsc",e).toString(),w.cursorAfter=e=>new w("cursorAfter",void 0,e).toString(),w.cursorBefore=e=>new w("cursorBefore",void 0,e).toString(),w.limit=e=>new w("limit",void 0,e).toString(),w.offset=e=>new w("offset",void 0,e).toString(),w.contains=(e,t)=>new w("contains",e,t).toString(),w.or=e=>new w("or",void 0,e.map(e=>JSON.parse(e))).toString(),w.and=e=>new w("and",void 0,e.map(e=>JSON.parse(e))).toString();class g extends Error{constructor(e,t=0,i="",n=""){super(e),this.name="AppwriteException",this.message=e,this.code=t,this.type=i,this.response=n}}class y{constructor(){this.config={endpoint:"https://cloud.appwrite.io/v1",endpointRealtime:"",project:"",jwt:"",locale:"",session:""},this.headers={"x-sdk-name":"Web","x-sdk-platform":"client","x-sdk-language":"web","x-sdk-version":"14.0.1","X-Appwrite-Response-Format":"1.5.0"},this.realtime={socket:void 0,timeout:void 0,url:"",channels:new Set,subscriptions:new Map,subscriptionsCounter:0,reconnect:!0,reconnectAttempts:0,lastMessage:void 0,connect:()=>{clearTimeout(this.realtime.timeout),this.realtime.timeout=null===window||void 0===window?void 0:window.setTimeout(()=>{this.realtime.createSocket()},50)},getTimeout:()=>{switch(!0){case this.realtime.reconnectAttempts<5:return 1e3;case this.realtime.reconnectAttempts<15:return 5e3;case this.realtime.reconnectAttempts<100:return 1e4;default:return 6e4}},createSocket:()=>{var e,t,i;if(this.realtime.channels.size<1)return this.realtime.reconnect=!1,void(null===(e=this.realtime.socket)||void 0===e||e.close());const n=new URLSearchParams;n.set("project",this.config.project),this.realtime.channels.forEach(e=>{n.append("channels[]",e)});const o=this.config.endpointRealtime+"/realtime?"+n.toString();(o!==this.realtime.url||!this.realtime.socket||(null===(t=this.realtime.socket)||void 0===t?void 0:t.readyState)>WebSocket.OPEN)&&(this.realtime.socket&&(null===(i=this.realtime.socket)||void 0===i?void 0:i.readyState)<WebSocket.CLOSING&&(this.realtime.reconnect=!1,this.realtime.socket.close()),this.realtime.url=o,this.realtime.socket=new WebSocket(o),this.realtime.socket.addEventListener("message",this.realtime.onMessage),this.realtime.socket.addEventListener("open",e=>{this.realtime.reconnectAttempts=0}),this.realtime.socket.addEventListener("close",e=>{var t,i,n;if(!this.realtime.reconnect||"error"===(null===(i=null===(t=this.realtime)||void 0===t?void 0:t.lastMessage)||void 0===i?void 0:i.type)&&1008===(null===(n=this.realtime)||void 0===n?void 0:n.lastMessage.data).code)return void(this.realtime.reconnect=!0);const o=this.realtime.getTimeout();console.error(`Realtime got disconnected. Reconnect will be attempted in ${o/1e3} seconds.`,e.reason),setTimeout(()=>{this.realtime.reconnectAttempts++,this.realtime.createSocket()},o)}))},onMessage:e=>{var t,i;try{const n=JSON.parse(e.data);switch(this.realtime.lastMessage=n,n.type){case"connected":const e=JSON.parse(null!==(t=window.localStorage.getItem("cookieFallback"))&&void 0!==t?t:"{}"),o=null==e?void 0:e[`a_session_${this.config.project}`],r=n.data;o&&!r.user&&(null===(i=this.realtime.socket)||void 0===i||i.send(JSON.stringify({type:"authentication",data:{session:o}})));break;case"event":let s=n.data;if(null==s?void 0:s.channels){if(!s.channels.some(e=>this.realtime.channels.has(e)))return;this.realtime.subscriptions.forEach(e=>{s.channels.some(t=>e.channels.includes(t))&&setTimeout(()=>e.callback(s))})}break;case"error":throw n.data}}catch(e){console.error(e)}},cleanUp:e=>{this.realtime.channels.forEach(t=>{e.includes(t)&&(Array.from(this.realtime.subscriptions).some(([e,i])=>i.channels.includes(t))||this.realtime.channels.delete(t))})}}}setEndpoint(e){return this.config.endpoint=e,this.config.endpointRealtime=this.config.endpointRealtime||this.config.endpoint.replace("https://","wss://").replace("http://","ws://"),this}setEndpointRealtime(e){return this.config.endpointRealtime=e,this}setProject(e){return this.headers["X-Appwrite-Project"]=e,this.config.project=e,this}setJWT(e){return this.headers["X-Appwrite-JWT"]=e,this.config.jwt=e,this}setLocale(e){return this.headers["X-Appwrite-Locale"]=e,this.config.locale=e,this}setSession(e){return this.headers["X-Appwrite-Session"]=e,this.config.session=e,this}subscribe(e,t){let i="string"==typeof e?[e]:e;i.forEach(e=>this.realtime.channels.add(e));const n=this.realtime.subscriptionsCounter++;return this.realtime.subscriptions.set(n,{channels:i,callback:t}),this.realtime.connect(),()=>{this.realtime.subscriptions.delete(n),this.realtime.cleanUp(i),this.realtime.connect()}}call(e,t,i={},n={}){var o,r;return m(this,void 0,void 0,function*(){e=e.toUpperCase(),i=Object.assign({},this.headers,i);let s={method:e,headers:i,credentials:"include"};if("undefined"!=typeof window&&window.localStorage&&(i["X-Fallback-Cookies"]=null!==(o=window.localStorage.getItem("cookieFallback"))&&void 0!==o?o:""),"GET"===e)for(const[e,i]of Object.entries(v.flatten(n)))t.searchParams.append(e,i);else switch(i["content-type"]){case"application/json":s.body=JSON.stringify(n);break;case"multipart/form-data":let e=new FormData;for(const t in n)Array.isArray(n[t])?n[t].forEach(i=>{e.append(t+"[]",i)}):e.append(t,n[t]);s.body=e,delete i["content-type"]}try{let e=null;const i=yield(0,f.fetch)(t.toString(),s);if(e=(null===(r=i.headers.get("content-type"))||void 0===r?void 0:r.includes("application/json"))?yield i.json():{message:yield i.text()},400<=i.status)throw new g(null==e?void 0:e.message,i.status,null==e?void 0:e.type,e);const n=i.headers.get("X-Fallback-Cookies");return"undefined"!=typeof window&&window.localStorage&&n&&(window.console.warn("Appwrite is using localStorage for session management. Increase your security by adding a custom domain as your API endpoint."),window.localStorage.setItem("cookieFallback",n)),e}catch(e){if(e instanceof g)throw e;throw new g(e.message)}})}}class b extends v{constructor(e){super(e)}get(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}create(e,t,i,n){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "email"');if(void 0===i)throw new g('Missing required parameter: "password"');const o={};void 0!==e&&(o.userId=e),void 0!==t&&(o.email=t),void 0!==i&&(o.password=i),void 0!==n&&(o.name=n);const r=new URL(this.client.config.endpoint+"/account");return yield this.client.call("post",r,{"content-type":"application/json"},o)})}updateEmail(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "email"');if(void 0===t)throw new g('Missing required parameter: "password"');const i={};void 0!==e&&(i.email=e),void 0!==t&&(i.password=t);const n=new URL(this.client.config.endpoint+"/account/email");return yield this.client.call("patch",n,{"content-type":"application/json"},i)})}listIdentities(e){return m(this,void 0,void 0,function*(){const t={};void 0!==e&&(t.queries=e);const i=new URL(this.client.config.endpoint+"/account/identities");return yield this.client.call("get",i,{"content-type":"application/json"},t)})}deleteIdentity(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "identityId"');const t="/account/identities/{identityId}".replace("{identityId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})})}createJWT(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/jwt");return yield this.client.call("post",e,{"content-type":"application/json"},{})})}listLogs(e){return m(this,void 0,void 0,function*(){const t={};void 0!==e&&(t.queries=e);const i=new URL(this.client.config.endpoint+"/account/logs");return yield this.client.call("get",i,{"content-type":"application/json"},t)})}updateMFA(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "mfa"');const t={};void 0!==e&&(t.mfa=e);const i=new URL(this.client.config.endpoint+"/account/mfa");return yield this.client.call("patch",i,{"content-type":"application/json"},t)})}createMfaAuthenticator(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "type"');const t="/account/mfa/authenticators/{type}".replace("{type}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("post",i,{"content-type":"application/json"},{})})}updateMfaAuthenticator(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "type"');if(void 0===t)throw new g('Missing required parameter: "otp"');const i="/account/mfa/authenticators/{type}".replace("{type}",e),n={};void 0!==t&&(n.otp=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)})}deleteMfaAuthenticator(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "type"');if(void 0===t)throw new g('Missing required parameter: "otp"');const i="/account/mfa/authenticators/{type}".replace("{type}",e),n={};void 0!==t&&(n.otp=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("delete",o,{"content-type":"application/json"},n)})}createMfaChallenge(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "factor"');const t={};void 0!==e&&(t.factor=e);const i=new URL(this.client.config.endpoint+"/account/mfa/challenge");return yield this.client.call("post",i,{"content-type":"application/json"},t)})}updateMfaChallenge(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "challengeId"');if(void 0===t)throw new g('Missing required parameter: "otp"');const i={};void 0!==e&&(i.challengeId=e),void 0!==t&&(i.otp=t);const n=new URL(this.client.config.endpoint+"/account/mfa/challenge");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}listMfaFactors(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/mfa/factors");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}getMfaRecoveryCodes(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/mfa/recovery-codes");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}createMfaRecoveryCodes(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/mfa/recovery-codes");return yield this.client.call("post",e,{"content-type":"application/json"},{})})}updateMfaRecoveryCodes(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/mfa/recovery-codes");return yield this.client.call("patch",e,{"content-type":"application/json"},{})})}updateName(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "name"');const t={};void 0!==e&&(t.name=e);const i=new URL(this.client.config.endpoint+"/account/name");return yield this.client.call("patch",i,{"content-type":"application/json"},t)})}updatePassword(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "password"');const i={};void 0!==e&&(i.password=e),void 0!==t&&(i.oldPassword=t);const n=new URL(this.client.config.endpoint+"/account/password");return yield this.client.call("patch",n,{"content-type":"application/json"},i)})}updatePhone(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "phone"');if(void 0===t)throw new g('Missing required parameter: "password"');const i={};void 0!==e&&(i.phone=e),void 0!==t&&(i.password=t);const n=new URL(this.client.config.endpoint+"/account/phone");return yield this.client.call("patch",n,{"content-type":"application/json"},i)})}getPrefs(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/prefs");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}updatePrefs(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "prefs"');const t={};void 0!==e&&(t.prefs=e);const i=new URL(this.client.config.endpoint+"/account/prefs");return yield this.client.call("patch",i,{"content-type":"application/json"},t)})}createRecovery(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "email"');if(void 0===t)throw new g('Missing required parameter: "url"');const i={};void 0!==e&&(i.email=e),void 0!==t&&(i.url=t);const n=new URL(this.client.config.endpoint+"/account/recovery");return yield this.client.call("post",n,{"content-type":"application/json"},i)})}updateRecovery(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');if(void 0===i)throw new g('Missing required parameter: "password"');const n={};void 0!==e&&(n.userId=e),void 0!==t&&(n.secret=t),void 0!==i&&(n.password=i);const o=new URL(this.client.config.endpoint+"/account/recovery");return yield this.client.call("put",o,{"content-type":"application/json"},n)})}listSessions(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/sessions");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}deleteSessions(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/sessions");return yield this.client.call("delete",e,{"content-type":"application/json"},{})})}createAnonymousSession(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/sessions/anonymous");return yield this.client.call("post",e,{"content-type":"application/json"},{})})}createEmailPasswordSession(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "email"');if(void 0===t)throw new g('Missing required parameter: "password"');const i={};void 0!==e&&(i.email=e),void 0!==t&&(i.password=t);const n=new URL(this.client.config.endpoint+"/account/sessions/email");return yield this.client.call("post",n,{"content-type":"application/json"},i)})}updateMagicURLSession(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/sessions/magic-url");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}createOAuth2Session(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "provider"');const o="/account/sessions/oauth2/{provider}".replace("{provider}",e),r={};void 0!==t&&(r.success=t),void 0!==i&&(r.failure=i),void 0!==n&&(r.scopes=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);if("undefined"==typeof window||!(null===window||void 0===window?void 0:window.location))return s;window.location.href=s.toString()}updatePhoneSession(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/sessions/phone");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}createSession(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/sessions/token");return yield this.client.call("post",n,{"content-type":"application/json"},i)})}getSession(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "sessionId"');const t="/account/sessions/{sessionId}".replace("{sessionId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("get",i,{"content-type":"application/json"},{})})}updateSession(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "sessionId"');const t="/account/sessions/{sessionId}".replace("{sessionId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("patch",i,{"content-type":"application/json"},{})})}deleteSession(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "sessionId"');const t="/account/sessions/{sessionId}".replace("{sessionId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})})}updateStatus(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/status");return yield this.client.call("patch",e,{"content-type":"application/json"},{})})}createPushTarget(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "targetId"');if(void 0===t)throw new g('Missing required parameter: "identifier"');const n={};void 0!==e&&(n.targetId=e),void 0!==t&&(n.identifier=t),void 0!==i&&(n.providerId=i);const o=new URL(this.client.config.endpoint+"/account/targets/push");return yield this.client.call("post",o,{"content-type":"application/json"},n)})}updatePushTarget(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "targetId"');if(void 0===t)throw new g('Missing required parameter: "identifier"');const i="/account/targets/{targetId}/push".replace("{targetId}",e),n={};void 0!==t&&(n.identifier=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)})}deletePushTarget(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "targetId"');const t="/account/targets/{targetId}/push".replace("{targetId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})})}createEmailToken(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "email"');const n={};void 0!==e&&(n.userId=e),void 0!==t&&(n.email=t),void 0!==i&&(n.phrase=i);const o=new URL(this.client.config.endpoint+"/account/tokens/email");return yield this.client.call("post",o,{"content-type":"application/json"},n)})}createMagicURLToken(e,t,i,n){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "email"');const o={};void 0!==e&&(o.userId=e),void 0!==t&&(o.email=t),void 0!==i&&(o.url=i),void 0!==n&&(o.phrase=n);const r=new URL(this.client.config.endpoint+"/account/tokens/magic-url");return yield this.client.call("post",r,{"content-type":"application/json"},o)})}createOAuth2Token(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "provider"');const o="/account/tokens/oauth2/{provider}".replace("{provider}",e),r={};void 0!==t&&(r.success=t),void 0!==i&&(r.failure=i),void 0!==n&&(r.scopes=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);if("undefined"==typeof window||!(null===window||void 0===window?void 0:window.location))return s;window.location.href=s.toString()}createPhoneToken(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "phone"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.phone=t);const n=new URL(this.client.config.endpoint+"/account/tokens/phone");return yield this.client.call("post",n,{"content-type":"application/json"},i)})}createVerification(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "url"');const t={};void 0!==e&&(t.url=e);const i=new URL(this.client.config.endpoint+"/account/verification");return yield this.client.call("post",i,{"content-type":"application/json"},t)})}updateVerification(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/verification");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}createPhoneVerification(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/account/verification/phone");return yield this.client.call("post",e,{"content-type":"application/json"},{})})}updatePhoneVerification(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "userId"');if(void 0===t)throw new g('Missing required parameter: "secret"');const i={};void 0!==e&&(i.userId=e),void 0!==t&&(i.secret=t);const n=new URL(this.client.config.endpoint+"/account/verification/phone");return yield this.client.call("put",n,{"content-type":"application/json"},i)})}}class I extends v{constructor(e){super(e)}getBrowser(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "code"');const o="/avatars/browsers/{code}".replace("{code}",e),r={};void 0!==t&&(r.width=t),void 0!==i&&(r.height=i),void 0!==n&&(r.quality=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);return s}getCreditCard(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "code"');const o="/avatars/credit-cards/{code}".replace("{code}",e),r={};void 0!==t&&(r.width=t),void 0!==i&&(r.height=i),void 0!==n&&(r.quality=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);return s}getFavicon(e){if(void 0===e)throw new g('Missing required parameter: "url"');const t={};void 0!==e&&(t.url=e);const i=new URL(this.client.config.endpoint+"/avatars/favicon");t.project=this.client.config.project;for(const[e,n]of Object.entries(v.flatten(t)))i.searchParams.append(e,n);return i}getFlag(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "code"');const o="/avatars/flags/{code}".replace("{code}",e),r={};void 0!==t&&(r.width=t),void 0!==i&&(r.height=i),void 0!==n&&(r.quality=n);const s=new URL(this.client.config.endpoint+o);r.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(r)))s.searchParams.append(e,t);return s}getImage(e,t,i){if(void 0===e)throw new g('Missing required parameter: "url"');const n={};void 0!==e&&(n.url=e),void 0!==t&&(n.width=t),void 0!==i&&(n.height=i);const o=new URL(this.client.config.endpoint+"/avatars/image");n.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(n)))o.searchParams.append(e,t);return o}getInitials(e,t,i,n){const o={};void 0!==e&&(o.name=e),void 0!==t&&(o.width=t),void 0!==i&&(o.height=i),void 0!==n&&(o.background=n);const r=new URL(this.client.config.endpoint+"/avatars/initials");o.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(o)))r.searchParams.append(e,t);return r}getQR(e,t,i,n){if(void 0===e)throw new g('Missing required parameter: "text"');const o={};void 0!==e&&(o.text=e),void 0!==t&&(o.size=t),void 0!==i&&(o.margin=i),void 0!==n&&(o.download=n);const r=new URL(this.client.config.endpoint+"/avatars/qr");o.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(o)))r.searchParams.append(e,t);return r}}class M extends v{constructor(e){super(e)}listDocuments(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');const n="/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}",e).replace("{collectionId}",t),o={};void 0!==i&&(o.queries=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("get",r,{"content-type":"application/json"},o)})}createDocument(e,t,i,n,o){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');if(void 0===i)throw new g('Missing required parameter: "documentId"');if(void 0===n)throw new g('Missing required parameter: "data"');const r="/databases/{databaseId}/collections/{collectionId}/documents".replace("{databaseId}",e).replace("{collectionId}",t),s={};void 0!==i&&(s.documentId=i),void 0!==n&&(s.data=n),void 0!==o&&(s.permissions=o);const a=new URL(this.client.config.endpoint+r);return yield this.client.call("post",a,{"content-type":"application/json"},s)})}getDocument(e,t,i,n){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');if(void 0===i)throw new g('Missing required parameter: "documentId"');const o="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",e).replace("{collectionId}",t).replace("{documentId}",i),r={};void 0!==n&&(r.queries=n);const s=new URL(this.client.config.endpoint+o);return yield this.client.call("get",s,{"content-type":"application/json"},r)})}updateDocument(e,t,i,n,o){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');if(void 0===i)throw new g('Missing required parameter: "documentId"');const r="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",e).replace("{collectionId}",t).replace("{documentId}",i),s={};void 0!==n&&(s.data=n),void 0!==o&&(s.permissions=o);const a=new URL(this.client.config.endpoint+r);return yield this.client.call("patch",a,{"content-type":"application/json"},s)})}deleteDocument(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "databaseId"');if(void 0===t)throw new g('Missing required parameter: "collectionId"');if(void 0===i)throw new g('Missing required parameter: "documentId"');const n="/databases/{databaseId}/collections/{collectionId}/documents/{documentId}".replace("{databaseId}",e).replace("{collectionId}",t).replace("{documentId}",i),o=new URL(this.client.config.endpoint+n);return yield this.client.call("delete",o,{"content-type":"application/json"},{})})}}class q extends v{constructor(e){super(e)}listExecutions(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "functionId"');const n="/functions/{functionId}/executions".replace("{functionId}",e),o={};void 0!==t&&(o.queries=t),void 0!==i&&(o.search=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("get",r,{"content-type":"application/json"},o)})}createExecution(e,t,i,n,o,r){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "functionId"');const s="/functions/{functionId}/executions".replace("{functionId}",e),a={};void 0!==t&&(a.body=t),void 0!==i&&(a.async=i),void 0!==n&&(a.path=n),void 0!==o&&(a.method=o),void 0!==r&&(a.headers=r);const c=new URL(this.client.config.endpoint+s);return yield this.client.call("post",c,{"content-type":"application/json"},a)})}getExecution(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "functionId"');if(void 0===t)throw new g('Missing required parameter: "executionId"');const i="/functions/{functionId}/executions/{executionId}".replace("{functionId}",e).replace("{executionId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("get",n,{"content-type":"application/json"},{})})}}class j extends v{constructor(e){super(e)}query(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "query"');const t={};void 0!==e&&(t.query=e);const i=new URL(this.client.config.endpoint+"/graphql");return yield this.client.call("post",i,{"x-sdk-graphql":"true","content-type":"application/json"},t)})}mutation(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "query"');const t={};void 0!==e&&(t.query=e);const i=new URL(this.client.config.endpoint+"/graphql/mutation");return yield this.client.call("post",i,{"x-sdk-graphql":"true","content-type":"application/json"},t)})}}class R extends v{constructor(e){super(e)}get(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/locale");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}listCodes(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/locale/codes");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}listContinents(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/locale/continents");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}listCountries(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/locale/countries");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}listCountriesEU(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/locale/countries/eu");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}listCountriesPhones(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/locale/countries/phones");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}listCurrencies(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/locale/currencies");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}listLanguages(){return m(this,void 0,void 0,function*(){const e=new URL(this.client.config.endpoint+"/locale/languages");return yield this.client.call("get",e,{"content-type":"application/json"},{})})}}class U extends v{constructor(e){super(e)}createSubscriber(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "topicId"');if(void 0===t)throw new g('Missing required parameter: "subscriberId"');if(void 0===i)throw new g('Missing required parameter: "targetId"');const n="/messaging/topics/{topicId}/subscribers".replace("{topicId}",e),o={};void 0!==t&&(o.subscriberId=t),void 0!==i&&(o.targetId=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("post",r,{"content-type":"application/json"},o)})}deleteSubscriber(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "topicId"');if(void 0===t)throw new g('Missing required parameter: "subscriberId"');const i="/messaging/topics/{topicId}/subscribers/{subscriberId}".replace("{topicId}",e).replace("{subscriberId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("delete",n,{"content-type":"application/json"},{})})}}class S extends v{constructor(e){super(e)}listFiles(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');const n="/storage/buckets/{bucketId}/files".replace("{bucketId}",e),o={};void 0!==t&&(o.queries=t),void 0!==i&&(o.search=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("get",r,{"content-type":"application/json"},o)})}createFile(e,t,i,n,o=e=>{}){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');if(void 0===i)throw new g('Missing required parameter: "file"');const r="/storage/buckets/{bucketId}/files".replace("{bucketId}",e),s={};void 0!==t&&(s.fileId=t),void 0!==i&&(s.file=i),void 0!==n&&(s.permissions=n);const a=new URL(this.client.config.endpoint+r);if(!(i instanceof File))throw new g('Parameter "file" has to be a File.');const c=i.size;if(c<=v.CHUNK_SIZE)return yield this.client.call("post",a,{"content-type":"multipart/form-data"},s);const d={"content-type":"multipart/form-data"};let l,p=0;if("unique()"!=t)try{l=yield this.client.call("GET",new URL(this.client.config.endpoint+r+"/"+t),d),p=l.chunksUploaded*v.CHUNK_SIZE}catch(e){}for(;p<c;){let e=Math.min(p+v.CHUNK_SIZE-1,c-1);d["content-range"]="bytes "+p+"-"+e+"/"+c,l&&l.$id&&(d["x-appwrite-id"]=l.$id);const t=i.slice(p,e+1);s.file=new File([t],i.name),l=yield this.client.call("post",a,d,s),o&&o({$id:l.$id,progress:p/c*100,sizeUploaded:p,chunksTotal:l.chunksTotal,chunksUploaded:l.chunksUploaded}),p+=v.CHUNK_SIZE}return l})}getFile(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const i="/storage/buckets/{bucketId}/files/{fileId}".replace("{bucketId}",e).replace("{fileId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("get",n,{"content-type":"application/json"},{})})}updateFile(e,t,i,n){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const o="/storage/buckets/{bucketId}/files/{fileId}".replace("{bucketId}",e).replace("{fileId}",t),r={};void 0!==i&&(r.name=i),void 0!==n&&(r.permissions=n);const s=new URL(this.client.config.endpoint+o);return yield this.client.call("put",s,{"content-type":"application/json"},r)})}deleteFile(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const i="/storage/buckets/{bucketId}/files/{fileId}".replace("{bucketId}",e).replace("{fileId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("delete",n,{"content-type":"application/json"},{})})}getFileDownload(e,t){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const i="/storage/buckets/{bucketId}/files/{fileId}/download".replace("{bucketId}",e).replace("{fileId}",t),n={},o=new URL(this.client.config.endpoint+i);n.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(n)))o.searchParams.append(e,t);return o}getFilePreview(e,t,i,n,o,r,s,a,c,d,l,p,u){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const h="/storage/buckets/{bucketId}/files/{fileId}/preview".replace("{bucketId}",e).replace("{fileId}",t),f={};void 0!==i&&(f.width=i),void 0!==n&&(f.height=n),void 0!==o&&(f.gravity=o),void 0!==r&&(f.quality=r),void 0!==s&&(f.borderWidth=s),void 0!==a&&(f.borderColor=a),void 0!==c&&(f.borderRadius=c),void 0!==d&&(f.opacity=d),void 0!==l&&(f.rotation=l),void 0!==p&&(f.background=p),void 0!==u&&(f.output=u);const m=new URL(this.client.config.endpoint+h);f.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(f)))m.searchParams.append(e,t);return m}getFileView(e,t){if(void 0===e)throw new g('Missing required parameter: "bucketId"');if(void 0===t)throw new g('Missing required parameter: "fileId"');const i="/storage/buckets/{bucketId}/files/{fileId}/view".replace("{bucketId}",e).replace("{fileId}",t),n={},o=new URL(this.client.config.endpoint+i);n.project=this.client.config.project;for(const[e,t]of Object.entries(v.flatten(n)))o.searchParams.append(e,t);return o}}class k extends v{constructor(e){super(e)}list(e,t){return m(this,void 0,void 0,function*(){const i={};void 0!==e&&(i.queries=e),void 0!==t&&(i.search=t);const n=new URL(this.client.config.endpoint+"/teams");return yield this.client.call("get",n,{"content-type":"application/json"},i)})}create(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "name"');const n={};void 0!==e&&(n.teamId=e),void 0!==t&&(n.name=t),void 0!==i&&(n.roles=i);const o=new URL(this.client.config.endpoint+"/teams");return yield this.client.call("post",o,{"content-type":"application/json"},n)})}get(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');const t="/teams/{teamId}".replace("{teamId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("get",i,{"content-type":"application/json"},{})})}updateName(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "name"');const i="/teams/{teamId}".replace("{teamId}",e),n={};void 0!==t&&(n.name=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)})}delete(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');const t="/teams/{teamId}".replace("{teamId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("delete",i,{"content-type":"application/json"},{})})}listMemberships(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');const n="/teams/{teamId}/memberships".replace("{teamId}",e),o={};void 0!==t&&(o.queries=t),void 0!==i&&(o.search=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("get",r,{"content-type":"application/json"},o)})}createMembership(e,t,i,n,o,r,s){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "roles"');const a="/teams/{teamId}/memberships".replace("{teamId}",e),c={};void 0!==i&&(c.email=i),void 0!==n&&(c.userId=n),void 0!==o&&(c.phone=o),void 0!==t&&(c.roles=t),void 0!==r&&(c.url=r),void 0!==s&&(c.name=s);const d=new URL(this.client.config.endpoint+a);return yield this.client.call("post",d,{"content-type":"application/json"},c)})}getMembership(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "membershipId"');const i="/teams/{teamId}/memberships/{membershipId}".replace("{teamId}",e).replace("{membershipId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("get",n,{"content-type":"application/json"},{})})}updateMembership(e,t,i){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "membershipId"');if(void 0===i)throw new g('Missing required parameter: "roles"');const n="/teams/{teamId}/memberships/{membershipId}".replace("{teamId}",e).replace("{membershipId}",t),o={};void 0!==i&&(o.roles=i);const r=new URL(this.client.config.endpoint+n);return yield this.client.call("patch",r,{"content-type":"application/json"},o)})}deleteMembership(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "membershipId"');const i="/teams/{teamId}/memberships/{membershipId}".replace("{teamId}",e).replace("{membershipId}",t),n=new URL(this.client.config.endpoint+i);return yield this.client.call("delete",n,{"content-type":"application/json"},{})})}updateMembershipStatus(e,t,i,n){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "membershipId"');if(void 0===i)throw new g('Missing required parameter: "userId"');if(void 0===n)throw new g('Missing required parameter: "secret"');const o="/teams/{teamId}/memberships/{membershipId}/status".replace("{teamId}",e).replace("{membershipId}",t),r={};void 0!==i&&(r.userId=i),void 0!==n&&(r.secret=n);const s=new URL(this.client.config.endpoint+o);return yield this.client.call("patch",s,{"content-type":"application/json"},r)})}getPrefs(e){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');const t="/teams/{teamId}/prefs".replace("{teamId}",e),i=new URL(this.client.config.endpoint+t);return yield this.client.call("get",i,{"content-type":"application/json"},{})})}updatePrefs(e,t){return m(this,void 0,void 0,function*(){if(void 0===e)throw new g('Missing required parameter: "teamId"');if(void 0===t)throw new g('Missing required parameter: "prefs"');const i="/teams/{teamId}/prefs".replace("{teamId}",e),n={};void 0!==t&&(n.prefs=t);const o=new URL(this.client.config.endpoint+i);return yield this.client.call("put",o,{"content-type":"application/json"},n)})}}class L{}L.read=e=>`read("${e}")`,L.write=e=>`write("${e}")`,L.create=e=>`create("${e}")`,L.update=e=>`update("${e}")`,L.delete=e=>`delete("${e}")`;class A{static any(){return"any"}static user(e,t=""){return""===t?`user:${e}`:`user:${e}/${t}`}static users(e=""){return""===e?"users":`users/${e}`}static guests(){return"guests"}static team(e,t=""){return""===t?`team:${e}`:`team:${e}/${t}`}static member(e){return`member:${e}`}static label(e){return`label:${e}`}}class E{static custom(e){return e}static unique(e=7){const t=function(e,t,i,n){if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return n}(E,n,0,o).call(E);let i="";for(let t=0;t<e;t++)i+=Math.floor(16*Math.random()).toString(16);return t+i}}n=E,o=function(){const e=new Date,t=Math.floor(e.getTime()/1e3),i=e.getMilliseconds();return t.toString(16)+i.toString(16).padStart(5,"0")},function(e){e.Totp="totp"}(r||(r={})),function(e){e.Email="email",e.Phone="phone",e.Totp="totp",e.Recoverycode="recoverycode"}(s||(s={})),function(e){e.Amazon="amazon",e.Apple="apple",e.Auth0="auth0",e.Authentik="authentik",e.Autodesk="autodesk",e.Bitbucket="bitbucket",e.Bitly="bitly",e.Box="box",e.Dailymotion="dailymotion",e.Discord="discord",e.Disqus="disqus",e.Dropbox="dropbox",e.Etsy="etsy",e.Facebook="facebook",e.Github="github",e.Gitlab="gitlab",e.Google="google",e.Linkedin="linkedin",e.Microsoft="microsoft",e.Notion="notion",e.Oidc="oidc",e.Okta="okta",e.Paypal="paypal",e.PaypalSandbox="paypalSandbox",e.Podio="podio",e.Salesforce="salesforce",e.Slack="slack",e.Spotify="spotify",e.Stripe="stripe",e.Tradeshift="tradeshift",e.TradeshiftBox="tradeshiftBox",e.Twitch="twitch",e.Wordpress="wordpress",e.Yahoo="yahoo",e.Yammer="yammer",e.Yandex="yandex",e.Zoho="zoho",e.Zoom="zoom",e.Mock="mock"}(a||(a={})),function(e){e.AvantBrowser="aa",e.AndroidWebViewBeta="an",e.GoogleChrome="ch",e.GoogleChromeIOS="ci",e.GoogleChromeMobile="cm",e.Chromium="cr",e.MozillaFirefox="ff",e.Safari="sf",e.MobileSafari="mf",e.MicrosoftEdge="ps",e.MicrosoftEdgeIOS="oi",e.OperaMini="om",e.Opera="op",e.OperaNext="on"}(c||(c={})),function(e){e.AmericanExpress="amex",e.Argencard="argencard",e.Cabal="cabal",e.Consosud="censosud",e.DinersClub="diners",e.Discover="discover",e.Elo="elo",e.Hipercard="hipercard",e.JCB="jcb",e.Mastercard="mastercard",e.Naranja="naranja",e.TarjetaShopping="targeta-shopping",e.UnionChinaPay="union-china-pay",e.Visa="visa",e.MIR="mir",e.Maestro="maestro"}(d||(d={})),function(e){e.Afghanistan="af",e.Angola="ao",e.Albania="al",e.Andorra="ad",e.UnitedArabEmirates="ae",e.Argentina="ar",e.Armenia="am",e.AntiguaAndBarbuda="ag",e.Australia="au",e.Austria="at",e.Azerbaijan="az",e.Burundi="bi",e.Belgium="be",e.Benin="bj",e.BurkinaFaso="bf",e.Bangladesh="bd",e.Bulgaria="bg",e.Bahrain="bh",e.Bahamas="bs",e.BosniaAndHerzegovina="ba",e.Belarus="by",e.Belize="bz",e.Bolivia="bo",e.Brazil="br",e.Barbados="bb",e.BruneiDarussalam="bn",e.Bhutan="bt",e.Botswana="bw",e.CentralAfricanRepublic="cf",e.Canada="ca",e.Switzerland="ch",e.Chile="cl",e.China="cn",e.CoteDIvoire="ci",e.Cameroon="cm",e.DemocraticRepublicOfTheCongo="cd",e.RepublicOfTheCongo="cg",e.Colombia="co",e.Comoros="km",e.CapeVerde="cv",e.CostaRica="cr",e.Cuba="cu",e.Cyprus="cy",e.CzechRepublic="cz",e.Germany="de",e.Djibouti="dj",e.Dominica="dm",e.Denmark="dk",e.DominicanRepublic="do",e.Algeria="dz",e.Ecuador="ec",e.Egypt="eg",e.Eritrea="er",e.Spain="es",e.Estonia="ee",e.Ethiopia="et",e.Finland="fi",e.Fiji="fj",e.France="fr",e.MicronesiaFederatedStatesOf="fm",e.Gabon="ga",e.UnitedKingdom="gb",e.Georgia="ge",e.Ghana="gh",e.Guinea="gn",e.Gambia="gm",e.GuineaBissau="gw",e.EquatorialGuinea="gq",e.Greece="gr",e.Grenada="gd",e.Guatemala="gt",e.Guyana="gy",e.Honduras="hn",e.Croatia="hr",e.Haiti="ht",e.Hungary="hu",e.Indonesia="id",e.India="in",e.Ireland="ie",e.IranIslamicRepublicOf="ir",e.Iraq="iq",e.Iceland="is",e.Israel="il",e.Italy="it",e.Jamaica="jm",e.Jordan="jo",e.Japan="jp",e.Kazakhstan="kz",e.Kenya="ke",e.Kyrgyzstan="kg",e.Cambodia="kh",e.Kiribati="ki",e.SaintKittsAndNevis="kn",e.SouthKorea="kr",e.Kuwait="kw",e.LaoPeopleSDemocraticRepublic="la",e.Lebanon="lb",e.Liberia="lr",e.Libya="ly",e.SaintLucia="lc",e.Liechtenstein="li",e.SriLanka="lk",e.Lesotho="ls",e.Lithuania="lt",e.Luxembourg="lu",e.Latvia="lv",e.Morocco="ma",e.Monaco="mc",e.Moldova="md",e.Madagascar="mg",e.Maldives="mv",e.Mexico="mx",e.MarshallIslands="mh",e.NorthMacedonia="mk",e.Mali="ml",e.Malta="mt",e.Myanmar="mm",e.Montenegro="me",e.Mongolia="mn",e.Mozambique="mz",e.Mauritania="mr",e.Mauritius="mu",e.Malawi="mw",e.Malaysia="my",e.Namibia="na",e.Niger="ne",e.Nigeria="ng",e.Nicaragua="ni",e.Netherlands="nl",e.Norway="no",e.Nepal="np",e.Nauru="nr",e.NewZealand="nz",e.Oman="om",e.Pakistan="pk",e.Panama="pa",e.Peru="pe",e.Philippines="ph",e.Palau="pw",e.PapuaNewGuinea="pg",e.Poland="pl",e.NorthKorea="kp",e.Portugal="pt",e.Paraguay="py",e.Qatar="qa",e.Romania="ro",e.Russia="ru",e.Rwanda="rw",e.SaudiArabia="sa",e.Sudan="sd",e.Senegal="sn",e.Singapore="sg",e.SolomonIslands="sb",e.SierraLeone="sl",e.ElSalvador="sv",e.SanMarino="sm",e.Somalia="so",e.Serbia="rs",e.SouthSudan="ss",e.SaoTomeAndPrincipe="st",e.Suriname="sr",e.Slovakia="sk",e.Slovenia="si",e.Sweden="se",e.Eswatini="sz",e.Seychelles="sc",e.Syria="sy",e.Chad="td",e.Togo="tg",e.Thailand="th",e.Tajikistan="tj",e.Turkmenistan="tm",e.TimorLeste="tl",e.Tonga="to",e.TrinidadAndTobago="tt",e.Tunisia="tn",e.Turkey="tr",e.Tuvalu="tv",e.Tanzania="tz",e.Uganda="ug",e.Ukraine="ua",e.Uruguay="uy",e.UnitedStates="us",e.Uzbekistan="uz",e.VaticanCity="va",e.SaintVincentAndTheGrenadines="vc",e.Venezuela="ve",e.Vietnam="vn",e.Vanuatu="vu",e.Samoa="ws",e.Yemen="ye",e.SouthAfrica="za",e.Zambia="zm",e.Zimbabwe="zw"}(l||(l={})),function(e){e.GET="GET",e.POST="POST",e.PUT="PUT",e.PATCH="PATCH",e.DELETE="DELETE",e.OPTIONS="OPTIONS"}(p||(p={})),function(e){e.Center="center",e.Topleft="top-left",e.Top="top",e.Topright="top-right",e.Left="left",e.Right="right",e.Bottomleft="bottom-left",e.Bottom="bottom",e.Bottomright="bottom-right"}(u||(u={})),function(e){e.Jpg="jpg",e.Jpeg="jpeg",e.Gif="gif",e.Png="png",e.Webp="webp"}(h||(h={}))},57582:function(e,t){var i="undefined"!=typeof self?self:this,n=function(){function e(){this.fetch=!1,this.DOMException=i.DOMException}return e.prototype=i,new e}();!function(e){!function(t){var i="URLSearchParams"in e,n="Symbol"in e&&"iterator"in Symbol,o="FileReader"in e&&"Blob"in e&&function(){try{return new Blob,!0}catch(e){return!1}}(),r="FormData"in e,s="ArrayBuffer"in e;if(s)var a=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&a.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(e))throw new TypeError("Invalid character in header field name");return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function p(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return n&&(t[Symbol.iterator]=function(){return t}),t}function u(e){this.map={},e instanceof u?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function h(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function f(e){return new Promise(function(t,i){e.onload=function(){t(e.result)},e.onerror=function(){i(e.error)}})}function m(e){var t=new FileReader,i=f(t);return t.readAsArrayBuffer(e),i}function v(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function w(){return this.bodyUsed=!1,this._initBody=function(e){var t;this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:o&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:i&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():s&&o&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=v(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=v(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):i&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},o&&(this.blob=function(){var e=h(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?h(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var e,t,i,n=h(this);if(n)return n;if(this._bodyBlob)return e=this._bodyBlob,i=f(t=new FileReader),t.readAsText(e),i;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),i=new Array(t.length),n=0;n<t.length;n++)i[n]=String.fromCharCode(t[n]);return i.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r&&(this.formData=function(){return this.text().then(b)}),this.json=function(){return this.text().then(JSON.parse)},this}u.prototype.append=function(e,t){e=d(e),t=l(t);var i=this.map[e];this.map[e]=i?i+", "+t:t},u.prototype.delete=function(e){delete this.map[d(e)]},u.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},u.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},u.prototype.set=function(e,t){this.map[d(e)]=l(t)},u.prototype.forEach=function(e,t){for(var i in this.map)this.map.hasOwnProperty(i)&&e.call(t,this.map[i],i,this)},u.prototype.keys=function(){var e=[];return this.forEach(function(t,i){e.push(i)}),p(e)},u.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),p(e)},u.prototype.entries=function(){var e=[];return this.forEach(function(t,i){e.push([i,t])}),p(e)},n&&(u.prototype[Symbol.iterator]=u.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function y(e,t){var i,n,o=(t=t||{}).body;if(e instanceof y){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new u(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,o||null==e._bodyInit||(o=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new u(t.headers)),this.method=(n=(i=t.method||this.method||"GET").toUpperCase(),g.indexOf(n)>-1?n:i),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&o)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(o)}function b(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var i=e.split("="),n=i.shift().replace(/\+/g," "),o=i.join("=").replace(/\+/g," ");t.append(decodeURIComponent(n),decodeURIComponent(o))}}),t}function I(e,t){t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in t?t.statusText:"OK",this.headers=new u(t.headers),this.url=t.url||"",this._initBody(e)}y.prototype.clone=function(){return new y(this,{body:this._bodyInit})},w.call(y.prototype),w.call(I.prototype),I.prototype.clone=function(){return new I(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new u(this.headers),url:this.url})},I.error=function(){var e=new I(null,{status:0,statusText:""});return e.type="error",e};var M=[301,302,303,307,308];I.redirect=function(e,t){if(-1===M.indexOf(t))throw new RangeError("Invalid status code");return new I(null,{status:t,headers:{location:e}})},t.DOMException=e.DOMException;try{new t.DOMException}catch(e){t.DOMException=function(e,t){this.message=e,this.name=t;var i=Error(e);this.stack=i.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function q(e,i){return new Promise(function(n,r){var s=new y(e,i);if(s.signal&&s.signal.aborted)return r(new t.DOMException("Aborted","AbortError"));var a=new XMLHttpRequest;function c(){a.abort()}a.onload=function(){var e,t,i={status:a.status,statusText:a.statusText,headers:(e=a.getAllResponseHeaders()||"",t=new u,e.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(e){var i=e.split(":"),n=i.shift().trim();if(n){var o=i.join(":").trim();t.append(n,o)}}),t)};i.url="responseURL"in a?a.responseURL:i.headers.get("X-Request-URL");var o="response"in a?a.response:a.responseText;n(new I(o,i))},a.onerror=function(){r(new TypeError("Network request failed"))},a.ontimeout=function(){r(new TypeError("Network request failed"))},a.onabort=function(){r(new t.DOMException("Aborted","AbortError"))},a.open(s.method,s.url,!0),"include"===s.credentials?a.withCredentials=!0:"omit"===s.credentials&&(a.withCredentials=!1),"responseType"in a&&o&&(a.responseType="blob"),s.headers.forEach(function(e,t){a.setRequestHeader(t,e)}),s.signal&&(s.signal.addEventListener("abort",c),a.onreadystatechange=function(){4===a.readyState&&s.signal.removeEventListener("abort",c)}),a.send(void 0===s._bodyInit?null:s._bodyInit)})}q.polyfill=!0,e.fetch||(e.fetch=q,e.Headers=u,e.Request=y,e.Response=I),t.Headers=u,t.Request=y,t.Response=I,t.fetch=q,Object.defineProperty(t,"__esModule",{value:!0})}({})}(n),n.fetch.ponyfill=!0,delete n.fetch.polyfill;var o=n;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,e.exports=t}};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const __webpack_esm_id__=3828;export const __webpack_esm_ids__=[3828];export const __webpack_esm_modules__={23828:(l,e,a)=>{a.r(e),a.d(e,{networkPlaceholderSvg:()=>o});const o=a(35842).JW`<svg fill="none" viewBox="0 0 22 20">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
fill-rule="evenodd"
|
|
5
|
+
d="M16.32 13.62a3.14 3.14 0 1 1-.99 1.72l-1.6-.93a3.83 3.83 0 0 1-3.71 1 3.66 3.66 0 0 1-1.74-1l-1.6.94a3.14 3.14 0 1 1-1-1.73l1.6-.94a3.7 3.7 0 0 1 0-2 3.81 3.81 0 0 1 1.8-2.33c.29-.17.6-.3.92-.38V6.1a3.14 3.14 0 1 1 2 0l-.01.02v1.85H12a3.82 3.82 0 0 1 2.33 1.8 3.7 3.7 0 0 1 .39 2.91l1.6.93ZM2.6 16.54a1.14 1.14 0 0 0 1.98-1.14 1.14 1.14 0 0 0-1.98 1.14ZM11 2.01a1.14 1.14 0 1 0 0 2.28 1.14 1.14 0 0 0 0-2.28Zm1.68 10.45c.08-.19.14-.38.16-.58v-.05l.02-.13v-.13a1.92 1.92 0 0 0-.24-.8l-.11-.15a1.89 1.89 0 0 0-.74-.6 1.86 1.86 0 0 0-.77-.17h-.19a1.97 1.97 0 0 0-.89.34 1.98 1.98 0 0 0-.61.74 1.99 1.99 0 0 0-.16.9v.05a1.87 1.87 0 0 0 .24.74l.1.15c.12.16.26.3.42.42l.16.1.13.07.04.02a1.84 1.84 0 0 0 .76.17h.17a2 2 0 0 0 .91-.35 1.78 1.78 0 0 0 .52-.58l.03-.05a.84.84 0 0 0 .05-.11Zm5.15 4.5a1.14 1.14 0 0 0 1.14-1.97 1.13 1.13 0 0 0-1.55.41c-.32.55-.13 1.25.41 1.56Z"
|
|
6
|
+
clip-rule="evenodd"
|
|
7
|
+
/>
|
|
8
|
+
<path
|
|
9
|
+
fill="currentColor"
|
|
10
|
+
fill-rule="evenodd"
|
|
11
|
+
d="M4.63 9.43a1.5 1.5 0 1 0 1.5-2.6 1.5 1.5 0 0 0-1.5 2.6Zm.32-1.55a.5.5 0 0 1 .68-.19.5.5 0 0 1 .18.68.5.5 0 0 1-.68.19.5.5 0 0 1-.18-.68ZM17.94 8.88a1.5 1.5 0 1 1-2.6-1.5 1.5 1.5 0 1 1 2.6 1.5ZM16.9 7.69a.5.5 0 0 0-.68.19.5.5 0 0 0 .18.68.5.5 0 0 0 .68-.19.5.5 0 0 0-.18-.68ZM9.75 17.75a1.5 1.5 0 1 1 2.6 1.5 1.5 1.5 0 1 1-2.6-1.5Zm1.05 1.18a.5.5 0 0 0 .68-.18.5.5 0 0 0-.18-.68.5.5 0 0 0-.68.18.5.5 0 0 0 .18.68Z"
|
|
12
|
+
clip-rule="evenodd"
|
|
13
|
+
/>
|
|
14
|
+
</svg>`}};
|
package/build/385.index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_id__=385;export const __webpack_esm_ids__=[385];export const __webpack_esm_modules__={20385:(e,_,o)=>{o.r(_),o.d(_,{checkmarkBoldSvg:()=>l});const l=o(52788).JW`<svg fill="none" viewBox="0 0 14 14">
|
|
2
2
|
<path
|
|
3
3
|
fill="currentColor"
|
|
4
4
|
fill-rule="evenodd"
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const __webpack_esm_id__=3857;export const __webpack_esm_ids__=[3857];export const __webpack_esm_modules__={43857:(a,e,l)=>{l.r(e),l.d(e,{walletPlaceholderSvg:()=>c});const c=l(35842).JW`
|
|
2
|
+
<svg fill="none" viewBox="0 0 48 44">
|
|
3
|
+
<path
|
|
4
|
+
style="fill: var(--wui-color-bg-300);"
|
|
5
|
+
d="M4.56 8.64c-1.23 1.68-1.23 4.08-1.23 8.88v8.96c0 4.8 0 7.2 1.23 8.88.39.55.87 1.02 1.41 1.42C7.65 38 10.05 38 14.85 38h14.3c4.8 0 7.2 0 8.88-1.22a6.4 6.4 0 0 0 1.41-1.42c.83-1.14 1.1-2.6 1.19-4.92a6.4 6.4 0 0 0 5.16-4.65c.21-.81.21-1.8.21-3.79 0-1.98 0-2.98-.22-3.79a6.4 6.4 0 0 0-5.15-4.65c-.1-2.32-.36-3.78-1.19-4.92a6.4 6.4 0 0 0-1.41-1.42C36.35 6 33.95 6 29.15 6h-14.3c-4.8 0-7.2 0-8.88 1.22a6.4 6.4 0 0 0-1.41 1.42Z"
|
|
6
|
+
/>
|
|
7
|
+
<path
|
|
8
|
+
style="fill: var(--wui-color-fg-200);"
|
|
9
|
+
fill-rule="evenodd"
|
|
10
|
+
d="M2.27 11.33a6.4 6.4 0 0 1 6.4-6.4h26.66a6.4 6.4 0 0 1 6.4 6.4v1.7a6.4 6.4 0 0 1 5.34 6.3v5.34a6.4 6.4 0 0 1-5.34 6.3v1.7a6.4 6.4 0 0 1-6.4 6.4H8.67a6.4 6.4 0 0 1-6.4-6.4V11.33ZM39.6 31.07h-6.93a9.07 9.07 0 1 1 0-18.14h6.93v-1.6a4.27 4.27 0 0 0-4.27-4.26H8.67a4.27 4.27 0 0 0-4.27 4.26v21.34a4.27 4.27 0 0 0 4.27 4.26h26.66a4.27 4.27 0 0 0 4.27-4.26v-1.6Zm-6.93-16a6.93 6.93 0 0 0 0 13.86h8a4.27 4.27 0 0 0 4.26-4.26v-5.34a4.27 4.27 0 0 0-4.26-4.26h-8Z"
|
|
11
|
+
clip-rule="evenodd"
|
|
12
|
+
/>
|
|
13
|
+
</svg>
|
|
14
|
+
`}};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export const __webpack_esm_id__=3874;export const __webpack_esm_ids__=[3874];export const __webpack_esm_modules__={33874:(l,c,e)=>{e.r(c),e.d(c,{discordSvg:()=>i});const i=e(35842).JW`<svg fill="none" viewBox="0 0 40 40">
|
|
2
|
+
<g clip-path="url(#a)">
|
|
3
|
+
<g clip-path="url(#b)">
|
|
4
|
+
<circle cx="20" cy="19.89" r="20" fill="#5865F2" />
|
|
5
|
+
<path
|
|
6
|
+
fill="#fff"
|
|
7
|
+
fill-rule="evenodd"
|
|
8
|
+
d="M25.71 28.15C30.25 28 32 25.02 32 25.02c0-6.61-2.96-11.98-2.96-11.98-2.96-2.22-5.77-2.15-5.77-2.15l-.29.32c3.5 1.07 5.12 2.61 5.12 2.61a16.75 16.75 0 0 0-10.34-1.93l-.35.04a15.43 15.43 0 0 0-5.88 1.9s1.71-1.63 5.4-2.7l-.2-.24s-2.81-.07-5.77 2.15c0 0-2.96 5.37-2.96 11.98 0 0 1.73 2.98 6.27 3.13l1.37-1.7c-2.6-.79-3.6-2.43-3.6-2.43l.58.35.09.06.08.04.02.01.08.05a17.25 17.25 0 0 0 4.52 1.58 14.4 14.4 0 0 0 8.3-.86c.72-.27 1.52-.66 2.37-1.21 0 0-1.03 1.68-3.72 2.44.61.78 1.35 1.67 1.35 1.67Zm-9.55-9.6c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28.01-1.25-.93-2.28-2.1-2.28Zm7.5 0c-1.17 0-2.1 1.03-2.1 2.28 0 1.25.95 2.28 2.1 2.28 1.17 0 2.1-1.03 2.1-2.28 0-1.25-.93-2.28-2.1-2.28Z"
|
|
9
|
+
clip-rule="evenodd"
|
|
10
|
+
/>
|
|
11
|
+
</g>
|
|
12
|
+
</g>
|
|
13
|
+
<defs>
|
|
14
|
+
<clipPath id="a"><rect width="40" height="40" fill="#fff" rx="20" /></clipPath>
|
|
15
|
+
<clipPath id="b"><path fill="#fff" d="M0 0h40v40H0z" /></clipPath>
|
|
16
|
+
</defs>
|
|
17
|
+
</svg>`}};
|
package/build/4028.index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const
|
|
1
|
+
export const __webpack_esm_id__=4028;export const __webpack_esm_ids__=[4028];export const __webpack_esm_modules__={74028:(e,_,o)=>{o.r(_),o.d(_,{mobileSvg:()=>l});const l=o(52788).JW`<svg fill="none" viewBox="0 0 20 20">
|
|
2
2
|
<path fill="currentColor" d="M10.81 5.81a2 2 0 1 1-4 0 2 2 0 0 1 4 0Z" />
|
|
3
3
|
<path
|
|
4
4
|
fill="currentColor"
|