@saasquatch/mint-components 1.7.1-0 → 1.7.2-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{ShadowViewAddon-b997bca7.js → ShadowViewAddon-d0a52d38.js} +17 -12
- package/dist/cjs/{global-de2bf4f7.js → global-6785de71.js} +1 -1
- package/dist/cjs/{index.module-ccd9cbad.js → index.module-02576958.js} +8 -8
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/mint-components.cjs.js +2 -2
- package/dist/cjs/{re-render-378abee0.js → re-render-c484d9ab.js} +1 -1
- package/dist/cjs/sqm-asset-card.cjs.entry.js +1 -1
- package/dist/cjs/sqm-big-stat_39.cjs.entry.js +37 -37
- package/dist/cjs/sqm-close-button.cjs.entry.js +1 -1
- package/dist/cjs/sqm-graphql-client-provider.cjs.entry.js +3 -3
- package/dist/cjs/sqm-instant-access-registration.cjs.entry.js +3 -3
- package/dist/cjs/sqm-leaderboard-rank.cjs.entry.js +4 -4
- package/dist/cjs/sqm-logout-current-user.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-navigation-sidebar-item-view-7e751389.js → sqm-navigation-sidebar-item-view-21dcca39.js} +2 -2
- package/dist/cjs/sqm-navigation-sidebar-item.cjs.entry.js +2 -2
- package/dist/cjs/sqm-navigation-sidebar.cjs.entry.js +2 -2
- package/dist/cjs/sqm-password-field.cjs.entry.js +2 -2
- package/dist/cjs/sqm-popup-container.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-email-verification-view-6f0aea50.js → sqm-portal-email-verification-view-d6e14e8d.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +6 -6
- package/dist/cjs/sqm-portal-forgot-password.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-logout.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-profile-view-0abcf3b8.js → sqm-portal-profile-view-13a1229f.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +5 -5
- package/dist/cjs/sqm-portal-protected-route.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-registration-form.cjs.entry.js +4 -4
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +5 -5
- package/dist/cjs/sqm-portal-verify-email.cjs.entry.js +5 -5
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +5 -5
- package/dist/cjs/sqm-referred-registration.cjs.entry.js +3 -3
- package/dist/cjs/sqm-rewards-table-customer-note-column.cjs.entry.js +2 -2
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +8 -8
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +48 -48
- package/dist/cjs/sqm-tab.cjs.entry.js +2 -2
- package/dist/cjs/sqm-tabs.cjs.entry.js +3 -3
- package/dist/cjs/{useChildElements-4cfa421a.js → useChildElements-74eb05b6.js} +1 -1
- package/dist/cjs/{useInstantAccessRegistration-45026b1f.js → useInstantAccessRegistration-11ff69f8.js} +2 -2
- package/dist/cjs/{useReferralTable-f1f85db9.js → useReferralTable-6ca43436.js} +6 -6
- package/dist/cjs/{useRegistrationFormState-7e9641c4.js → useRegistrationFormState-01d63bda.js} +1 -1
- package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +7 -7
- package/dist/collection/components/sqm-share-link/useShareLink.js +6 -1
- package/dist/esm/{ShadowViewAddon-5508ac9d.js → ShadowViewAddon-2c82b555.js} +17 -12
- package/dist/esm/{global-3cb5aea4.js → global-91edfca0.js} +1 -1
- package/dist/esm/{index.module-c549b2c8.js → index.module-99d8522e.js} +2 -2
- package/dist/esm/loader.js +2 -2
- package/dist/esm/mint-components.js +2 -2
- package/dist/esm/{re-render-3211b893.js → re-render-096db0eb.js} +1 -1
- package/dist/esm/sqm-asset-card.entry.js +1 -1
- package/dist/esm/sqm-big-stat_39.entry.js +39 -39
- package/dist/esm/sqm-close-button.entry.js +1 -1
- package/dist/esm/sqm-graphql-client-provider.entry.js +3 -3
- package/dist/esm/sqm-instant-access-registration.entry.js +3 -3
- package/dist/esm/sqm-leaderboard-rank.entry.js +4 -4
- package/dist/esm/sqm-logout-current-user.entry.js +2 -2
- package/dist/esm/{sqm-navigation-sidebar-item-view-e9296d4b.js → sqm-navigation-sidebar-item-view-eb765b9c.js} +2 -2
- package/dist/esm/sqm-navigation-sidebar-item.entry.js +2 -2
- package/dist/esm/sqm-navigation-sidebar.entry.js +2 -2
- package/dist/esm/sqm-password-field.entry.js +2 -2
- package/dist/esm/sqm-popup-container.entry.js +1 -1
- package/dist/esm/{sqm-portal-email-verification-view-87413403.js → sqm-portal-email-verification-view-408af676.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +6 -6
- package/dist/esm/sqm-portal-forgot-password.entry.js +4 -4
- package/dist/esm/sqm-portal-logout.entry.js +2 -2
- package/dist/esm/{sqm-portal-profile-view-977710a3.js → sqm-portal-profile-view-efa44888.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +5 -5
- package/dist/esm/sqm-portal-protected-route.entry.js +4 -4
- package/dist/esm/sqm-portal-registration-form.entry.js +4 -4
- package/dist/esm/sqm-portal-reset-password.entry.js +5 -5
- package/dist/esm/sqm-portal-verify-email.entry.js +5 -5
- package/dist/esm/sqm-referral-table_11.entry.js +5 -5
- package/dist/esm/sqm-referred-registration.entry.js +3 -3
- package/dist/esm/sqm-rewards-table-customer-note-column.entry.js +2 -2
- package/dist/esm/sqm-rewards-table_9.entry.js +8 -8
- package/dist/esm/sqm-stencilbook.entry.js +48 -48
- package/dist/esm/sqm-tab.entry.js +2 -2
- package/dist/esm/sqm-tabs.entry.js +3 -3
- package/dist/esm/{useChildElements-a97f3864.js → useChildElements-b945a965.js} +1 -1
- package/dist/esm/{useInstantAccessRegistration-47501f2c.js → useInstantAccessRegistration-7f9f4360.js} +2 -2
- package/dist/esm/{useReferralTable-d5398ef2.js → useReferralTable-e425f29d.js} +6 -6
- package/dist/esm/{useRegistrationFormState-b1f730bd.js → useRegistrationFormState-c9d54ef3.js} +1 -1
- package/dist/esm-es5/ShadowViewAddon-2c82b555.js +1 -0
- package/dist/esm-es5/{global-3cb5aea4.js → global-91edfca0.js} +1 -1
- package/dist/esm-es5/{index.module-c549b2c8.js → index.module-99d8522e.js} +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/{re-render-3211b893.js → re-render-096db0eb.js} +1 -1
- package/dist/esm-es5/sqm-asset-card.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_39.entry.js +1 -1
- package/dist/esm-es5/sqm-close-button.entry.js +1 -1
- package/dist/esm-es5/sqm-graphql-client-provider.entry.js +1 -1
- package/dist/esm-es5/sqm-instant-access-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-leaderboard-rank.entry.js +1 -1
- package/dist/esm-es5/sqm-logout-current-user.entry.js +1 -1
- package/dist/esm-es5/{sqm-navigation-sidebar-item-view-e9296d4b.js → sqm-navigation-sidebar-item-view-eb765b9c.js} +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar-item.entry.js +1 -1
- package/dist/esm-es5/sqm-navigation-sidebar.entry.js +1 -1
- package/dist/esm-es5/sqm-password-field.entry.js +1 -1
- package/dist/esm-es5/sqm-popup-container.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-email-verification-view-87413403.js → sqm-portal-email-verification-view-408af676.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-logout.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-977710a3.js → sqm-portal-profile-view-efa44888.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-protected-route.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-registration-form.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-verify-email.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-referred-registration.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-column.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/sqm-tab.entry.js +1 -1
- package/dist/esm-es5/sqm-tabs.entry.js +1 -1
- package/dist/esm-es5/{useChildElements-a97f3864.js → useChildElements-b945a965.js} +1 -1
- package/dist/esm-es5/{useInstantAccessRegistration-47501f2c.js → useInstantAccessRegistration-7f9f4360.js} +1 -1
- package/dist/esm-es5/{useReferralTable-d5398ef2.js → useReferralTable-e425f29d.js} +1 -1
- package/dist/esm-es5/useRegistrationFormState-c9d54ef3.js +1 -0
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/mint-components.js +1 -1
- package/dist/mint-components/{p-626dc2ce.entry.js → p-00196b47.entry.js} +5 -5
- package/dist/mint-components/{p-b16930c5.entry.js → p-05f069ce.entry.js} +2 -2
- package/dist/mint-components/{p-086bc650.system.js → p-0943b547.system.js} +1 -1
- package/dist/mint-components/p-09cdd442.system.entry.js +1 -0
- package/dist/mint-components/{p-b0008fd2.system.entry.js → p-0a892e0f.system.entry.js} +1 -1
- package/dist/mint-components/p-0ad6459e.entry.js +1 -0
- package/dist/mint-components/{p-e5883a5f.entry.js → p-0b8f38a8.entry.js} +1 -1
- package/dist/mint-components/p-0de80de6.js +1 -0
- package/dist/mint-components/{p-c5fe9915.system.entry.js → p-13570402.system.entry.js} +1 -1
- package/dist/mint-components/{p-35604900.system.entry.js → p-1e884e97.system.entry.js} +1 -1
- package/dist/mint-components/p-1fa097d3.entry.js +1 -0
- package/dist/mint-components/p-22d1e92e.system.js +1 -0
- package/dist/mint-components/{p-fc7d9d19.system.entry.js → p-25ad41bd.system.entry.js} +1 -1
- package/dist/mint-components/{p-f60232ab.entry.js → p-2adb5310.entry.js} +1 -1
- package/dist/mint-components/{p-b4f1239f.system.entry.js → p-2bba85ac.system.entry.js} +1 -1
- package/dist/mint-components/{p-eaf2b723.js → p-2e9a5714.js} +1 -1
- package/dist/mint-components/{p-bb7f5f8b.entry.js → p-3e0bb7f9.entry.js} +1 -1
- package/dist/mint-components/{p-a3e28532.system.js → p-41c62fef.system.js} +1 -1
- package/dist/mint-components/{p-4f09f749.js → p-42844992.js} +1 -1
- package/dist/mint-components/{p-66a30837.system.entry.js → p-53f4f635.system.entry.js} +1 -1
- package/dist/mint-components/{p-239f4be8.entry.js → p-57a89487.entry.js} +1 -1
- package/dist/mint-components/p-59318941.system.js +1 -0
- package/dist/mint-components/{p-6fc0c1a8.system.entry.js → p-66e3cb0c.system.entry.js} +1 -1
- package/dist/mint-components/{p-600b792e.system.entry.js → p-6d1a2821.system.entry.js} +1 -1
- package/dist/mint-components/p-6e793d76.system.entry.js +1 -0
- package/dist/mint-components/p-6fed24de.entry.js +1 -0
- package/dist/mint-components/{p-10b03137.system.entry.js → p-7d5ee633.system.entry.js} +1 -1
- package/dist/mint-components/{p-f2ec822a.js → p-831d1332.js} +1 -1
- package/dist/mint-components/{p-34c90e51.system.entry.js → p-84ee5462.system.entry.js} +1 -1
- package/dist/mint-components/p-878daf52.js +1 -0
- package/dist/mint-components/p-89e86134.entry.js +1 -0
- package/dist/mint-components/{p-cdddccfe.js → p-8b28c511.js} +1 -1
- package/dist/mint-components/{p-1d78d8ba.system.js → p-8b2b5d37.system.js} +1 -1
- package/dist/mint-components/{p-18ecc54e.system.entry.js → p-8f1974f8.system.entry.js} +1 -1
- package/dist/mint-components/{p-2d6f3bbc.entry.js → p-9a74f167.entry.js} +1 -1
- package/dist/mint-components/{p-6cb2eff2.system.entry.js → p-9b2e0735.system.entry.js} +1 -1
- package/dist/mint-components/{p-46f41615.system.js → p-9f3a0252.system.js} +1 -1
- package/dist/mint-components/{p-c9210918.entry.js → p-a23a2a86.entry.js} +1 -1
- package/dist/mint-components/{p-cf5b20fc.system.js → p-a372d9cf.system.js} +1 -1
- package/dist/mint-components/{p-f6ee8a24.system.entry.js → p-a65e2e14.system.entry.js} +1 -1
- package/dist/mint-components/{p-7195cdd7.system.entry.js → p-a6c026bc.system.entry.js} +1 -1
- package/dist/mint-components/{p-1f4828ad.system.js → p-a79208b8.system.js} +1 -1
- package/dist/mint-components/{p-8b02bfc7.system.entry.js → p-abfb3897.system.entry.js} +1 -1
- package/dist/mint-components/{p-4069a5ac.entry.js → p-b0ef4f17.entry.js} +1 -1
- package/dist/mint-components/{p-6a578070.entry.js → p-b0f3c6c5.entry.js} +2 -2
- package/dist/mint-components/{p-1527ce05.entry.js → p-b4fddf49.entry.js} +1 -1
- package/dist/mint-components/{p-125c8c60.system.entry.js → p-b5b9aaba.system.entry.js} +1 -1
- package/dist/mint-components/{p-5ef6521c.system.js → p-b6dafb9b.system.js} +1 -1
- package/dist/mint-components/p-b9bf7576.system.js +1 -0
- package/dist/mint-components/{p-36182652.entry.js → p-b9c7b7ef.entry.js} +1 -1
- package/dist/mint-components/{p-8f13044b.system.entry.js → p-ba295930.system.entry.js} +1 -1
- package/dist/mint-components/{p-ac453316.system.entry.js → p-be8f19ba.system.entry.js} +1 -1
- package/dist/mint-components/{p-d41556bd.entry.js → p-c24d34d8.entry.js} +1 -1
- package/dist/mint-components/{p-b43ea640.entry.js → p-c2bd46e2.entry.js} +1 -1
- package/dist/mint-components/{p-428256ab.js → p-ce5b03c8.js} +8 -3
- package/dist/mint-components/p-ce748fab.js +1 -0
- package/dist/mint-components/{p-2ff85968.entry.js → p-d5e83056.entry.js} +1 -1
- package/dist/mint-components/{p-bb5ec5c2.js → p-d65bf9dc.js} +1 -1
- package/dist/mint-components/{p-706a112f.entry.js → p-d846f34f.entry.js} +2 -2
- package/dist/mint-components/p-db9652e7.system.entry.js +1 -0
- package/dist/mint-components/{p-b4deff58.entry.js → p-e058ba88.entry.js} +1 -1
- package/dist/mint-components/{p-c1962b42.entry.js → p-e3de804b.entry.js} +1 -1
- package/dist/mint-components/{p-d9e05949.system.entry.js → p-e49392c3.system.entry.js} +1 -1
- package/dist/mint-components/p-e9197aac.entry.js +1 -0
- package/dist/mint-components/{p-6ff1de8a.js → p-eab33344.js} +1 -1
- package/dist/mint-components/{p-01d691c5.system.entry.js → p-ed9374ef.system.entry.js} +1 -1
- package/dist/mint-components/{p-e0604038.system.js → p-ee7bc1c7.system.js} +1 -1
- package/dist/mint-components/{p-bb9a9cf3.entry.js → p-ef6a3ff3.entry.js} +2 -2
- package/dist/mint-components/{p-25fd6ee0.system.entry.js → p-f04ce58d.system.entry.js} +1 -1
- package/dist/mint-components/p-f064bf28.entry.js +1 -0
- package/dist/mint-components/p-f21aa0bd.entry.js +1 -0
- package/dist/mint-components/{p-01be40a8.system.entry.js → p-f60d9f3e.system.entry.js} +1 -1
- package/dist/mint-components/{p-9df46d84.system.js → p-f63961b4.system.js} +1 -1
- package/dist/mint-components/{p-b953ae7f.js → p-f71cfd64.js} +1 -1
- package/dist/mint-components/{p-e3fc9e65.system.entry.js → p-f7b5c0ac.system.entry.js} +1 -1
- package/docs/docs.docx +0 -0
- package/package.json +1 -1
- package/dist/esm-es5/ShadowViewAddon-5508ac9d.js +0 -1
- package/dist/esm-es5/useRegistrationFormState-b1f730bd.js +0 -1
- package/dist/mint-components/p-2108937d.js +0 -1
- package/dist/mint-components/p-37678b57.entry.js +0 -1
- package/dist/mint-components/p-3c02b80b.entry.js +0 -1
- package/dist/mint-components/p-5da880d1.js +0 -1
- package/dist/mint-components/p-6a15c0c5.system.entry.js +0 -1
- package/dist/mint-components/p-79787bf3.system.js +0 -1
- package/dist/mint-components/p-844b9513.entry.js +0 -1
- package/dist/mint-components/p-87a6bfa4.entry.js +0 -1
- package/dist/mint-components/p-99ec46fe.js +0 -1
- package/dist/mint-components/p-a984852e.entry.js +0 -1
- package/dist/mint-components/p-ad1fb768.entry.js +0 -1
- package/dist/mint-components/p-b2f447a6.entry.js +0 -1
- package/dist/mint-components/p-c0e7d16e.system.js +0 -1
- package/dist/mint-components/p-c32a8733.system.js +0 -1
- package/dist/mint-components/p-e61bedb4.system.entry.js +0 -1
- package/dist/mint-components/p-fd8addea.system.entry.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as n,d as t,s as e,c as i,a as r,e as o,f as s,h as u,i as a,j as c,k as f}from"./p-901f5b80.js";const l=(t,e)=>n((()=>t),e);function h(n){this.message=n}(h.prototype=new Error).name="InvalidCharacterError";var d="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(n){var t=String(n).replace(/=+$/,"");if(t.length%4==1)throw new h("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,i,r=0,o=0,s="";i=t.charAt(o++);~i&&(e=r%4?64*e+i:i,r++%4)?s+=String.fromCharCode(255&e>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};function v(n){var t=n.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(d(n).replace(/(.)/g,(function(n,t){var e=t.charCodeAt(0).toString(16).toUpperCase();return e.length<2&&(e="0"+e),"%"+e})))}(t)}catch(n){return d(t)}}function m(n){this.message=n}function p(n,t){if("string"!=typeof n)throw new m("Invalid token specified");var e=!0===(t=t||{}).header?0:1;try{return JSON.parse(v(n.split(".")[e]))}catch(n){throw new m("Invalid token specified: "+n.message)}}(m.prototype=new Error).name="InvalidTokenError";const{toString:y,hasOwnProperty:b}=Object.prototype,w=Function.prototype.toString,g=new Map;function E(n,t){try{return S(n,t)}finally{g.clear()}}function S(n,t){if(n===t)return!0;const e=y.call(n);if(e!==y.call(t))return!1;switch(e){case"[object Array]":if(n.length!==t.length)return!1;case"[object Object]":{if(N(n,t))return!0;const e=I(n),i=I(t),r=e.length;if(r!==i.length)return!1;for(let n=0;n<r;++n)if(!b.call(t,e[n]))return!1;for(let i=0;i<r;++i){const r=e[i];if(!S(n[r],t[r]))return!1}return!0}case"[object Error]":return n.name===t.name&&n.message===t.message;case"[object Number]":if(n!=n)return t!=t;case"[object Boolean]":case"[object Date]":return+n==+t;case"[object RegExp]":case"[object String]":return n==`${t}`;case"[object Map]":case"[object Set]":{if(n.size!==t.size)return!1;if(N(n,t))return!0;const i=n.entries(),r="[object Map]"===e;for(;;){const n=i.next();if(n.done)break;const[e,o]=n.value;if(!t.has(e))return!1;if(r&&!S(o,t.get(e)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":n=new Uint8Array(n),t=new Uint8Array(t);case"[object DataView]":{let e=n.byteLength;if(e===t.byteLength)for(;e--&&n[e]===t[e];);return-1===e}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const e=w.call(n);return e===w.call(t)&&!function(n){const t=n.length-T.length;return t>=0&&n.indexOf(T,t)===t}(e)}}return!1}function I(n){return Object.keys(n).filter(O,n)}function O(n){return void 0!==this[n]}const T="{ [native code] }";function N(n,t){let e=g.get(n);if(e){if(e.has(t))return!0}else g.set(n,e=new Set);return e.add(t),!1}var F=Object.defineProperty,C=Object.defineProperties,j=Object.getOwnPropertyDescriptors,D=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,x=(n,t,e)=>t in n?F(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,P=(n,t)=>{for(var e in t||(t={}))A.call(t,e)&&x(n,e,t[e]);if(D)for(var e of D(t))_.call(t,e)&&x(n,e,t[e]);return n},k=(n,t)=>C(n,j(t));function V(){var n,t,e;return window.SquatchAndroid?{type:"SquatchAndroid",android:window.SquatchAndroid,widgetIdent:window.widgetIdent}:window.SquatchPortal?{type:"SquatchPortal",env:window.SquatchPortal}:window.SquatchAdmin?{type:"SquatchAdmin",adminSDK:window.SquatchAdmin}:(window.widgetIdent||(null==(n=window.frameElement)?void 0:n.squatchJsApi))&&"demo"!==(null==(t=window.widgetIdent)?void 0:t.env)?{type:"SquatchJS2",api:null==(e=window.frameElement)?void 0:e.squatchJsApi,widgetIdent:window.widgetIdent}:{type:"None"}}function R(){const n=V();return"None"===n.type||"SquatchAdmin"===n.type}function M(){var n;const t=V();switch(t.type){case"SquatchAndroid":case"SquatchIOS":case"SquatchJS2":return null==(n=t.widgetIdent)?void 0:n.tenantAlias;case"SquatchAdmin":case"None":return"demo";case"SquatchPortal":return t.env.tenantAlias}}var U="https://app.referralsaasquatch.com";function q(){var n,t;const e=V();switch(e.type){case"SquatchAndroid":case"SquatchIOS":case"SquatchJS2":return(null==(n=e.widgetIdent)?void 0:n.appDomain)||U;case"SquatchPortal":return(null==(t=e.env)?void 0:t.appDomain)||U;case"SquatchAdmin":case"None":return U}}var $=(()=>{var n;try{return null==(n=null==window?void 0:window.localStorage)?void 0:n.getItem("debug")}catch(n){return!1}})();function L(n,...t){$&&console.debug(`sq:environment:${n}`,...t)}var B=(...n)=>L("history",...n);function J(n){if("string"==typeof n)return n;const t=new URL(n.pathname,window.origin);return n.search&&(t.search=n.search),n.hash&&(t.hash=n.hash),t}function G(){return window.squatchHistory=window.squatchHistory||function(){if("SquatchPortal"===V().type){let n=function(n){const t=window.history[n];return function(...e){const i=t.apply(window.history,e),r=new Event(n);return window.dispatchEvent(r),i}};return window.history.pushState=n("pushState"),window.history.replaceState=n("replaceState"),new class{constructor(){this.listeners=new Set,window.addEventListener("popstate",this.notify.bind(this)),window.addEventListener("pushState",this.notify.bind(this)),window.addEventListener("replaceState",this.notify.bind(this))}listen(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}notify(){B("notifying listeners of route change",this.location),this.listeners&&this.listeners.forEach((n=>n()))}get location(){return{pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:window.history.state}}back(){this.go(-1)}forward(){this.go(1)}go(n){window.history.go(n)}push(n,t){const e=J(n);window.history.pushState(t,"",e)}replace(n,t){const e=J(n);window.history.replaceState(t,"",e)}}}return new class{constructor(){this.history=[{pathname:"/",search:"",hash:""}],this.index=0,this.listeners=new Set}listen(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}current(){return this.history[this.index]}get state(){return this.current().state}notify(){B("notifying listeners of route change",this.location),this.listeners.forEach((n=>n()))}get location(){return this.history[this.index]}back(){this.go(-1)}forward(){this.go(1)}go(n){this.index+=n,this.index<0&&(this.index=0),this.index>=this.history.length&&(this.index=this.history.length-1),this.notify()}push(n,t){let e;e="string"==typeof n?{pathname:n,search:this.history[this.index].search,hash:this.history[this.index].hash,state:t}:k(P({},n),{state:t}),this.index++,this.history.splice(this.index,this.history.length,e),this.notify()}replace(n,t){this.history[this.index]="string"==typeof n?{pathname:n,search:"",hash:"",state:t}:k(P({},n),{state:t}),this.notify()}}}(),window.squatchHistory}var H=new class{get location(){return G().location}listen(n){return G().listen(n)}back(){G().back()}forward(){G().forward()}go(n){G().go(n)}push(n,t){G().push(n,t)}replace(n,t){G().replace(n,t)}};function Y(n){if(n&&/^[a-z]{2}_(?:[A-Z]{2}|[0-9]{3})$/.test(n))return n}function Q(){var n;let e=window.squatchLocale;if(!e){L("sq:locale","Creating locale context provider");const i=(null==(n=window.widgetIdent)?void 0:n.locale)??Y(navigator.language.replaceAll("-","_"));e=new t({element:document.documentElement,initialState:i,contextName:"sq:locale"}).start(),window.squatchLocale=e}return e}var W=(...n)=>L("sq:locale",...n),X=(...n)=>L("sq:locale",...n),z=new e({contextName:"sq:user-identity",element:(()=>{const n="__environment_context_listener";let t=document.getElementById(n);return t||(t=document.createElement("div"),t.id=n,document.documentElement.appendChild(t)),t})(),onChange:async n=>{var t;const e=Q(),i=(null==(t=window.widgetIdent)?void 0:t.locale)??Y(navigator.language.replaceAll("-","_"));let r;if(n){X("User context changed, refetching locale");const n=await async function(){var n;W("Fetching locale from GraphQL for current user");try{const t=await fetch(`${q()}/api/v1/${M()}/graphql`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${null==(n=rn())?void 0:n.jwt}`},body:JSON.stringify({query:"\n query {\n viewer {\n ... on User {\n locale\n }\n }\n }\n"})});if(!t.ok)throw new Error("Failed to fetch locale");const e=await t.json();if(e.errors)throw new Error(JSON.stringify(e.errors,null,2));return e.data.viewer.locale||void 0}catch(n){return void W("Failed to fetch locale for current user",n.message)}}();e.context!==n&&(X(`New value fetched from GraphQL [${n}]`),r=n||i)}else r=i;X(`Setting locale context to [${r}]`),e.context=r}}),K=(...n)=>L("sq:user-identity",...n);function Z(){let n=window.squatchUserIdentity;return n||(K("Creating user context provider"),n=new t({element:document.documentElement,initialState:tn(),contextName:"sq:user-identity"}).start(),window.squatchUserIdentity=n,X("Starting user context listener for locale updates"),z.start()),n}function nn(n){if(n)try{const t=p(n),e=t.exp;let i,r;if(function(n){return n.sub&&/.*:.*@.*:users/.test(n.sub)}(t)){const n=t.sub.match(/(.*):(.*)@(.*):users/);(null==n?void 0:n[1])&&(r=atob(n[1])),(null==n?void 0:n[2])&&(i=atob(n[2]))}else(function(n){return n.user&&n.user.id&&n.user.accountId})(t)&&(r=t.user.accountId,i=t.user.id);return i&&r?e&&Date.now()>=1e3*e?void K("JWT has expired"):{id:i,accountId:r,jwt:n}:void K("No user information")}catch(n){return void K("Invalid JWT")}}function tn(){const n=V();switch(n.type){case"SquatchIOS":case"SquatchAndroid":case"SquatchJS2":if(!n.widgetIdent)return;const{userId:t,accountId:e,token:i}=n.widgetIdent;if(!t||!e||!i)return;return{id:n.widgetIdent.userId,accountId:n.widgetIdent.accountId,jwt:n.widgetIdent.token};case"SquatchPortal":const r=new URLSearchParams(document.location.search);if(r.has("jwt"))return nn(r.get("jwt"));const o=localStorage.getItem("sq:user-identity");if(!o)return;try{const n=JSON.parse(o),t=nn(n.jwt);return t?P(P({},n),t):void 0}catch(n){return}case"SquatchAdmin":case"None":return}}function en(n){const t=Z();E(t.context,n)||(K(`Setting user context value [${JSON.stringify(n)}]`),t.context=n),n&&"SquatchPortal"===V().type?localStorage.setItem("sq:user-identity",JSON.stringify(n)):n||localStorage.removeItem("sq:user-identity")}function rn(){var n;return null==(n=window.squatchUserIdentity)?void 0:n.context}var on=(...n)=>L("sq:program-id",...n);function sn(){var n;let e=window.squatchProgramId;return e||(on("Creating program context provider"),e=new t({element:document.documentElement,initialState:(null==(n=window.widgetIdent)?void 0:n.programId)||void 0,contextName:"sq:program-id"}).start(),window.squatchProgramId=e),e}function un(n){const t=sn();t.context!==n&&(on(`Setting program context value [${n}]`),t.context=n)}function an(n){return(an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var cn="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function fn(n,t){for(var e,i=/\r\n|[\n\r]/g,r=1,o=t+1;(e=i.exec(n.body))&&e.index<t;)r+=1,o=t+1-(e.index+e[0].length);return{line:r,column:o}}function ln(n,t){var e=n.locationOffset.column-1,i=dn(e)+n.body,r=t.line-1,o=t.line+(n.locationOffset.line-1),s=t.column+(1===t.line?e:0),u="".concat(n.name,":").concat(o,":").concat(s,"\n"),a=i.split(/\r\n|[\n\r]/g),c=a[r];if(c.length>120){for(var f=Math.floor(s/80),l=s%80,h=[],d=0;d<c.length;d+=80)h.push(c.slice(d,d+80));return u+hn([["".concat(o),h[0]]].concat(h.slice(1,f+1).map((function(n){return["",n]})),[[" ",dn(l-1)+"^"],["",h[f+1]]]))}return u+hn([["".concat(o-1),a[r-1]],["".concat(o),c],["",dn(s-1)+"^"],["".concat(o+1),a[r+1]]])}function hn(n){var t=n.filter((function(n){return void 0!==n[1]})),e=Math.max.apply(Math,t.map((function(n){return n[0].length})));return t.map((function(n){var t,i=n[1];return dn(e-(t=n[0]).length)+t+(i?" | "+i:" |")})).join("\n")}function dn(n){return Array(n+1).join(" ")}function vn(n){return(vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function mn(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function pn(n,t){return!t||"object"!==vn(t)&&"function"!=typeof t?yn(n):t}function yn(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function bn(n){var t="function"==typeof Map?new Map:void 0;return(bn=function(n){if(null===n||!function(n){return-1!==Function.toString.call(n).indexOf("[native code]")}(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(n))return t.get(n);t.set(n,e)}function e(){return wn(n,arguments,Sn(this).constructor)}return e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),En(e,n)})(n)}function wn(n,t,e){return(wn=gn()?Reflect.construct:function(n,t,e){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(n,i));return e&&En(r,e.prototype),r}).apply(null,arguments)}function gn(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(n){return!1}}function En(n,t){return(En=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}function Sn(n){return(Sn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}var In=function(){!function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&En(n,t)}(o,bn(Error));var n,t,e,i,r=(n=o,t=gn(),function(){var e,i=Sn(n);if(t){var r=Sn(this).constructor;e=Reflect.construct(i,arguments,r)}else e=i.apply(this,arguments);return pn(this,e)});function o(n,t,e,i,s,u,a){var c,f,l,h,d;!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),d=r.call(this,n);var v,m=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,p=e;!p&&m&&(p=null===(v=m[0].loc)||void 0===v?void 0:v.source);var y,b=i;!b&&m&&(b=m.reduce((function(n,t){return t.loc&&n.push(t.loc.start),n}),[])),b&&0===b.length&&(b=void 0),i&&e?y=i.map((function(n){return fn(e,n)})):m&&(y=m.reduce((function(n,t){return t.loc&&n.push(fn(t.loc.source,t.loc.start)),n}),[]));var w,g=a;if(null==g&&null!=u){var E=u.extensions;"object"==an(w=E)&&null!==w&&(g=E)}return Object.defineProperties(yn(d),{name:{value:"GraphQLError"},message:{value:n,enumerable:!0,writable:!0},locations:{value:null!==(c=y)&&void 0!==c?c:void 0,enumerable:null!=y},path:{value:null!=s?s:void 0,enumerable:null!=s},nodes:{value:null!=m?m:void 0},source:{value:null!==(f=p)&&void 0!==f?f:void 0},positions:{value:null!==(l=b)&&void 0!==l?l:void 0},originalError:{value:u},extensions:{value:null!==(h=g)&&void 0!==h?h:void 0,enumerable:null!=g}}),null!=u&&u.stack?(Object.defineProperty(yn(d),"stack",{value:u.stack,writable:!0,configurable:!0}),pn(d)):(Error.captureStackTrace?Error.captureStackTrace(yn(d),o):Object.defineProperty(yn(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return e=o,(i=[{key:"toString",value:function(){return function(n){var t,e=n.message;if(n.nodes)for(var i=0,r=n.nodes;i<r.length;i++){var o=r[i];o.loc&&(e+="\n\n"+ln((t=o.loc).source,fn(t.source,t.start)))}else if(n.source&&n.locations)for(var s=0,u=n.locations;s<u.length;s++)e+="\n\n"+ln(n.source,u[s]);return e}(this)}},{key:cn,get:function(){return"Object"}}])&&mn(e.prototype,i),o}();function On(n,t,e){return new In("Syntax Error: ".concat(e),void 0,n,[t])}var Tn=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"}),Nn="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function Fn(n){var t=n.prototype.toJSON;"function"==typeof t||function(){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),n.prototype.inspect=t,Nn&&(n.prototype[Nn]=t)}var Cn=function(){function n(n,t,e){this.start=n.start,this.end=t.end,this.startToken=n,this.endToken=t,this.source=e}return n.prototype.toJSON=function(){return{start:this.start,end:this.end}},n}();Fn(Cn);var jn=function(){function n(n,t,e,i,r,o,s){this.kind=n,this.start=t,this.end=e,this.line=i,this.column=r,this.value=s,this.prev=o,this.next=null}return n.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},n}();function Dn(n){return null!=n&&"string"==typeof n.kind}Fn(jn);var An=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function _n(n){return(_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function xn(n){return Pn(n,[])}function Pn(n,t){switch(_n(n)){case"string":return JSON.stringify(n);case"function":return n.name?"[function ".concat(n.name,"]"):"[function]";case"object":return null===n?"null":function(n,t){if(-1!==t.indexOf(n))return"[Circular]";var e=[].concat(t,[n]),i=function(n){var t=n[String(Nn)];return"function"==typeof t?t:"function"==typeof n.inspect?n.inspect:void 0}(n);if(void 0!==i){var r=i.call(n);if(r!==n)return"string"==typeof r?r:Pn(r,e)}else if(Array.isArray(n))return function(n,t){if(0===n.length)return"[]";if(t.length>2)return"[Array]";for(var e=Math.min(10,n.length),i=n.length-e,r=[],o=0;o<e;++o)r.push(Pn(n[o],t));return 1===i?r.push("... 1 more item"):i>1&&r.push("... ".concat(i," more items")),"["+r.join(", ")+"]"}(n,e);return function(n,t){var e=Object.keys(n);return 0===e.length?"{}":t.length>2?"["+function(n){var t=Object.prototype.toString.call(n).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof n.constructor){var e=n.constructor.name;if("string"==typeof e&&""!==e)return e}return t}(n)+"]":"{ "+e.map((function(e){return e+": "+Pn(n[e],t)})).join(", ")+" }"}(n,e)}(n,t);default:return String(n)}}function kn(n,t){if(!Boolean(n))throw new Error(t)}function Vn(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}var Rn=function(){function n(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof n||kn(0,"Body must be a string. Received: ".concat(xn(n),".")),this.body=n,this.name=t,this.locationOffset=e,this.locationOffset.line>0||kn(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||kn(0,"column in locationOffset is 1-indexed and must be positive.")}var t,e;return t=n,(e=[{key:cn,get:function(){return"Source"}}])&&Vn(t.prototype,e),n}(),Mn=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function Un(n){var t=n.split(/\r\n|[\n\r]/g),e=function(n){for(var t,e=!0,i=!0,r=0,o=null,s=0;s<n.length;++s)switch(n.charCodeAt(s)){case 13:10===n.charCodeAt(s+1)&&++s;case 10:e=!1,i=!0,r=0;break;case 9:case 32:++r;break;default:i&&!e&&(null===o||r<o)&&(o=r),i=!1}return null!==(t=o)&&void 0!==t?t:0}(n);if(0!==e)for(var i=1;i<t.length;i++)t[i]=t[i].slice(e);for(var r=0;r<t.length&&qn(t[r]);)++r;for(var o=t.length;o>r&&qn(t[o-1]);)--o;return t.slice(r,o).join("\n")}function qn(n){for(var t=0;t<n.length;++t)if(" "!==n[t]&&"\t"!==n[t])return!1;return!0}var $n=function(){function n(n){var t=new jn(An.SOF,0,0,0,0,null);this.source=n,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=n.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var n=this.token;if(n.kind!==An.EOF)do{var t;n=null!==(t=n.next)&&void 0!==t?t:n.next=Bn(this,n)}while(n.kind===An.COMMENT);return n},n}();function Ln(n){return isNaN(n)?An.EOF:n<127?JSON.stringify(String.fromCharCode(n)):'"\\u'.concat(("00"+n.toString(16).toUpperCase()).slice(-4),'"')}function Bn(n,t){for(var e=n.source,i=e.body,r=i.length,o=t.end;o<r;){var s=i.charCodeAt(o),u=n.line,a=1+o-n.lineStart;switch(s){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++n.line,n.lineStart=o;continue;case 13:10===i.charCodeAt(o+1)?o+=2:++o,++n.line,n.lineStart=o;continue;case 33:return new jn(An.BANG,o,o+1,u,a,t);case 35:return Gn(e,o,u,a,t);case 36:return new jn(An.DOLLAR,o,o+1,u,a,t);case 38:return new jn(An.AMP,o,o+1,u,a,t);case 40:return new jn(An.PAREN_L,o,o+1,u,a,t);case 41:return new jn(An.PAREN_R,o,o+1,u,a,t);case 46:if(46===i.charCodeAt(o+1)&&46===i.charCodeAt(o+2))return new jn(An.SPREAD,o,o+3,u,a,t);break;case 58:return new jn(An.COLON,o,o+1,u,a,t);case 61:return new jn(An.EQUALS,o,o+1,u,a,t);case 64:return new jn(An.AT,o,o+1,u,a,t);case 91:return new jn(An.BRACKET_L,o,o+1,u,a,t);case 93:return new jn(An.BRACKET_R,o,o+1,u,a,t);case 123:return new jn(An.BRACE_L,o,o+1,u,a,t);case 124:return new jn(An.PIPE,o,o+1,u,a,t);case 125:return new jn(An.BRACE_R,o,o+1,u,a,t);case 34:return 34===i.charCodeAt(o+1)&&34===i.charCodeAt(o+2)?Wn(e,o,u,a,t,n):Qn(e,o,u,a,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Hn(e,o,s,u,a,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return Kn(e,o,u,a,t)}throw On(e,o,Jn(s))}return new jn(An.EOF,r,r,n.line,1+o-n.lineStart,t)}function Jn(n){return n<32&&9!==n&&10!==n&&13!==n?"Cannot contain the invalid character ".concat(Ln(n),"."):39===n?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(Ln(n),".")}function Gn(n,t,e,i,r){var o,s=n.body,u=t;do{o=s.charCodeAt(++u)}while(!isNaN(o)&&(o>31||9===o));return new jn(An.COMMENT,t,u,e,i,r,s.slice(t+1,u))}function Hn(n,t,e,i,r,o){var s=n.body,u=e,a=t,c=!1;if(45===u&&(u=s.charCodeAt(++a)),48===u){if((u=s.charCodeAt(++a))>=48&&u<=57)throw On(n,a,"Invalid number, unexpected digit after 0: ".concat(Ln(u),"."))}else a=Yn(n,a,u),u=s.charCodeAt(a);if(46===u&&(c=!0,u=s.charCodeAt(++a),a=Yn(n,a,u),u=s.charCodeAt(a)),69!==u&&101!==u||(c=!0,43!==(u=s.charCodeAt(++a))&&45!==u||(u=s.charCodeAt(++a)),a=Yn(n,a,u),u=s.charCodeAt(a)),46===u||function(n){return 95===n||n>=65&&n<=90||n>=97&&n<=122}(u))throw On(n,a,"Invalid number, expected digit but got: ".concat(Ln(u),"."));return new jn(c?An.FLOAT:An.INT,t,a,i,r,o,s.slice(t,a))}function Yn(n,t,e){var i=n.body,r=t,o=e;if(o>=48&&o<=57){do{o=i.charCodeAt(++r)}while(o>=48&&o<=57);return r}throw On(n,r,"Invalid number, expected digit but got: ".concat(Ln(o),"."))}function Qn(n,t,e,i,r){for(var o=n.body,s=t+1,u=s,a=0,c="";s<o.length&&!isNaN(a=o.charCodeAt(s))&&10!==a&&13!==a;){if(34===a)return c+=o.slice(u,s),new jn(An.STRING,t,s+1,e,i,r,c);if(a<32&&9!==a)throw On(n,s,"Invalid character within String: ".concat(Ln(a),"."));if(++s,92===a){switch(c+=o.slice(u,s-1),a=o.charCodeAt(s)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+="\t";break;case 117:var f=Xn(o.charCodeAt(s+1),o.charCodeAt(s+2),o.charCodeAt(s+3),o.charCodeAt(s+4));if(f<0){var l=o.slice(s+1,s+5);throw On(n,s,"Invalid character escape sequence: \\u".concat(l,"."))}c+=String.fromCharCode(f),s+=4;break;default:throw On(n,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(a),"."))}u=++s}}throw On(n,s,"Unterminated string.")}function Wn(n,t,e,i,r,o){for(var s=n.body,u=t+3,a=u,c=0,f="";u<s.length&&!isNaN(c=s.charCodeAt(u));){if(34===c&&34===s.charCodeAt(u+1)&&34===s.charCodeAt(u+2))return f+=s.slice(a,u),new jn(An.BLOCK_STRING,t,u+3,e,i,r,Un(f));if(c<32&&9!==c&&10!==c&&13!==c)throw On(n,u,"Invalid character within String: ".concat(Ln(c),"."));10===c?(++u,++o.line,o.lineStart=u):13===c?(10===s.charCodeAt(u+1)?u+=2:++u,++o.line,o.lineStart=u):92===c&&34===s.charCodeAt(u+1)&&34===s.charCodeAt(u+2)&&34===s.charCodeAt(u+3)?(f+=s.slice(a,u)+'"""',a=u+=4):++u}throw On(n,u,"Unterminated string.")}function Xn(n,t,e,i){return zn(n)<<12|zn(t)<<8|zn(e)<<4|zn(i)}function zn(n){return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:-1}function Kn(n,t,e,i,r){for(var o=n.body,s=o.length,u=t+1,a=0;u!==s&&!isNaN(a=o.charCodeAt(u))&&(95===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122);)++u;return new jn(An.NAME,t,u,e,i,r,o.slice(t,u))}function Zn(n,t){return new nt(n,t).parseDocument()}var nt=function(){function n(n,t){var e=function(n){return n instanceof Rn}(n)?n:new Rn(n);this._lexer=new $n(e),this._options=t}var t=n.prototype;return t.parseName=function(){var n=this.expectToken(An.NAME);return{kind:Tn.NAME,value:n.value,loc:this.loc(n)}},t.parseDocument=function(){var n=this._lexer.token;return{kind:Tn.DOCUMENT,definitions:this.many(An.SOF,this.parseDefinition,An.EOF),loc:this.loc(n)}},t.parseDefinition=function(){if(this.peek(An.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(An.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var n=this._lexer.token;if(this.peek(An.BRACE_L))return{kind:Tn.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(n)};var t,e=this.parseOperationType();return this.peek(An.NAME)&&(t=this.parseName()),{kind:Tn.OPERATION_DEFINITION,operation:e,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},t.parseOperationType=function(){var n=this.expectToken(An.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(n)},t.parseVariableDefinitions=function(){return this.optionalMany(An.PAREN_L,this.parseVariableDefinition,An.PAREN_R)},t.parseVariableDefinition=function(){var n=this._lexer.token;return{kind:Tn.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(An.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(An.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(n)}},t.parseVariable=function(){var n=this._lexer.token;return this.expectToken(An.DOLLAR),{kind:Tn.VARIABLE,name:this.parseName(),loc:this.loc(n)}},t.parseSelectionSet=function(){var n=this._lexer.token;return{kind:Tn.SELECTION_SET,selections:this.many(An.BRACE_L,this.parseSelection,An.BRACE_R),loc:this.loc(n)}},t.parseSelection=function(){return this.peek(An.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var n,t,e=this._lexer.token,i=this.parseName();return this.expectOptionalToken(An.COLON)?(n=i,t=this.parseName()):t=i,{kind:Tn.FIELD,alias:n,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(An.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(e)}},t.parseArguments=function(n){return this.optionalMany(An.PAREN_L,n?this.parseConstArgument:this.parseArgument,An.PAREN_R)},t.parseArgument=function(){var n=this._lexer.token,t=this.parseName();return this.expectToken(An.COLON),{kind:Tn.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(n)}},t.parseConstArgument=function(){var n=this._lexer.token;return{kind:Tn.ARGUMENT,name:this.parseName(),value:(this.expectToken(An.COLON),this.parseValueLiteral(!0)),loc:this.loc(n)}},t.parseFragment=function(){var n=this._lexer.token;this.expectToken(An.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(An.NAME)?{kind:Tn.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(n)}:{kind:Tn.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},t.parseFragmentDefinition=function(){var n,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(n=this._options)||void 0===n?void 0:n.experimentalFragmentVariables)?{kind:Tn.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:Tn.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(n){var t=this._lexer.token;switch(t.kind){case An.BRACKET_L:return this.parseList(n);case An.BRACE_L:return this.parseObject(n);case An.INT:return this._lexer.advance(),{kind:Tn.INT,value:t.value,loc:this.loc(t)};case An.FLOAT:return this._lexer.advance(),{kind:Tn.FLOAT,value:t.value,loc:this.loc(t)};case An.STRING:case An.BLOCK_STRING:return this.parseStringLiteral();case An.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:Tn.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:Tn.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:Tn.NULL,loc:this.loc(t)};default:return{kind:Tn.ENUM,value:t.value,loc:this.loc(t)}}case An.DOLLAR:if(!n)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var n=this._lexer.token;return this._lexer.advance(),{kind:Tn.STRING,value:n.value,block:n.kind===An.BLOCK_STRING,loc:this.loc(n)}},t.parseList=function(n){var t=this,e=this._lexer.token;return{kind:Tn.LIST,values:this.any(An.BRACKET_L,(function(){return t.parseValueLiteral(n)}),An.BRACKET_R),loc:this.loc(e)}},t.parseObject=function(n){var t=this,e=this._lexer.token;return{kind:Tn.OBJECT,fields:this.any(An.BRACE_L,(function(){return t.parseObjectField(n)}),An.BRACE_R),loc:this.loc(e)}},t.parseObjectField=function(n){var t=this._lexer.token,e=this.parseName();return this.expectToken(An.COLON),{kind:Tn.OBJECT_FIELD,name:e,value:this.parseValueLiteral(n),loc:this.loc(t)}},t.parseDirectives=function(n){for(var t=[];this.peek(An.AT);)t.push(this.parseDirective(n));return t},t.parseDirective=function(n){var t=this._lexer.token;return this.expectToken(An.AT),{kind:Tn.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(n),loc:this.loc(t)}},t.parseTypeReference=function(){var n,t=this._lexer.token;return this.expectOptionalToken(An.BRACKET_L)?(n=this.parseTypeReference(),this.expectToken(An.BRACKET_R),n={kind:Tn.LIST_TYPE,type:n,loc:this.loc(t)}):n=this.parseNamedType(),this.expectOptionalToken(An.BANG)?{kind:Tn.NON_NULL_TYPE,type:n,loc:this.loc(t)}:n},t.parseNamedType=function(){var n=this._lexer.token;return{kind:Tn.NAMED_TYPE,name:this.parseName(),loc:this.loc(n)}},t.parseTypeSystemDefinition=function(){var n=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(n.kind===An.NAME)switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(n)},t.peekDescription=function(){return this.peek(An.STRING)||this.peek(An.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var e=this.parseDirectives(!0),i=this.many(An.BRACE_L,this.parseOperationTypeDefinition,An.BRACE_R);return{kind:Tn.SCHEMA_DEFINITION,description:t,directives:e,operationTypes:i,loc:this.loc(n)}},t.parseOperationTypeDefinition=function(){var n=this._lexer.token,t=this.parseOperationType();this.expectToken(An.COLON);var e=this.parseNamedType();return{kind:Tn.OPERATION_TYPE_DEFINITION,operation:t,type:e,loc:this.loc(n)}},t.parseScalarTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var e=this.parseName(),i=this.parseDirectives(!0);return{kind:Tn.SCALAR_TYPE_DEFINITION,description:t,name:e,directives:i,loc:this.loc(n)}},t.parseObjectTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var e=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Tn.OBJECT_TYPE_DEFINITION,description:t,name:e,interfaces:i,directives:r,fields:o,loc:this.loc(n)}},t.parseImplementsInterfaces=function(){var n;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(n=this._options)||void 0===n?void 0:n.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(An.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(An.AMP)||this.peek(An.NAME));return t}return this.delimitedMany(An.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var n;return!0===(null===(n=this._options)||void 0===n?void 0:n.allowLegacySDLEmptyFields)&&this.peek(An.BRACE_L)&&this._lexer.lookahead().kind===An.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(An.BRACE_L,this.parseFieldDefinition,An.BRACE_R)},t.parseFieldDefinition=function(){var n=this._lexer.token,t=this.parseDescription(),e=this.parseName(),i=this.parseArgumentDefs();this.expectToken(An.COLON);var r=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:Tn.FIELD_DEFINITION,description:t,name:e,arguments:i,type:r,directives:o,loc:this.loc(n)}},t.parseArgumentDefs=function(){return this.optionalMany(An.PAREN_L,this.parseInputValueDef,An.PAREN_R)},t.parseInputValueDef=function(){var n=this._lexer.token,t=this.parseDescription(),e=this.parseName();this.expectToken(An.COLON);var i,r=this.parseTypeReference();this.expectOptionalToken(An.EQUALS)&&(i=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:Tn.INPUT_VALUE_DEFINITION,description:t,name:e,type:r,defaultValue:i,directives:o,loc:this.loc(n)}},t.parseInterfaceTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var e=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Tn.INTERFACE_TYPE_DEFINITION,description:t,name:e,interfaces:i,directives:r,fields:o,loc:this.loc(n)}},t.parseUnionTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var e=this.parseName(),i=this.parseDirectives(!0),r=this.parseUnionMemberTypes();return{kind:Tn.UNION_TYPE_DEFINITION,description:t,name:e,directives:i,types:r,loc:this.loc(n)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(An.EQUALS)?this.delimitedMany(An.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var e=this.parseName(),i=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();return{kind:Tn.ENUM_TYPE_DEFINITION,description:t,name:e,directives:i,values:r,loc:this.loc(n)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(An.BRACE_L,this.parseEnumValueDefinition,An.BRACE_R)},t.parseEnumValueDefinition=function(){var n=this._lexer.token,t=this.parseDescription(),e=this.parseName(),i=this.parseDirectives(!0);return{kind:Tn.ENUM_VALUE_DEFINITION,description:t,name:e,directives:i,loc:this.loc(n)}},t.parseInputObjectTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var e=this.parseName(),i=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();return{kind:Tn.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:e,directives:i,fields:r,loc:this.loc(n)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(An.BRACE_L,this.parseInputValueDef,An.BRACE_R)},t.parseTypeSystemExtension=function(){var n=this._lexer.lookahead();if(n.kind===An.NAME)switch(n.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(n)},t.parseSchemaExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),e=this.optionalMany(An.BRACE_L,this.parseOperationTypeDefinition,An.BRACE_R);if(0===t.length&&0===e.length)throw this.unexpected();return{kind:Tn.SCHEMA_EXTENSION,directives:t,operationTypes:e,loc:this.loc(n)}},t.parseScalarTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),e=this.parseDirectives(!0);if(0===e.length)throw this.unexpected();return{kind:Tn.SCALAR_TYPE_EXTENSION,name:t,directives:e,loc:this.loc(n)}},t.parseObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),e=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===e.length&&0===i.length&&0===r.length)throw this.unexpected();return{kind:Tn.OBJECT_TYPE_EXTENSION,name:t,interfaces:e,directives:i,fields:r,loc:this.loc(n)}},t.parseInterfaceTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),e=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===e.length&&0===i.length&&0===r.length)throw this.unexpected();return{kind:Tn.INTERFACE_TYPE_EXTENSION,name:t,interfaces:e,directives:i,fields:r,loc:this.loc(n)}},t.parseUnionTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),e=this.parseDirectives(!0),i=this.parseUnionMemberTypes();if(0===e.length&&0===i.length)throw this.unexpected();return{kind:Tn.UNION_TYPE_EXTENSION,name:t,directives:e,types:i,loc:this.loc(n)}},t.parseEnumTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),e=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();if(0===e.length&&0===i.length)throw this.unexpected();return{kind:Tn.ENUM_TYPE_EXTENSION,name:t,directives:e,values:i,loc:this.loc(n)}},t.parseInputObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),e=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();if(0===e.length&&0===i.length)throw this.unexpected();return{kind:Tn.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:e,fields:i,loc:this.loc(n)}},t.parseDirectiveDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(An.AT);var e=this.parseName(),i=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:Tn.DIRECTIVE_DEFINITION,description:t,name:e,arguments:i,repeatable:r,locations:o,loc:this.loc(n)}},t.parseDirectiveLocations=function(){return this.delimitedMany(An.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var n=this._lexer.token,t=this.parseName();if(void 0!==Mn[t.value])return t;throw this.unexpected(n)},t.loc=function(n){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new Cn(n,this._lexer.lastToken,this._lexer.source)},t.peek=function(n){return this._lexer.token.kind===n},t.expectToken=function(n){var t=this._lexer.token;if(t.kind===n)return this._lexer.advance(),t;throw On(this._lexer.source,t.start,"Expected ".concat(et(n),", found ").concat(tt(t),"."))},t.expectOptionalToken=function(n){var t=this._lexer.token;if(t.kind===n)return this._lexer.advance(),t},t.expectKeyword=function(n){var t=this._lexer.token;if(t.kind!==An.NAME||t.value!==n)throw On(this._lexer.source,t.start,'Expected "'.concat(n,'", found ').concat(tt(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(n){var t=this._lexer.token;return t.kind===An.NAME&&t.value===n&&(this._lexer.advance(),!0)},t.unexpected=function(n){var t=null!=n?n:this._lexer.token;return On(this._lexer.source,t.start,"Unexpected ".concat(tt(t),"."))},t.any=function(n,t,e){this.expectToken(n);for(var i=[];!this.expectOptionalToken(e);)i.push(t.call(this));return i},t.optionalMany=function(n,t,e){if(this.expectOptionalToken(n)){var i=[];do{i.push(t.call(this))}while(!this.expectOptionalToken(e));return i}return[]},t.many=function(n,t,e){this.expectToken(n);var i=[];do{i.push(t.call(this))}while(!this.expectOptionalToken(e));return i},t.delimitedMany=function(n,t){this.expectOptionalToken(n);var e=[];do{e.push(t.call(this))}while(this.expectOptionalToken(n));return e},n}();function tt(n){var t=n.value;return et(n.kind)+(null!=t?' "'.concat(t,'"'):"")}function et(n){return function(n){return n===An.BANG||n===An.DOLLAR||n===An.AMP||n===An.PAREN_L||n===An.PAREN_R||n===An.SPREAD||n===An.COLON||n===An.EQUALS||n===An.AT||n===An.BRACKET_L||n===An.BRACKET_R||n===An.BRACE_L||n===An.PIPE||n===An.BRACE_R}(n)?'"'.concat(n,'"'):n}var it={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},rt=Object.freeze({});function ot(n,t,e){var i=n[t];if(i){if(!e&&"function"==typeof i)return i;var r=e?i.leave:i.enter;if("function"==typeof r)return r}else{var o=e?n.leave:n.enter;if(o){if("function"==typeof o)return o;var s=o[t];if("function"==typeof s)return s}}}function st(n){return function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:it,i=void 0,r=Array.isArray(n),o=[n],s=-1,u=[],a=void 0,c=void 0,f=void 0,l=[],h=[],d=n;do{var v=++s===o.length,m=v&&0!==u.length;if(v){if(c=0===h.length?void 0:l[l.length-1],a=f,f=h.pop(),m){if(r)a=a.slice();else{for(var p={},y=0,b=Object.keys(a);y<b.length;y++){var w=b[y];p[w]=a[w]}a=p}for(var g=0,E=0;E<u.length;E++){var S=u[E][0],I=u[E][1];r&&(S-=g),r&&null===I?(a.splice(S,1),g++):a[S]=I}}s=i.index,o=i.keys,u=i.edits,r=i.inArray,i=i.prev}else{if(c=f?r?s:o[s]:void 0,null==(a=f?f[c]:d))continue;f&&l.push(c)}var O,T=void 0;if(!Array.isArray(a)){if(!Dn(a))throw new Error("Invalid AST Node: ".concat(xn(a),"."));var N=ot(t,a.kind,v);if(N){if((T=N.call(t,a,c,f,l,h))===rt)break;if(!1===T){if(!v){l.pop();continue}}else if(void 0!==T&&(u.push([c,T]),!v)){if(!Dn(T)){l.pop();continue}a=T}}}void 0===T&&m&&u.push([c,a]),v?l.pop():(i={inArray:r,index:s,keys:o,edits:u,prev:i},o=(r=Array.isArray(a))?a:null!==(O=e[a.kind])&&void 0!==O?O:[],s=-1,u=[],f&&h.push(f),f=a)}while(void 0!==i);return 0!==u.length&&(d=u[u.length-1][1]),d}(n,{leave:ut})}var ut={Name:function(n){return n.value},Variable:function(n){return"$"+n.name},Document:function(n){return ct(n.definitions,"\n\n")+"\n"},OperationDefinition:function(n){var t=n.operation,e=n.name,i=lt("(",ct(n.variableDefinitions,", "),")"),r=ct(n.directives," "),o=n.selectionSet;return e||r||i||"query"!==t?ct([t,ct([e,i]),r,o]," "):o},VariableDefinition:function(n){var t=n.directives;return n.variable+": "+n.type+lt(" = ",n.defaultValue)+lt(" ",ct(t," "))},SelectionSet:function(n){return ft(n.selections)},Field:function(n){var t=n.name,e=n.arguments,i=n.directives,r=n.selectionSet,o=lt("",n.alias,": ")+t,s=o+lt("(",ct(e,", "),")");return s.length>80&&(s=o+lt("(\n",ht(ct(e,"\n")),"\n)")),ct([s,ct(i," "),r]," ")},Argument:function(n){return n.name+": "+n.value},FragmentSpread:function(n){return"..."+n.name+lt(" ",ct(n.directives," "))},InlineFragment:function(n){var t=n.directives,e=n.selectionSet;return ct(["...",lt("on ",n.typeCondition),ct(t," "),e]," ")},FragmentDefinition:function(n){var t=n.typeCondition,e=n.variableDefinitions,i=n.directives,r=n.selectionSet;return"fragment ".concat(n.name).concat(lt("(",ct(e,", "),")")," ")+"on ".concat(t," ").concat(lt("",ct(i," ")," "))+r},IntValue:function(n){return n.value},FloatValue:function(n){return n.value},StringValue:function(n,t){var e=n.value;return n.block?function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=-1===n.indexOf("\n"),r=" "===n[0]||"\t"===n[0],o='"'===n[n.length-1],s="\\"===n[n.length-1],u=!i||o||s||e,a="";return!u||i&&r||(a+="\n"+t),a+=t?n.replace(/\n/g,"\n"+t):n,u&&(a+="\n"),'"""'+a.replace(/"""/g,'\\"""')+'"""'}(e,"description"===t?"":" "):JSON.stringify(e)},BooleanValue:function(n){return n.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(n){return n.value},ListValue:function(n){return"["+ct(n.values,", ")+"]"},ObjectValue:function(n){return"{"+ct(n.fields,", ")+"}"},ObjectField:function(n){return n.name+": "+n.value},Directive:function(n){return"@"+n.name+lt("(",ct(n.arguments,", "),")")},NamedType:function(n){return n.name},ListType:function(n){return"["+n.type+"]"},NonNullType:function(n){return n.type+"!"},SchemaDefinition:at((function(n){var t=n.operationTypes;return ct(["schema",ct(n.directives," "),ft(t)]," ")})),OperationTypeDefinition:function(n){return n.operation+": "+n.type},ScalarTypeDefinition:at((function(n){return ct(["scalar",n.name,ct(n.directives," ")]," ")})),ObjectTypeDefinition:at((function(n){var t=n.directives,e=n.fields;return ct(["type",n.name,lt("implements ",ct(n.interfaces," & ")),ct(t," "),ft(e)]," ")})),FieldDefinition:at((function(n){var t=n.arguments,e=n.type,i=n.directives;return n.name+(vt(t)?lt("(\n",ht(ct(t,"\n")),"\n)"):lt("(",ct(t,", "),")"))+": "+e+lt(" ",ct(i," "))})),InputValueDefinition:at((function(n){var t=n.directives;return ct([n.name+": "+n.type,lt("= ",n.defaultValue),ct(t," ")]," ")})),InterfaceTypeDefinition:at((function(n){var t=n.directives,e=n.fields;return ct(["interface",n.name,lt("implements ",ct(n.interfaces," & ")),ct(t," "),ft(e)]," ")})),UnionTypeDefinition:at((function(n){var t=n.types;return ct(["union",n.name,ct(n.directives," "),t&&0!==t.length?"= "+ct(t," | "):""]," ")})),EnumTypeDefinition:at((function(n){var t=n.values;return ct(["enum",n.name,ct(n.directives," "),ft(t)]," ")})),EnumValueDefinition:at((function(n){return ct([n.name,ct(n.directives," ")]," ")})),InputObjectTypeDefinition:at((function(n){var t=n.fields;return ct(["input",n.name,ct(n.directives," "),ft(t)]," ")})),DirectiveDefinition:at((function(n){var t=n.arguments,e=n.repeatable,i=n.locations;return"directive @"+n.name+(vt(t)?lt("(\n",ht(ct(t,"\n")),"\n)"):lt("(",ct(t,", "),")"))+(e?" repeatable":"")+" on "+ct(i," | ")})),SchemaExtension:function(n){var t=n.operationTypes;return ct(["extend schema",ct(n.directives," "),ft(t)]," ")},ScalarTypeExtension:function(n){return ct(["extend scalar",n.name,ct(n.directives," ")]," ")},ObjectTypeExtension:function(n){var t=n.directives,e=n.fields;return ct(["extend type",n.name,lt("implements ",ct(n.interfaces," & ")),ct(t," "),ft(e)]," ")},InterfaceTypeExtension:function(n){var t=n.directives,e=n.fields;return ct(["extend interface",n.name,lt("implements ",ct(n.interfaces," & ")),ct(t," "),ft(e)]," ")},UnionTypeExtension:function(n){var t=n.types;return ct(["extend union",n.name,ct(n.directives," "),t&&0!==t.length?"= "+ct(t," | "):""]," ")},EnumTypeExtension:function(n){var t=n.values;return ct(["extend enum",n.name,ct(n.directives," "),ft(t)]," ")},InputObjectTypeExtension:function(n){var t=n.fields;return ct(["extend input",n.name,ct(n.directives," "),ft(t)]," ")}};function at(n){return function(t){return ct([t.description,n(t)],"\n")}}function ct(n){var t,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==n?void 0:n.filter((function(n){return n})).join(e))&&void 0!==t?t:""}function ft(n){return lt("{\n",ht(ct(n,"\n")),"\n}")}function lt(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?n+t+e:""}function ht(n){return lt(" ",n.replace(/\n/g,"\n "))}function dt(n){return-1!==n.indexOf("\n")}function vt(n){return null!=n&&n.some(dt)}function mt(n,t,e,i){var r,o=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:e(i),s=t.get(o);return void 0===s&&(s=n.call(this,i),t.set(o,s)),s}function pt(n,t,e){var i=Array.prototype.slice.call(arguments,3),r=e(i),o=t.get(r);return void 0===o&&(o=n.apply(this,i),t.set(r,o)),o}function yt(n,t,e,i,r){return e.bind(t,n,i,r)}function bt(n,t){return yt(n,this,1===n.length?mt:pt,t.cache.create(),t.serializer)}function wt(){return JSON.stringify(arguments)}function gt(){this.cache=Object.create(null)}gt.prototype.has=function(n){return n in this.cache},gt.prototype.get=function(n){return this.cache[n]},gt.prototype.set=function(n,t){this.cache[n]=t};var Et={create:function(){return new gt}},St=function(n,t){return(t&&t.strategy?t.strategy:bt)(n,{cache:t&&t.cache?t.cache:Et,serializer:t&&t.serializer?t.serializer:wt})},It={variadic:function(n,t){return yt(n,this,pt,t.cache.create(),t.serializer)},monadic:function(n,t){return yt(n,this,mt,t.cache.create(),t.serializer)}};St.strategies=It;const Ot=Object.freeze(Object.assign(Object.create(null),St,{default:St,strategies:It}));function Tt(n){return"function"==typeof n}let Nt=!1;const Ft={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Nt&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Nt=n},get useDeprecatedSynchronousErrorHandling(){return Nt}};function Ct(n){setTimeout((()=>{throw n}),0)}const jt={closed:!0,next(n){},error(n){if(Ft.useDeprecatedSynchronousErrorHandling)throw n;Ct(n)},complete(){}},Dt=Array.isArray||(n=>n&&"number"==typeof n.length);function At(n){return null!==n&&"object"==typeof n}const _t=(()=>{function n(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map(((n,t)=>`${t+1}) ${n.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return n.prototype=Object.create(Error.prototype),n})();class xt{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:e,_unsubscribe:i,_subscriptions:r}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof xt)t.remove(this);else if(null!==t)for(let n=0;n<t.length;++n)t[n].remove(this);if(Tt(i)){e&&(this._unsubscribe=void 0);try{i.call(this)}catch(t){n=t instanceof _t?Pt(t.errors):[t]}}if(Dt(r)){let t=-1,e=r.length;for(;++t<e;){const e=r[t];if(At(e))try{e.unsubscribe()}catch(t){n=n||[],t instanceof _t?n=n.concat(Pt(t.errors)):n.push(t)}}}if(n)throw new _t(n)}add(n){let t=n;if(!n)return xt.EMPTY;switch(typeof n){case"function":t=new xt(n);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof xt)){const n=t;t=new xt,t._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+n+" added to Subscription.")}let{_parentOrParents:e}=t;if(null===e)t._parentOrParents=this;else if(e instanceof xt){if(e===this)return t;t._parentOrParents=[e,this]}else{if(-1!==e.indexOf(this))return t;e.push(this)}const i=this._subscriptions;return null===i?this._subscriptions=[t]:i.push(t),t}remove(n){const t=this._subscriptions;if(t){const e=t.indexOf(n);-1!==e&&t.splice(e,1)}}}function Pt(n){return n.reduce(((n,t)=>n.concat(t instanceof _t?t.errors:t)),[])}xt.EMPTY=function(n){return n.closed=!0,n}(new xt);const kt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class Vt extends xt{constructor(n,t,e){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=jt;break;case 1:if(!n){this.destination=jt;break}if("object"==typeof n){n instanceof Vt?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new Rt(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new Rt(this,n,t,e)}}[kt](){return this}static create(n,t,e){const i=new Vt(n,t,e);return i.syncErrorThrowable=!1,i}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class Rt extends Vt{constructor(n,t,e,i){let r;super(),this._parentSubscriber=n;let o=this;Tt(t)?r=t:t&&(r=t.next,e=t.error,i=t.complete,t!==jt&&(o=Object.create(t),Tt(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=r,this._error=e,this._complete=i}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;Ft.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:e}=Ft;if(this._error)e&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(t.syncErrorThrowable)e?(t.syncErrorValue=n,t.syncErrorThrown=!0):Ct(n),this.unsubscribe();else{if(this.unsubscribe(),e)throw n;Ct(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const t=()=>this._complete.call(this._context);Ft.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,t){try{n.call(this._context,t)}catch(n){if(this.unsubscribe(),Ft.useDeprecatedSynchronousErrorHandling)throw n;Ct(n)}}__tryOrSetError(n,t,e){if(!Ft.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,e)}catch(t){return Ft.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=t,n.syncErrorThrown=!0,!0):(Ct(t),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const Mt="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ut(n){return n}class qt{constructor(n){this._isScalar=!1,n&&(this._subscribe=n)}lift(n){const t=new qt;return t.source=this,t.operator=n,t}subscribe(n,t,e){const{operator:i}=this,r=function(n,t,e){if(n){if(n instanceof Vt)return n;if(n[kt])return n[kt]()}return n||t||e?new Vt(n,t,e):new Vt(jt)}(n,t,e);if(r.add(i?i.call(r,this.source):this.source||Ft.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),Ft.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}_trySubscribe(n){try{return this._subscribe(n)}catch(t){Ft.useDeprecatedSynchronousErrorHandling&&(n.syncErrorThrown=!0,n.syncErrorValue=t),function(n){for(;n;){const{closed:t,destination:e,isStopped:i}=n;if(t||i)return!1;n=e&&e instanceof Vt?e:null}return!0}(n)?n.error(t):console.warn(t)}}forEach(n,t){return new(t=$t(t))(((t,e)=>{let i;i=this.subscribe((t=>{try{n(t)}catch(n){e(n),i&&i.unsubscribe()}}),e,t)}))}_subscribe(n){const{source:t}=this;return t&&t.subscribe(n)}[Mt](){return this}pipe(...n){return 0===n.length?this:(0===(t=n).length?Ut:1===t.length?t[0]:function(n){return t.reduce(((n,t)=>t(n)),n)})(this);var t}toPromise(n){return new(n=$t(n))(((n,t)=>{let e;this.subscribe((n=>e=n),(n=>t(n)),(()=>n(e)))}))}}function $t(n){if(n||(n=Promise),!n)throw new Error("no Promise impl found");return n}qt.create=n=>new qt(n);const Lt=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class Bt extends xt{constructor(n,t){super(),this.subject=n,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,t=n.observers;if(this.subject=null,!t||0===t.length||n.isStopped||n.closed)return;const e=t.indexOf(this.subscriber);-1!==e&&t.splice(e,1)}}class Jt extends Vt{constructor(n){super(n),this.destination=n}}class Gt extends qt{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[kt](){return new Jt(this)}lift(n){const t=new Ht(this,this);return t.operator=n,t}next(n){if(this.closed)throw new Lt;if(!this.isStopped){const{observers:t}=this,e=t.length,i=t.slice();for(let t=0;t<e;t++)i[t].next(n)}}error(n){if(this.closed)throw new Lt;this.hasError=!0,this.thrownError=n,this.isStopped=!0;const{observers:t}=this,e=t.length,i=t.slice();for(let t=0;t<e;t++)i[t].error(n);this.observers.length=0}complete(){if(this.closed)throw new Lt;this.isStopped=!0;const{observers:n}=this,t=n.length,e=n.slice();for(let n=0;n<t;n++)e[n].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(n){if(this.closed)throw new Lt;return super._trySubscribe(n)}_subscribe(n){if(this.closed)throw new Lt;return this.hasError?(n.error(this.thrownError),xt.EMPTY):this.isStopped?(n.complete(),xt.EMPTY):(this.observers.push(n),new Bt(this,n))}asObservable(){const n=new qt;return n.source=this,n}}Gt.create=(n,t)=>new Ht(n,t);class Ht extends Gt{constructor(n,t){super(),this.destination=n,this.source=t}next(n){const{destination:t}=this;t&&t.next&&t.next(n)}error(n){const{destination:t}=this;t&&t.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:t}=this;return t?this.source.subscribe(n):xt.EMPTY}}class Yt extends xt{constructor(n,t){super()}schedule(n,t=0){return this}}class Qt{constructor(n,t=Qt.now){this.SchedulerAction=n,this.now=t}schedule(n,t=0,e){return new this.SchedulerAction(this,n).schedule(e,t)}}Qt.now=()=>Date.now();class Wt extends Qt{constructor(n,t=Qt.now){super(n,(()=>Wt.delegate&&Wt.delegate!==this?Wt.delegate.now():t())),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,t=0,e){return Wt.delegate&&Wt.delegate!==this?Wt.delegate.schedule(n,t,e):super.schedule(n,t,e)}flush(n){const{actions:t}=this;if(this.active)return void t.push(n);let e;this.active=!0;do{if(e=n.execute(n.state,n.delay))break}while(n=t.shift());if(this.active=!1,e){for(;n=t.shift();)n.unsubscribe();throw e}}}function Xt(n){return n&&"function"==typeof n.schedule}const zt=new Wt(class extends Yt{constructor(n,t){super(n,t),this.scheduler=n,this.work=t,this.pending=!1}schedule(n,t=0){if(this.closed)return this;this.state=n;const e=this.id,i=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(i,e,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}requestAsyncId(n,t,e=0){return setInterval(n.flush.bind(n,this),e)}recycleAsyncId(n,t,e=0){if(null!==e&&this.delay===e&&!1===this.pending)return t;clearInterval(t)}execute(n,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const e=this._execute(n,t);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,t){let e,i=!1;try{this.work(n)}catch(n){i=!0,e=!!n&&n||new Error(n)}if(i)return this.unsubscribe(),e}_unsubscribe(){const n=this.id,t=this.scheduler,e=t.actions,i=e.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&e.splice(i,1),null!=n&&(this.id=this.recycleAsyncId(t,n,null)),this.delay=null}});class Kt{constructor(n,t,e,i){this.bufferTimeSpan=n,this.bufferCreationInterval=t,this.maxBufferSize=e,this.scheduler=i}call(n,t){return t.subscribe(new ne(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class Zt{constructor(){this.buffer=[]}}class ne extends Vt{constructor(n,t,e,i,r){super(n),this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r,this.contexts=[];const o=this.openContext();if(this.timespanOnly=null==e||e<0,this.timespanOnly)this.add(o.closeAction=r.schedule(te,t,{subscriber:this,context:o,bufferTimeSpan:t}));else{const n={bufferTimeSpan:t,bufferCreationInterval:e,subscriber:this,scheduler:r};this.add(o.closeAction=r.schedule(ie,t,{subscriber:this,context:o})),this.add(r.schedule(ee,e,n))}}_next(n){const t=this.contexts,e=t.length;let i;for(let r=0;r<e;r++){const e=t[r],o=e.buffer;o.push(n),o.length==this.maxBufferSize&&(i=e)}i&&this.onBufferFull(i)}_error(n){this.contexts.length=0,super._error(n)}_complete(){const{contexts:n,destination:t}=this;for(;n.length>0;){const e=n.shift();t.next(e.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const t=n.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){n=this.openContext();const t=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(te,t,{subscriber:this,context:n,bufferTimeSpan:t}))}}openContext(){const n=new Zt;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const t=this.contexts;(t?t.indexOf(n):-1)>=0&&t.splice(t.indexOf(n),1)}}function te(n){const t=n.subscriber,e=n.context;e&&t.closeContext(e),t.closed||(n.context=t.openContext(),n.context.closeAction=this.schedule(n,n.bufferTimeSpan))}function ee(n){const{bufferCreationInterval:t,bufferTimeSpan:e,subscriber:i,scheduler:r}=n,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(ie,e,{subscriber:i,context:o})),this.schedule(n,t))}function ie(n){const{subscriber:t,context:e}=n;t.closeContext(e)}var re=i((function(n,t){var e,i=r&&r.__extends||(e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(n,t)},function(n,t){function i(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0}),t.ClientError=void 0;var o=function(n){function t(e,i){var r=this,o=t.extractMessage(e)+": "+JSON.stringify({response:e,request:i});return r=n.call(this,o)||this,Object.setPrototypeOf(r,t.prototype),r.response=e,r.request=i,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(r,t),r}return i(t,n),t.extractMessage=function(n){try{return n.errors[0].message}catch(t){return"GraphQL Error (Code: "+n.status+")"}},t}(Error);t.ClientError=o})),oe=i((function(n,t){var e="undefined"!=typeof self?self:r,i=function(){function n(){this.fetch=!1,this.DOMException=e.DOMException}return n.prototype=e,new n}();!function(n){!function(t){var e="URLSearchParams"in n,i="Symbol"in n&&"iterator"in Symbol,r="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(n){return!1}}(),o="FormData"in n,s="ArrayBuffer"in n;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(n){return n&&u.indexOf(Object.prototype.toString.call(n))>-1};function c(n){if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new TypeError("Invalid character in header field name");return n.toLowerCase()}function f(n){return"string"!=typeof n&&(n=String(n)),n}function l(n){var t={next:function(){var t=n.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(n){this.map={},n instanceof h?n.forEach((function(n,t){this.append(t,n)}),this):Array.isArray(n)?n.forEach((function(n){this.append(n[0],n[1])}),this):n&&Object.getOwnPropertyNames(n).forEach((function(t){this.append(t,n[t])}),this)}function d(n){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}function v(n){return new Promise((function(t,e){n.onload=function(){t(n.result)},n.onerror=function(){e(n.error)}}))}function m(n){var t=new FileReader,e=v(t);return t.readAsArrayBuffer(n),e}function p(n){if(n.slice)return n.slice(0);var t=new Uint8Array(n.byteLength);return t.set(new Uint8Array(n)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(n){var t;this._bodyInit=n,n?"string"==typeof n?this._bodyText=n:r&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:o&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:e&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():s&&r&&(t=n)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(n)||a(n))?this._bodyArrayBuffer=p(n):this._bodyText=n=Object.prototype.toString.call(n):this._bodyText="",this.headers.get("content-type")||("string"==typeof n?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var n=d(this);if(n)return n;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?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var n,t,e,i=d(this);if(i)return i;if(this._bodyBlob)return n=this._bodyBlob,e=v(t=new FileReader),t.readAsText(n),e;if(this._bodyArrayBuffer)return Promise.resolve(function(n){for(var t=new Uint8Array(n),e=new Array(t.length),i=0;i<t.length;i++)e[i]=String.fromCharCode(t[i]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(g)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(n,t){n=c(n),t=f(t);var e=this.map[n];this.map[n]=e?e+", "+t:t},h.prototype.delete=function(n){delete this.map[c(n)]},h.prototype.get=function(n){return n=c(n),this.has(n)?this.map[n]:null},h.prototype.has=function(n){return this.map.hasOwnProperty(c(n))},h.prototype.set=function(n,t){this.map[c(n)]=f(t)},h.prototype.forEach=function(n,t){for(var e in this.map)this.map.hasOwnProperty(e)&&n.call(t,this.map[e],e,this)},h.prototype.keys=function(){var n=[];return this.forEach((function(t,e){n.push(e)})),l(n)},h.prototype.values=function(){var n=[];return this.forEach((function(t){n.push(t)})),l(n)},h.prototype.entries=function(){var n=[];return this.forEach((function(t,e){n.push([e,t])})),l(n)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(n,t){var e,i,r=(t=t||{}).body;if(n instanceof w){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,t.headers||(this.headers=new h(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,r||null==n._bodyInit||(r=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(i=(e=t.method||this.method||"GET").toUpperCase(),b.indexOf(i)>-1?i:e),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function g(n){var t=new FormData;return n.trim().split("&").forEach((function(n){if(n){var e=n.split("="),i=e.shift().replace(/\+/g," "),r=e.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}})),t}function E(n,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 h(t.headers),this.url=t.url||"",this._initBody(n)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},y.call(w.prototype),y.call(E.prototype),E.prototype.clone=function(){return new E(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},E.error=function(){var n=new E(null,{status:0,statusText:""});return n.type="error",n};var S=[301,302,303,307,308];E.redirect=function(n,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new E(null,{status:t,headers:{location:n}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(n){t.DOMException=function(n,t){this.message=n,this.name=t;var e=Error(n);this.stack=e.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function I(n,e){return new Promise((function(i,o){var s=new w(n,e);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function a(){u.abort()}u.onload=function(){var n,t,e={status:u.status,statusText:u.statusText,headers:(n=u.getAllResponseHeaders()||"",t=new h,n.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(n){var e=n.split(":"),i=e.shift().trim();if(i){var r=e.join(":").trim();t.append(i,r)}})),t)};e.url="responseURL"in u?u.responseURL:e.headers.get("X-Request-URL"),i(new E("response"in u?u.response:u.responseText,e))},u.onerror=function(){o(new TypeError("Network request failed"))},u.ontimeout=function(){o(new TypeError("Network request failed"))},u.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},u.open(s.method,s.url,!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&r&&(u.responseType="blob"),s.headers.forEach((function(n,t){u.setRequestHeader(t,n)})),s.signal&&(s.signal.addEventListener("abort",a),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",a)}),u.send(void 0===s._bodyInit?null:s._bodyInit)}))}I.polyfill=!0,n.fetch||(n.fetch=I,n.Headers=h,n.Request=w,n.Response=E),t.Headers=h,t.Request=w,t.Response=E,t.fetch=I,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,n.exports=t})),se=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=e})),ue=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return o(n,[])};var e,i=(e=se)&&e.__esModule?e:{default:e};function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function o(n,t){switch(r(n)){case"string":return JSON.stringify(n);case"function":return n.name?"[function ".concat(n.name,"]"):"[function]";case"object":return null===n?"null":function(n,t){if(-1!==t.indexOf(n))return"[Circular]";var e=[].concat(t,[n]),r=function(n){var t=n[String(i.default)];return"function"==typeof t?t:"function"==typeof n.inspect?n.inspect:void 0}(n);if(void 0!==r){var s=r.call(n);if(s!==n)return"string"==typeof s?s:o(s,e)}else if(Array.isArray(n))return function(n,t){if(0===n.length)return"[]";if(t.length>2)return"[Array]";for(var e=Math.min(10,n.length),i=n.length-e,r=[],s=0;s<e;++s)r.push(o(n[s],t));return 1===i?r.push("... 1 more item"):i>1&&r.push("... ".concat(i," more items")),"["+r.join(", ")+"]"}(n,e);return function(n,t){var e=Object.keys(n);return 0===e.length?"{}":t.length>2?"["+function(n){var t=Object.prototype.toString.call(n).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof n.constructor){var e=n.constructor.name;if("string"==typeof e&&""!==e)return e}return t}(n)+"]":"{ "+e.map((function(e){return e+": "+o(n[e],t)})).join(", ")+" }"}(n,e)}(n,t);default:return String(n)}}})),ae=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n,t){if(!Boolean(n))throw new Error(null!=t?t:"Unexpected invariant triggered.")}})),ce=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){var t=n.prototype.toJSON;"function"==typeof t||(0,e.default)(0),n.prototype.inspect=t,i.default&&(n.prototype[i.default]=t)};var e=r(ae),i=r(se);function r(n){return n&&n.__esModule?n:{default:n}}})),fe=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(n){return null!=n&&"string"==typeof n.kind},t.Token=t.Location=void 0;var e,i=(e=ce)&&e.__esModule?e:{default:e},r=function(){function n(n,t,e){this.start=n.start,this.end=t.end,this.startToken=n,this.endToken=t,this.source=e}return n.prototype.toJSON=function(){return{start:this.start,end:this.end}},n}();t.Location=r,(0,i.default)(r);var o=function(){function n(n,t,e,i,r,o,s){this.kind=n,this.start=t,this.end=e,this.line=i,this.column=r,this.value=s,this.prev=o,this.next=null}return n.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},n}();t.Token=o,(0,i.default)(o)})),le=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,u=void 0,a=Array.isArray(n),c=[n],f=-1,l=[],h=void 0,d=void 0,v=void 0,m=[],p=[],y=n;do{var b=++f===c.length,w=b&&0!==l.length;if(b){if(d=0===p.length?void 0:m[m.length-1],h=v,v=p.pop(),w){if(a)h=h.slice();else{for(var g={},E=0,S=Object.keys(h);E<S.length;E++){var I=S[E];g[I]=h[I]}h=g}for(var O=0,T=0;T<l.length;T++){var N=l[T][0],F=l[T][1];a&&(N-=O),a&&null===F?(h.splice(N,1),O++):h[N]=F}}f=u.index,c=u.keys,l=u.edits,a=u.inArray,u=u.prev}else{if(d=v?a?f:c[f]:void 0,null==(h=v?v[d]:y))continue;v&&m.push(d)}var C,j=void 0;if(!Array.isArray(h)){if(!(0,fe.isNode)(h))throw new Error("Invalid AST Node: ".concat((0,i.default)(h),"."));var D=s(t,h.kind,b);if(D){if((j=D.call(t,h,d,v,m,p))===o)break;if(!1===j){if(!b){m.pop();continue}}else if(void 0!==j&&(l.push([d,j]),!b)){if(!(0,fe.isNode)(j)){m.pop();continue}h=j}}}void 0===j&&w&&l.push([d,h]),b?m.pop():(u={inArray:a,index:f,keys:c,edits:l,prev:u},c=(a=Array.isArray(h))?h:null!==(C=e[h.kind])&&void 0!==C?C:[],f=-1,l=[],v&&p.push(v),v=h)}while(void 0!==u);return 0!==l.length&&(y=l[l.length-1][1]),y},t.visitInParallel=function(n){var t=new Array(n.length);return{enter:function(e){for(var i=0;i<n.length;i++)if(null==t[i]){var r=s(n[i],e.kind,!1);if(r){var u=r.apply(n[i],arguments);if(!1===u)t[i]=e;else if(u===o)t[i]=o;else if(void 0!==u)return u}}},leave:function(e){for(var i=0;i<n.length;i++)if(null==t[i]){var r=s(n[i],e.kind,!0);if(r){var u=r.apply(n[i],arguments);if(u===o)t[i]=o;else if(void 0!==u&&!1!==u)return u}}else t[i]===e&&(t[i]=null)}}},t.getVisitFn=s,t.BREAK=t.QueryDocumentKeys=void 0;var e,i=(e=ue)&&e.__esModule?e:{default:e},r={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};t.QueryDocumentKeys=r;var o=Object.freeze({});function s(n,t,e){var i=n[t];if(i){if(!e&&"function"==typeof i)return i;var r=e?i.leave:i.enter;if("function"==typeof r)return r}else{var o=e?n.leave:n.enter;if(o){if("function"==typeof o)return o;var s=o[t];if("function"==typeof s)return s}}}t.BREAK=o})),he=i((function(n,t){function e(n){for(var t=0;t<n.length;++t)if(" "!==n[t]&&"\t"!==n[t])return!1;return!0}function i(n){for(var t,e=!0,i=!0,r=0,o=null,s=0;s<n.length;++s)switch(n.charCodeAt(s)){case 13:10===n.charCodeAt(s+1)&&++s;case 10:e=!1,i=!0,r=0;break;case 9:case 32:++r;break;default:i&&!e&&(null===o||r<o)&&(o=r),i=!1}return null!==(t=o)&&void 0!==t?t:0}Object.defineProperty(t,"__esModule",{value:!0}),t.dedentBlockStringValue=function(n){var t=n.split(/\r\n|[\n\r]/g),r=i(n);if(0!==r)for(var o=1;o<t.length;o++)t[o]=t[o].slice(r);for(var s=0;s<t.length&&e(t[s]);)++s;for(var u=t.length;u>s&&e(t[u-1]);)--u;return t.slice(s,u).join("\n")},t.getBlockStringIndentation=i,t.printBlockString=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=-1===n.indexOf("\n"),r=" "===n[0]||"\t"===n[0],o='"'===n[n.length-1],s="\\"===n[n.length-1],u=!i||o||s||e,a="";return!u||i&&r||(a+="\n"+t),a+=t?n.replace(/\n/g,"\n"+t):n,u&&(a+="\n"),'"""'+a.replace(/"""/g,'\\"""')+'"""'}})),de=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(n){return(0,le.visit)(n,{leave:e})};var e={Name:function(n){return n.value},Variable:function(n){return"$"+n.name},Document:function(n){return r(n.definitions,"\n\n")+"\n"},OperationDefinition:function(n){var t=n.operation,e=n.name,i=s("(",r(n.variableDefinitions,", "),")"),o=r(n.directives," "),u=n.selectionSet;return e||o||i||"query"!==t?r([t,r([e,i]),o,u]," "):u},VariableDefinition:function(n){var t=n.directives;return n.variable+": "+n.type+s(" = ",n.defaultValue)+s(" ",r(t," "))},SelectionSet:function(n){return o(n.selections)},Field:function(n){var t=n.name,e=n.arguments,i=n.directives,o=n.selectionSet,a=s("",n.alias,": ")+t,c=a+s("(",r(e,", "),")");return c.length>80&&(c=a+s("(\n",u(r(e,"\n")),"\n)")),r([c,r(i," "),o]," ")},Argument:function(n){return n.name+": "+n.value},FragmentSpread:function(n){return"..."+n.name+s(" ",r(n.directives," "))},InlineFragment:function(n){var t=n.directives,e=n.selectionSet;return r(["...",s("on ",n.typeCondition),r(t," "),e]," ")},FragmentDefinition:function(n){var t=n.typeCondition,e=n.variableDefinitions,i=n.directives,o=n.selectionSet;return"fragment ".concat(n.name).concat(s("(",r(e,", "),")")," ")+"on ".concat(t," ").concat(s("",r(i," ")," "))+o},IntValue:function(n){return n.value},FloatValue:function(n){return n.value},StringValue:function(n,t){var e=n.value;return n.block?(0,he.printBlockString)(e,"description"===t?"":" "):JSON.stringify(e)},BooleanValue:function(n){return n.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(n){return n.value},ListValue:function(n){return"["+r(n.values,", ")+"]"},ObjectValue:function(n){return"{"+r(n.fields,", ")+"}"},ObjectField:function(n){return n.name+": "+n.value},Directive:function(n){return"@"+n.name+s("(",r(n.arguments,", "),")")},NamedType:function(n){return n.name},ListType:function(n){return"["+n.type+"]"},NonNullType:function(n){return n.type+"!"},SchemaDefinition:i((function(n){var t=n.operationTypes;return r(["schema",r(n.directives," "),o(t)]," ")})),OperationTypeDefinition:function(n){return n.operation+": "+n.type},ScalarTypeDefinition:i((function(n){return r(["scalar",n.name,r(n.directives," ")]," ")})),ObjectTypeDefinition:i((function(n){var t=n.directives,e=n.fields;return r(["type",n.name,s("implements ",r(n.interfaces," & ")),r(t," "),o(e)]," ")})),FieldDefinition:i((function(n){var t=n.arguments,e=n.type,i=n.directives;return n.name+(c(t)?s("(\n",u(r(t,"\n")),"\n)"):s("(",r(t,", "),")"))+": "+e+s(" ",r(i," "))})),InputValueDefinition:i((function(n){var t=n.directives;return r([n.name+": "+n.type,s("= ",n.defaultValue),r(t," ")]," ")})),InterfaceTypeDefinition:i((function(n){var t=n.directives,e=n.fields;return r(["interface",n.name,s("implements ",r(n.interfaces," & ")),r(t," "),o(e)]," ")})),UnionTypeDefinition:i((function(n){var t=n.types;return r(["union",n.name,r(n.directives," "),t&&0!==t.length?"= "+r(t," | "):""]," ")})),EnumTypeDefinition:i((function(n){var t=n.values;return r(["enum",n.name,r(n.directives," "),o(t)]," ")})),EnumValueDefinition:i((function(n){return r([n.name,r(n.directives," ")]," ")})),InputObjectTypeDefinition:i((function(n){var t=n.fields;return r(["input",n.name,r(n.directives," "),o(t)]," ")})),DirectiveDefinition:i((function(n){var t=n.arguments,e=n.repeatable,i=n.locations;return"directive @"+n.name+(c(t)?s("(\n",u(r(t,"\n")),"\n)"):s("(",r(t,", "),")"))+(e?" repeatable":"")+" on "+r(i," | ")})),SchemaExtension:function(n){var t=n.operationTypes;return r(["extend schema",r(n.directives," "),o(t)]," ")},ScalarTypeExtension:function(n){return r(["extend scalar",n.name,r(n.directives," ")]," ")},ObjectTypeExtension:function(n){var t=n.directives,e=n.fields;return r(["extend type",n.name,s("implements ",r(n.interfaces," & ")),r(t," "),o(e)]," ")},InterfaceTypeExtension:function(n){var t=n.directives,e=n.fields;return r(["extend interface",n.name,s("implements ",r(n.interfaces," & ")),r(t," "),o(e)]," ")},UnionTypeExtension:function(n){var t=n.types;return r(["extend union",n.name,r(n.directives," "),t&&0!==t.length?"= "+r(t," | "):""]," ")},EnumTypeExtension:function(n){var t=n.values;return r(["extend enum",n.name,r(n.directives," "),o(t)]," ")},InputObjectTypeExtension:function(n){var t=n.fields;return r(["extend input",n.name,r(n.directives," "),o(t)]," ")}};function i(n){return function(t){return r([t.description,n(t)],"\n")}}function r(n){var t,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==n?void 0:n.filter((function(n){return n})).join(e))&&void 0!==t?t:""}function o(n){return s("{\n",u(r(n,"\n")),"\n}")}function s(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?n+t+e:""}function u(n){return s(" ",n.replace(/\n/g,"\n "))}function a(n){return-1!==n.indexOf("\n")}function c(n){return null!=n&&n.some(a)}})),ve=function(n){var t=n.name,e=n.type;this.uri=n.uri,this.name=t,this.type=e},me=function(n){return"undefined"!=typeof File&&n instanceof File||"undefined"!=typeof Blob&&n instanceof Blob||n instanceof ve},pe=function n(t,e,i){var r;void 0===e&&(e=""),void 0===i&&(i=me);var o=new Map;function s(n,t){var e=o.get(t);e?e.push.apply(e,n):o.set(t,n)}if(i(t))r=null,s([e],t);else{var u=e?e+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)r=Array.prototype.map.call(t,(function(n,t){return s([""+u+t],n),null}));else if(Array.isArray(t))r=t.map((function(t,e){var r=n(t,""+u+e,i);return r.files.forEach(s),r.clone}));else if(t&&t.constructor===Object)for(var a in r={},t){var c=n(t[a],""+u+a,i);c.files.forEach(s),r[a]=c.clone}else r=t}return{clone:r,files:o}},ye=me,be="object"==typeof self?self.FormData:window.FormData,we=i((function(n,t){var e=r&&r.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0});var i=e(be),o=function(n){return ye(n)||null!==n&&"object"==typeof n&&"function"==typeof n.pipe};t.default=function(n,t){var e=pe({query:n,variables:t},"",o),r=e.clone,s=e.files;if(0===s.size)return JSON.stringify(r);var u=new("undefined"==typeof FormData?i.default:FormData);u.append("operations",JSON.stringify(r));var a={},c=0;return s.forEach((function(n){a[++c]=n})),u.append("map",JSON.stringify(a)),c=0,s.forEach((function(n,t){u.append(""+ ++c,t)})),u}})),ge=i((function(n,t){var e=r&&r.__assign||function(){return(e=Object.assign||function(n){for(var t,e=1,i=arguments.length;e<i;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},i=r&&r.__createBinding||(Object.create?function(n,t,e,i){void 0===i&&(i=e),Object.defineProperty(n,i,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,i){void 0===i&&(i=e),n[i]=t[e]}),o=r&&r.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),s=r&&r.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&i(t,n,e);return o(t,n),t},u=r&&r.__awaiter||function(n,t,e,i){return new(e||(e=Promise))((function(r,o){function s(n){try{a(i.next(n))}catch(n){o(n)}}function u(n){try{a(i.throw(n))}catch(n){o(n)}}function a(n){var t;n.done?r(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(s,u)}a((i=i.apply(n,t||[])).next())}))},a=r&&r.__generator||function(n,t){var e,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(n,s)}catch(n){o=[6,n],i=0}finally{e=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},c=r&&r.__rest||function(n,t){var e={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.indexOf(i)<0&&(e[i]=n[i]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(n);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(e[i[r]]=n[i[r]])}return e},f=r&&r.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.gql=t.request=t.rawRequest=t.GraphQLClient=t.ClientError=void 0;var l=s(oe),h=l,d=f(we),v=re;Object.defineProperty(t,"ClientError",{enumerable:!0,get:function(){return v.ClientError}});var m=function(n){var t={};return n&&("undefined"!=typeof Headers&&n instanceof Headers||n instanceof h.Headers?t=function(n){var t={};return n.forEach((function(n,e){t[e]=n})),t}(n):Array.isArray(n)?n.forEach((function(n){t[n[0]]=n[1]})):t=n),t},p=function(){function n(n,t){this.url=n,this.options=t||{}}return n.prototype.rawRequest=function(n,t,i){return u(this,void 0,void 0,(function(){var r,o,s,u,f,h,v,p,y,w;return a(this,(function(a){switch(a.label){case 0:return o=(r=this.options).headers,u=void 0===(s=r.fetch)?l.default:s,f=c(r,["headers","fetch"]),h=d.default(n,t),[4,u(this.url,e({method:"POST",headers:e(e(e({},"string"==typeof h?{"Content-Type":"application/json"}:{}),m(o)),m(i)),body:h},f))];case 1:return[4,b(v=a.sent())];case 2:if(p=a.sent(),v.ok&&!p.errors&&p.data)return y=v.headers,w=v.status,[2,e(e({},p),{headers:y,status:w})];throw new re.ClientError(e(e({},"string"==typeof p?{error:p}:p),{status:v.status,headers:v.headers}),{query:n,variables:t})}}))}))},n.prototype.request=function(n,t,i){return u(this,void 0,void 0,(function(){var r,o,s,u,f,h,v,p,y;return a(this,(function(a){switch(a.label){case 0:return o=(r=this.options).headers,u=void 0===(s=r.fetch)?l.default:s,f=c(r,["headers","fetch"]),h=function(n){return"string"==typeof n?n:de.print(n)}(n),v=d.default(h,t),[4,u(this.url,e({method:"POST",headers:e(e(e({},"string"==typeof v?{"Content-Type":"application/json"}:{}),m(o)),m(i)),body:v},f))];case 1:return[4,b(p=a.sent())];case 2:if(y=a.sent(),p.ok&&!y.errors&&y.data)return[2,y.data];throw new re.ClientError(e(e({},"string"==typeof y?{error:y}:y),{status:p.status}),{query:h,variables:t})}}))}))},n.prototype.setHeaders=function(n){return this.options.headers=n,this},n.prototype.setHeader=function(n,t){var e,i=this.options.headers;return i?i[n]=t:this.options.headers=((e={})[n]=t,e),this},n}();function y(n,t,e){return u(this,void 0,void 0,(function(){return a(this,(function(){return[2,new p(n).request(t,e)]}))}))}function b(n){var t=n.headers.get("Content-Type");return t&&t.startsWith("application/json")?n.json():n.text()}t.GraphQLClient=p,t.rawRequest=function(n,t,e){return u(this,void 0,void 0,(function(){return a(this,(function(){return[2,new p(n).rawRequest(t,e)]}))}))},t.request=y,t.default=y,t.gql=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return n.reduce((function(n,e,i){return""+n+e+(i in t?t[i]:"")}),"")}})),Ee=i((function(n,t){var e=r&&r.__assign||function(){return(e=Object.assign||function(n){for(var t,e=1,i=arguments.length;e<i;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},i=r&&r.__spreadArrays||function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;var i=Array(n),r=0;for(t=0;t<e;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,r++)i[r]=o[s];return i};function o(n,t){return"Variable"===n.kind?e(e({},n),{name:e(e({},n.name),{value:t(n.name.value)})}):"ObjectValue"===n.kind?e(e({},n),{fields:n.fields.map((function(n){return e(e({},n),{value:o(n.value,t)})}))}):"ListValue"===n.kind?e(e({},n),{values:n.values.map((function(n){return o(n,t)}))}):n}function s(n,t){return e(e({},n),{value:o(n.value,t)})}function u(n,t){var i;return e(e({},n),{arguments:null===(i=n.arguments)||void 0===i?void 0:i.map((function(n){return s(n,t)}))})}function a(n,t){var i;return e(e({},n),{variable:e(e({},n.variable),{name:e(e({},n.variable.name),{value:t(n.variable.name.value)})}),directives:null===(i=n.directives)||void 0===i?void 0:i.map((function(n){return u(n,t)}))})}function c(n,t){return e(e({},n),{selections:n.selections.map((function(n){var i,r,o;switch(n.kind){case"Field":return e(e({},n),{arguments:null===(i=n.arguments)||void 0===i?void 0:i.map((function(n){return s(n,t)})),selectionSet:n.selectionSet?c(n.selectionSet,t):void 0});case"FragmentSpread":return e(e({},n),{directives:null===(r=n.directives)||void 0===r?void 0:r.map((function(n){return u(n,t)}))});case"InlineFragment":return e(e({},n),{directives:null===(o=n.directives)||void 0===o?void 0:o.map((function(n){return u(n,t)})),selectionSet:c(n.selectionSet,t)})}}))})}function f(n,t,i){var r,o;return e(e({},n),{variableDefinitions:null===(r=n.variableDefinitions)||void 0===r?void 0:r.map((function(n){return a(n,t)})),directives:null===(o=n.directives)||void 0===o?void 0:o.map((function(n){return u(n,t)})),selectionSet:c(e(e({},n.selectionSet),{selections:n.selectionSet.selections.map((function(n){var t,r;switch(n.kind){case"Field":return e(e({},n),{alias:e(e({},n.name),{value:i(null!==(r=null===(t=n.alias)||void 0===t?void 0:t.value)&&void 0!==r?r:n.name.value)})});default:return n}}))}),t)})}Object.defineProperty(t,"__esModule",{value:!0}),t.renameVariables=t.renameVariablesAndTopLevelFields=t.renameVariablesAndTopLevelFieldsOnOpDef=t.renameSelectionSetArguments=t.renameVariableDefinition=t.renameDirectiveArguments=t.renameArgument=t.renameValue=t.defaultRenameFn=void 0,t.defaultRenameFn=function(n,t){return n+"_"+t},t.renameValue=o,t.renameArgument=s,t.renameDirectiveArguments=u,t.renameVariableDefinition=a,t.renameSelectionSetArguments=c,t.renameVariablesAndTopLevelFieldsOnOpDef=f,t.renameVariablesAndTopLevelFields=function(n,t,r){return e(e({},n),{definitions:i(n.definitions.filter((function(n){return"OperationDefinition"!==n.kind})),n.definitions.filter((function(n){return"OperationDefinition"===n.kind})).map((function(n){return f(n,t,r)})))})},t.renameVariables=function(n,t){return Object.keys(n).reduce((function(i,r){var o;return e(e({},i),((o={})[t(r)]=n[r],o))}),{})}}));const Se=o(i((function(n,t){var e,i=r&&r.__extends||(e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])})(n,t)},function(n,t){function i(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=r&&r.__assign||function(){return(o=Object.assign||function(n){for(var t,e=1,i=arguments.length;e<i;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},s=r&&r.__spreadArrays||function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;var i=Array(n),r=0;for(t=0;t<e;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,r++)i[r]=o[s];return i};Object.defineProperty(t,"__esModule",{value:!0});var u={kind:"Document",definitions:[]},a=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return i(t,n),t}(Error),c=function(){function n(n,t,e){this.operationName=n,this.document=t,this.variables=e}return n.prototype.add=function(t,e){var i=this,r=this.document.definitions.concat(t.definitions).filter((function(n){return"OperationDefinition"===n.kind}));if(!r.length)throw new a("Expected at least one OperationDefinition, but found none.");r.forEach((function(n){var t,e,i=r.filter((function(t){return t!==n}));i.forEach((function(t){var e,i;if(t.operation!==n.operation)throw new a("expected all operations to be of the smae type, but "+(null===(e=t.name)||void 0===e?void 0:e.value)+" is "+t.operation+" and "+(null===(i=n.name)||void 0===i?void 0:i.value)+" is "+n.operation)})),null===(t=n.selectionSet.selections)||void 0===t||t.filter((function(n){return"Field"===n.kind})).forEach((function(t){i.forEach((function(e){var i;return null===(i=e.selectionSet.selections)||void 0===i?void 0:i.filter((function(n){return"Field"===n.kind})).forEach((function(i){var r,o,s,u;if(((null===(r=t.alias)||void 0===r?void 0:r.value)||t.name.value)===((null===(o=i.alias)||void 0===o?void 0:o.value)||i.name.value))throw new a("duplicate field definition "+i.name.value+" for oprations "+(null===(s=n.name)||void 0===s?void 0:s.value)+" and "+(null===(u=e.name)||void 0===u?void 0:u.value))}))}))})),null===(e=n.variableDefinitions)||void 0===e||e.forEach((function(t){i.forEach((function(e){var i;return null===(i=e.variableDefinitions)||void 0===i?void 0:i.forEach((function(i){var r,o;if(t.variable.name.value===i.variable.name.value)throw new a("duplicate variable definition "+i.variable.name.value+" for oprations "+(null===(r=n.name)||void 0===r?void 0:r.value)+" and "+(null===(o=e.name)||void 0===o?void 0:o.value))}))}))}))}));for(var u=i.variables&&e?o(o({},i.variables),e):e||i.variables,c=[{kind:"OperationDefinition",directives:r.flatMap((function(n){return n.directives||[]})),name:{kind:"Name",value:this.operationName},operation:r[0].operation,selectionSet:{kind:"SelectionSet",selections:r.flatMap((function(n){return n.selectionSet.selections}))},variableDefinitions:r.flatMap((function(n){return n.variableDefinitions||[]}))}],f=new Set,l=0,h=this.document.definitions.concat(t.definitions);l<h.length;l++){var d=h[l];if("OperationDefinition"!==d.kind){if("FragmentDefinition"===d.kind){if(f.has(d.name.value))continue;f.add(d.name.value)}c=s([d],c)}}return new n(this.operationName,{kind:"Document",definitions:c},u)},n.prototype.addN=function(n,t,e,i){return void 0===e&&(e=Ee.defaultRenameFn),void 0===i&&(i=Ee.defaultRenameFn),t.length?t.reduce((function(t,r,o){var s=Ee.renameVariablesAndTopLevelFields(n,(function(n){return e(n,o)}),(function(n){return i(n,o)})),u=Ee.renameVariables(r,(function(n){return e(n,o)}));return t.add(s,u)}),this):this},n}();t.default=function(n){return{operationName:n,add:function(n,t){return new c(this.operationName,n,t)},addN:function(n,t,e,i){return new c(this.operationName,u).addN(n,t,e,i)}}}})));var Ie={current:void 0};function Oe(){if(void 0===Ie.current)throw new Error("no implementation of useHost provided");return Ie.current()}function Te(n){if(!n)throw new Error("Must supply an implementation");if("function"!=typeof n)throw new Error("implementation must be a function");Ie.current=n}function Ne(){Q();var n=Oe();return u(n,"sq:locale")}function Fe(){sn();var n=Oe();return u(n,"sq:program-id")}function Ce(){var n;return null==(n=je())?void 0:n.jwt}function je(){Z();var n=Oe(),t=u(n,"sq:user-identity"),e=nn(null==t?void 0:t.jwt);if(R()||!t||e)return t;en(void 0)}var De=M,Ae=q,_e=function(){var n;const t=V();switch(t.type){case"SquatchJS2":return(null==(n=t.widgetIdent)?void 0:n.engagementMedium)||"EMBED";case"SquatchAndroid":case"SquatchIOS":case"SquatchPortal":case"SquatchAdmin":case"None":return"EMBED"}};function xe(){return(xe=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n}).apply(this,arguments)}function Pe(n,t){return(Pe=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}function ke(n,t){return t||(t=n.slice(0)),n.raw=t,n}function Ve(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}function Re(n,t){var e;if("undefined"==typeof Symbol||null==n[Symbol.iterator]){if(Array.isArray(n)||(e=function(n,t){if(n){if("string"==typeof n)return Ve(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ve(n,t):void 0}}(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var i=0;return function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=n[Symbol.iterator]()).next.bind(e)}var Me=function(){return(Me=Object.assign||function(n){for(var t,e=1,i=arguments.length;e<i;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},Ue=new Map,qe=new Map,$e=!0,Le=!1;function Be(n){return n.replace(/[\s,]+/g," ").trim()}function Je(n){var t,e,i,r=Be(n);if(!Ue.has(r)){var o=Zn(n,{experimentalFragmentVariables:Le});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");Ue.set(r,function(n){var t=new Set(n.definitions);t.forEach((function(n){n.loc&&delete n.loc,Object.keys(n).forEach((function(e){var i=n[e];i&&"object"==typeof i&&t.add(i)}))}));var e=n.loc;return e&&(delete e.startToken,delete e.endToken),n}((t=o,e=new Set,i=[],t.definitions.forEach((function(n){if("FragmentDefinition"===n.kind){var t=n.name.value,r=Be((s=n.loc).source.body.substring(s.start,s.end)),o=qe.get(t);o&&!o.has(r)?$e&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||qe.set(t,o=new Set),o.add(r),e.has(r)||(e.add(r),i.push(n))}else i.push(n);var s})),Me(Me({},t),{definitions:i}))))}return Ue.get(r)}function Ge(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];"string"==typeof n&&(n=[n]);var i=n[0];return t.forEach((function(t,e){i+=t&&"Document"===t.kind?t.loc.source.body:t,i+=n[e+1]})),Je(i)}var He,Ye=Ge;(He=Ge||(Ge={})).gql=Ye,He.resetCaches=function(){Ue.clear(),qe.clear()},He.disableFragmentWarnings=function(){$e=!1},He.enableExperimentalFragmentVariables=function(){Le=!0},He.disableExperimentalFragmentVariables=function(){Le=!1},Ge.default=Ge;var Qe=Ge;function We(n,t){try{var e=n()}catch(n){return t(n)}return e&&e.then?e.then(void 0,t):e}var Xe=function(n){var t,e;function i(t,e){var i;(i=n.call(this,t,e)||this).subject=new Gt;var r=new Gt;return i.subject.pipe(function(n){let t=arguments.length,e=zt;Xt(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],t--);let i=null;t>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return t>=3&&(r=arguments[2]),function(t){return t.lift(new Kt(n,i,r,e))}}(200,void 0,10)).subscribe((function(n){try{if(!n.length)return Promise.resolve();for(var t,e=ni(n),o=e.mergedQuery,s=e.mergedVariables,u=e.mergedQueryAddedEvents,a=Re(e.unmergedQueryAddedEvents);!(t=a()).done;)r.next(t.value);return u.length?Promise.resolve(We((function(){return Promise.resolve(i.superRequest(o,s)).then((function(n){ii(n,u)}))}),(function(n){if(n instanceof re.ClientError){var t=function(){var t=n.response,e=t.data,i=t.errors;if(!e)return{v:oi(u,n)};for(var r,o=Object.keys(e),s=[].concat(u),a=function(){var t=r.value,e=void 0;t.path.find((function(i,r,u){if(o.includes(i)){var a=Ze(i),c=s.findIndex((function(n){return n.id===a}));if(-1===c)return!1;o.splice(r,1),e=s.splice(c,1)[0];var f=ti(n.response.data,e);u[r]=Ke(u[r],a);var l=e.query,h=e.variables,d=xe({},n.response,{errors:[t],data:f,path:u}),v=new re.ClientError(d,{query:"string"!=typeof l?st(l):l,variables:h});return ri(e,v),!0}return!1}))},c=Re(i);!(r=c()).done;)a();ii(e,s)}();if("object"==typeof t)return t.v}else oi(u,n)}))):Promise.resolve()}catch(n){return Promise.reject(n)}})),r.subscribe((function(n){try{var t=We((function(){return Promise.resolve(i.superRequest(n.query,n.variables)).then((function(t){ei(t,n)}))}),(function(t){ri(n,t)}));return Promise.resolve(t&&t.then?t.then((function(){})):void 0)}catch(n){return Promise.reject(n)}})),i}e=n,(t=i).prototype=Object.create(e.prototype),t.prototype.constructor=t,Pe(t,e);var r=i.prototype;return r.superRequest=function(t,e){return n.prototype.request.call(this,t,e)},r.request=function(n,t){var e=this;return new Promise((function(i,r){var o={query:n,variables:t,id:ze(),resolve:i,reject:r};e.subject.next(o)}))},i}(ge.GraphQLClient),ze=function(){return((n=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(n));for(;n--;){let i=63&e[n];t+=i<36?i.toString(36):i<62?(i-26).toString(36).toUpperCase():i<63?"_":"-"}return t})().replace(/[-_]/g,"")},Ke=function(n,t){return n.replace("_"+t,"")},Ze=function(n){var t=n.split("_");return t[t.length-1]},ni=function(n){var t=[],e=[],i=n.reduce((function(n,i){var r=i.query,o=i.variables,s=i.id;try{var u="string"==typeof r?Zn(r):r,a=u.definitions.find((function(n){return"FragmentDefinition"===n.kind})),c="string"==typeof r?r:st(r),f=/@/.test(c);if(a||f)return e.push(i),n;var l=function(n){return function(n,t){return n+"_"+t}(n,s)};return n=n.addN(u,[o],l,l),t.push(i),n}catch(t){return e.push(i),n}}),Se("BatchedQuery")),r=i.document,o=i.variables;return{mergedQuery:r&&st(r),mergedVariables:o,mergedQueryAddedEvents:t,unmergedQueryAddedEvents:e}},ti=function(n,t){if(!n)return n;var e=Object.keys(n),i=t.id;return e.reduce((function(t,e){var r;return e.endsWith(i)&&(t=xe({},t,((r={})[Ke(e,i)]=n[e],r))),t}),{})},ei=function(n,t){(0,t.resolve)(n)},ii=function(n,t){for(var e,i=Re(t);!(e=i()).done;){var r=e.value,o=ti(n,r);r.resolve(o)}},ri=function(n,t){(0,n.reject)(t)},oi=function(n,t){for(var e,i=Re(n);!(e=i()).done;)(0,e.value.reject)(t)},si="sq:graphql-client",ui=St((function(n,t,e){return new Xe(n+"/api/v1/"+t+"/graphql",{headers:{Authorization:"Bearer "+(e||"")}})}));function ai(n,t){switch(t.type){case"loading":return{data:void 0,errors:void 0,loading:!0};case"data":return{data:t.payload,errors:void 0,loading:!1};case"errors":return{data:void 0,errors:t.payload,loading:!1}}}function ci(n,t){var e,i,r,o,s,c,f=(e=Ce(),i=Ae(),r=De(),o=ui(i,r,e),s=Oe(),null!=(c=u(s,"sq:graphql-client",{attempts:0}))?c:o),h=a(ai,t),d=h[1];return[h[0],l((function(t,e){void 0===e&&(e=!1);try{if(!f){var i=new Error("No GraphQL client found");return d({type:"errors",payload:i}),Promise.resolve(i)}return Promise.resolve(function(i,r){try{var o=(e||d({type:"loading"}),Promise.resolve(f.request(n,t)).then((function(n){return d({type:"data",payload:n}),n})))}catch(n){return r(n)}return o&&o.then?o.then(void 0,r):o}(0,(function(n){return d({type:"errors",payload:n}),n})))}catch(n){return Promise.reject(n)}}),[f,n,d])]}var fi,li={loading:!1,data:void 0,errors:void 0};function hi(n){var t=ci(n,li);return[t[1],t[0]]}var di,vi=Qe(fi||(fi=ke(["\n mutation AuthenticateWithEmailAndPassword(\n $email: String!\n $password: String!\n ) {\n authenticateManagedIdentityWithEmailAndPassword(\n authenticateManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function mi(){var n=hi(vi),t=n[0],e=n[1];return[function(n){try{return Promise.resolve(t(n)).then((function(n){if(!(n instanceof Error)&&n.authenticateManagedIdentityWithEmailAndPassword){var t=n.authenticateManagedIdentityWithEmailAndPassword.token,e=p(t).user;en({jwt:t,id:e.id,accountId:e.accountId,managedIdentity:{email:n.authenticateManagedIdentityWithEmailAndPassword.email,emailVerified:n.authenticateManagedIdentityWithEmailAndPassword.emailVerified,sessionData:n.authenticateManagedIdentityWithEmailAndPassword.sessionData}})}return n}))}catch(n){return Promise.reject(n)}},{loading:e.loading,data:e.data,errors:e.errors}]}var pi,yi=Qe(di||(di=ke(["\n mutation RegisterWithEmailAndPassword(\n $email: String!\n $password: String!\n $formData: RSJsonNode\n $redirectPath: String\n ) {\n registerManagedIdentityWithEmailAndPassword(\n registerManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n formData: $formData\n redirectPath: $redirectPath\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function bi(){var n=hi(yi),t=n[0],e=n[1];return[function(n){try{return Promise.resolve(t(n)).then((function(n){if(!(n instanceof Error)&&n.registerManagedIdentityWithEmailAndPassword){var t=n.registerManagedIdentityWithEmailAndPassword.token,e=p(t).user;en({jwt:t,id:e.id,accountId:e.accountId,managedIdentity:{email:n.registerManagedIdentityWithEmailAndPassword.email,emailVerified:n.registerManagedIdentityWithEmailAndPassword.emailVerified,sessionData:n.registerManagedIdentityWithEmailAndPassword.sessionData}})}return n}))}catch(n){return Promise.reject(n)}},{loading:e.loading,data:e.data,errors:e.errors}]}var wi,gi=Qe(pi||(pi=ke(["\n mutation RegisterViaRegistrationForm($key: String!, $formData: RSJsonNode!) {\n submitForm(formSubmissionInput: { key: $key, formData: $formData }) {\n results {\n ... on FormHandlerSubmissionResult {\n result\n formHandler {\n namespace\n }\n }\n ... on FormHandlerError {\n errorCode\n error\n errorType\n formHandler {\n name\n endpointUrl\n }\n }\n }\n }\n }\n"])));function Ei(){var n=hi(gi),t=n[0],e=n[1],i=e.loading,r=e.data,o=e.errors,s=c(null),u=s[1];return[function(n){try{return u(null),Promise.resolve(t(n)).then((function(n){var t,e,i,r;if(n instanceof Error)return n;var o=null==(t=n.submitForm)||null==(e=t.results)?void 0:e.find((function(n){var t;return"identity"===(null==n||null==(t=n.formHandler)?void 0:t.namespace)}));if(o&&null!=(i=o.result)&&null!=(r=i.results)&&r.length){var s=o.result.results[0];if(s.success){var a=s.data.token,c=p(a).user;en({jwt:a,id:c.id,accountId:c.accountId,managedIdentity:{email:s.data.email,emailVerified:s.data.emailVerified,sessionData:s.data.sessionData}})}else u(s.message)}return n}))}catch(n){return Promise.reject(n)}},{loading:i,data:r,errors:o,formError:s[0]}]}var Si,Ii=Qe(wi||(wi=ke(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Oi(){var n=hi(Ii),t=n[1];return[n[0],{loading:t.loading,data:t.data,errors:t.errors}]}var Ti,Ni=Qe(Si||(Si=ke(["\n mutation ResetPassword($oobCode: String!, $password: String!) {\n resetManagedIdentityPassword(\n resetManagedIdentityPasswordInput: {\n password: $password\n oobCode: $oobCode\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Fi(){var n=hi(Ni),t=n[0],e=n[1];return[function(n){try{return Promise.resolve(t(n)).then((function(n){if(!(n instanceof Error)&&n.resetManagedIdentityPassword){var t=n.resetManagedIdentityPassword.token,e=p(t).user;en({jwt:t,id:e.id,accountId:e.accountId,managedIdentity:{email:n.resetManagedIdentityPassword.email,emailVerified:n.resetManagedIdentityPassword.emailVerified,sessionData:n.resetManagedIdentityPassword.sessionData}})}return n}))}catch(n){return Promise.reject(n)}},{loading:e.loading,data:e.data,errors:e.errors}]}var Ci=Qe(Ti||(Ti=ke(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function ji(){return hi(Ci)}function Di(){var n=Oe();return{refresh:l((function(){n.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}))}),[n])}}function Ai(t){var e=t.skip,i=void 0!==e&&e,r=t.update,o=t.variables;s((function(){var n=function(){!i&&r(o,!0)};return document.addEventListener("sq:refresh",n),function(){return document.removeEventListener("sq:refresh",n)}}),function(t){var e=f(t),i=f(0);return E(t,e.current)||(e.current=t,i.current+=1),n((function(){return e.current}),[i.current])}([o,r,i]))}var _i,xi={loading:!1,data:void 0,errors:void 0},Pi=Symbol();function ki(n){var t=ci(n,xi),e=t[0],i=t[1],r=f(Pi);Ai({skip:r.current===Pi,update:i,variables:r.current});var o=l((function(n){return r.current=n,i(n)}),[i]);return[i,xe({},e,{refetch:o})]}var Vi,Ri=Qe(_i||(_i=ke(["\n query ManagedIdentitySession {\n managedIdentitySession {\n email\n emailVerified\n sessionData\n }\n }\n"])));function Mi(){var n=je(),t=ki(Ri),e=t[0],i=t[1],r=i.refetch,o=function(t){t instanceof Error||!t.managedIdentitySession||en(xe({},n,{managedIdentity:t.managedIdentitySession}))};return[function(){try{return Promise.resolve(e({})).then((function(n){return o(n),n}))}catch(n){return Promise.reject(n)}},{loading:i.loading,data:i.data,errors:i.errors,refetch:function(){try{return Promise.resolve(r()).then((function(n){return o(n),n}))}catch(n){return Promise.reject(n)}}}]}var Ui,qi=Qe(Vi||(Vi=ke(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function $i(){var n=Mi()[0],t=hi(qi),e=t[0],i=t[1];return[function(t){try{return Promise.resolve(e(t)).then((function(t){var e=function(){if(!(t instanceof Error)&&t.verifyManagedIdentityEmail.success)return Promise.resolve(n()).then((function(){}))}();return e&&e.then?e.then((function(){return t})):t}))}catch(t){return Promise.reject(t)}},{loading:i.loading,data:i.data,errors:i.errors}]}var Li,Bi=Qe(Ui||(Ui=ke(["\n mutation RequestPasswordResetEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityPasswordResetEmail(\n requestManagedIdentityPasswordResetEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function Ji(){return hi(Bi)}var Gi,Hi=Qe(Li||(Li=ke(["\n mutation RequestVerificationEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityVerificationEmail(\n requestManagedIdentityVerificationEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function Yi(){return hi(Hi)}var Qi=Qe(Gi||(Gi=ke(["\n mutation authenticateManagedIdentityWithInstantAccess(\n $email: String!\n $firstName: String\n $lastName: String\n $locale: RSLocale\n $countryCode: RSCountryCode\n $cookies: String\n ) {\n authenticateManagedIdentityWithInstantAccess(\n authenticateManagedIdentityWithInstantAccessInput: {\n email: $email\n firstName: $firstName\n lastName: $lastName\n locale: $locale\n countryCode: $countryCode\n cookies: $cookies\n }\n ) {\n email\n emailVerified\n sessionData\n token\n }\n }\n"])));function Wi(){var n=hi(Qi),t=n[0],e=n[1];return[function(n){try{return Promise.resolve(t(n)).then((function(n){if(!(n instanceof Error)&&n.authenticateManagedIdentityWithInstantAccess){var t=n.authenticateManagedIdentityWithInstantAccess.email;en({jwt:n.authenticateManagedIdentityWithInstantAccess.token,id:t,accountId:t})}return n}))}catch(n){return Promise.reject(n)}},{loading:e.loading,data:e.data,errors:e.errors}]}function Xi(){return a((function(n){return n+1}),0)}function zi(n){for(var t,e=Re(Object.getOwnPropertyNames(n));!(t=e()).done;){var i=n[t.value];i&&"object"==typeof i&&zi(i)}return Object.freeze(n)}var Ki={loading:!0,data:void 0,errors:void 0};function Zi(n,t,e){var i=ci(n,Ki),r=i[0],o=i[1],s=Xi(),u=s[1];return function(n,t){var e=f();e.current&&E(t,e.current.key)||(e.current={key:t,value:n()})}((function(){!e&&o(t)}),[n,t,o,s[0],e]),Ai({skip:e,update:o,variables:t}),zi(xe({},r,{refetch:u}))}function nr(){var n=Xi()[1];return s((function(){return H.listen((function(){n()}))}),[]),H.location}var tr,er=H;function ir(n,t,e,i,r){var o;void 0===i&&(i={}),void 0===r&&(r=!1);var s=function(n){var t=c({limit:n.limit,offset:n.offset}),e=t[0],i=t[1],r=e.offset,o=e.limit,s=function(n,t){return n*t},u=function(n,t){return Math.ceil(n/t)||0};return{limit:o,setLimit:function(n){var t=u(r,n),o=s(n,t);i(xe({},e,{limit:n,offset:o}))},offset:r,setCurrentPage:function(n){var t=s(n,o);i((function(n){return xe({},n,{offset:t})}))},calculatePagination:function(n,t){var e=u(r,o),i=function(n,t){return Math.ceil(n/t)||0}(t,o),s=0===n?"0":n>1?r+1+"-"+(r+n):""+(r+1);return{currentPage:e,pageCount:i,rangeOnPage:s,pageProgress:s+" of "+t}}}}(e),u=s.limit,a=s.setLimit,f=s.setCurrentPage,l=s.calculatePagination,h=Zi(n,xe({limit:u,offset:s.offset},i),r),d=h.loading,v=h.errors,m=h.refetch,p=t(h.data),y=l((null==p||null==(o=p.data)?void 0:o.length)||0,(null==p?void 0:p.totalCount)||0);return{envelope:p,states:{errors:v,loading:d,limit:u,currentPage:y.currentPage,pageCount:y.pageCount,pageProgress:y.pageProgress},callbacks:{refetch:m,setLimit:a,setCurrentPage:f}}}ge.gql(tr||(tr=ke(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var rr,or,sr,ur,ar=1e3,cr=6e4,fr=60*cr,lr=24*fr,hr=function(n,t){t=t||{};var e=typeof n;if("string"===e&&n.length>0)return function(n){if(!((n=String(n)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(t){var e=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*e;case"weeks":case"week":case"w":return 6048e5*e;case"days":case"day":case"d":return e*lr;case"hours":case"hour":case"hrs":case"hr":case"h":return e*fr;case"minutes":case"minute":case"mins":case"min":case"m":return e*cr;case"seconds":case"second":case"secs":case"sec":case"s":return e*ar;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}(n);if("number"===e&&isFinite(n))return t.long?function(n){var t=Math.abs(n);return t>=lr?dr(n,t,lr,"day"):t>=fr?dr(n,t,fr,"hour"):t>=cr?dr(n,t,cr,"minute"):t>=ar?dr(n,t,ar,"second"):n+" ms"}(n):function(n){var t=Math.abs(n);return t>=lr?Math.round(n/lr)+"d":t>=fr?Math.round(n/fr)+"h":t>=cr?Math.round(n/cr)+"m":t>=ar?Math.round(n/ar)+"s":n+"ms"}(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function dr(n,t,e,i){var r=t>=1.5*e;return Math.round(n/e)+" "+i+(r?"s":"")}(function(n,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const e="color: "+this.color;t.splice(1,0,e,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(n=>{"%%"!==n&&(i++,"%c"===n&&(r=i))})),t.splice(r,0,e)},t.save=function(n){try{n?t.storage.setItem("debug",n):t.storage.removeItem("debug")}catch(n){}},t.load=function(){let n;try{n=t.storage.getItem("debug")}catch(n){}return!n&&"undefined"!=typeof process&&"env"in process&&(n=process.env.DEBUG),n},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(n){}}(),t.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),n.exports=function(n){function t(n){let i,r=null;function o(...n){if(!o.enabled)return;const e=o,r=Number(new Date);e.diff=r-(i||r),e.prev=i,e.curr=r,i=r,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");let s=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,((i,r)=>{if("%%"===i)return"%";s++;const o=t.formatters[r];return"function"==typeof o&&(i=o.call(e,n[s]),n.splice(s,1),s--),i})),t.formatArgs.call(e,n),(e.log||t.log).apply(e,n)}return o.namespace=n,o.useColors=t.useColors(),o.color=t.selectColor(n),o.extend=e,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(n):r,set:n=>{r=n}}),"function"==typeof t.init&&t.init(o),o}function e(n,e){const i=t(this.namespace+(void 0===e?":":e)+n);return i.log=this.log,i}function i(n){return n.toString().substring(2,n.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(n){return n instanceof Error?n.stack||n.message:n},t.disable=function(){const n=[...t.names.map(i),...t.skips.map(i).map((n=>"-"+n))].join(",");return t.enable(""),n},t.enable=function(n){let e;t.save(n),t.names=[],t.skips=[];const i=("string"==typeof n?n:"").split(/[\s,]+/),r=i.length;for(e=0;e<r;e++)i[e]&&("-"===(n=i[e].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+n.substr(1)+"$")):t.names.push(new RegExp("^"+n+"$")))},t.enabled=function(n){if("*"===n[n.length-1])return!0;let e,i;for(e=0,i=t.skips.length;e<i;e++)if(t.skips[e].test(n))return!1;for(e=0,i=t.names.length;e<i;e++)if(t.names[e].test(n))return!0;return!1},t.humanize=hr,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(n).forEach((e=>{t[e]=n[e]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(n){let e=0;for(let t=0;t<n.length;t++)e=(e<<5)-e+n.charCodeAt(t),e|=0;return t.colors[Math.abs(e)%t.colors.length]},t.enable(t.load()),t}(t);const{formatters:e}=n.exports;e.j=function(n){try{return JSON.stringify(n)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}}}(rr={exports:{}},rr.exports),rr.exports)("sq:useForm"),ge.gql(or||(or=ke(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),ge.gql(sr||(sr=ke(["\n mutation ($formSubmissionInput: FormSubmissionInput!) {\n submitForm(formSubmissionInput: $formSubmissionInput) {\n success\n results {\n ... on FormHandlerSubmissionResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"]))),ge.gql(ur||(ur=ke(["\n query ($formValidationInput: FormValidationInput!) {\n validateForm(formValidationInput: $formValidationInput) {\n valid\n results {\n ... on FormHandlerValidationResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"])));export{ui as C,Ce as H,hi as I,ki as J,Mi as K,je as L,Fi as N,Fe as O,mi as S,_e as T,Oe as V,Ne as W,$i as Y,De as _,Xi as a,Zi as b,si as c,ge as d,en as e,l as f,V as g,ji as h,R as i,un as j,Oi as k,bi as l,Ot as m,Di as n,Yi as o,er as p,Ei as q,St as s,Ji as t,Wi as u,nr as v,Te as x,ir as y}
|
|
1
|
+
import{u as n,d as t,s as e,c as i,a as r,e as o,f as s,h as u,i as a,j as c,k as f}from"./p-901f5b80.js";const l=(t,e)=>n((()=>t),e);function h(n){this.message=n}(h.prototype=new Error).name="InvalidCharacterError";var d="undefined"!=typeof window&&window.atob&&window.atob.bind(window)||function(n){var t=String(n).replace(/=+$/,"");if(t.length%4==1)throw new h("'atob' failed: The string to be decoded is not correctly encoded.");for(var e,i,r=0,o=0,s="";i=t.charAt(o++);~i&&(e=r%4?64*e+i:i,r++%4)?s+=String.fromCharCode(255&e>>(-2*r&6)):0)i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(i);return s};function v(n){var t=n.replace(/-/g,"+").replace(/_/g,"/");switch(t.length%4){case 0:break;case 2:t+="==";break;case 3:t+="=";break;default:throw"Illegal base64url string!"}try{return function(n){return decodeURIComponent(d(n).replace(/(.)/g,(function(n,t){var e=t.charCodeAt(0).toString(16).toUpperCase();return e.length<2&&(e="0"+e),"%"+e})))}(t)}catch(n){return d(t)}}function m(n){this.message=n}function p(n,t){if("string"!=typeof n)throw new m("Invalid token specified");var e=!0===(t=t||{}).header?0:1;try{return JSON.parse(v(n.split(".")[e]))}catch(n){throw new m("Invalid token specified: "+n.message)}}(m.prototype=new Error).name="InvalidTokenError";const{toString:y,hasOwnProperty:b}=Object.prototype,w=Function.prototype.toString,E=new Map;function g(n,t){try{return S(n,t)}finally{E.clear()}}function S(n,t){if(n===t)return!0;const e=y.call(n);if(e!==y.call(t))return!1;switch(e){case"[object Array]":if(n.length!==t.length)return!1;case"[object Object]":{if(N(n,t))return!0;const e=I(n),i=I(t),r=e.length;if(r!==i.length)return!1;for(let n=0;n<r;++n)if(!b.call(t,e[n]))return!1;for(let i=0;i<r;++i){const r=e[i];if(!S(n[r],t[r]))return!1}return!0}case"[object Error]":return n.name===t.name&&n.message===t.message;case"[object Number]":if(n!=n)return t!=t;case"[object Boolean]":case"[object Date]":return+n==+t;case"[object RegExp]":case"[object String]":return n==`${t}`;case"[object Map]":case"[object Set]":{if(n.size!==t.size)return!1;if(N(n,t))return!0;const i=n.entries(),r="[object Map]"===e;for(;;){const n=i.next();if(n.done)break;const[e,o]=n.value;if(!t.has(e))return!1;if(r&&!S(o,t.get(e)))return!1}return!0}case"[object Uint16Array]":case"[object Uint8Array]":case"[object Uint32Array]":case"[object Int32Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object ArrayBuffer]":n=new Uint8Array(n),t=new Uint8Array(t);case"[object DataView]":{let e=n.byteLength;if(e===t.byteLength)for(;e--&&n[e]===t[e];);return-1===e}case"[object AsyncFunction]":case"[object GeneratorFunction]":case"[object AsyncGeneratorFunction]":case"[object Function]":{const e=w.call(n);return e===w.call(t)&&!function(n){const t=n.length-T.length;return t>=0&&n.indexOf(T,t)===t}(e)}}return!1}function I(n){return Object.keys(n).filter(O,n)}function O(n){return void 0!==this[n]}const T="{ [native code] }";function N(n,t){let e=E.get(n);if(e){if(e.has(t))return!0}else E.set(n,e=new Set);return e.add(t),!1}var F=Object.defineProperty,C=Object.defineProperties,D=Object.getOwnPropertyDescriptors,j=Object.getOwnPropertySymbols,A=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable,P=(n,t,e)=>t in n?F(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e,x=(n,t)=>{for(var e in t||(t={}))A.call(t,e)&&P(n,e,t[e]);if(j)for(var e of j(t))_.call(t,e)&&P(n,e,t[e]);return n},k=(n,t)=>C(n,D(t));function R(){var n,t,e;return window.SquatchAndroid?{type:"SquatchAndroid",android:window.SquatchAndroid,widgetIdent:window.widgetIdent}:window.SquatchPortal?{type:"SquatchPortal",env:window.SquatchPortal}:window.SquatchAdmin?{type:"SquatchAdmin",adminSDK:window.SquatchAdmin}:(window.widgetIdent||(null==(n=window.frameElement)?void 0:n.squatchJsApi))&&"demo"!==(null==(t=window.widgetIdent)?void 0:t.env)?{type:"SquatchJS2",api:null==(e=window.frameElement)?void 0:e.squatchJsApi,widgetIdent:window.widgetIdent}:{type:"None"}}function V(){const n=R();return"None"===n.type||"SquatchAdmin"===n.type}function M(){var n;const t=R();switch(t.type){case"SquatchAndroid":case"SquatchIOS":case"SquatchJS2":return null==(n=t.widgetIdent)?void 0:n.tenantAlias;case"SquatchAdmin":case"None":return"demo";case"SquatchPortal":return t.env.tenantAlias}}var U="https://app.referralsaasquatch.com";function q(){var n,t;const e=R();switch(e.type){case"SquatchAndroid":case"SquatchIOS":case"SquatchJS2":return(null==(n=e.widgetIdent)?void 0:n.appDomain)||U;case"SquatchPortal":return(null==(t=e.env)?void 0:t.appDomain)||U;case"SquatchAdmin":case"None":return U}}var $=(()=>{var n;try{return null==(n=null==window?void 0:window.localStorage)?void 0:n.getItem("debug")}catch(n){return!1}})();function L(n,...t){$&&console.debug(`sq:environment:${n}`,...t)}var B=(...n)=>L("history",...n);function J(n){if("string"==typeof n)return n;const t=new URL(n.pathname,window.origin);return n.search&&(t.search=n.search),n.hash&&(t.hash=n.hash),t}function G(){return window.squatchHistory=window.squatchHistory||function(){if("SquatchPortal"===R().type){let n=function(n){const t=window.history[n];return function(...e){const i=t.apply(window.history,e),r=new Event(n);return window.dispatchEvent(r),i}};return window.history.pushState=n("pushState"),window.history.replaceState=n("replaceState"),new class{constructor(){this.listeners=new Set,window.addEventListener("popstate",this.notify.bind(this)),window.addEventListener("pushState",this.notify.bind(this)),window.addEventListener("replaceState",this.notify.bind(this))}listen(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}notify(){B("notifying listeners of route change",this.location),this.listeners&&this.listeners.forEach((n=>n()))}get location(){return{pathname:window.location.pathname,search:window.location.search,hash:window.location.hash,state:window.history.state}}back(){this.go(-1)}forward(){this.go(1)}go(n){window.history.go(n)}push(n,t){const e=J(n);window.history.pushState(t,"",e)}replace(n,t){const e=J(n);window.history.replaceState(t,"",e)}}}return new class{constructor(){this.history=[{pathname:"/",search:"",hash:""}],this.index=0,this.listeners=new Set}listen(n){return this.listeners.add(n),()=>{this.listeners.delete(n)}}current(){return this.history[this.index]}get state(){return this.current().state}notify(){B("notifying listeners of route change",this.location),this.listeners.forEach((n=>n()))}get location(){return this.history[this.index]}back(){this.go(-1)}forward(){this.go(1)}go(n){this.index+=n,this.index<0&&(this.index=0),this.index>=this.history.length&&(this.index=this.history.length-1),this.notify()}push(n,t){let e;e="string"==typeof n?{pathname:n,search:this.history[this.index].search,hash:this.history[this.index].hash,state:t}:k(x({},n),{state:t}),this.index++,this.history.splice(this.index,this.history.length,e),this.notify()}replace(n,t){this.history[this.index]="string"==typeof n?{pathname:n,search:"",hash:"",state:t}:k(x({},n),{state:t}),this.notify()}}}(),window.squatchHistory}var H=new class{get location(){return G().location}listen(n){return G().listen(n)}back(){G().back()}forward(){G().forward()}go(n){G().go(n)}push(n,t){G().push(n,t)}replace(n,t){G().replace(n,t)}};function Y(n){if(n&&/^[a-z]{2}_(?:[A-Z]{2}|[0-9]{3})$/.test(n))return n}function Q(){var n;let e=window.squatchLocale;if(!e){L("sq:locale","Creating locale context provider");const i=(null==(n=window.widgetIdent)?void 0:n.locale)??Y(navigator.language.replaceAll("-","_"));e=new t({element:document.documentElement,initialState:i,contextName:"sq:locale"}).start(),window.squatchLocale=e}return e}var W=(...n)=>L("sq:locale",...n),z=(...n)=>L("sq:locale",...n),X=new e({contextName:"sq:user-identity",element:(()=>{const n="__environment_context_listener";let t=document.getElementById(n);return t||(t=document.createElement("div"),t.id=n,document.documentElement.appendChild(t)),t})(),onChange:async n=>{var t;const e=Q(),i=(null==(t=window.widgetIdent)?void 0:t.locale)??Y(navigator.language.replaceAll("-","_"));let r;if(n){z("User context changed, refetching locale");const n=await async function(){var n;W("Fetching locale from GraphQL for current user");try{const t=await fetch(`${q()}/api/v1/${M()}/graphql`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${null==(n=rn())?void 0:n.jwt}`},body:JSON.stringify({query:"\n query {\n viewer {\n ... on User {\n locale\n }\n }\n }\n"})});if(!t.ok)throw new Error("Failed to fetch locale");const e=await t.json();if(e.errors)throw new Error(JSON.stringify(e.errors,null,2));return e.data.viewer.locale||void 0}catch(n){return void W("Failed to fetch locale for current user",n.message)}}();e.context!==n&&(z(`New value fetched from GraphQL [${n}]`),r=n||i)}else r=i;z(`Setting locale context to [${r}]`),e.context=r}}),K=(...n)=>L("sq:user-identity",...n);function Z(){let n=window.squatchUserIdentity;return n||(K("Creating user context provider"),n=new t({element:document.documentElement,initialState:tn(),contextName:"sq:user-identity"}).start(),window.squatchUserIdentity=n,z("Starting user context listener for locale updates"),X.start()),n}function nn(n){if(n)try{const t=p(n),e=t.exp;let i,r;if(function(n){return n.sub&&/.*:.*@.*:users/.test(n.sub)}(t)){const n=t.sub.match(/(.*):(.*)@(.*):users/);(null==n?void 0:n[1])&&(r=atob(n[1])),(null==n?void 0:n[2])&&(i=atob(n[2]))}else(function(n){return n.user&&n.user.id&&n.user.accountId})(t)&&(r=t.user.accountId,i=t.user.id);return i&&r?e&&Date.now()>=1e3*e?void K("JWT has expired"):{id:i,accountId:r,jwt:n}:void K("No user information")}catch(n){return void K("Invalid JWT")}}function tn(){const n=R();switch(n.type){case"SquatchIOS":case"SquatchAndroid":case"SquatchJS2":if(!n.widgetIdent)return;const{userId:t,accountId:e,token:i}=n.widgetIdent;if(!t||!e||!i)return;return{id:n.widgetIdent.userId,accountId:n.widgetIdent.accountId,jwt:n.widgetIdent.token};case"SquatchPortal":const r=new URLSearchParams(document.location.search);if(r.has("jwt"))return nn(r.get("jwt"));const o=localStorage.getItem("sq:user-identity");if(!o)return;try{const n=JSON.parse(o),t=nn(n.jwt);return t?x(x({},n),t):void 0}catch(n){return}case"SquatchAdmin":case"None":return}}function en(n){const t=Z();g(t.context,n)||(K(`Setting user context value [${JSON.stringify(n)}]`),t.context=n),n&&"SquatchPortal"===R().type?localStorage.setItem("sq:user-identity",JSON.stringify(n)):n||localStorage.removeItem("sq:user-identity")}function rn(){var n;return null==(n=window.squatchUserIdentity)?void 0:n.context}var on=(...n)=>L("sq:program-id",...n);function sn(){var n;let e=window.squatchProgramId;return e||(on("Creating program context provider"),e=new t({element:document.documentElement,initialState:(null==(n=window.widgetIdent)?void 0:n.programId)||void 0,contextName:"sq:program-id"}).start(),window.squatchProgramId=e),e}function un(n){const t=sn();t.context!==n&&(on(`Setting program context value [${n}]`),t.context=n)}function an(n){return(an="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}var cn="function"==typeof Symbol&&null!=Symbol.toStringTag?Symbol.toStringTag:"@@toStringTag";function fn(n,t){for(var e,i=/\r\n|[\n\r]/g,r=1,o=t+1;(e=i.exec(n.body))&&e.index<t;)r+=1,o=t+1-(e.index+e[0].length);return{line:r,column:o}}function ln(n,t){var e=n.locationOffset.column-1,i=dn(e)+n.body,r=t.line-1,o=t.line+(n.locationOffset.line-1),s=t.column+(1===t.line?e:0),u="".concat(n.name,":").concat(o,":").concat(s,"\n"),a=i.split(/\r\n|[\n\r]/g),c=a[r];if(c.length>120){for(var f=Math.floor(s/80),l=s%80,h=[],d=0;d<c.length;d+=80)h.push(c.slice(d,d+80));return u+hn([["".concat(o),h[0]]].concat(h.slice(1,f+1).map((function(n){return["",n]})),[[" ",dn(l-1)+"^"],["",h[f+1]]]))}return u+hn([["".concat(o-1),a[r-1]],["".concat(o),c],["",dn(s-1)+"^"],["".concat(o+1),a[r+1]]])}function hn(n){var t=n.filter((function(n){return void 0!==n[1]})),e=Math.max.apply(Math,t.map((function(n){return n[0].length})));return t.map((function(n){var t,i=n[1];return dn(e-(t=n[0]).length)+t+(i?" | "+i:" |")})).join("\n")}function dn(n){return Array(n+1).join(" ")}function vn(n){return(vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function mn(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}function pn(n,t){return!t||"object"!==vn(t)&&"function"!=typeof t?yn(n):t}function yn(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}function bn(n){var t="function"==typeof Map?new Map:void 0;return(bn=function(n){if(null===n||!function(n){return-1!==Function.toString.call(n).indexOf("[native code]")}(n))return n;if("function"!=typeof n)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(n))return t.get(n);t.set(n,e)}function e(){return wn(n,arguments,Sn(this).constructor)}return e.prototype=Object.create(n.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),gn(e,n)})(n)}function wn(n,t,e){return(wn=En()?Reflect.construct:function(n,t,e){var i=[null];i.push.apply(i,t);var r=new(Function.bind.apply(n,i));return e&&gn(r,e.prototype),r}).apply(null,arguments)}function En(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(n){return!1}}function gn(n,t){return(gn=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}function Sn(n){return(Sn=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}var In=function(){!function(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&gn(n,t)}(o,bn(Error));var n,t,e,i,r=(n=o,t=En(),function(){var e,i=Sn(n);if(t){var r=Sn(this).constructor;e=Reflect.construct(i,arguments,r)}else e=i.apply(this,arguments);return pn(this,e)});function o(n,t,e,i,s,u,a){var c,f,l,h,d;!function(n,t){if(!(n instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),d=r.call(this,n);var v,m=Array.isArray(t)?0!==t.length?t:void 0:t?[t]:void 0,p=e;!p&&m&&(p=null===(v=m[0].loc)||void 0===v?void 0:v.source);var y,b=i;!b&&m&&(b=m.reduce((function(n,t){return t.loc&&n.push(t.loc.start),n}),[])),b&&0===b.length&&(b=void 0),i&&e?y=i.map((function(n){return fn(e,n)})):m&&(y=m.reduce((function(n,t){return t.loc&&n.push(fn(t.loc.source,t.loc.start)),n}),[]));var w,E=a;if(null==E&&null!=u){var g=u.extensions;"object"==an(w=g)&&null!==w&&(E=g)}return Object.defineProperties(yn(d),{name:{value:"GraphQLError"},message:{value:n,enumerable:!0,writable:!0},locations:{value:null!==(c=y)&&void 0!==c?c:void 0,enumerable:null!=y},path:{value:null!=s?s:void 0,enumerable:null!=s},nodes:{value:null!=m?m:void 0},source:{value:null!==(f=p)&&void 0!==f?f:void 0},positions:{value:null!==(l=b)&&void 0!==l?l:void 0},originalError:{value:u},extensions:{value:null!==(h=E)&&void 0!==h?h:void 0,enumerable:null!=E}}),null!=u&&u.stack?(Object.defineProperty(yn(d),"stack",{value:u.stack,writable:!0,configurable:!0}),pn(d)):(Error.captureStackTrace?Error.captureStackTrace(yn(d),o):Object.defineProperty(yn(d),"stack",{value:Error().stack,writable:!0,configurable:!0}),d)}return e=o,(i=[{key:"toString",value:function(){return function(n){var t,e=n.message;if(n.nodes)for(var i=0,r=n.nodes;i<r.length;i++){var o=r[i];o.loc&&(e+="\n\n"+ln((t=o.loc).source,fn(t.source,t.start)))}else if(n.source&&n.locations)for(var s=0,u=n.locations;s<u.length;s++)e+="\n\n"+ln(n.source,u[s]);return e}(this)}},{key:cn,get:function(){return"Object"}}])&&mn(e.prototype,i),o}();function On(n,t,e){return new In("Syntax Error: ".concat(e),void 0,n,[t])}var Tn=Object.freeze({NAME:"Name",DOCUMENT:"Document",OPERATION_DEFINITION:"OperationDefinition",VARIABLE_DEFINITION:"VariableDefinition",SELECTION_SET:"SelectionSet",FIELD:"Field",ARGUMENT:"Argument",FRAGMENT_SPREAD:"FragmentSpread",INLINE_FRAGMENT:"InlineFragment",FRAGMENT_DEFINITION:"FragmentDefinition",VARIABLE:"Variable",INT:"IntValue",FLOAT:"FloatValue",STRING:"StringValue",BOOLEAN:"BooleanValue",NULL:"NullValue",ENUM:"EnumValue",LIST:"ListValue",OBJECT:"ObjectValue",OBJECT_FIELD:"ObjectField",DIRECTIVE:"Directive",NAMED_TYPE:"NamedType",LIST_TYPE:"ListType",NON_NULL_TYPE:"NonNullType",SCHEMA_DEFINITION:"SchemaDefinition",OPERATION_TYPE_DEFINITION:"OperationTypeDefinition",SCALAR_TYPE_DEFINITION:"ScalarTypeDefinition",OBJECT_TYPE_DEFINITION:"ObjectTypeDefinition",FIELD_DEFINITION:"FieldDefinition",INPUT_VALUE_DEFINITION:"InputValueDefinition",INTERFACE_TYPE_DEFINITION:"InterfaceTypeDefinition",UNION_TYPE_DEFINITION:"UnionTypeDefinition",ENUM_TYPE_DEFINITION:"EnumTypeDefinition",ENUM_VALUE_DEFINITION:"EnumValueDefinition",INPUT_OBJECT_TYPE_DEFINITION:"InputObjectTypeDefinition",DIRECTIVE_DEFINITION:"DirectiveDefinition",SCHEMA_EXTENSION:"SchemaExtension",SCALAR_TYPE_EXTENSION:"ScalarTypeExtension",OBJECT_TYPE_EXTENSION:"ObjectTypeExtension",INTERFACE_TYPE_EXTENSION:"InterfaceTypeExtension",UNION_TYPE_EXTENSION:"UnionTypeExtension",ENUM_TYPE_EXTENSION:"EnumTypeExtension",INPUT_OBJECT_TYPE_EXTENSION:"InputObjectTypeExtension"}),Nn="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;function Fn(n){var t=n.prototype.toJSON;"function"==typeof t||function(){if(!Boolean(0))throw new Error("Unexpected invariant triggered.")}(),n.prototype.inspect=t,Nn&&(n.prototype[Nn]=t)}var Cn=function(){function n(n,t,e){this.start=n.start,this.end=t.end,this.startToken=n,this.endToken=t,this.source=e}return n.prototype.toJSON=function(){return{start:this.start,end:this.end}},n}();Fn(Cn);var Dn=function(){function n(n,t,e,i,r,o,s){this.kind=n,this.start=t,this.end=e,this.line=i,this.column=r,this.value=s,this.prev=o,this.next=null}return n.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},n}();function jn(n){return null!=n&&"string"==typeof n.kind}Fn(Dn);var An=Object.freeze({SOF:"<SOF>",EOF:"<EOF>",BANG:"!",DOLLAR:"$",AMP:"&",PAREN_L:"(",PAREN_R:")",SPREAD:"...",COLON:":",EQUALS:"=",AT:"@",BRACKET_L:"[",BRACKET_R:"]",BRACE_L:"{",PIPE:"|",BRACE_R:"}",NAME:"Name",INT:"Int",FLOAT:"Float",STRING:"String",BLOCK_STRING:"BlockString",COMMENT:"Comment"});function _n(n){return(_n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function Pn(n){return xn(n,[])}function xn(n,t){switch(_n(n)){case"string":return JSON.stringify(n);case"function":return n.name?"[function ".concat(n.name,"]"):"[function]";case"object":return null===n?"null":function(n,t){if(-1!==t.indexOf(n))return"[Circular]";var e=[].concat(t,[n]),i=function(n){var t=n[String(Nn)];return"function"==typeof t?t:"function"==typeof n.inspect?n.inspect:void 0}(n);if(void 0!==i){var r=i.call(n);if(r!==n)return"string"==typeof r?r:xn(r,e)}else if(Array.isArray(n))return function(n,t){if(0===n.length)return"[]";if(t.length>2)return"[Array]";for(var e=Math.min(10,n.length),i=n.length-e,r=[],o=0;o<e;++o)r.push(xn(n[o],t));return 1===i?r.push("... 1 more item"):i>1&&r.push("... ".concat(i," more items")),"["+r.join(", ")+"]"}(n,e);return function(n,t){var e=Object.keys(n);return 0===e.length?"{}":t.length>2?"["+function(n){var t=Object.prototype.toString.call(n).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof n.constructor){var e=n.constructor.name;if("string"==typeof e&&""!==e)return e}return t}(n)+"]":"{ "+e.map((function(e){return e+": "+xn(n[e],t)})).join(", ")+" }"}(n,e)}(n,t);default:return String(n)}}function kn(n,t){if(!Boolean(n))throw new Error(t)}function Rn(n,t){for(var e=0;e<t.length;e++){var i=t[e];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(n,i.key,i)}}var Vn=function(){function n(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"GraphQL request",e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{line:1,column:1};"string"==typeof n||kn(0,"Body must be a string. Received: ".concat(Pn(n),".")),this.body=n,this.name=t,this.locationOffset=e,this.locationOffset.line>0||kn(0,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||kn(0,"column in locationOffset is 1-indexed and must be positive.")}var t,e;return t=n,(e=[{key:cn,get:function(){return"Source"}}])&&Rn(t.prototype,e),n}(),Mn=Object.freeze({QUERY:"QUERY",MUTATION:"MUTATION",SUBSCRIPTION:"SUBSCRIPTION",FIELD:"FIELD",FRAGMENT_DEFINITION:"FRAGMENT_DEFINITION",FRAGMENT_SPREAD:"FRAGMENT_SPREAD",INLINE_FRAGMENT:"INLINE_FRAGMENT",VARIABLE_DEFINITION:"VARIABLE_DEFINITION",SCHEMA:"SCHEMA",SCALAR:"SCALAR",OBJECT:"OBJECT",FIELD_DEFINITION:"FIELD_DEFINITION",ARGUMENT_DEFINITION:"ARGUMENT_DEFINITION",INTERFACE:"INTERFACE",UNION:"UNION",ENUM:"ENUM",ENUM_VALUE:"ENUM_VALUE",INPUT_OBJECT:"INPUT_OBJECT",INPUT_FIELD_DEFINITION:"INPUT_FIELD_DEFINITION"});function Un(n){var t=n.split(/\r\n|[\n\r]/g),e=function(n){for(var t,e=!0,i=!0,r=0,o=null,s=0;s<n.length;++s)switch(n.charCodeAt(s)){case 13:10===n.charCodeAt(s+1)&&++s;case 10:e=!1,i=!0,r=0;break;case 9:case 32:++r;break;default:i&&!e&&(null===o||r<o)&&(o=r),i=!1}return null!==(t=o)&&void 0!==t?t:0}(n);if(0!==e)for(var i=1;i<t.length;i++)t[i]=t[i].slice(e);for(var r=0;r<t.length&&qn(t[r]);)++r;for(var o=t.length;o>r&&qn(t[o-1]);)--o;return t.slice(r,o).join("\n")}function qn(n){for(var t=0;t<n.length;++t)if(" "!==n[t]&&"\t"!==n[t])return!1;return!0}var $n=function(){function n(n){var t=new Dn(An.SOF,0,0,0,0,null);this.source=n,this.lastToken=t,this.token=t,this.line=1,this.lineStart=0}var t=n.prototype;return t.advance=function(){return this.lastToken=this.token,this.token=this.lookahead()},t.lookahead=function(){var n=this.token;if(n.kind!==An.EOF)do{var t;n=null!==(t=n.next)&&void 0!==t?t:n.next=Bn(this,n)}while(n.kind===An.COMMENT);return n},n}();function Ln(n){return isNaN(n)?An.EOF:n<127?JSON.stringify(String.fromCharCode(n)):'"\\u'.concat(("00"+n.toString(16).toUpperCase()).slice(-4),'"')}function Bn(n,t){for(var e=n.source,i=e.body,r=i.length,o=t.end;o<r;){var s=i.charCodeAt(o),u=n.line,a=1+o-n.lineStart;switch(s){case 65279:case 9:case 32:case 44:++o;continue;case 10:++o,++n.line,n.lineStart=o;continue;case 13:10===i.charCodeAt(o+1)?o+=2:++o,++n.line,n.lineStart=o;continue;case 33:return new Dn(An.BANG,o,o+1,u,a,t);case 35:return Gn(e,o,u,a,t);case 36:return new Dn(An.DOLLAR,o,o+1,u,a,t);case 38:return new Dn(An.AMP,o,o+1,u,a,t);case 40:return new Dn(An.PAREN_L,o,o+1,u,a,t);case 41:return new Dn(An.PAREN_R,o,o+1,u,a,t);case 46:if(46===i.charCodeAt(o+1)&&46===i.charCodeAt(o+2))return new Dn(An.SPREAD,o,o+3,u,a,t);break;case 58:return new Dn(An.COLON,o,o+1,u,a,t);case 61:return new Dn(An.EQUALS,o,o+1,u,a,t);case 64:return new Dn(An.AT,o,o+1,u,a,t);case 91:return new Dn(An.BRACKET_L,o,o+1,u,a,t);case 93:return new Dn(An.BRACKET_R,o,o+1,u,a,t);case 123:return new Dn(An.BRACE_L,o,o+1,u,a,t);case 124:return new Dn(An.PIPE,o,o+1,u,a,t);case 125:return new Dn(An.BRACE_R,o,o+1,u,a,t);case 34:return 34===i.charCodeAt(o+1)&&34===i.charCodeAt(o+2)?Wn(e,o,u,a,t,n):Qn(e,o,u,a,t);case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return Hn(e,o,s,u,a,t);case 65:case 66:case 67:case 68:case 69:case 70:case 71:case 72:case 73:case 74:case 75:case 76:case 77:case 78:case 79:case 80:case 81:case 82:case 83:case 84:case 85:case 86:case 87:case 88:case 89:case 90:case 95:case 97:case 98:case 99:case 100:case 101:case 102:case 103:case 104:case 105:case 106:case 107:case 108:case 109:case 110:case 111:case 112:case 113:case 114:case 115:case 116:case 117:case 118:case 119:case 120:case 121:case 122:return Kn(e,o,u,a,t)}throw On(e,o,Jn(s))}return new Dn(An.EOF,r,r,n.line,1+o-n.lineStart,t)}function Jn(n){return n<32&&9!==n&&10!==n&&13!==n?"Cannot contain the invalid character ".concat(Ln(n),"."):39===n?"Unexpected single quote character ('), did you mean to use a double quote (\")?":"Cannot parse the unexpected character ".concat(Ln(n),".")}function Gn(n,t,e,i,r){var o,s=n.body,u=t;do{o=s.charCodeAt(++u)}while(!isNaN(o)&&(o>31||9===o));return new Dn(An.COMMENT,t,u,e,i,r,s.slice(t+1,u))}function Hn(n,t,e,i,r,o){var s=n.body,u=e,a=t,c=!1;if(45===u&&(u=s.charCodeAt(++a)),48===u){if((u=s.charCodeAt(++a))>=48&&u<=57)throw On(n,a,"Invalid number, unexpected digit after 0: ".concat(Ln(u),"."))}else a=Yn(n,a,u),u=s.charCodeAt(a);if(46===u&&(c=!0,u=s.charCodeAt(++a),a=Yn(n,a,u),u=s.charCodeAt(a)),69!==u&&101!==u||(c=!0,43!==(u=s.charCodeAt(++a))&&45!==u||(u=s.charCodeAt(++a)),a=Yn(n,a,u),u=s.charCodeAt(a)),46===u||function(n){return 95===n||n>=65&&n<=90||n>=97&&n<=122}(u))throw On(n,a,"Invalid number, expected digit but got: ".concat(Ln(u),"."));return new Dn(c?An.FLOAT:An.INT,t,a,i,r,o,s.slice(t,a))}function Yn(n,t,e){var i=n.body,r=t,o=e;if(o>=48&&o<=57){do{o=i.charCodeAt(++r)}while(o>=48&&o<=57);return r}throw On(n,r,"Invalid number, expected digit but got: ".concat(Ln(o),"."))}function Qn(n,t,e,i,r){for(var o=n.body,s=t+1,u=s,a=0,c="";s<o.length&&!isNaN(a=o.charCodeAt(s))&&10!==a&&13!==a;){if(34===a)return c+=o.slice(u,s),new Dn(An.STRING,t,s+1,e,i,r,c);if(a<32&&9!==a)throw On(n,s,"Invalid character within String: ".concat(Ln(a),"."));if(++s,92===a){switch(c+=o.slice(u,s-1),a=o.charCodeAt(s)){case 34:c+='"';break;case 47:c+="/";break;case 92:c+="\\";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+="\n";break;case 114:c+="\r";break;case 116:c+="\t";break;case 117:var f=zn(o.charCodeAt(s+1),o.charCodeAt(s+2),o.charCodeAt(s+3),o.charCodeAt(s+4));if(f<0){var l=o.slice(s+1,s+5);throw On(n,s,"Invalid character escape sequence: \\u".concat(l,"."))}c+=String.fromCharCode(f),s+=4;break;default:throw On(n,s,"Invalid character escape sequence: \\".concat(String.fromCharCode(a),"."))}u=++s}}throw On(n,s,"Unterminated string.")}function Wn(n,t,e,i,r,o){for(var s=n.body,u=t+3,a=u,c=0,f="";u<s.length&&!isNaN(c=s.charCodeAt(u));){if(34===c&&34===s.charCodeAt(u+1)&&34===s.charCodeAt(u+2))return f+=s.slice(a,u),new Dn(An.BLOCK_STRING,t,u+3,e,i,r,Un(f));if(c<32&&9!==c&&10!==c&&13!==c)throw On(n,u,"Invalid character within String: ".concat(Ln(c),"."));10===c?(++u,++o.line,o.lineStart=u):13===c?(10===s.charCodeAt(u+1)?u+=2:++u,++o.line,o.lineStart=u):92===c&&34===s.charCodeAt(u+1)&&34===s.charCodeAt(u+2)&&34===s.charCodeAt(u+3)?(f+=s.slice(a,u)+'"""',a=u+=4):++u}throw On(n,u,"Unterminated string.")}function zn(n,t,e,i){return Xn(n)<<12|Xn(t)<<8|Xn(e)<<4|Xn(i)}function Xn(n){return n>=48&&n<=57?n-48:n>=65&&n<=70?n-55:n>=97&&n<=102?n-87:-1}function Kn(n,t,e,i,r){for(var o=n.body,s=o.length,u=t+1,a=0;u!==s&&!isNaN(a=o.charCodeAt(u))&&(95===a||a>=48&&a<=57||a>=65&&a<=90||a>=97&&a<=122);)++u;return new Dn(An.NAME,t,u,e,i,r,o.slice(t,u))}function Zn(n,t){return new nt(n,t).parseDocument()}var nt=function(){function n(n,t){var e=function(n){return n instanceof Vn}(n)?n:new Vn(n);this._lexer=new $n(e),this._options=t}var t=n.prototype;return t.parseName=function(){var n=this.expectToken(An.NAME);return{kind:Tn.NAME,value:n.value,loc:this.loc(n)}},t.parseDocument=function(){var n=this._lexer.token;return{kind:Tn.DOCUMENT,definitions:this.many(An.SOF,this.parseDefinition,An.EOF),loc:this.loc(n)}},t.parseDefinition=function(){if(this.peek(An.NAME))switch(this._lexer.token.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"schema":case"scalar":case"type":case"interface":case"union":case"enum":case"input":case"directive":return this.parseTypeSystemDefinition();case"extend":return this.parseTypeSystemExtension()}else{if(this.peek(An.BRACE_L))return this.parseOperationDefinition();if(this.peekDescription())return this.parseTypeSystemDefinition()}throw this.unexpected()},t.parseOperationDefinition=function(){var n=this._lexer.token;if(this.peek(An.BRACE_L))return{kind:Tn.OPERATION_DEFINITION,operation:"query",name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet(),loc:this.loc(n)};var t,e=this.parseOperationType();return this.peek(An.NAME)&&(t=this.parseName()),{kind:Tn.OPERATION_DEFINITION,operation:e,name:t,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},t.parseOperationType=function(){var n=this.expectToken(An.NAME);switch(n.value){case"query":return"query";case"mutation":return"mutation";case"subscription":return"subscription"}throw this.unexpected(n)},t.parseVariableDefinitions=function(){return this.optionalMany(An.PAREN_L,this.parseVariableDefinition,An.PAREN_R)},t.parseVariableDefinition=function(){var n=this._lexer.token;return{kind:Tn.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(An.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(An.EQUALS)?this.parseValueLiteral(!0):void 0,directives:this.parseDirectives(!0),loc:this.loc(n)}},t.parseVariable=function(){var n=this._lexer.token;return this.expectToken(An.DOLLAR),{kind:Tn.VARIABLE,name:this.parseName(),loc:this.loc(n)}},t.parseSelectionSet=function(){var n=this._lexer.token;return{kind:Tn.SELECTION_SET,selections:this.many(An.BRACE_L,this.parseSelection,An.BRACE_R),loc:this.loc(n)}},t.parseSelection=function(){return this.peek(An.SPREAD)?this.parseFragment():this.parseField()},t.parseField=function(){var n,t,e=this._lexer.token,i=this.parseName();return this.expectOptionalToken(An.COLON)?(n=i,t=this.parseName()):t=i,{kind:Tn.FIELD,alias:n,name:t,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(An.BRACE_L)?this.parseSelectionSet():void 0,loc:this.loc(e)}},t.parseArguments=function(n){return this.optionalMany(An.PAREN_L,n?this.parseConstArgument:this.parseArgument,An.PAREN_R)},t.parseArgument=function(){var n=this._lexer.token,t=this.parseName();return this.expectToken(An.COLON),{kind:Tn.ARGUMENT,name:t,value:this.parseValueLiteral(!1),loc:this.loc(n)}},t.parseConstArgument=function(){var n=this._lexer.token;return{kind:Tn.ARGUMENT,name:this.parseName(),value:(this.expectToken(An.COLON),this.parseValueLiteral(!0)),loc:this.loc(n)}},t.parseFragment=function(){var n=this._lexer.token;this.expectToken(An.SPREAD);var t=this.expectOptionalKeyword("on");return!t&&this.peek(An.NAME)?{kind:Tn.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1),loc:this.loc(n)}:{kind:Tn.INLINE_FRAGMENT,typeCondition:t?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(n)}},t.parseFragmentDefinition=function(){var n,t=this._lexer.token;return this.expectKeyword("fragment"),!0===(null===(n=this._options)||void 0===n?void 0:n.experimentalFragmentVariables)?{kind:Tn.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}:{kind:Tn.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet(),loc:this.loc(t)}},t.parseFragmentName=function(){if("on"===this._lexer.token.value)throw this.unexpected();return this.parseName()},t.parseValueLiteral=function(n){var t=this._lexer.token;switch(t.kind){case An.BRACKET_L:return this.parseList(n);case An.BRACE_L:return this.parseObject(n);case An.INT:return this._lexer.advance(),{kind:Tn.INT,value:t.value,loc:this.loc(t)};case An.FLOAT:return this._lexer.advance(),{kind:Tn.FLOAT,value:t.value,loc:this.loc(t)};case An.STRING:case An.BLOCK_STRING:return this.parseStringLiteral();case An.NAME:switch(this._lexer.advance(),t.value){case"true":return{kind:Tn.BOOLEAN,value:!0,loc:this.loc(t)};case"false":return{kind:Tn.BOOLEAN,value:!1,loc:this.loc(t)};case"null":return{kind:Tn.NULL,loc:this.loc(t)};default:return{kind:Tn.ENUM,value:t.value,loc:this.loc(t)}}case An.DOLLAR:if(!n)return this.parseVariable()}throw this.unexpected()},t.parseStringLiteral=function(){var n=this._lexer.token;return this._lexer.advance(),{kind:Tn.STRING,value:n.value,block:n.kind===An.BLOCK_STRING,loc:this.loc(n)}},t.parseList=function(n){var t=this,e=this._lexer.token;return{kind:Tn.LIST,values:this.any(An.BRACKET_L,(function(){return t.parseValueLiteral(n)}),An.BRACKET_R),loc:this.loc(e)}},t.parseObject=function(n){var t=this,e=this._lexer.token;return{kind:Tn.OBJECT,fields:this.any(An.BRACE_L,(function(){return t.parseObjectField(n)}),An.BRACE_R),loc:this.loc(e)}},t.parseObjectField=function(n){var t=this._lexer.token,e=this.parseName();return this.expectToken(An.COLON),{kind:Tn.OBJECT_FIELD,name:e,value:this.parseValueLiteral(n),loc:this.loc(t)}},t.parseDirectives=function(n){for(var t=[];this.peek(An.AT);)t.push(this.parseDirective(n));return t},t.parseDirective=function(n){var t=this._lexer.token;return this.expectToken(An.AT),{kind:Tn.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(n),loc:this.loc(t)}},t.parseTypeReference=function(){var n,t=this._lexer.token;return this.expectOptionalToken(An.BRACKET_L)?(n=this.parseTypeReference(),this.expectToken(An.BRACKET_R),n={kind:Tn.LIST_TYPE,type:n,loc:this.loc(t)}):n=this.parseNamedType(),this.expectOptionalToken(An.BANG)?{kind:Tn.NON_NULL_TYPE,type:n,loc:this.loc(t)}:n},t.parseNamedType=function(){var n=this._lexer.token;return{kind:Tn.NAMED_TYPE,name:this.parseName(),loc:this.loc(n)}},t.parseTypeSystemDefinition=function(){var n=this.peekDescription()?this._lexer.lookahead():this._lexer.token;if(n.kind===An.NAME)switch(n.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}throw this.unexpected(n)},t.peekDescription=function(){return this.peek(An.STRING)||this.peek(An.BLOCK_STRING)},t.parseDescription=function(){if(this.peekDescription())return this.parseStringLiteral()},t.parseSchemaDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("schema");var e=this.parseDirectives(!0),i=this.many(An.BRACE_L,this.parseOperationTypeDefinition,An.BRACE_R);return{kind:Tn.SCHEMA_DEFINITION,description:t,directives:e,operationTypes:i,loc:this.loc(n)}},t.parseOperationTypeDefinition=function(){var n=this._lexer.token,t=this.parseOperationType();this.expectToken(An.COLON);var e=this.parseNamedType();return{kind:Tn.OPERATION_TYPE_DEFINITION,operation:t,type:e,loc:this.loc(n)}},t.parseScalarTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("scalar");var e=this.parseName(),i=this.parseDirectives(!0);return{kind:Tn.SCALAR_TYPE_DEFINITION,description:t,name:e,directives:i,loc:this.loc(n)}},t.parseObjectTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("type");var e=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Tn.OBJECT_TYPE_DEFINITION,description:t,name:e,interfaces:i,directives:r,fields:o,loc:this.loc(n)}},t.parseImplementsInterfaces=function(){var n;if(!this.expectOptionalKeyword("implements"))return[];if(!0===(null===(n=this._options)||void 0===n?void 0:n.allowLegacySDLImplementsInterfaces)){var t=[];this.expectOptionalToken(An.AMP);do{t.push(this.parseNamedType())}while(this.expectOptionalToken(An.AMP)||this.peek(An.NAME));return t}return this.delimitedMany(An.AMP,this.parseNamedType)},t.parseFieldsDefinition=function(){var n;return!0===(null===(n=this._options)||void 0===n?void 0:n.allowLegacySDLEmptyFields)&&this.peek(An.BRACE_L)&&this._lexer.lookahead().kind===An.BRACE_R?(this._lexer.advance(),this._lexer.advance(),[]):this.optionalMany(An.BRACE_L,this.parseFieldDefinition,An.BRACE_R)},t.parseFieldDefinition=function(){var n=this._lexer.token,t=this.parseDescription(),e=this.parseName(),i=this.parseArgumentDefs();this.expectToken(An.COLON);var r=this.parseTypeReference(),o=this.parseDirectives(!0);return{kind:Tn.FIELD_DEFINITION,description:t,name:e,arguments:i,type:r,directives:o,loc:this.loc(n)}},t.parseArgumentDefs=function(){return this.optionalMany(An.PAREN_L,this.parseInputValueDef,An.PAREN_R)},t.parseInputValueDef=function(){var n=this._lexer.token,t=this.parseDescription(),e=this.parseName();this.expectToken(An.COLON);var i,r=this.parseTypeReference();this.expectOptionalToken(An.EQUALS)&&(i=this.parseValueLiteral(!0));var o=this.parseDirectives(!0);return{kind:Tn.INPUT_VALUE_DEFINITION,description:t,name:e,type:r,defaultValue:i,directives:o,loc:this.loc(n)}},t.parseInterfaceTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("interface");var e=this.parseName(),i=this.parseImplementsInterfaces(),r=this.parseDirectives(!0),o=this.parseFieldsDefinition();return{kind:Tn.INTERFACE_TYPE_DEFINITION,description:t,name:e,interfaces:i,directives:r,fields:o,loc:this.loc(n)}},t.parseUnionTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("union");var e=this.parseName(),i=this.parseDirectives(!0),r=this.parseUnionMemberTypes();return{kind:Tn.UNION_TYPE_DEFINITION,description:t,name:e,directives:i,types:r,loc:this.loc(n)}},t.parseUnionMemberTypes=function(){return this.expectOptionalToken(An.EQUALS)?this.delimitedMany(An.PIPE,this.parseNamedType):[]},t.parseEnumTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("enum");var e=this.parseName(),i=this.parseDirectives(!0),r=this.parseEnumValuesDefinition();return{kind:Tn.ENUM_TYPE_DEFINITION,description:t,name:e,directives:i,values:r,loc:this.loc(n)}},t.parseEnumValuesDefinition=function(){return this.optionalMany(An.BRACE_L,this.parseEnumValueDefinition,An.BRACE_R)},t.parseEnumValueDefinition=function(){var n=this._lexer.token,t=this.parseDescription(),e=this.parseName(),i=this.parseDirectives(!0);return{kind:Tn.ENUM_VALUE_DEFINITION,description:t,name:e,directives:i,loc:this.loc(n)}},t.parseInputObjectTypeDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("input");var e=this.parseName(),i=this.parseDirectives(!0),r=this.parseInputFieldsDefinition();return{kind:Tn.INPUT_OBJECT_TYPE_DEFINITION,description:t,name:e,directives:i,fields:r,loc:this.loc(n)}},t.parseInputFieldsDefinition=function(){return this.optionalMany(An.BRACE_L,this.parseInputValueDef,An.BRACE_R)},t.parseTypeSystemExtension=function(){var n=this._lexer.lookahead();if(n.kind===An.NAME)switch(n.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(n)},t.parseSchemaExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");var t=this.parseDirectives(!0),e=this.optionalMany(An.BRACE_L,this.parseOperationTypeDefinition,An.BRACE_R);if(0===t.length&&0===e.length)throw this.unexpected();return{kind:Tn.SCHEMA_EXTENSION,directives:t,operationTypes:e,loc:this.loc(n)}},t.parseScalarTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");var t=this.parseName(),e=this.parseDirectives(!0);if(0===e.length)throw this.unexpected();return{kind:Tn.SCALAR_TYPE_EXTENSION,name:t,directives:e,loc:this.loc(n)}},t.parseObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");var t=this.parseName(),e=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===e.length&&0===i.length&&0===r.length)throw this.unexpected();return{kind:Tn.OBJECT_TYPE_EXTENSION,name:t,interfaces:e,directives:i,fields:r,loc:this.loc(n)}},t.parseInterfaceTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");var t=this.parseName(),e=this.parseImplementsInterfaces(),i=this.parseDirectives(!0),r=this.parseFieldsDefinition();if(0===e.length&&0===i.length&&0===r.length)throw this.unexpected();return{kind:Tn.INTERFACE_TYPE_EXTENSION,name:t,interfaces:e,directives:i,fields:r,loc:this.loc(n)}},t.parseUnionTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");var t=this.parseName(),e=this.parseDirectives(!0),i=this.parseUnionMemberTypes();if(0===e.length&&0===i.length)throw this.unexpected();return{kind:Tn.UNION_TYPE_EXTENSION,name:t,directives:e,types:i,loc:this.loc(n)}},t.parseEnumTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");var t=this.parseName(),e=this.parseDirectives(!0),i=this.parseEnumValuesDefinition();if(0===e.length&&0===i.length)throw this.unexpected();return{kind:Tn.ENUM_TYPE_EXTENSION,name:t,directives:e,values:i,loc:this.loc(n)}},t.parseInputObjectTypeExtension=function(){var n=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");var t=this.parseName(),e=this.parseDirectives(!0),i=this.parseInputFieldsDefinition();if(0===e.length&&0===i.length)throw this.unexpected();return{kind:Tn.INPUT_OBJECT_TYPE_EXTENSION,name:t,directives:e,fields:i,loc:this.loc(n)}},t.parseDirectiveDefinition=function(){var n=this._lexer.token,t=this.parseDescription();this.expectKeyword("directive"),this.expectToken(An.AT);var e=this.parseName(),i=this.parseArgumentDefs(),r=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");var o=this.parseDirectiveLocations();return{kind:Tn.DIRECTIVE_DEFINITION,description:t,name:e,arguments:i,repeatable:r,locations:o,loc:this.loc(n)}},t.parseDirectiveLocations=function(){return this.delimitedMany(An.PIPE,this.parseDirectiveLocation)},t.parseDirectiveLocation=function(){var n=this._lexer.token,t=this.parseName();if(void 0!==Mn[t.value])return t;throw this.unexpected(n)},t.loc=function(n){var t;if(!0!==(null===(t=this._options)||void 0===t?void 0:t.noLocation))return new Cn(n,this._lexer.lastToken,this._lexer.source)},t.peek=function(n){return this._lexer.token.kind===n},t.expectToken=function(n){var t=this._lexer.token;if(t.kind===n)return this._lexer.advance(),t;throw On(this._lexer.source,t.start,"Expected ".concat(et(n),", found ").concat(tt(t),"."))},t.expectOptionalToken=function(n){var t=this._lexer.token;if(t.kind===n)return this._lexer.advance(),t},t.expectKeyword=function(n){var t=this._lexer.token;if(t.kind!==An.NAME||t.value!==n)throw On(this._lexer.source,t.start,'Expected "'.concat(n,'", found ').concat(tt(t),"."));this._lexer.advance()},t.expectOptionalKeyword=function(n){var t=this._lexer.token;return t.kind===An.NAME&&t.value===n&&(this._lexer.advance(),!0)},t.unexpected=function(n){var t=null!=n?n:this._lexer.token;return On(this._lexer.source,t.start,"Unexpected ".concat(tt(t),"."))},t.any=function(n,t,e){this.expectToken(n);for(var i=[];!this.expectOptionalToken(e);)i.push(t.call(this));return i},t.optionalMany=function(n,t,e){if(this.expectOptionalToken(n)){var i=[];do{i.push(t.call(this))}while(!this.expectOptionalToken(e));return i}return[]},t.many=function(n,t,e){this.expectToken(n);var i=[];do{i.push(t.call(this))}while(!this.expectOptionalToken(e));return i},t.delimitedMany=function(n,t){this.expectOptionalToken(n);var e=[];do{e.push(t.call(this))}while(this.expectOptionalToken(n));return e},n}();function tt(n){var t=n.value;return et(n.kind)+(null!=t?' "'.concat(t,'"'):"")}function et(n){return function(n){return n===An.BANG||n===An.DOLLAR||n===An.AMP||n===An.PAREN_L||n===An.PAREN_R||n===An.SPREAD||n===An.COLON||n===An.EQUALS||n===An.AT||n===An.BRACKET_L||n===An.BRACKET_R||n===An.BRACE_L||n===An.PIPE||n===An.BRACE_R}(n)?'"'.concat(n,'"'):n}var it={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},rt=Object.freeze({});function ot(n,t,e){var i=n[t];if(i){if(!e&&"function"==typeof i)return i;var r=e?i.leave:i.enter;if("function"==typeof r)return r}else{var o=e?n.leave:n.enter;if(o){if("function"==typeof o)return o;var s=o[t];if("function"==typeof s)return s}}}function st(n){return function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:it,i=void 0,r=Array.isArray(n),o=[n],s=-1,u=[],a=void 0,c=void 0,f=void 0,l=[],h=[],d=n;do{var v=++s===o.length,m=v&&0!==u.length;if(v){if(c=0===h.length?void 0:l[l.length-1],a=f,f=h.pop(),m){if(r)a=a.slice();else{for(var p={},y=0,b=Object.keys(a);y<b.length;y++){var w=b[y];p[w]=a[w]}a=p}for(var E=0,g=0;g<u.length;g++){var S=u[g][0],I=u[g][1];r&&(S-=E),r&&null===I?(a.splice(S,1),E++):a[S]=I}}s=i.index,o=i.keys,u=i.edits,r=i.inArray,i=i.prev}else{if(c=f?r?s:o[s]:void 0,null==(a=f?f[c]:d))continue;f&&l.push(c)}var O,T=void 0;if(!Array.isArray(a)){if(!jn(a))throw new Error("Invalid AST Node: ".concat(Pn(a),"."));var N=ot(t,a.kind,v);if(N){if((T=N.call(t,a,c,f,l,h))===rt)break;if(!1===T){if(!v){l.pop();continue}}else if(void 0!==T&&(u.push([c,T]),!v)){if(!jn(T)){l.pop();continue}a=T}}}void 0===T&&m&&u.push([c,a]),v?l.pop():(i={inArray:r,index:s,keys:o,edits:u,prev:i},o=(r=Array.isArray(a))?a:null!==(O=e[a.kind])&&void 0!==O?O:[],s=-1,u=[],f&&h.push(f),f=a)}while(void 0!==i);return 0!==u.length&&(d=u[u.length-1][1]),d}(n,{leave:ut})}var ut={Name:function(n){return n.value},Variable:function(n){return"$"+n.name},Document:function(n){return ct(n.definitions,"\n\n")+"\n"},OperationDefinition:function(n){var t=n.operation,e=n.name,i=lt("(",ct(n.variableDefinitions,", "),")"),r=ct(n.directives," "),o=n.selectionSet;return e||r||i||"query"!==t?ct([t,ct([e,i]),r,o]," "):o},VariableDefinition:function(n){var t=n.directives;return n.variable+": "+n.type+lt(" = ",n.defaultValue)+lt(" ",ct(t," "))},SelectionSet:function(n){return ft(n.selections)},Field:function(n){var t=n.name,e=n.arguments,i=n.directives,r=n.selectionSet,o=lt("",n.alias,": ")+t,s=o+lt("(",ct(e,", "),")");return s.length>80&&(s=o+lt("(\n",ht(ct(e,"\n")),"\n)")),ct([s,ct(i," "),r]," ")},Argument:function(n){return n.name+": "+n.value},FragmentSpread:function(n){return"..."+n.name+lt(" ",ct(n.directives," "))},InlineFragment:function(n){var t=n.directives,e=n.selectionSet;return ct(["...",lt("on ",n.typeCondition),ct(t," "),e]," ")},FragmentDefinition:function(n){var t=n.typeCondition,e=n.variableDefinitions,i=n.directives,r=n.selectionSet;return"fragment ".concat(n.name).concat(lt("(",ct(e,", "),")")," ")+"on ".concat(t," ").concat(lt("",ct(i," ")," "))+r},IntValue:function(n){return n.value},FloatValue:function(n){return n.value},StringValue:function(n,t){var e=n.value;return n.block?function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=-1===n.indexOf("\n"),r=" "===n[0]||"\t"===n[0],o='"'===n[n.length-1],s="\\"===n[n.length-1],u=!i||o||s||e,a="";return!u||i&&r||(a+="\n"+t),a+=t?n.replace(/\n/g,"\n"+t):n,u&&(a+="\n"),'"""'+a.replace(/"""/g,'\\"""')+'"""'}(e,"description"===t?"":" "):JSON.stringify(e)},BooleanValue:function(n){return n.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(n){return n.value},ListValue:function(n){return"["+ct(n.values,", ")+"]"},ObjectValue:function(n){return"{"+ct(n.fields,", ")+"}"},ObjectField:function(n){return n.name+": "+n.value},Directive:function(n){return"@"+n.name+lt("(",ct(n.arguments,", "),")")},NamedType:function(n){return n.name},ListType:function(n){return"["+n.type+"]"},NonNullType:function(n){return n.type+"!"},SchemaDefinition:at((function(n){var t=n.operationTypes;return ct(["schema",ct(n.directives," "),ft(t)]," ")})),OperationTypeDefinition:function(n){return n.operation+": "+n.type},ScalarTypeDefinition:at((function(n){return ct(["scalar",n.name,ct(n.directives," ")]," ")})),ObjectTypeDefinition:at((function(n){var t=n.directives,e=n.fields;return ct(["type",n.name,lt("implements ",ct(n.interfaces," & ")),ct(t," "),ft(e)]," ")})),FieldDefinition:at((function(n){var t=n.arguments,e=n.type,i=n.directives;return n.name+(vt(t)?lt("(\n",ht(ct(t,"\n")),"\n)"):lt("(",ct(t,", "),")"))+": "+e+lt(" ",ct(i," "))})),InputValueDefinition:at((function(n){var t=n.directives;return ct([n.name+": "+n.type,lt("= ",n.defaultValue),ct(t," ")]," ")})),InterfaceTypeDefinition:at((function(n){var t=n.directives,e=n.fields;return ct(["interface",n.name,lt("implements ",ct(n.interfaces," & ")),ct(t," "),ft(e)]," ")})),UnionTypeDefinition:at((function(n){var t=n.types;return ct(["union",n.name,ct(n.directives," "),t&&0!==t.length?"= "+ct(t," | "):""]," ")})),EnumTypeDefinition:at((function(n){var t=n.values;return ct(["enum",n.name,ct(n.directives," "),ft(t)]," ")})),EnumValueDefinition:at((function(n){return ct([n.name,ct(n.directives," ")]," ")})),InputObjectTypeDefinition:at((function(n){var t=n.fields;return ct(["input",n.name,ct(n.directives," "),ft(t)]," ")})),DirectiveDefinition:at((function(n){var t=n.arguments,e=n.repeatable,i=n.locations;return"directive @"+n.name+(vt(t)?lt("(\n",ht(ct(t,"\n")),"\n)"):lt("(",ct(t,", "),")"))+(e?" repeatable":"")+" on "+ct(i," | ")})),SchemaExtension:function(n){var t=n.operationTypes;return ct(["extend schema",ct(n.directives," "),ft(t)]," ")},ScalarTypeExtension:function(n){return ct(["extend scalar",n.name,ct(n.directives," ")]," ")},ObjectTypeExtension:function(n){var t=n.directives,e=n.fields;return ct(["extend type",n.name,lt("implements ",ct(n.interfaces," & ")),ct(t," "),ft(e)]," ")},InterfaceTypeExtension:function(n){var t=n.directives,e=n.fields;return ct(["extend interface",n.name,lt("implements ",ct(n.interfaces," & ")),ct(t," "),ft(e)]," ")},UnionTypeExtension:function(n){var t=n.types;return ct(["extend union",n.name,ct(n.directives," "),t&&0!==t.length?"= "+ct(t," | "):""]," ")},EnumTypeExtension:function(n){var t=n.values;return ct(["extend enum",n.name,ct(n.directives," "),ft(t)]," ")},InputObjectTypeExtension:function(n){var t=n.fields;return ct(["extend input",n.name,ct(n.directives," "),ft(t)]," ")}};function at(n){return function(t){return ct([t.description,n(t)],"\n")}}function ct(n){var t,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==n?void 0:n.filter((function(n){return n})).join(e))&&void 0!==t?t:""}function ft(n){return lt("{\n",ht(ct(n,"\n")),"\n}")}function lt(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?n+t+e:""}function ht(n){return lt(" ",n.replace(/\n/g,"\n "))}function dt(n){return-1!==n.indexOf("\n")}function vt(n){return null!=n&&n.some(dt)}function mt(n,t,e,i){var r,o=null==(r=i)||"number"==typeof r||"boolean"==typeof r?i:e(i),s=t.get(o);return void 0===s&&(s=n.call(this,i),t.set(o,s)),s}function pt(n,t,e){var i=Array.prototype.slice.call(arguments,3),r=e(i),o=t.get(r);return void 0===o&&(o=n.apply(this,i),t.set(r,o)),o}function yt(n,t,e,i,r){return e.bind(t,n,i,r)}function bt(n,t){return yt(n,this,1===n.length?mt:pt,t.cache.create(),t.serializer)}function wt(){return JSON.stringify(arguments)}function Et(){this.cache=Object.create(null)}Et.prototype.has=function(n){return n in this.cache},Et.prototype.get=function(n){return this.cache[n]},Et.prototype.set=function(n,t){this.cache[n]=t};var gt={create:function(){return new Et}},St=function(n,t){return(t&&t.strategy?t.strategy:bt)(n,{cache:t&&t.cache?t.cache:gt,serializer:t&&t.serializer?t.serializer:wt})},It={variadic:function(n,t){return yt(n,this,pt,t.cache.create(),t.serializer)},monadic:function(n,t){return yt(n,this,mt,t.cache.create(),t.serializer)}};St.strategies=It;const Ot=Object.freeze(Object.assign(Object.create(null),St,{default:St,strategies:It}));function Tt(n){return"function"==typeof n}let Nt=!1;const Ft={Promise:void 0,set useDeprecatedSynchronousErrorHandling(n){if(n){const n=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+n.stack)}else Nt&&console.log("RxJS: Back to a better error behavior. Thank you. <3");Nt=n},get useDeprecatedSynchronousErrorHandling(){return Nt}};function Ct(n){setTimeout((()=>{throw n}),0)}const Dt={closed:!0,next(n){},error(n){if(Ft.useDeprecatedSynchronousErrorHandling)throw n;Ct(n)},complete(){}},jt=Array.isArray||(n=>n&&"number"==typeof n.length);function At(n){return null!==n&&"object"==typeof n}const _t=(()=>{function n(n){return Error.call(this),this.message=n?`${n.length} errors occurred during unsubscription:\n${n.map(((n,t)=>`${t+1}) ${n.toString()}`)).join("\n ")}`:"",this.name="UnsubscriptionError",this.errors=n,this}return n.prototype=Object.create(Error.prototype),n})();class Pt{constructor(n){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,n&&(this._ctorUnsubscribe=!0,this._unsubscribe=n)}unsubscribe(){let n;if(this.closed)return;let{_parentOrParents:t,_ctorUnsubscribe:e,_unsubscribe:i,_subscriptions:r}=this;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,t instanceof Pt)t.remove(this);else if(null!==t)for(let n=0;n<t.length;++n)t[n].remove(this);if(Tt(i)){e&&(this._unsubscribe=void 0);try{i.call(this)}catch(t){n=t instanceof _t?xt(t.errors):[t]}}if(jt(r)){let t=-1,e=r.length;for(;++t<e;){const e=r[t];if(At(e))try{e.unsubscribe()}catch(t){n=n||[],t instanceof _t?n=n.concat(xt(t.errors)):n.push(t)}}}if(n)throw new _t(n)}add(n){let t=n;if(!n)return Pt.EMPTY;switch(typeof n){case"function":t=new Pt(n);case"object":if(t===this||t.closed||"function"!=typeof t.unsubscribe)return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof Pt)){const n=t;t=new Pt,t._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+n+" added to Subscription.")}let{_parentOrParents:e}=t;if(null===e)t._parentOrParents=this;else if(e instanceof Pt){if(e===this)return t;t._parentOrParents=[e,this]}else{if(-1!==e.indexOf(this))return t;e.push(this)}const i=this._subscriptions;return null===i?this._subscriptions=[t]:i.push(t),t}remove(n){const t=this._subscriptions;if(t){const e=t.indexOf(n);-1!==e&&t.splice(e,1)}}}function xt(n){return n.reduce(((n,t)=>n.concat(t instanceof _t?t.errors:t)),[])}Pt.EMPTY=function(n){return n.closed=!0,n}(new Pt);const kt="function"==typeof Symbol?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random();class Rt extends Pt{constructor(n,t,e){switch(super(),this.syncErrorValue=null,this.syncErrorThrown=!1,this.syncErrorThrowable=!1,this.isStopped=!1,arguments.length){case 0:this.destination=Dt;break;case 1:if(!n){this.destination=Dt;break}if("object"==typeof n){n instanceof Rt?(this.syncErrorThrowable=n.syncErrorThrowable,this.destination=n,n.add(this)):(this.syncErrorThrowable=!0,this.destination=new Vt(this,n));break}default:this.syncErrorThrowable=!0,this.destination=new Vt(this,n,t,e)}}[kt](){return this}static create(n,t,e){const i=new Rt(n,t,e);return i.syncErrorThrowable=!1,i}next(n){this.isStopped||this._next(n)}error(n){this.isStopped||(this.isStopped=!0,this._error(n))}complete(){this.isStopped||(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe())}_next(n){this.destination.next(n)}_error(n){this.destination.error(n),this.unsubscribe()}_complete(){this.destination.complete(),this.unsubscribe()}_unsubscribeAndRecycle(){const{_parentOrParents:n}=this;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=n,this}}class Vt extends Rt{constructor(n,t,e,i){let r;super(),this._parentSubscriber=n;let o=this;Tt(t)?r=t:t&&(r=t.next,e=t.error,i=t.complete,t!==Dt&&(o=Object.create(t),Tt(o.unsubscribe)&&this.add(o.unsubscribe.bind(o)),o.unsubscribe=this.unsubscribe.bind(this))),this._context=o,this._next=r,this._error=e,this._complete=i}next(n){if(!this.isStopped&&this._next){const{_parentSubscriber:t}=this;Ft.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,n)&&this.unsubscribe():this.__tryOrUnsub(this._next,n)}}error(n){if(!this.isStopped){const{_parentSubscriber:t}=this,{useDeprecatedSynchronousErrorHandling:e}=Ft;if(this._error)e&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,n),this.unsubscribe()):(this.__tryOrUnsub(this._error,n),this.unsubscribe());else if(t.syncErrorThrowable)e?(t.syncErrorValue=n,t.syncErrorThrown=!0):Ct(n),this.unsubscribe();else{if(this.unsubscribe(),e)throw n;Ct(n)}}}complete(){if(!this.isStopped){const{_parentSubscriber:n}=this;if(this._complete){const t=()=>this._complete.call(this._context);Ft.useDeprecatedSynchronousErrorHandling&&n.syncErrorThrowable?(this.__tryOrSetError(n,t),this.unsubscribe()):(this.__tryOrUnsub(t),this.unsubscribe())}else this.unsubscribe()}}__tryOrUnsub(n,t){try{n.call(this._context,t)}catch(n){if(this.unsubscribe(),Ft.useDeprecatedSynchronousErrorHandling)throw n;Ct(n)}}__tryOrSetError(n,t,e){if(!Ft.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,e)}catch(t){return Ft.useDeprecatedSynchronousErrorHandling?(n.syncErrorValue=t,n.syncErrorThrown=!0,!0):(Ct(t),!0)}return!1}_unsubscribe(){const{_parentSubscriber:n}=this;this._context=null,this._parentSubscriber=null,n.unsubscribe()}}const Mt="function"==typeof Symbol&&Symbol.observable||"@@observable";function Ut(n){return n}class qt{constructor(n){this._isScalar=!1,n&&(this._subscribe=n)}lift(n){const t=new qt;return t.source=this,t.operator=n,t}subscribe(n,t,e){const{operator:i}=this,r=function(n,t,e){if(n){if(n instanceof Rt)return n;if(n[kt])return n[kt]()}return n||t||e?new Rt(n,t,e):new Rt(Dt)}(n,t,e);if(r.add(i?i.call(r,this.source):this.source||Ft.useDeprecatedSynchronousErrorHandling&&!r.syncErrorThrowable?this._subscribe(r):this._trySubscribe(r)),Ft.useDeprecatedSynchronousErrorHandling&&r.syncErrorThrowable&&(r.syncErrorThrowable=!1,r.syncErrorThrown))throw r.syncErrorValue;return r}_trySubscribe(n){try{return this._subscribe(n)}catch(t){Ft.useDeprecatedSynchronousErrorHandling&&(n.syncErrorThrown=!0,n.syncErrorValue=t),function(n){for(;n;){const{closed:t,destination:e,isStopped:i}=n;if(t||i)return!1;n=e&&e instanceof Rt?e:null}return!0}(n)?n.error(t):console.warn(t)}}forEach(n,t){return new(t=$t(t))(((t,e)=>{let i;i=this.subscribe((t=>{try{n(t)}catch(n){e(n),i&&i.unsubscribe()}}),e,t)}))}_subscribe(n){const{source:t}=this;return t&&t.subscribe(n)}[Mt](){return this}pipe(...n){return 0===n.length?this:(0===(t=n).length?Ut:1===t.length?t[0]:function(n){return t.reduce(((n,t)=>t(n)),n)})(this);var t}toPromise(n){return new(n=$t(n))(((n,t)=>{let e;this.subscribe((n=>e=n),(n=>t(n)),(()=>n(e)))}))}}function $t(n){if(n||(n=Promise),!n)throw new Error("no Promise impl found");return n}qt.create=n=>new qt(n);const Lt=(()=>{function n(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return n.prototype=Object.create(Error.prototype),n})();class Bt extends Pt{constructor(n,t){super(),this.subject=n,this.subscriber=t,this.closed=!1}unsubscribe(){if(this.closed)return;this.closed=!0;const n=this.subject,t=n.observers;if(this.subject=null,!t||0===t.length||n.isStopped||n.closed)return;const e=t.indexOf(this.subscriber);-1!==e&&t.splice(e,1)}}class Jt extends Rt{constructor(n){super(n),this.destination=n}}class Gt extends qt{constructor(){super(),this.observers=[],this.closed=!1,this.isStopped=!1,this.hasError=!1,this.thrownError=null}[kt](){return new Jt(this)}lift(n){const t=new Ht(this,this);return t.operator=n,t}next(n){if(this.closed)throw new Lt;if(!this.isStopped){const{observers:t}=this,e=t.length,i=t.slice();for(let t=0;t<e;t++)i[t].next(n)}}error(n){if(this.closed)throw new Lt;this.hasError=!0,this.thrownError=n,this.isStopped=!0;const{observers:t}=this,e=t.length,i=t.slice();for(let t=0;t<e;t++)i[t].error(n);this.observers.length=0}complete(){if(this.closed)throw new Lt;this.isStopped=!0;const{observers:n}=this,t=n.length,e=n.slice();for(let n=0;n<t;n++)e[n].complete();this.observers.length=0}unsubscribe(){this.isStopped=!0,this.closed=!0,this.observers=null}_trySubscribe(n){if(this.closed)throw new Lt;return super._trySubscribe(n)}_subscribe(n){if(this.closed)throw new Lt;return this.hasError?(n.error(this.thrownError),Pt.EMPTY):this.isStopped?(n.complete(),Pt.EMPTY):(this.observers.push(n),new Bt(this,n))}asObservable(){const n=new qt;return n.source=this,n}}Gt.create=(n,t)=>new Ht(n,t);class Ht extends Gt{constructor(n,t){super(),this.destination=n,this.source=t}next(n){const{destination:t}=this;t&&t.next&&t.next(n)}error(n){const{destination:t}=this;t&&t.error&&this.destination.error(n)}complete(){const{destination:n}=this;n&&n.complete&&this.destination.complete()}_subscribe(n){const{source:t}=this;return t?this.source.subscribe(n):Pt.EMPTY}}class Yt extends Pt{constructor(n,t){super()}schedule(n,t=0){return this}}class Qt{constructor(n,t=Qt.now){this.SchedulerAction=n,this.now=t}schedule(n,t=0,e){return new this.SchedulerAction(this,n).schedule(e,t)}}Qt.now=()=>Date.now();class Wt extends Qt{constructor(n,t=Qt.now){super(n,(()=>Wt.delegate&&Wt.delegate!==this?Wt.delegate.now():t())),this.actions=[],this.active=!1,this.scheduled=void 0}schedule(n,t=0,e){return Wt.delegate&&Wt.delegate!==this?Wt.delegate.schedule(n,t,e):super.schedule(n,t,e)}flush(n){const{actions:t}=this;if(this.active)return void t.push(n);let e;this.active=!0;do{if(e=n.execute(n.state,n.delay))break}while(n=t.shift());if(this.active=!1,e){for(;n=t.shift();)n.unsubscribe();throw e}}}function zt(n){return n&&"function"==typeof n.schedule}const Xt=new Wt(class extends Yt{constructor(n,t){super(n,t),this.scheduler=n,this.work=t,this.pending=!1}schedule(n,t=0){if(this.closed)return this;this.state=n;const e=this.id,i=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(i,e,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(i,this.id,t),this}requestAsyncId(n,t,e=0){return setInterval(n.flush.bind(n,this),e)}recycleAsyncId(n,t,e=0){if(null!==e&&this.delay===e&&!1===this.pending)return t;clearInterval(t)}execute(n,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;const e=this._execute(n,t);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))}_execute(n,t){let e,i=!1;try{this.work(n)}catch(n){i=!0,e=!!n&&n||new Error(n)}if(i)return this.unsubscribe(),e}_unsubscribe(){const n=this.id,t=this.scheduler,e=t.actions,i=e.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==i&&e.splice(i,1),null!=n&&(this.id=this.recycleAsyncId(t,n,null)),this.delay=null}});class Kt{constructor(n,t,e,i){this.bufferTimeSpan=n,this.bufferCreationInterval=t,this.maxBufferSize=e,this.scheduler=i}call(n,t){return t.subscribe(new ne(n,this.bufferTimeSpan,this.bufferCreationInterval,this.maxBufferSize,this.scheduler))}}class Zt{constructor(){this.buffer=[]}}class ne extends Rt{constructor(n,t,e,i,r){super(n),this.bufferTimeSpan=t,this.bufferCreationInterval=e,this.maxBufferSize=i,this.scheduler=r,this.contexts=[];const o=this.openContext();if(this.timespanOnly=null==e||e<0,this.timespanOnly)this.add(o.closeAction=r.schedule(te,t,{subscriber:this,context:o,bufferTimeSpan:t}));else{const n={bufferTimeSpan:t,bufferCreationInterval:e,subscriber:this,scheduler:r};this.add(o.closeAction=r.schedule(ie,t,{subscriber:this,context:o})),this.add(r.schedule(ee,e,n))}}_next(n){const t=this.contexts,e=t.length;let i;for(let r=0;r<e;r++){const e=t[r],o=e.buffer;o.push(n),o.length==this.maxBufferSize&&(i=e)}i&&this.onBufferFull(i)}_error(n){this.contexts.length=0,super._error(n)}_complete(){const{contexts:n,destination:t}=this;for(;n.length>0;){const e=n.shift();t.next(e.buffer)}super._complete()}_unsubscribe(){this.contexts=null}onBufferFull(n){this.closeContext(n);const t=n.closeAction;if(t.unsubscribe(),this.remove(t),!this.closed&&this.timespanOnly){n=this.openContext();const t=this.bufferTimeSpan;this.add(n.closeAction=this.scheduler.schedule(te,t,{subscriber:this,context:n,bufferTimeSpan:t}))}}openContext(){const n=new Zt;return this.contexts.push(n),n}closeContext(n){this.destination.next(n.buffer);const t=this.contexts;(t?t.indexOf(n):-1)>=0&&t.splice(t.indexOf(n),1)}}function te(n){const t=n.subscriber,e=n.context;e&&t.closeContext(e),t.closed||(n.context=t.openContext(),n.context.closeAction=this.schedule(n,n.bufferTimeSpan))}function ee(n){const{bufferCreationInterval:t,bufferTimeSpan:e,subscriber:i,scheduler:r}=n,o=i.openContext();i.closed||(i.add(o.closeAction=r.schedule(ie,e,{subscriber:i,context:o})),this.schedule(n,t))}function ie(n){const{subscriber:t,context:e}=n;t.closeContext(e)}var re=i((function(n,t){var e,i=r&&r.__extends||(e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e])})(n,t)},function(n,t){function i(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)});Object.defineProperty(t,"__esModule",{value:!0}),t.ClientError=void 0;var o=function(n){function t(e,i){var r=this,o=t.extractMessage(e)+": "+JSON.stringify({response:e,request:i});return r=n.call(this,o)||this,Object.setPrototypeOf(r,t.prototype),r.response=e,r.request=i,"function"==typeof Error.captureStackTrace&&Error.captureStackTrace(r,t),r}return i(t,n),t.extractMessage=function(n){try{return n.errors[0].message}catch(t){return"GraphQL Error (Code: "+n.status+")"}},t}(Error);t.ClientError=o})),oe=i((function(n,t){var e="undefined"!=typeof self?self:r,i=function(){function n(){this.fetch=!1,this.DOMException=e.DOMException}return n.prototype=e,new n}();!function(n){!function(t){var e="URLSearchParams"in n,i="Symbol"in n&&"iterator"in Symbol,r="FileReader"in n&&"Blob"in n&&function(){try{return new Blob,!0}catch(n){return!1}}(),o="FormData"in n,s="ArrayBuffer"in n;if(s)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],a=ArrayBuffer.isView||function(n){return n&&u.indexOf(Object.prototype.toString.call(n))>-1};function c(n){if("string"!=typeof n&&(n=String(n)),/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(n))throw new TypeError("Invalid character in header field name");return n.toLowerCase()}function f(n){return"string"!=typeof n&&(n=String(n)),n}function l(n){var t={next:function(){var t=n.shift();return{done:void 0===t,value:t}}};return i&&(t[Symbol.iterator]=function(){return t}),t}function h(n){this.map={},n instanceof h?n.forEach((function(n,t){this.append(t,n)}),this):Array.isArray(n)?n.forEach((function(n){this.append(n[0],n[1])}),this):n&&Object.getOwnPropertyNames(n).forEach((function(t){this.append(t,n[t])}),this)}function d(n){if(n.bodyUsed)return Promise.reject(new TypeError("Already read"));n.bodyUsed=!0}function v(n){return new Promise((function(t,e){n.onload=function(){t(n.result)},n.onerror=function(){e(n.error)}}))}function m(n){var t=new FileReader,e=v(t);return t.readAsArrayBuffer(n),e}function p(n){if(n.slice)return n.slice(0);var t=new Uint8Array(n.byteLength);return t.set(new Uint8Array(n)),t.buffer}function y(){return this.bodyUsed=!1,this._initBody=function(n){var t;this._bodyInit=n,n?"string"==typeof n?this._bodyText=n:r&&Blob.prototype.isPrototypeOf(n)?this._bodyBlob=n:o&&FormData.prototype.isPrototypeOf(n)?this._bodyFormData=n:e&&URLSearchParams.prototype.isPrototypeOf(n)?this._bodyText=n.toString():s&&r&&(t=n)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=p(n.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):s&&(ArrayBuffer.prototype.isPrototypeOf(n)||a(n))?this._bodyArrayBuffer=p(n):this._bodyText=n=Object.prototype.toString.call(n):this._bodyText="",this.headers.get("content-type")||("string"==typeof n?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e&&URLSearchParams.prototype.isPrototypeOf(n)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},r&&(this.blob=function(){var n=d(this);if(n)return n;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?d(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(m)}),this.text=function(){var n,t,e,i=d(this);if(i)return i;if(this._bodyBlob)return n=this._bodyBlob,e=v(t=new FileReader),t.readAsText(n),e;if(this._bodyArrayBuffer)return Promise.resolve(function(n){for(var t=new Uint8Array(n),e=new Array(t.length),i=0;i<t.length;i++)e[i]=String.fromCharCode(t[i]);return e.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},o&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}h.prototype.append=function(n,t){n=c(n),t=f(t);var e=this.map[n];this.map[n]=e?e+", "+t:t},h.prototype.delete=function(n){delete this.map[c(n)]},h.prototype.get=function(n){return n=c(n),this.has(n)?this.map[n]:null},h.prototype.has=function(n){return this.map.hasOwnProperty(c(n))},h.prototype.set=function(n,t){this.map[c(n)]=f(t)},h.prototype.forEach=function(n,t){for(var e in this.map)this.map.hasOwnProperty(e)&&n.call(t,this.map[e],e,this)},h.prototype.keys=function(){var n=[];return this.forEach((function(t,e){n.push(e)})),l(n)},h.prototype.values=function(){var n=[];return this.forEach((function(t){n.push(t)})),l(n)},h.prototype.entries=function(){var n=[];return this.forEach((function(t,e){n.push([e,t])})),l(n)},i&&(h.prototype[Symbol.iterator]=h.prototype.entries);var b=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function w(n,t){var e,i,r=(t=t||{}).body;if(n instanceof w){if(n.bodyUsed)throw new TypeError("Already read");this.url=n.url,this.credentials=n.credentials,t.headers||(this.headers=new h(n.headers)),this.method=n.method,this.mode=n.mode,this.signal=n.signal,r||null==n._bodyInit||(r=n._bodyInit,n.bodyUsed=!0)}else this.url=String(n);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new h(t.headers)),this.method=(i=(e=t.method||this.method||"GET").toUpperCase(),b.indexOf(i)>-1?i:e),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&r)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(r)}function E(n){var t=new FormData;return n.trim().split("&").forEach((function(n){if(n){var e=n.split("="),i=e.shift().replace(/\+/g," "),r=e.join("=").replace(/\+/g," ");t.append(decodeURIComponent(i),decodeURIComponent(r))}})),t}function g(n,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 h(t.headers),this.url=t.url||"",this._initBody(n)}w.prototype.clone=function(){return new w(this,{body:this._bodyInit})},y.call(w.prototype),y.call(g.prototype),g.prototype.clone=function(){return new g(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new h(this.headers),url:this.url})},g.error=function(){var n=new g(null,{status:0,statusText:""});return n.type="error",n};var S=[301,302,303,307,308];g.redirect=function(n,t){if(-1===S.indexOf(t))throw new RangeError("Invalid status code");return new g(null,{status:t,headers:{location:n}})},t.DOMException=n.DOMException;try{new t.DOMException}catch(n){t.DOMException=function(n,t){this.message=n,this.name=t;var e=Error(n);this.stack=e.stack},t.DOMException.prototype=Object.create(Error.prototype),t.DOMException.prototype.constructor=t.DOMException}function I(n,e){return new Promise((function(i,o){var s=new w(n,e);if(s.signal&&s.signal.aborted)return o(new t.DOMException("Aborted","AbortError"));var u=new XMLHttpRequest;function a(){u.abort()}u.onload=function(){var n,t,e={status:u.status,statusText:u.statusText,headers:(n=u.getAllResponseHeaders()||"",t=new h,n.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach((function(n){var e=n.split(":"),i=e.shift().trim();if(i){var r=e.join(":").trim();t.append(i,r)}})),t)};e.url="responseURL"in u?u.responseURL:e.headers.get("X-Request-URL"),i(new g("response"in u?u.response:u.responseText,e))},u.onerror=function(){o(new TypeError("Network request failed"))},u.ontimeout=function(){o(new TypeError("Network request failed"))},u.onabort=function(){o(new t.DOMException("Aborted","AbortError"))},u.open(s.method,s.url,!0),"include"===s.credentials?u.withCredentials=!0:"omit"===s.credentials&&(u.withCredentials=!1),"responseType"in u&&r&&(u.responseType="blob"),s.headers.forEach((function(n,t){u.setRequestHeader(t,n)})),s.signal&&(s.signal.addEventListener("abort",a),u.onreadystatechange=function(){4===u.readyState&&s.signal.removeEventListener("abort",a)}),u.send(void 0===s._bodyInit?null:s._bodyInit)}))}I.polyfill=!0,n.fetch||(n.fetch=I,n.Headers=h,n.Request=w,n.Response=g),t.Headers=h,t.Request=w,t.Response=g,t.fetch=I,Object.defineProperty(t,"__esModule",{value:!0})}({})}(i),i.fetch.ponyfill=!0,delete i.fetch.polyfill;var o=i;(t=o.fetch).default=o.fetch,t.fetch=o.fetch,t.Headers=o.Headers,t.Request=o.Request,t.Response=o.Response,n.exports=t})),se=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var e="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=e})),ue=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){return o(n,[])};var e,i=(e=se)&&e.__esModule?e:{default:e};function r(n){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function o(n,t){switch(r(n)){case"string":return JSON.stringify(n);case"function":return n.name?"[function ".concat(n.name,"]"):"[function]";case"object":return null===n?"null":function(n,t){if(-1!==t.indexOf(n))return"[Circular]";var e=[].concat(t,[n]),r=function(n){var t=n[String(i.default)];return"function"==typeof t?t:"function"==typeof n.inspect?n.inspect:void 0}(n);if(void 0!==r){var s=r.call(n);if(s!==n)return"string"==typeof s?s:o(s,e)}else if(Array.isArray(n))return function(n,t){if(0===n.length)return"[]";if(t.length>2)return"[Array]";for(var e=Math.min(10,n.length),i=n.length-e,r=[],s=0;s<e;++s)r.push(o(n[s],t));return 1===i?r.push("... 1 more item"):i>1&&r.push("... ".concat(i," more items")),"["+r.join(", ")+"]"}(n,e);return function(n,t){var e=Object.keys(n);return 0===e.length?"{}":t.length>2?"["+function(n){var t=Object.prototype.toString.call(n).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof n.constructor){var e=n.constructor.name;if("string"==typeof e&&""!==e)return e}return t}(n)+"]":"{ "+e.map((function(e){return e+": "+o(n[e],t)})).join(", ")+" }"}(n,e)}(n,t);default:return String(n)}}})),ae=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n,t){if(!Boolean(n))throw new Error(null!=t?t:"Unexpected invariant triggered.")}})),ce=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(n){var t=n.prototype.toJSON;"function"==typeof t||(0,e.default)(0),n.prototype.inspect=t,i.default&&(n.prototype[i.default]=t)};var e=r(ae),i=r(se);function r(n){return n&&n.__esModule?n:{default:n}}})),fe=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(n){return null!=n&&"string"==typeof n.kind},t.Token=t.Location=void 0;var e,i=(e=ce)&&e.__esModule?e:{default:e},r=function(){function n(n,t,e){this.start=n.start,this.end=t.end,this.startToken=n,this.endToken=t,this.source=e}return n.prototype.toJSON=function(){return{start:this.start,end:this.end}},n}();t.Location=r,(0,i.default)(r);var o=function(){function n(n,t,e,i,r,o,s){this.kind=n,this.start=t,this.end=e,this.line=i,this.column=r,this.value=s,this.prev=o,this.next=null}return n.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},n}();t.Token=o,(0,i.default)(o)})),le=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:r,u=void 0,a=Array.isArray(n),c=[n],f=-1,l=[],h=void 0,d=void 0,v=void 0,m=[],p=[],y=n;do{var b=++f===c.length,w=b&&0!==l.length;if(b){if(d=0===p.length?void 0:m[m.length-1],h=v,v=p.pop(),w){if(a)h=h.slice();else{for(var E={},g=0,S=Object.keys(h);g<S.length;g++){var I=S[g];E[I]=h[I]}h=E}for(var O=0,T=0;T<l.length;T++){var N=l[T][0],F=l[T][1];a&&(N-=O),a&&null===F?(h.splice(N,1),O++):h[N]=F}}f=u.index,c=u.keys,l=u.edits,a=u.inArray,u=u.prev}else{if(d=v?a?f:c[f]:void 0,null==(h=v?v[d]:y))continue;v&&m.push(d)}var C,D=void 0;if(!Array.isArray(h)){if(!(0,fe.isNode)(h))throw new Error("Invalid AST Node: ".concat((0,i.default)(h),"."));var j=s(t,h.kind,b);if(j){if((D=j.call(t,h,d,v,m,p))===o)break;if(!1===D){if(!b){m.pop();continue}}else if(void 0!==D&&(l.push([d,D]),!b)){if(!(0,fe.isNode)(D)){m.pop();continue}h=D}}}void 0===D&&w&&l.push([d,h]),b?m.pop():(u={inArray:a,index:f,keys:c,edits:l,prev:u},c=(a=Array.isArray(h))?h:null!==(C=e[h.kind])&&void 0!==C?C:[],f=-1,l=[],v&&p.push(v),v=h)}while(void 0!==u);return 0!==l.length&&(y=l[l.length-1][1]),y},t.visitInParallel=function(n){var t=new Array(n.length);return{enter:function(e){for(var i=0;i<n.length;i++)if(null==t[i]){var r=s(n[i],e.kind,!1);if(r){var u=r.apply(n[i],arguments);if(!1===u)t[i]=e;else if(u===o)t[i]=o;else if(void 0!==u)return u}}},leave:function(e){for(var i=0;i<n.length;i++)if(null==t[i]){var r=s(n[i],e.kind,!0);if(r){var u=r.apply(n[i],arguments);if(u===o)t[i]=o;else if(void 0!==u&&!1!==u)return u}}else t[i]===e&&(t[i]=null)}}},t.getVisitFn=s,t.BREAK=t.QueryDocumentKeys=void 0;var e,i=(e=ue)&&e.__esModule?e:{default:e},r={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};t.QueryDocumentKeys=r;var o=Object.freeze({});function s(n,t,e){var i=n[t];if(i){if(!e&&"function"==typeof i)return i;var r=e?i.leave:i.enter;if("function"==typeof r)return r}else{var o=e?n.leave:n.enter;if(o){if("function"==typeof o)return o;var s=o[t];if("function"==typeof s)return s}}}t.BREAK=o})),he=i((function(n,t){function e(n){for(var t=0;t<n.length;++t)if(" "!==n[t]&&"\t"!==n[t])return!1;return!0}function i(n){for(var t,e=!0,i=!0,r=0,o=null,s=0;s<n.length;++s)switch(n.charCodeAt(s)){case 13:10===n.charCodeAt(s+1)&&++s;case 10:e=!1,i=!0,r=0;break;case 9:case 32:++r;break;default:i&&!e&&(null===o||r<o)&&(o=r),i=!1}return null!==(t=o)&&void 0!==t?t:0}Object.defineProperty(t,"__esModule",{value:!0}),t.dedentBlockStringValue=function(n){var t=n.split(/\r\n|[\n\r]/g),r=i(n);if(0!==r)for(var o=1;o<t.length;o++)t[o]=t[o].slice(r);for(var s=0;s<t.length&&e(t[s]);)++s;for(var u=t.length;u>s&&e(t[u-1]);)--u;return t.slice(s,u).join("\n")},t.getBlockStringIndentation=i,t.printBlockString=function(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=-1===n.indexOf("\n"),r=" "===n[0]||"\t"===n[0],o='"'===n[n.length-1],s="\\"===n[n.length-1],u=!i||o||s||e,a="";return!u||i&&r||(a+="\n"+t),a+=t?n.replace(/\n/g,"\n"+t):n,u&&(a+="\n"),'"""'+a.replace(/"""/g,'\\"""')+'"""'}})),de=i((function(n,t){Object.defineProperty(t,"__esModule",{value:!0}),t.print=function(n){return(0,le.visit)(n,{leave:e})};var e={Name:function(n){return n.value},Variable:function(n){return"$"+n.name},Document:function(n){return r(n.definitions,"\n\n")+"\n"},OperationDefinition:function(n){var t=n.operation,e=n.name,i=s("(",r(n.variableDefinitions,", "),")"),o=r(n.directives," "),u=n.selectionSet;return e||o||i||"query"!==t?r([t,r([e,i]),o,u]," "):u},VariableDefinition:function(n){var t=n.directives;return n.variable+": "+n.type+s(" = ",n.defaultValue)+s(" ",r(t," "))},SelectionSet:function(n){return o(n.selections)},Field:function(n){var t=n.name,e=n.arguments,i=n.directives,o=n.selectionSet,a=s("",n.alias,": ")+t,c=a+s("(",r(e,", "),")");return c.length>80&&(c=a+s("(\n",u(r(e,"\n")),"\n)")),r([c,r(i," "),o]," ")},Argument:function(n){return n.name+": "+n.value},FragmentSpread:function(n){return"..."+n.name+s(" ",r(n.directives," "))},InlineFragment:function(n){var t=n.directives,e=n.selectionSet;return r(["...",s("on ",n.typeCondition),r(t," "),e]," ")},FragmentDefinition:function(n){var t=n.typeCondition,e=n.variableDefinitions,i=n.directives,o=n.selectionSet;return"fragment ".concat(n.name).concat(s("(",r(e,", "),")")," ")+"on ".concat(t," ").concat(s("",r(i," ")," "))+o},IntValue:function(n){return n.value},FloatValue:function(n){return n.value},StringValue:function(n,t){var e=n.value;return n.block?(0,he.printBlockString)(e,"description"===t?"":" "):JSON.stringify(e)},BooleanValue:function(n){return n.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(n){return n.value},ListValue:function(n){return"["+r(n.values,", ")+"]"},ObjectValue:function(n){return"{"+r(n.fields,", ")+"}"},ObjectField:function(n){return n.name+": "+n.value},Directive:function(n){return"@"+n.name+s("(",r(n.arguments,", "),")")},NamedType:function(n){return n.name},ListType:function(n){return"["+n.type+"]"},NonNullType:function(n){return n.type+"!"},SchemaDefinition:i((function(n){var t=n.operationTypes;return r(["schema",r(n.directives," "),o(t)]," ")})),OperationTypeDefinition:function(n){return n.operation+": "+n.type},ScalarTypeDefinition:i((function(n){return r(["scalar",n.name,r(n.directives," ")]," ")})),ObjectTypeDefinition:i((function(n){var t=n.directives,e=n.fields;return r(["type",n.name,s("implements ",r(n.interfaces," & ")),r(t," "),o(e)]," ")})),FieldDefinition:i((function(n){var t=n.arguments,e=n.type,i=n.directives;return n.name+(c(t)?s("(\n",u(r(t,"\n")),"\n)"):s("(",r(t,", "),")"))+": "+e+s(" ",r(i," "))})),InputValueDefinition:i((function(n){var t=n.directives;return r([n.name+": "+n.type,s("= ",n.defaultValue),r(t," ")]," ")})),InterfaceTypeDefinition:i((function(n){var t=n.directives,e=n.fields;return r(["interface",n.name,s("implements ",r(n.interfaces," & ")),r(t," "),o(e)]," ")})),UnionTypeDefinition:i((function(n){var t=n.types;return r(["union",n.name,r(n.directives," "),t&&0!==t.length?"= "+r(t," | "):""]," ")})),EnumTypeDefinition:i((function(n){var t=n.values;return r(["enum",n.name,r(n.directives," "),o(t)]," ")})),EnumValueDefinition:i((function(n){return r([n.name,r(n.directives," ")]," ")})),InputObjectTypeDefinition:i((function(n){var t=n.fields;return r(["input",n.name,r(n.directives," "),o(t)]," ")})),DirectiveDefinition:i((function(n){var t=n.arguments,e=n.repeatable,i=n.locations;return"directive @"+n.name+(c(t)?s("(\n",u(r(t,"\n")),"\n)"):s("(",r(t,", "),")"))+(e?" repeatable":"")+" on "+r(i," | ")})),SchemaExtension:function(n){var t=n.operationTypes;return r(["extend schema",r(n.directives," "),o(t)]," ")},ScalarTypeExtension:function(n){return r(["extend scalar",n.name,r(n.directives," ")]," ")},ObjectTypeExtension:function(n){var t=n.directives,e=n.fields;return r(["extend type",n.name,s("implements ",r(n.interfaces," & ")),r(t," "),o(e)]," ")},InterfaceTypeExtension:function(n){var t=n.directives,e=n.fields;return r(["extend interface",n.name,s("implements ",r(n.interfaces," & ")),r(t," "),o(e)]," ")},UnionTypeExtension:function(n){var t=n.types;return r(["extend union",n.name,r(n.directives," "),t&&0!==t.length?"= "+r(t," | "):""]," ")},EnumTypeExtension:function(n){var t=n.values;return r(["extend enum",n.name,r(n.directives," "),o(t)]," ")},InputObjectTypeExtension:function(n){var t=n.fields;return r(["extend input",n.name,r(n.directives," "),o(t)]," ")}};function i(n){return function(t){return r([t.description,n(t)],"\n")}}function r(n){var t,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==n?void 0:n.filter((function(n){return n})).join(e))&&void 0!==t?t:""}function o(n){return s("{\n",u(r(n,"\n")),"\n}")}function s(n,t){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";return null!=t&&""!==t?n+t+e:""}function u(n){return s(" ",n.replace(/\n/g,"\n "))}function a(n){return-1!==n.indexOf("\n")}function c(n){return null!=n&&n.some(a)}})),ve=function(n){var t=n.name,e=n.type;this.uri=n.uri,this.name=t,this.type=e},me=function(n){return"undefined"!=typeof File&&n instanceof File||"undefined"!=typeof Blob&&n instanceof Blob||n instanceof ve},pe=function n(t,e,i){var r;void 0===e&&(e=""),void 0===i&&(i=me);var o=new Map;function s(n,t){var e=o.get(t);e?e.push.apply(e,n):o.set(t,n)}if(i(t))r=null,s([e],t);else{var u=e?e+".":"";if("undefined"!=typeof FileList&&t instanceof FileList)r=Array.prototype.map.call(t,(function(n,t){return s([""+u+t],n),null}));else if(Array.isArray(t))r=t.map((function(t,e){var r=n(t,""+u+e,i);return r.files.forEach(s),r.clone}));else if(t&&t.constructor===Object)for(var a in r={},t){var c=n(t[a],""+u+a,i);c.files.forEach(s),r[a]=c.clone}else r=t}return{clone:r,files:o}},ye=me,be="object"==typeof self?self.FormData:window.FormData,we=i((function(n,t){var e=r&&r.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0});var i=e(be),o=function(n){return ye(n)||null!==n&&"object"==typeof n&&"function"==typeof n.pipe};t.default=function(n,t){var e=pe({query:n,variables:t},"",o),r=e.clone,s=e.files;if(0===s.size)return JSON.stringify(r);var u=new("undefined"==typeof FormData?i.default:FormData);u.append("operations",JSON.stringify(r));var a={},c=0;return s.forEach((function(n){a[++c]=n})),u.append("map",JSON.stringify(a)),c=0,s.forEach((function(n,t){u.append(""+ ++c,t)})),u}})),Ee=i((function(n,t){var e=r&&r.__assign||function(){return(e=Object.assign||function(n){for(var t,e=1,i=arguments.length;e<i;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},i=r&&r.__createBinding||(Object.create?function(n,t,e,i){void 0===i&&(i=e),Object.defineProperty(n,i,{enumerable:!0,get:function(){return t[e]}})}:function(n,t,e,i){void 0===i&&(i=e),n[i]=t[e]}),o=r&&r.__setModuleDefault||(Object.create?function(n,t){Object.defineProperty(n,"default",{enumerable:!0,value:t})}:function(n,t){n.default=t}),s=r&&r.__importStar||function(n){if(n&&n.__esModule)return n;var t={};if(null!=n)for(var e in n)"default"!==e&&Object.prototype.hasOwnProperty.call(n,e)&&i(t,n,e);return o(t,n),t},u=r&&r.__awaiter||function(n,t,e,i){return new(e||(e=Promise))((function(r,o){function s(n){try{a(i.next(n))}catch(n){o(n)}}function u(n){try{a(i.throw(n))}catch(n){o(n)}}function a(n){var t;n.done?r(n.value):(t=n.value,t instanceof e?t:new e((function(n){n(t)}))).then(s,u)}a((i=i.apply(n,t||[])).next())}))},a=r&&r.__generator||function(n,t){var e,i,r,o,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:u(0),throw:u(1),return:u(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function u(o){return function(u){return function(o){if(e)throw new TypeError("Generator is already executing.");for(;s;)try{if(e=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,i=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((r=(r=s.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){s.label=o[1];break}if(6===o[0]&&s.label<r[1]){s.label=r[1],r=o;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(o);break}r[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(n,s)}catch(n){o=[6,n],i=0}finally{e=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,u])}}},c=r&&r.__rest||function(n,t){var e={};for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&t.indexOf(i)<0&&(e[i]=n[i]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(n);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(n,i[r])&&(e[i[r]]=n[i[r]])}return e},f=r&&r.__importDefault||function(n){return n&&n.__esModule?n:{default:n}};Object.defineProperty(t,"__esModule",{value:!0}),t.gql=t.request=t.rawRequest=t.GraphQLClient=t.ClientError=void 0;var l=s(oe),h=l,d=f(we),v=re;Object.defineProperty(t,"ClientError",{enumerable:!0,get:function(){return v.ClientError}});var m=function(n){var t={};return n&&("undefined"!=typeof Headers&&n instanceof Headers||n instanceof h.Headers?t=function(n){var t={};return n.forEach((function(n,e){t[e]=n})),t}(n):Array.isArray(n)?n.forEach((function(n){t[n[0]]=n[1]})):t=n),t},p=function(){function n(n,t){this.url=n,this.options=t||{}}return n.prototype.rawRequest=function(n,t,i){return u(this,void 0,void 0,(function(){var r,o,s,u,f,h,v,p,y,w;return a(this,(function(a){switch(a.label){case 0:return o=(r=this.options).headers,u=void 0===(s=r.fetch)?l.default:s,f=c(r,["headers","fetch"]),h=d.default(n,t),[4,u(this.url,e({method:"POST",headers:e(e(e({},"string"==typeof h?{"Content-Type":"application/json"}:{}),m(o)),m(i)),body:h},f))];case 1:return[4,b(v=a.sent())];case 2:if(p=a.sent(),v.ok&&!p.errors&&p.data)return y=v.headers,w=v.status,[2,e(e({},p),{headers:y,status:w})];throw new re.ClientError(e(e({},"string"==typeof p?{error:p}:p),{status:v.status,headers:v.headers}),{query:n,variables:t})}}))}))},n.prototype.request=function(n,t,i){return u(this,void 0,void 0,(function(){var r,o,s,u,f,h,v,p,y;return a(this,(function(a){switch(a.label){case 0:return o=(r=this.options).headers,u=void 0===(s=r.fetch)?l.default:s,f=c(r,["headers","fetch"]),h=function(n){return"string"==typeof n?n:de.print(n)}(n),v=d.default(h,t),[4,u(this.url,e({method:"POST",headers:e(e(e({},"string"==typeof v?{"Content-Type":"application/json"}:{}),m(o)),m(i)),body:v},f))];case 1:return[4,b(p=a.sent())];case 2:if(y=a.sent(),p.ok&&!y.errors&&y.data)return[2,y.data];throw new re.ClientError(e(e({},"string"==typeof y?{error:y}:y),{status:p.status}),{query:h,variables:t})}}))}))},n.prototype.setHeaders=function(n){return this.options.headers=n,this},n.prototype.setHeader=function(n,t){var e,i=this.options.headers;return i?i[n]=t:this.options.headers=((e={})[n]=t,e),this},n}();function y(n,t,e){return u(this,void 0,void 0,(function(){return a(this,(function(){return[2,new p(n).request(t,e)]}))}))}function b(n){var t=n.headers.get("Content-Type");return t&&t.startsWith("application/json")?n.json():n.text()}t.GraphQLClient=p,t.rawRequest=function(n,t,e){return u(this,void 0,void 0,(function(){return a(this,(function(){return[2,new p(n).rawRequest(t,e)]}))}))},t.request=y,t.default=y,t.gql=function(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];return n.reduce((function(n,e,i){return""+n+e+(i in t?t[i]:"")}),"")}})),ge=i((function(n,t){var e=r&&r.__assign||function(){return(e=Object.assign||function(n){for(var t,e=1,i=arguments.length;e<i;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},i=r&&r.__spreadArrays||function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;var i=Array(n),r=0;for(t=0;t<e;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,r++)i[r]=o[s];return i};function o(n,t){return"Variable"===n.kind?e(e({},n),{name:e(e({},n.name),{value:t(n.name.value)})}):"ObjectValue"===n.kind?e(e({},n),{fields:n.fields.map((function(n){return e(e({},n),{value:o(n.value,t)})}))}):"ListValue"===n.kind?e(e({},n),{values:n.values.map((function(n){return o(n,t)}))}):n}function s(n,t){return e(e({},n),{value:o(n.value,t)})}function u(n,t){var i;return e(e({},n),{arguments:null===(i=n.arguments)||void 0===i?void 0:i.map((function(n){return s(n,t)}))})}function a(n,t){var i;return e(e({},n),{variable:e(e({},n.variable),{name:e(e({},n.variable.name),{value:t(n.variable.name.value)})}),directives:null===(i=n.directives)||void 0===i?void 0:i.map((function(n){return u(n,t)}))})}function c(n,t){return e(e({},n),{selections:n.selections.map((function(n){var i,r,o;switch(n.kind){case"Field":return e(e({},n),{arguments:null===(i=n.arguments)||void 0===i?void 0:i.map((function(n){return s(n,t)})),selectionSet:n.selectionSet?c(n.selectionSet,t):void 0});case"FragmentSpread":return e(e({},n),{directives:null===(r=n.directives)||void 0===r?void 0:r.map((function(n){return u(n,t)}))});case"InlineFragment":return e(e({},n),{directives:null===(o=n.directives)||void 0===o?void 0:o.map((function(n){return u(n,t)})),selectionSet:c(n.selectionSet,t)})}}))})}function f(n,t,i){var r,o;return e(e({},n),{variableDefinitions:null===(r=n.variableDefinitions)||void 0===r?void 0:r.map((function(n){return a(n,t)})),directives:null===(o=n.directives)||void 0===o?void 0:o.map((function(n){return u(n,t)})),selectionSet:c(e(e({},n.selectionSet),{selections:n.selectionSet.selections.map((function(n){var t,r;switch(n.kind){case"Field":return e(e({},n),{alias:e(e({},n.name),{value:i(null!==(r=null===(t=n.alias)||void 0===t?void 0:t.value)&&void 0!==r?r:n.name.value)})});default:return n}}))}),t)})}Object.defineProperty(t,"__esModule",{value:!0}),t.renameVariables=t.renameVariablesAndTopLevelFields=t.renameVariablesAndTopLevelFieldsOnOpDef=t.renameSelectionSetArguments=t.renameVariableDefinition=t.renameDirectiveArguments=t.renameArgument=t.renameValue=t.defaultRenameFn=void 0,t.defaultRenameFn=function(n,t){return n+"_"+t},t.renameValue=o,t.renameArgument=s,t.renameDirectiveArguments=u,t.renameVariableDefinition=a,t.renameSelectionSetArguments=c,t.renameVariablesAndTopLevelFieldsOnOpDef=f,t.renameVariablesAndTopLevelFields=function(n,t,r){return e(e({},n),{definitions:i(n.definitions.filter((function(n){return"OperationDefinition"!==n.kind})),n.definitions.filter((function(n){return"OperationDefinition"===n.kind})).map((function(n){return f(n,t,r)})))})},t.renameVariables=function(n,t){return Object.keys(n).reduce((function(i,r){var o;return e(e({},i),((o={})[t(r)]=n[r],o))}),{})}}));const Se=o(i((function(n,t){var e,i=r&&r.__extends||(e=function(n,t){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,t){n.__proto__=t}||function(n,t){for(var e in t)t.hasOwnProperty(e)&&(n[e]=t[e])})(n,t)},function(n,t){function i(){this.constructor=n}e(n,t),n.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),o=r&&r.__assign||function(){return(o=Object.assign||function(n){for(var t,e=1,i=arguments.length;e<i;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},s=r&&r.__spreadArrays||function(){for(var n=0,t=0,e=arguments.length;t<e;t++)n+=arguments[t].length;var i=Array(n),r=0;for(t=0;t<e;t++)for(var o=arguments[t],s=0,u=o.length;s<u;s++,r++)i[r]=o[s];return i};Object.defineProperty(t,"__esModule",{value:!0});var u={kind:"Document",definitions:[]},a=function(n){function t(){return null!==n&&n.apply(this,arguments)||this}return i(t,n),t}(Error),c=function(){function n(n,t,e){this.operationName=n,this.document=t,this.variables=e}return n.prototype.add=function(t,e){var i=this,r=this.document.definitions.concat(t.definitions).filter((function(n){return"OperationDefinition"===n.kind}));if(!r.length)throw new a("Expected at least one OperationDefinition, but found none.");r.forEach((function(n){var t,e,i=r.filter((function(t){return t!==n}));i.forEach((function(t){var e,i;if(t.operation!==n.operation)throw new a("expected all operations to be of the smae type, but "+(null===(e=t.name)||void 0===e?void 0:e.value)+" is "+t.operation+" and "+(null===(i=n.name)||void 0===i?void 0:i.value)+" is "+n.operation)})),null===(t=n.selectionSet.selections)||void 0===t||t.filter((function(n){return"Field"===n.kind})).forEach((function(t){i.forEach((function(e){var i;return null===(i=e.selectionSet.selections)||void 0===i?void 0:i.filter((function(n){return"Field"===n.kind})).forEach((function(i){var r,o,s,u;if(((null===(r=t.alias)||void 0===r?void 0:r.value)||t.name.value)===((null===(o=i.alias)||void 0===o?void 0:o.value)||i.name.value))throw new a("duplicate field definition "+i.name.value+" for oprations "+(null===(s=n.name)||void 0===s?void 0:s.value)+" and "+(null===(u=e.name)||void 0===u?void 0:u.value))}))}))})),null===(e=n.variableDefinitions)||void 0===e||e.forEach((function(t){i.forEach((function(e){var i;return null===(i=e.variableDefinitions)||void 0===i?void 0:i.forEach((function(i){var r,o;if(t.variable.name.value===i.variable.name.value)throw new a("duplicate variable definition "+i.variable.name.value+" for oprations "+(null===(r=n.name)||void 0===r?void 0:r.value)+" and "+(null===(o=e.name)||void 0===o?void 0:o.value))}))}))}))}));for(var u=i.variables&&e?o(o({},i.variables),e):e||i.variables,c=[{kind:"OperationDefinition",directives:r.flatMap((function(n){return n.directives||[]})),name:{kind:"Name",value:this.operationName},operation:r[0].operation,selectionSet:{kind:"SelectionSet",selections:r.flatMap((function(n){return n.selectionSet.selections}))},variableDefinitions:r.flatMap((function(n){return n.variableDefinitions||[]}))}],f=new Set,l=0,h=this.document.definitions.concat(t.definitions);l<h.length;l++){var d=h[l];if("OperationDefinition"!==d.kind){if("FragmentDefinition"===d.kind){if(f.has(d.name.value))continue;f.add(d.name.value)}c=s([d],c)}}return new n(this.operationName,{kind:"Document",definitions:c},u)},n.prototype.addN=function(n,t,e,i){return void 0===e&&(e=ge.defaultRenameFn),void 0===i&&(i=ge.defaultRenameFn),t.length?t.reduce((function(t,r,o){var s=ge.renameVariablesAndTopLevelFields(n,(function(n){return e(n,o)}),(function(n){return i(n,o)})),u=ge.renameVariables(r,(function(n){return e(n,o)}));return t.add(s,u)}),this):this},n}();t.default=function(n){return{operationName:n,add:function(n,t){return new c(this.operationName,n,t)},addN:function(n,t,e,i){return new c(this.operationName,u).addN(n,t,e,i)}}}})));var Ie={current:void 0};function Oe(){if(void 0===Ie.current)throw new Error("no implementation of useHost provided");return Ie.current()}function Te(n){if(!n)throw new Error("Must supply an implementation");if("function"!=typeof n)throw new Error("implementation must be a function");Ie.current=n}function Ne(){Q();var n=Oe();return u(n,"sq:locale")}function Fe(){sn();var n=Oe();return u(n,"sq:program-id")}function Ce(){var n;return null==(n=De())?void 0:n.jwt}function De(){Z();var n=Oe(),t=u(n,"sq:user-identity"),e=nn(null==t?void 0:t.jwt);if(V()||!t||e)return t;en(void 0)}var je=M,Ae=q,_e=function(){var n;const t=R();switch(t.type){case"SquatchJS2":return(null==(n=t.widgetIdent)?void 0:n.engagementMedium)||"EMBED";case"SquatchAndroid":case"SquatchIOS":case"SquatchPortal":case"SquatchAdmin":case"None":return"EMBED"}};function Pe(){return(Pe=Object.assign||function(n){for(var t=1;t<arguments.length;t++){var e=arguments[t];for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i])}return n}).apply(this,arguments)}function xe(n,t){return(xe=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}function ke(n,t){return t||(t=n.slice(0)),n.raw=t,n}function Re(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,i=new Array(t);e<t;e++)i[e]=n[e];return i}function Ve(n,t){var e;if("undefined"==typeof Symbol||null==n[Symbol.iterator]){if(Array.isArray(n)||(e=function(n,t){if(n){if("string"==typeof n)return Re(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Re(n,t):void 0}}(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var i=0;return function(){return i>=n.length?{done:!0}:{done:!1,value:n[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(e=n[Symbol.iterator]()).next.bind(e)}var Me=function(){return(Me=Object.assign||function(n){for(var t,e=1,i=arguments.length;e<i;e++)for(var r in t=arguments[e])Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}).apply(this,arguments)},Ue=new Map,qe=new Map,$e=!0,Le=!1;function Be(n){return n.replace(/[\s,]+/g," ").trim()}function Je(n){var t,e,i,r=Be(n);if(!Ue.has(r)){var o=Zn(n,{experimentalFragmentVariables:Le});if(!o||"Document"!==o.kind)throw new Error("Not a valid GraphQL document.");Ue.set(r,function(n){var t=new Set(n.definitions);t.forEach((function(n){n.loc&&delete n.loc,Object.keys(n).forEach((function(e){var i=n[e];i&&"object"==typeof i&&t.add(i)}))}));var e=n.loc;return e&&(delete e.startToken,delete e.endToken),n}((t=o,e=new Set,i=[],t.definitions.forEach((function(n){if("FragmentDefinition"===n.kind){var t=n.name.value,r=Be((s=n.loc).source.body.substring(s.start,s.end)),o=qe.get(t);o&&!o.has(r)?$e&&console.warn("Warning: fragment with name "+t+" already exists.\ngraphql-tag enforces all fragment names across your application to be unique; read more about\nthis in the docs: http://dev.apollodata.com/core/fragments.html#unique-names"):o||qe.set(t,o=new Set),o.add(r),e.has(r)||(e.add(r),i.push(n))}else i.push(n);var s})),Me(Me({},t),{definitions:i}))))}return Ue.get(r)}function Ge(n){for(var t=[],e=1;e<arguments.length;e++)t[e-1]=arguments[e];"string"==typeof n&&(n=[n]);var i=n[0];return t.forEach((function(t,e){i+=t&&"Document"===t.kind?t.loc.source.body:t,i+=n[e+1]})),Je(i)}var He,Ye=Ge;(He=Ge||(Ge={})).gql=Ye,He.resetCaches=function(){Ue.clear(),qe.clear()},He.disableFragmentWarnings=function(){$e=!1},He.enableExperimentalFragmentVariables=function(){Le=!0},He.disableExperimentalFragmentVariables=function(){Le=!1},Ge.default=Ge;var Qe=Ge;function We(n,t){try{var e=n()}catch(n){return t(n)}return e&&e.then?e.then(void 0,t):e}var ze=function(n){var t,e;function i(t,e){var i;(i=n.call(this,t,e)||this).subject=new Gt;var r=new Gt;return i.subject.pipe(function(n){let t=arguments.length,e=Xt;zt(arguments[arguments.length-1])&&(e=arguments[arguments.length-1],t--);let i=null;t>=2&&(i=arguments[1]);let r=Number.POSITIVE_INFINITY;return t>=3&&(r=arguments[2]),function(t){return t.lift(new Kt(n,i,r,e))}}(200,void 0,10)).subscribe((function(n){try{if(!n.length)return Promise.resolve();for(var t,e=ni(n),o=e.mergedQuery,s=e.mergedVariables,u=e.mergedQueryAddedEvents,a=Ve(e.unmergedQueryAddedEvents);!(t=a()).done;)r.next(t.value);return u.length?Promise.resolve(We((function(){return Promise.resolve(i.superRequest(o,s)).then((function(n){ii(n,u)}))}),(function(n){if(n instanceof re.ClientError){var t=function(){var t=n.response,e=t.data,i=t.errors;if(!e)return{v:oi(u,n)};for(var r,o=Object.keys(e),s=[].concat(u),a=function(){var t=r.value,e=void 0;t.path.find((function(i,r,u){if(o.includes(i)){var a=Ze(i),c=s.findIndex((function(n){return n.id===a}));if(-1===c)return!1;o.splice(r,1),e=s.splice(c,1)[0];var f=ti(n.response.data,e);u[r]=Ke(u[r],a);var l=e.query,h=e.variables,d=Pe({},n.response,{errors:[t],data:f,path:u}),v=new re.ClientError(d,{query:"string"!=typeof l?st(l):l,variables:h});return ri(e,v),!0}return!1}))},c=Ve(i);!(r=c()).done;)a();ii(e,s)}();if("object"==typeof t)return t.v}else oi(u,n)}))):Promise.resolve()}catch(n){return Promise.reject(n)}})),r.subscribe((function(n){try{var t=We((function(){return Promise.resolve(i.superRequest(n.query,n.variables)).then((function(t){ei(t,n)}))}),(function(t){ri(n,t)}));return Promise.resolve(t&&t.then?t.then((function(){})):void 0)}catch(n){return Promise.reject(n)}})),i}e=n,(t=i).prototype=Object.create(e.prototype),t.prototype.constructor=t,xe(t,e);var r=i.prototype;return r.superRequest=function(t,e){return n.prototype.request.call(this,t,e)},r.request=function(n,t){var e=this;return new Promise((function(i,r){var o={query:n,variables:t,id:Xe(),resolve:i,reject:r};e.subject.next(o)}))},i}(Ee.GraphQLClient),Xe=function(){return((n=21)=>{let t="",e=crypto.getRandomValues(new Uint8Array(n));for(;n--;){let i=63&e[n];t+=i<36?i.toString(36):i<62?(i-26).toString(36).toUpperCase():i<63?"_":"-"}return t})().replace(/[-_]/g,"")},Ke=function(n,t){return n.replace("_"+t,"")},Ze=function(n){var t=n.split("_");return t[t.length-1]},ni=function(n){var t=[],e=[],i=n.reduce((function(n,i){var r=i.query,o=i.variables,s=i.id;try{var u="string"==typeof r?Zn(r):r,a=u.definitions.find((function(n){return"FragmentDefinition"===n.kind})),c="string"==typeof r?r:st(r),f=/@/.test(c);if(a||f)return e.push(i),n;var l=function(n){return function(n,t){return n+"_"+t}(n,s)};return n=n.addN(u,[o],l,l),t.push(i),n}catch(t){return e.push(i),n}}),Se("BatchedQuery")),r=i.document,o=i.variables;return{mergedQuery:r&&st(r),mergedVariables:o,mergedQueryAddedEvents:t,unmergedQueryAddedEvents:e}},ti=function(n,t){if(!n)return n;var e=Object.keys(n),i=t.id;return e.reduce((function(t,e){var r;return e.endsWith(i)&&(t=Pe({},t,((r={})[Ke(e,i)]=n[e],r))),t}),{})},ei=function(n,t){(0,t.resolve)(n)},ii=function(n,t){for(var e,i=Ve(t);!(e=i()).done;){var r=e.value,o=ti(n,r);r.resolve(o)}},ri=function(n,t){(0,n.reject)(t)},oi=function(n,t){for(var e,i=Ve(n);!(e=i()).done;)(0,e.value.reject)(t)},si="sq:graphql-client",ui=St((function(n,t,e){return new ze(n+"/api/v1/"+t+"/graphql",{headers:{Authorization:"Bearer "+(e||"")}})}));function ai(n,t){switch(t.type){case"loading":return{data:void 0,errors:void 0,loading:!0};case"data":return{data:t.payload,errors:void 0,loading:!1};case"errors":return{data:void 0,errors:t.payload,loading:!1}}}function ci(n,t){var e,i,r,o,s,c,f=(e=Ce(),i=Ae(),r=je(),o=ui(i,r,e),s=Oe(),null!=(c=u(s,"sq:graphql-client",{attempts:0}))?c:o),h=a(ai,t),d=h[1];return[h[0],l((function(t,e){void 0===e&&(e=!1);try{if(!f){var i=new Error("No GraphQL client found");return d({type:"errors",payload:i}),Promise.resolve(i)}return Promise.resolve(function(i,r){try{var o=(e||d({type:"loading"}),Promise.resolve(f.request(n,t)).then((function(n){return d({type:"data",payload:n}),n})))}catch(n){return r(n)}return o&&o.then?o.then(void 0,r):o}(0,(function(n){return d({type:"errors",payload:n}),n})))}catch(n){return Promise.reject(n)}}),[f,n,d])]}var fi,li={loading:!1,data:void 0,errors:void 0};function hi(n){var t=ci(n,li);return[t[1],t[0]]}var di,vi=Qe(fi||(fi=ke(["\n mutation AuthenticateWithEmailAndPassword(\n $email: String!\n $password: String!\n ) {\n authenticateManagedIdentityWithEmailAndPassword(\n authenticateManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function mi(){var n=hi(vi),t=n[0],e=n[1];return[function(n){try{return Promise.resolve(t(n)).then((function(n){if(!(n instanceof Error)&&n.authenticateManagedIdentityWithEmailAndPassword){var t=n.authenticateManagedIdentityWithEmailAndPassword.token,e=p(t).user;en({jwt:t,id:e.id,accountId:e.accountId,managedIdentity:{email:n.authenticateManagedIdentityWithEmailAndPassword.email,emailVerified:n.authenticateManagedIdentityWithEmailAndPassword.emailVerified,sessionData:n.authenticateManagedIdentityWithEmailAndPassword.sessionData}})}return n}))}catch(n){return Promise.reject(n)}},{loading:e.loading,data:e.data,errors:e.errors}]}var pi,yi=Qe(di||(di=ke(["\n mutation RegisterWithEmailAndPassword(\n $email: String!\n $password: String!\n $formData: RSJsonNode\n $redirectPath: String\n ) {\n registerManagedIdentityWithEmailAndPassword(\n registerManagedIdentityWithEmailAndPasswordInput: {\n email: $email\n password: $password\n formData: $formData\n redirectPath: $redirectPath\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function bi(){var n=hi(yi),t=n[0],e=n[1];return[function(n){try{return Promise.resolve(t(n)).then((function(n){if(!(n instanceof Error)&&n.registerManagedIdentityWithEmailAndPassword){var t=n.registerManagedIdentityWithEmailAndPassword.token,e=p(t).user;en({jwt:t,id:e.id,accountId:e.accountId,managedIdentity:{email:n.registerManagedIdentityWithEmailAndPassword.email,emailVerified:n.registerManagedIdentityWithEmailAndPassword.emailVerified,sessionData:n.registerManagedIdentityWithEmailAndPassword.sessionData}})}return n}))}catch(n){return Promise.reject(n)}},{loading:e.loading,data:e.data,errors:e.errors}]}var wi,Ei=Qe(pi||(pi=ke(["\n mutation RegisterViaRegistrationForm($key: String!, $formData: RSJsonNode!) {\n submitForm(formSubmissionInput: { key: $key, formData: $formData }) {\n results {\n ... on FormHandlerSubmissionResult {\n result\n formHandler {\n namespace\n }\n }\n ... on FormHandlerError {\n errorCode\n error\n errorType\n formHandler {\n name\n endpointUrl\n }\n }\n }\n }\n }\n"])));function gi(){var n=hi(Ei),t=n[0],e=n[1],i=e.loading,r=e.data,o=e.errors,s=c(null),u=s[1];return[function(n){try{return u(null),Promise.resolve(t(n)).then((function(n){var t,e,i,r;if(n instanceof Error)return n;var o=null==(t=n.submitForm)||null==(e=t.results)?void 0:e.find((function(n){var t;return"identity"===(null==n||null==(t=n.formHandler)?void 0:t.namespace)}));if(o&&null!=(i=o.result)&&null!=(r=i.results)&&r.length){var s=o.result.results[0];if(s.success){var a=s.data.token,c=p(a).user;en({jwt:a,id:c.id,accountId:c.accountId,managedIdentity:{email:s.data.email,emailVerified:s.data.emailVerified,sessionData:s.data.sessionData}})}else u(s.message)}return n}))}catch(n){return Promise.reject(n)}},{loading:i,data:r,errors:o,formError:s[0]}]}var Si,Ii=Qe(wi||(wi=ke(["\n mutation ChangePassword($password: String!) {\n changeManagedIdentityPassword(\n changeManagedIdentityPasswordInput: { password: $password }\n ) {\n success\n }\n }\n"])));function Oi(){var n=hi(Ii),t=n[1];return[n[0],{loading:t.loading,data:t.data,errors:t.errors}]}var Ti,Ni=Qe(Si||(Si=ke(["\n mutation ResetPassword($oobCode: String!, $password: String!) {\n resetManagedIdentityPassword(\n resetManagedIdentityPasswordInput: {\n password: $password\n oobCode: $oobCode\n }\n ) {\n token\n email\n emailVerified\n sessionData\n }\n }\n"])));function Fi(){var n=hi(Ni),t=n[0],e=n[1];return[function(n){try{return Promise.resolve(t(n)).then((function(n){if(!(n instanceof Error)&&n.resetManagedIdentityPassword){var t=n.resetManagedIdentityPassword.token,e=p(t).user;en({jwt:t,id:e.id,accountId:e.accountId,managedIdentity:{email:n.resetManagedIdentityPassword.email,emailVerified:n.resetManagedIdentityPassword.emailVerified,sessionData:n.resetManagedIdentityPassword.sessionData}})}return n}))}catch(n){return Promise.reject(n)}},{loading:e.loading,data:e.data,errors:e.errors}]}var Ci=Qe(Ti||(Ti=ke(["\n mutation VerifyPasswordResetCode($oobCode: String!) {\n verifyManagedIdentityPasswordResetCode(\n verifyManagedIdentityPasswordResetCodeInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function Di(){return hi(Ci)}function ji(){var n=Oe();return{refresh:l((function(){n.dispatchEvent(new CustomEvent("sq:refresh",{bubbles:!0,composed:!0,cancelable:!0,detail:{}}))}),[n])}}function Ai(t){var e=t.skip,i=void 0!==e&&e,r=t.update,o=t.variables;s((function(){var n=function(){!i&&r(o,!0)};return document.addEventListener("sq:refresh",n),function(){return document.removeEventListener("sq:refresh",n)}}),function(t){var e=f(t),i=f(0);return g(t,e.current)||(e.current=t,i.current+=1),n((function(){return e.current}),[i.current])}([o,r,i]))}var _i,Pi={loading:!1,data:void 0,errors:void 0},xi=Symbol();function ki(n){var t=ci(n,Pi),e=t[0],i=t[1],r=f(xi);Ai({skip:r.current===xi,update:i,variables:r.current});var o=l((function(n){return r.current=n,i(n)}),[i]);return[i,Pe({},e,{refetch:o})]}var Ri,Vi=Qe(_i||(_i=ke(["\n query ManagedIdentitySession {\n managedIdentitySession {\n email\n emailVerified\n sessionData\n }\n }\n"])));function Mi(){var n=De(),t=ki(Vi),e=t[0],i=t[1],r=i.refetch,o=function(t){t instanceof Error||!t.managedIdentitySession||en(Pe({},n,{managedIdentity:t.managedIdentitySession}))};return[function(){try{return Promise.resolve(e({})).then((function(n){return o(n),n}))}catch(n){return Promise.reject(n)}},{loading:i.loading,data:i.data,errors:i.errors,refetch:function(){try{return Promise.resolve(r()).then((function(n){return o(n),n}))}catch(n){return Promise.reject(n)}}}]}var Ui,qi=Qe(Ri||(Ri=ke(["\n mutation VerifyEmail($oobCode: String!) {\n verifyManagedIdentityEmail(\n verifyManagedIdentityEmailInput: { oobCode: $oobCode }\n ) {\n success\n }\n }\n"])));function $i(){var n=Mi()[0],t=hi(qi),e=t[0],i=t[1];return[function(t){try{return Promise.resolve(e(t)).then((function(t){var e=function(){if(!(t instanceof Error)&&t.verifyManagedIdentityEmail.success)return Promise.resolve(n()).then((function(){}))}();return e&&e.then?e.then((function(){return t})):t}))}catch(t){return Promise.reject(t)}},{loading:i.loading,data:i.data,errors:i.errors}]}var Li,Bi=Qe(Ui||(Ui=ke(["\n mutation RequestPasswordResetEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityPasswordResetEmail(\n requestManagedIdentityPasswordResetEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function Ji(){return hi(Bi)}var Gi,Hi=Qe(Li||(Li=ke(["\n mutation RequestVerificationEmail(\n $email: String!\n $urlParams: RSJsonNode\n $redirectPath: String\n ) {\n requestManagedIdentityVerificationEmail(\n requestManagedIdentityVerificationEmailInput: {\n email: $email\n urlParams: $urlParams\n redirectPath: $redirectPath\n }\n ) {\n success\n }\n }\n"])));function Yi(){return hi(Hi)}var Qi=Qe(Gi||(Gi=ke(["\n mutation authenticateManagedIdentityWithInstantAccess(\n $email: String!\n $firstName: String\n $lastName: String\n $locale: RSLocale\n $countryCode: RSCountryCode\n $cookies: String\n ) {\n authenticateManagedIdentityWithInstantAccess(\n authenticateManagedIdentityWithInstantAccessInput: {\n email: $email\n firstName: $firstName\n lastName: $lastName\n locale: $locale\n countryCode: $countryCode\n cookies: $cookies\n }\n ) {\n email\n emailVerified\n sessionData\n token\n }\n }\n"])));function Wi(){var n=Fe(),t=hi(Qi),e=t[0],i=t[1];return[function(t){try{return Promise.resolve(e(t)).then((function(t){var e=function(){if(!(t instanceof Error)&&t.authenticateManagedIdentityWithInstantAccess)return Promise.resolve(function(n,t){try{return Promise.resolve(function(e,i){try{var r=Promise.resolve(fetch(q()+"/api/v1/"+M()+"/graphql",{method:"POST",headers:{"Content-Type":"application/json",Authorization:"Bearer "+t},body:JSON.stringify({query:"\n query checkReferralFraudStatus($programId: ID) {\n viewer {\n ... on User {\n id\n instantAccessRewards(filter: { programId_eq: $programId }) {\n data {\n id\n pendingReasons\n cancelledReason\n }\n }\n }\n }\n }\n",variables:{programId:n}})})).then((function(n){if(!n.ok)throw new Error("Failed to fetch locale");return Promise.resolve(n.json()).then((function(n){var t;if(n.errors)throw new Error(JSON.stringify(n.errors,null,2));var e=(null==(t=n.data.viewer.instantAccessRewards)?void 0:t.data)||[];return e.some((function(n){return"SUSPECTED_FRAUD"===n.cancelledReason}))?"DENIED":e.some((function(n){var t;return null==(t=n.pendingReasons)?void 0:t.includes("SUSPECTED_FRAUD")}))?"PENDING_REVIEW":"APPROVED"}))}))}catch(n){return i(n)}return r&&r.then?r.then(void 0,i):r}(0,(function(n){console.error(n)})))}catch(n){return Promise.reject(n)}}(n,t.authenticateManagedIdentityWithInstantAccess.token)).then((function(n){if("APPROVED"!==n)throw{name:"fraud_error",message:"Referral flagged as fraud."};var e=t.authenticateManagedIdentityWithInstantAccess.email;en({jwt:t.authenticateManagedIdentityWithInstantAccess.token,id:e,accountId:e})}))}();return e&&e.then?e.then((function(){return t})):t}))}catch(n){return Promise.reject(n)}},{loading:i.loading,data:i.data,errors:i.errors}]}function zi(){return a((function(n){return n+1}),0)}function Xi(n){for(var t,e=Ve(Object.getOwnPropertyNames(n));!(t=e()).done;){var i=n[t.value];i&&"object"==typeof i&&Xi(i)}return Object.freeze(n)}var Ki={loading:!0,data:void 0,errors:void 0};function Zi(n,t,e){var i=ci(n,Ki),r=i[0],o=i[1],s=zi(),u=s[1];return function(n,t){var e=f();e.current&&g(t,e.current.key)||(e.current={key:t,value:n()})}((function(){!e&&o(t)}),[n,t,o,s[0],e]),Ai({skip:e,update:o,variables:t}),Xi(Pe({},r,{refetch:u}))}function nr(){var n=zi()[1];return s((function(){return H.listen((function(){n()}))}),[]),H.location}var tr,er=H;function ir(n,t,e,i,r){var o;void 0===i&&(i={}),void 0===r&&(r=!1);var s=function(n){var t=c({limit:n.limit,offset:n.offset}),e=t[0],i=t[1],r=e.offset,o=e.limit,s=function(n,t){return n*t},u=function(n,t){return Math.ceil(n/t)||0};return{limit:o,setLimit:function(n){var t=u(r,n),o=s(n,t);i(Pe({},e,{limit:n,offset:o}))},offset:r,setCurrentPage:function(n){var t=s(n,o);i((function(n){return Pe({},n,{offset:t})}))},calculatePagination:function(n,t){var e=u(r,o),i=function(n,t){return Math.ceil(n/t)||0}(t,o),s=0===n?"0":n>1?r+1+"-"+(r+n):""+(r+1);return{currentPage:e,pageCount:i,rangeOnPage:s,pageProgress:s+" of "+t}}}}(e),u=s.limit,a=s.setLimit,f=s.setCurrentPage,l=s.calculatePagination,h=Zi(n,Pe({limit:u,offset:s.offset},i),r),d=h.loading,v=h.errors,m=h.refetch,p=t(h.data),y=l((null==p||null==(o=p.data)?void 0:o.length)||0,(null==p?void 0:p.totalCount)||0);return{envelope:p,states:{errors:v,loading:d,limit:u,currentPage:y.currentPage,pageCount:y.pageCount,pageProgress:y.pageProgress},callbacks:{refetch:m,setLimit:a,setCurrentPage:f}}}Ee.gql(tr||(tr=ke(["\n mutation ($eventMeta: UserAnalyticsEvent!) {\n createUserAnalyticsEvent(eventMeta: $eventMeta)\n }\n"])));var rr,or,sr,ur,ar=1e3,cr=6e4,fr=60*cr,lr=24*fr,hr=function(n,t){t=t||{};var e=typeof n;if("string"===e&&n.length>0)return function(n){if(!((n=String(n)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(n);if(t){var e=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*e;case"weeks":case"week":case"w":return 6048e5*e;case"days":case"day":case"d":return e*lr;case"hours":case"hour":case"hrs":case"hr":case"h":return e*fr;case"minutes":case"minute":case"mins":case"min":case"m":return e*cr;case"seconds":case"second":case"secs":case"sec":case"s":return e*ar;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}}(n);if("number"===e&&isFinite(n))return t.long?function(n){var t=Math.abs(n);return t>=lr?dr(n,t,lr,"day"):t>=fr?dr(n,t,fr,"hour"):t>=cr?dr(n,t,cr,"minute"):t>=ar?dr(n,t,ar,"second"):n+" ms"}(n):function(n){var t=Math.abs(n);return t>=lr?Math.round(n/lr)+"d":t>=fr?Math.round(n/fr)+"h":t>=cr?Math.round(n/cr)+"m":t>=ar?Math.round(n/ar)+"s":n+"ms"}(n);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(n))};function dr(n,t,e,i){var r=t>=1.5*e;return Math.round(n/e)+" "+i+(r?"s":"")}(function(n,t){t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+n.exports.humanize(this.diff),!this.useColors)return;const e="color: "+this.color;t.splice(1,0,e,"color: inherit");let i=0,r=0;t[0].replace(/%[a-zA-Z%]/g,(n=>{"%%"!==n&&(i++,"%c"===n&&(r=i))})),t.splice(r,0,e)},t.save=function(n){try{n?t.storage.setItem("debug",n):t.storage.removeItem("debug")}catch(n){}},t.load=function(){let n;try{n=t.storage.getItem("debug")}catch(n){}return!n&&"undefined"!=typeof process&&"env"in process&&(n=process.env.DEBUG),n},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(n){}}(),t.destroy=(()=>{let n=!1;return()=>{n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),n.exports=function(n){function t(n){let i,r=null;function o(...n){if(!o.enabled)return;const e=o,r=Number(new Date);e.diff=r-(i||r),e.prev=i,e.curr=r,i=r,n[0]=t.coerce(n[0]),"string"!=typeof n[0]&&n.unshift("%O");let s=0;n[0]=n[0].replace(/%([a-zA-Z%])/g,((i,r)=>{if("%%"===i)return"%";s++;const o=t.formatters[r];return"function"==typeof o&&(i=o.call(e,n[s]),n.splice(s,1),s--),i})),t.formatArgs.call(e,n),(e.log||t.log).apply(e,n)}return o.namespace=n,o.useColors=t.useColors(),o.color=t.selectColor(n),o.extend=e,o.destroy=t.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null===r?t.enabled(n):r,set:n=>{r=n}}),"function"==typeof t.init&&t.init(o),o}function e(n,e){const i=t(this.namespace+(void 0===e?":":e)+n);return i.log=this.log,i}function i(n){return n.toString().substring(2,n.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(n){return n instanceof Error?n.stack||n.message:n},t.disable=function(){const n=[...t.names.map(i),...t.skips.map(i).map((n=>"-"+n))].join(",");return t.enable(""),n},t.enable=function(n){let e;t.save(n),t.names=[],t.skips=[];const i=("string"==typeof n?n:"").split(/[\s,]+/),r=i.length;for(e=0;e<r;e++)i[e]&&("-"===(n=i[e].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+n.substr(1)+"$")):t.names.push(new RegExp("^"+n+"$")))},t.enabled=function(n){if("*"===n[n.length-1])return!0;let e,i;for(e=0,i=t.skips.length;e<i;e++)if(t.skips[e].test(n))return!1;for(e=0,i=t.names.length;e<i;e++)if(t.names[e].test(n))return!0;return!1},t.humanize=hr,t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(n).forEach((e=>{t[e]=n[e]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(n){let e=0;for(let t=0;t<n.length;t++)e=(e<<5)-e+n.charCodeAt(t),e|=0;return t.colors[Math.abs(e)%t.colors.length]},t.enable(t.load()),t}(t);const{formatters:e}=n.exports;e.j=function(n){try{return JSON.stringify(n)}catch(n){return"[UnexpectedJSONParseError]: "+n.message}}}(rr={exports:{}},rr.exports),rr.exports)("sq:useForm"),Ee.gql(or||(or=ke(["\n query ($key: String!) {\n form(key: $key) {\n schema\n initialData {\n initialData\n isEnabled\n isEnabledErrorMessage\n }\n }\n }\n"]))),Ee.gql(sr||(sr=ke(["\n mutation ($formSubmissionInput: FormSubmissionInput!) {\n submitForm(formSubmissionInput: $formSubmissionInput) {\n success\n results {\n ... on FormHandlerSubmissionResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"]))),Ee.gql(ur||(ur=ke(["\n query ($formValidationInput: FormValidationInput!) {\n validateForm(formValidationInput: $formValidationInput) {\n valid\n results {\n ... on FormHandlerValidationResult {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n result\n }\n ... on FormHandlerError {\n formHandler {\n name\n endpointUrl\n integration {\n name\n }\n }\n errorType\n error\n errorCode\n }\n }\n }\n }\n"])));export{ui as C,hi as F,De as H,Mi as K,Fi as N,Ne as O,mi as S,_e as T,je as U,Oe as V,Fe as W,$i as Y,Ce as _,zi as a,Zi as b,si as c,Ee as d,en as e,l as f,R as g,er as h,V as i,Di as j,un as k,Oi as l,Ot as m,bi as n,Yi as o,ji as p,gi as q,Ji as r,St as s,Wi as u,nr as v,Te as x,ir as y,ki as z}
|