UNPKG

@apideck/react-vault

Version:

<br />

1 lines 350 kB
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),n=e(t),r=require("@apideck/components"),o=e(require("jwt-decode")),a=require("react-i18next"),i=e(require("i18next")),l=require("swr"),s=e(l),u=require("react-dom"),c=require("formik"),d=e(require("markdown-to-jsx")),p=e(require("react-select")),f=require("@apideck/wayfinder"),m=e(require("fuse.js")),g="https://vault.apideck.com/oauth/callback";function h(e,t,n,r,o,a,i){try{var l=e[a](i),s=l.value}catch(e){return void n(e)}l.done?t(s):Promise.resolve(s).then(r,o)}function v(e){return function(){var t=this,n=arguments;return new Promise((function(r,o){var a=e.apply(t,n);function i(e){h(a,r,o,i,l,"next",e)}function l(e){h(a,r,o,i,l,"throw",e)}i(void 0)}))}}function b(){return(b=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function y(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function x(e,t){return e(t={exports:{}},t.exports),t.exports}function w(e){return e&&e.default||e}i.use(a.initReactI18next).init({resources:{en:{translation:{Added:"Added",Available:"Available","Manage your integrations":"Manage your integrations","No integrations found":"No integrations found","No integrations have been added yet":"It looks like the application owner did not yet make any integrations available","No connections":"No connections","Search integrations":"Search integrations","Needs configuration":"Needs configuration","Invalid configuration":"Invalid configuration","Not connected":"Not connected",Disabled:"Disabled",Unauthorized:"Unauthorized","Input required":"Input required",Connected:"Connected",Loading:"Loading","Select..":"Select..",Example:"Example","Select field":"Select field","Select custom field":"Select custom field","Enter a field mapping.":"Enter a field mapping.","Search properties":"Search properties","Search fields":"Search fields","No fields found for mapping.":"No fields found for mapping.","No custom fields found for mapping.":"No custom fields found for mapping.","Search connectors":"Search connectors",Type:"Type","None selected":"None selected","Map a property to":"Map a property to","Mapping removed.":"Mapping removed.","Select a source property from your":"Select a source property from your","data to the":"data to the",field:"field","Map properties from your":"Map properties from your","data to one of the fields below":"data to one of the fields below","Signed in":"Signed in",Save:"Save","Trying to connect...":"Trying to connect...","Connection failed":"Connection failed","Could not connect to {{connectionName}}. Please check your credentials":"Could not connect to {{connectionName}}. Please check your credentials.","Need help? View our":"Need help? View our","Connection Guide":"Connection Guide","Successfully connected to {{connectionName}}":"Successfully connected to {{connectionName}}","Please provide default values for the fields below. These will be applied when creating new {{selectedResource}} through our integration.":"Please provide default values for the fields below. These will be applied when creating new {{selectedResource}} through our integration.","Configure the {{name}} integration in the":"Configure the {{name}} integration in the","before linking your account. This integration will not be visible to your users until configured.":"before linking your account. This integration will not be visible to your users until configured.","Something went wrong":"Something went wrong","The integration could not be authorized. Please make sure your settings are correct and try again.":"The integration could not be authorized. Please make sure your settings are correct and try again.",Authorize:"Authorize","Missing required fields":"Missing required fields","Missing required field mappings.":"Missing required field mappings.","Field Mapping":"Field Mapping","Admin configuration required":"Admin configuration required",enabled:"enabled",disabled:"disabled","settings are updated":"settings are updated","Updating failed":"Updating failed","{{connectionName}} is deleted":"{{connectionName}} is deleted","Configurable Resources":"Configurable Resources","Re-authorize":"Re-authorize",Disable:"Disable",Enable:"Enable",Disconnect:"Disconnect",Delete:"Delete",Close:"Close",Connection:"Connection","Are you sure?":"Are you sure?",Settings:"Settings",Actions:"Actions","Configurable resources":"Configurable resources","Requires authorization":"Requires authorization","Authorization denied":"Authorization denied","Connection disabled":"Connection disabled","Re-authorization required":"Re-authorization required","Deny access?":"Deny access?","If you deny access, you will not be able to use this integration. Are you sure?":"If you deny access, you will not be able to use this integration. Are you sure?","Yes, deny access":"Yes, deny access","Requested Data Access":"Requested Data Access","The application is requesting permission to access the following data.":"The application is requesting permission to access the following data.","New permissions requested":"New permissions requested","The developer has updated the integration and requires additional permissions to keep it working.":"The developer has updated the integration and requires additional permissions to keep it working.","Full Data Access":"Full Data Access","This application is requesting access to all data available through this connection.":"This application is requesting access to all data available through this connection.","By authorizing you agree to grant the application access to the data listed above.":"By authorizing you agree to grant the application access to the data listed above.","{{count}} fields":"{{count}} fields","Updated Permissions Requested":"Updated Permissions Requested","Integration updated with new permissions":"This integration has been updated and requires access to additional data.","Permission required":"Permission required","Permission denied":"Permission denied","Permission revoked":"Permission revoked","New permissions required":"New permissions required"}},nl:{translation:{Added:"Toegevoegd",Available:"Beschikbaar","Manage your integrations":"Beheer je integraties","No integrations found":"Geen integraties gevonden","No integrations have been added yet":"Er zijn nog geen integraties beschikbaar gesteld door de applicatie eigenaar","No connections":"Geen connecties","Search integrations":"Zoek integraties","Needs configuration":"Configuratie nodig","Invalid configuration":"Ongeldige configuratie","Not connected":"Niet verbonden",Disabled:"Uitgeschakeld",Unauthorized:"Ongeautoriseerd","Input required":"Input vereist",Connected:"Verbonden",Loading:"Laden","Select..":"Selecteer..",Example:"Voorbeeld","Select field":"Selecteer field","Select custom field":"Selecteer custom field","Enter a field mapping.":"Voer een mapping in.","Search properties":"Zoek properties","Search fields":"Zoek fields","No fields found for mapping.":"Geen fields gevonden voor mapping.","No custom fields found for mapping.":"Geen custom fields gevonden voor mapping.","Search connectors":"Zoek connectors",Type:"Type","None selected":"Geen geselecteerd","Map a property to":"Map een property naar","Mapping removed.":"Mapping verwijderd.","Select a source property from your":"Selecteer een bron property van je","data to the":"data naar de",field:"field","Map properties from your":"Map properties van je","data to one of the fields below":"data naar een van de onderstaande fields","Signed in":"Ingelogd",Save:"Opslaan","Trying to connect...":"Verbinding maken...","Connection failed":"Verbinding mislukt","Could not connect to {{connectionName}}. Please check your credentials":"Kon geen verbinding maken met {{connectionName}}. Controleer je credentials.","Need help? View our":"Hulp nodig? Bekijk onze","Connection Guide":"Connection Guide","Successfully connected to {{connectionName}}":"Verbonden met {{connectionName}}","Please provide default values for the fields below. These will be applied when creating new {{selectedResource}} through our integration.":'Vul hieronder standaardwaarden in voor de velden. Deze worden toegepast wanneer je nieuwe "{{selectedResource}}" maakt via onze integratie.',"Configure the {{name}} integration in the":"Configureer de {{name}} integratie in het","before linking your account. This integration will not be visible to your users until configured.":"voordat je je account koppelt. Deze integratie is niet zichtbaar voor je gebruikers totdat deze is geconfigureerd.","Something went wrong":"Er is iets misgegaan","The integration could not be authorized. Please make sure your settings are correct and try again.":"De integratie kon niet worden geautoriseerd. Controleer of je instellingen correct zijn en probeer het opnieuw.",Authorize:"Autoriseren","Missing required fields":"Ontbrekende verplichte velden","Missing required field mappings.":"Ontbrekende verplichte veldmappings.","Field Mapping":"Veldmapping","Admin configuration required":"Admin configuratie vereist",enabled:"ingeschakeld",disabled:"uitgeschakeld","settings are updated":"instellingen zijn bijgewerkt","Updating failed":"Bijwerken mislukt","{{connectionName}} is deleted":"{{connectionName}} is verwijderd","Configurable Resources":"Configruabelen Resources","Re-authorize":"Herverbinden",Disable:"Uitschakelen",Enable:"Inschakelen",Disconnect:"Ontkoppelen",Delete:"Verwijderen",Close:"Sluiten",Connection:"Connectie","When you delete a connection you will lose all your configured settings.":"Wanneer je een connectie verwijdert, verlies je al je geconfigureerde instellingen.",Settings:"Instellingen",Actions:"Acties","Configurable resources":"Configruabelen resources","Requires authorization":"Autorisatie vereist","Authorization denied":"Autorisatie geweigerd","Connection disabled":"Verbinding uitgeschakeld","Re-authorization required":"Herautorisatie vereist","Deny access?":"Toegang weigeren?","If you deny access, you will not be able to use this integration. Are you sure?":"Als je de toegang weigert, kun je deze integratie niet gebruiken. Weet je het zeker?","Yes, deny access":"Ja, toegang weigeren","Requested Data Access":"Gevraagde gegevenstoegang","The application is requesting permission to access the following data.":"De applicatie waarmee je verbinding maakt, vraagt toestemming om toegang te krijgen tot de volgende gegevens.","New permissions requested":"Nieuwe machtigingen aangevraagd","The developer has updated the integration and requires additional permissions to keep it working.":"De ontwikkelaar heeft de integratie bijgewerkt en vereist extra machtigingen om deze werkend te houden.","Full Data Access":"Volledige gegevenstoegang","This application is requesting access to all data available through this connection.":"Deze applicatie vraagt toegang tot alle gegevens die beschikbaar zijn via deze verbinding.","By authorizing you agree to grant the application access to the data listed above.":"Door je te autoriseren, ga je ermee akkoord de applicatie toegang te verlenen tot de hierboven vermelde gegevens.","{{count}} fields":"{{count}} velden","Updated Permissions Requested":"Bijgewerkte Toestemmingen Gevraagd","Integration updated with new permissions":'Deze integratie is bijgewerkt en vereist toegang tot extra gegevens. De nieuwe velden zijn gemarkeerd als "Nieuw" voor uw beoordeling.',"Permission required":"Toestemming vereist","Permission denied":"Toestemming geweigerd","Permission revoked":"Toestemming ingetrokken","New permissions required":"Nieuwe toestemmingen vereist"}},fr:{translation:{Added:"Ajouté",Available:"Disponible","Manage your integrations":"Gérer vos intégrations","No integrations found":"Aucune intégration trouvée","No integrations have been added yet":"Il semble que le propriétaire de l'application n'ait pas encore rendu d'intégrations disponibles","No connections":"Aucune connexion","Search integrations":"Rechercher des intégrations","Needs configuration":"Nécessite une configuration","Invalid configuration":"Configuration invalide","Not connected":"Non connecté",Disabled:"Désactivé",Unauthorized:"Non autorisé","Input required":"Saisie requise",Connected:"Connecté",Loading:"Chargement","Select..":"Sélectionner..",Example:"Exemple","Select field":"Sélectionner le champ","Select custom field":"Sélectionner un champ personnalisé","Enter a field mapping.":"Entrez un mappage de champ.","Search properties":"Rechercher des propriétés","Search fields":"Rechercher des champs","No fields found for mapping.":"Aucun champ trouvé pour le mappage.","No custom fields found for mapping.":"Aucun champ personnalisé trouvé pour le mappage.","Search connectors":"Rechercher des connecteurs",Type:"Type","None selected":"Aucun sélectionné","Map a property to":"Mapper une propriété à","Mapping removed.":"Mappage supprimé.","Select a source property from your":"Sélectionnez une propriété source de votre","data to the":"données au",field:"champ","Map properties from your":"Mapper des propriétés de votre","data to one of the fields below":"données vers l'un des champs ci-dessous","Signed in":"Connecté",Save:"Sauvegarder","Trying to connect...":"Tentative de connexion...","Connection failed":"Connexion échouée","Could not connect to {{connectionName}}. Please check your credentials":"Impossible de se connecter à {{connectionName}}. Veuillez vérifier vos identifiants.","Need help? View our":"Besoin d'aide ? Voir notre","Connection Guide":"Guide de Connexion","Successfully connected to {{connectionName}}":"Connecté avec succès à {{connectionName}}","Please provide default values for the fields below. These will be applied when creating new {{selectedResource}} through our integration.":"Veuillez fournir des valeurs par défaut pour les champs ci-dessous. Elles seront appliquées lors de la création de nouveaux {{selectedResource}} via notre intégration.","Configure the {{name}} integration in the":"Configurez l'intégration {{name}} dans le","before linking your account. This integration will not be visible to your users until configured.":"avant de lier votre compte. Cette intégration ne sera pas visible par vos utilisateurs tant qu'elle ne sera pas configurée.","Something went wrong":"Quelque chose a mal tourné","The integration could not be authorized. Please make sure your settings are correct and try again.":"L'intégration n'a pas pu être autorisée. Veuillez vérifier que vos paramètres sont corrects et réessayez.",Authorize:"Autoriser","Missing required fields":"Champs obligatoires manquants","Missing required field mappings.":"Mappages de champs obligatoires manquants.","Field Mapping":"Mappage de champs","Admin configuration required":"Configuration d'admin requise",enabled:"activé",disabled:"désactivé","settings are updated":"les paramètres sont mis à jour","Updating failed":"La mise à jour a échoué","{{connectionName}} is deleted":"{{connectionName}} est supprimé","Configurable Resources":"Ressources configurables","Re-authorize":"Réautoriser",Disable:"Désactiver",Enable:"Activer",Disconnect:"Déconnecter",Delete:"Supprimer",Close:"Fermer",Connection:"Connexion","Are you sure?":"Êtes-vous sûr ?",Settings:"Paramètres",Actions:"Actions","Configurable resources":"Ressources configurables","Requires authorization":"Autorisation requise","Authorization denied":"Autorisation refusée","Connection disabled":"Connexion désactivée","Re-authorization required":"Réautorisation requise","Deny access?":"Refuser l'accès ?","If you deny access, you will not be able to use this integration. Are you sure?":"Si vous refusez l'accès, vous ne pourrez pas utiliser cette intégration. Êtes-vous sûr ?","Yes, deny access":"Oui, refuser l'accès","Requested Data Access":"Accès aux données demandé","The application is requesting permission to access the following data.":"L'application à laquelle vous vous connectez demande l'autorisation d'accéder aux données suivantes.","New permissions requested":"Nouvelles autorisations demandées","The developer has updated the integration and requires additional permissions to keep it working.":"Le développeur a mis à jour l'intégration et nécessite des autorisations supplémentaires pour la maintenir fonctionnelle.","Full Data Access":"Accès complet aux données","This application is requesting access to all data available through this connection.":"Cette application demande l_accès à toutes les données disponibles via cette connexion.","By authorizing you agree to grant the application access to the data listed above.":"En autorisant, vous acceptez de donner à l_application l_accès aux données listées ci-dessus.","{{count}} fields":"{{count}} champs","Updated Permissions Requested":"Autorisations Mises à Jour Requises","Integration updated with new permissions":"Cette intégration a été mise à jour et nécessite l'accès à des données supplémentaires. Les nouveaux champs sont marqués comme « Nouveau » pour votre examen.","Permission required":"Autorisation requise","Permission denied":"Autorisation refusée","Permission revoked":"Autorisation révoquée","New permissions required":"Nouvelles autorisations requises"}},de:{translation:{Added:"Hinzugefügt",Available:"Verfügbar","Manage your integrations":"Ihre Integrationen verwalten","No integrations found":"Keine Integrationen gefunden","No integrations have been added yet":"Es wurden noch keine Integrationen hinzugefügt","No connections":"Keine Verbindungen","Search integrations":"Integrationen suchen","Needs configuration":"Benötigt Konfiguration","Invalid configuration":"Ungültige Konfiguration","Not connected":"Nicht verbunden",Disabled:"Deaktiviert",Unauthorized:"Unautorisiert","Input required":"Eingabe erforderlich",Connected:"Verbunden",Loading:"Laden","Select..":"Auswählen..",Example:"Beispiel","Select field":"Feld auswählen","Select custom field":"Benutzerdefiniertes Feld auswählen","Enter a field mapping.":"Geben Sie eine Feldzuordnung ein.","Search properties":"Eigenschaften suchen","Search fields":"Felder suchen","No fields found for mapping.":"Keine Felder für die Zuordnung gefunden.","No custom fields found for mapping.":"Keine benutzerdefinierten Felder für die Zuordnung gefunden.","Search connectors":"Konnektoren suchen",Type:"Typ","None selected":"Keine ausgewählt","Map a property to":"Eigenschaft zuordnen zu","Mapping removed.":"Zuordnung entfernt.","Select a source property from your":"Wählen Sie eine Quelleigenschaft aus Ihrem","data to the":"Daten zum",field:"Feld","Map properties from your":"Eigenschaften zuordnen von Ihrem","data to one of the fields below":"Daten zu einem der folgenden Felder","Signed in":"Angemeldet",Save:"Speichern","Trying to connect...":"Versuche zu verbinden...","Connection failed":"Verbindung fehlgeschlagen","Could not connect to {{connectionName}}. Please check your credentials":"Verbindung zu {{connectionName}} konnte nicht hergestellt werden. Bitte überprüfen Sie Ihre Anmeldeinformationen","Need help? View our":"Brauchen Sie Hilfe? Sehen Sie sich unser","Connection Guide":"Verbindungsleitfaden","Successfully connected to {{connectionName}}":"Erfolgreich verbunden mit {{connectionName}}","Please provide default values for the fields below. These will be applied when creating new {{selectedResource}} through our integration.":"Bitte geben Sie Standardwerte für die untenstehenden Felder an. Diese werden angewendet, wenn neue {{selectedResource}} über unsere Integration erstellt werden.","Configure the {{name}} integration in the":"Konfigurieren Sie die {{name}}-Integration in der","before linking your account. This integration will not be visible to your users until configured.":"bevor Sie Ihr Konto verknüpfen. Diese Integration ist für Ihre Benutzer nicht sichtbar, bis sie konfiguriert ist.","Something went wrong":"Etwas ist schiefgelaufen","The integration could not be authorized. Please make sure your settings are correct and try again.":"Die Integration konnte nicht autorisiert werden. Bitte stellen Sie sicher, dass Ihre Einstellungen korrekt sind und versuchen Sie es erneut.",Authorize:"Autorisieren","Missing required fields":"Fehlende erforderliche Felder","Missing required field mappings.":"Fehlende erforderliche Feldzuordnungen.","Field Mapping":"Feldzuordnung","Admin configuration required":"Admin-Konfiguration erforderlich",enabled:"aktiviert",disabled:"deaktiviert","settings are updated":"Einstellungen werden aktualisiert","Updating failed":"Aktualisierung fehlgeschlagen","{{connectionName}} is deleted":"{{connectionName}} wurde gelöscht","Configurable Resources":"Konfigurierbare Ressourcen","Re-authorize":"Erneut autorisieren",Disable:"Deaktivieren",Enable:"Aktivieren",Disconnect:"Trennen",Delete:"Löschen",Close:"Schließen",Connection:"Verbindung","Are you sure?":"Sind Sie sicher?",Settings:"Einstellungen",Actions:"Aktionen","Configurable resources":"Konfigurierbare Ressourcen","Requires authorization":"Autorisierung erforderlich","Authorization denied":"Autorisierung verweigert","Connection disabled":"Verbindung deaktiviert","Re-authorization required":"Erneute Autorisierung erforderlich","Deny access?":"Zugriff verweigern?","If you deny access, you will not be able to use this integration. Are you sure?":"Wenn Sie den Zugriff verweigern, können Sie diese Integration nicht verwenden. Sind Sie sicher?","Yes, deny access":"Ja, Zugriff verweigern","Requested Data Access":"Angeforderter Datenzugriff","The application is requesting permission to access the following data.":"Die Anwendung, mit der Sie eine Verbindung herstellen, fordert die Berechtigung zum Zugriff auf die folgenden Daten an.","New permissions requested":"Neue Berechtigungen angefordert","The developer has updated the integration and requires additional permissions to keep it working.":"Der Entwickler hat die Integration aktualisiert und benötigt zusätzliche Berechtigungen, damit sie weiterhin funktioniert.","Full Data Access":"Vollständiger Datenzugriff","This application is requesting access to all data available through this connection.":"Diese Anwendung fordert Zugriff auf alle über diese Verbindung verfügbaren Daten.","By authorizing you agree to grant the application access to the data listed above.":"Wenn Sie sich autorisieren, erteilen Sie der Anwendung die Erlaubnis, auf die oben aufgeführten Daten zuzugreifen.","{{count}} fields":"{{count}} Felder","Updated Permissions Requested":"Aktualisierte Berechtigungen Angefordert","Integration updated with new permissions":"Diese Integration wurde aktualisiert und erfordert Zugriff auf zusätzliche Daten. Die neuen Felder sind zur Überprüfung als „Neu“ gekennzeichnet.","Permission required":"Berechtigung erforderlich","Permission denied":"Berechtigung verweigert","Permission revoked":"Berechtigung widerrufen","New permissions required":"Neue Berechtigungen erforderlich"}},es:{translation:{Added:"Agregado",Available:"Disponible","Manage your integrations":"Gestiona tus integraciones","No integrations found":"No se encontraron integraciones","No integrations have been added yet":"Aún no se han agregado integraciones","No connections":"Sin conexiones","Search integrations":"Buscar integraciones","Needs configuration":"Necesita configuración","Invalid configuration":"Configuración inválida","Not connected":"No conectado",Disabled:"Deshabilitado",Unauthorized:"No autorizado","Input required":"Se requiere entrada",Connected:"Conectado",Loading:"Cargando","Select..":"Seleccionar..",Example:"Ejemplo","Select field":"Seleccionar campo","Select custom field":"Seleccionar campo personalizado","Enter a field mapping.":"Introduce un mapeo de campo.","Search properties":"Buscar propiedades","Search fields":"Buscar campos","No fields found for mapping.":"No se encontraron campos para mapeo.","No custom fields found for mapping.":"No se encontraron campos personalizados para mapeo.","Search connectors":"Buscar conectores",Type:"Tipo","None selected":"Ninguno seleccionado","Map a property to":"Mapear una propiedad a","Mapping removed.":"Mapeo eliminado.","Select a source property from your":"Selecciona una propiedad fuente de tu","data to the":"datos al",field:"campo","Map properties from your":"Mapear propiedades de tu","data to one of the fields below":"datos a uno de los campos a continuación","Signed in":"Registrado",Save:"Guardar","Trying to connect...":"Intentando conectar...","Connection failed":"Conexión fallida","Could not connect to {{connectionName}}. Please check your credentials":"No se pudo conectar a {{connectionName}}. Por favor, verifica tus credenciales","Need help? View our":"¿Necesitas ayuda? Ver nuestro","Connection Guide":"Guía de Conexión","Successfully connected to {{connectionName}}":"Conectado exitosamente a {{connectionName}}","Please provide default values for the fields below. These will be applied when creating new {{selectedResource}} through our integration.":"Por favor, proporciona valores predeterminados para los campos a continuación. Estos se aplicarán al crear nuevos {{selectedResource}} a través de nuestra integración.","Configure the {{name}} integration in the":"Configura la integración {{name}} en el","before linking your account. This integration will not be visible to your users until configured.":"antes de vincular tu cuenta. Esta integración no será visible para tus usuarios hasta que esté configurada.","Something went wrong":"Algo salió mal","The integration could not be authorized. Please make sure your settings are correct and try again.":"La integración no pudo ser autorizada. Por favor, asegúrate de que tus ajustes son correctos y vuelve a intentarlo.",Authorize:"Autorizar","Missing required fields":"Faltan campos requeridos","Missing required field mappings.":"Faltan mapeos de campos requeridos.","Field Mapping":"Mapeo de Campo","Admin configuration required":"Se requiere configuración de administrador",enabled:"habilitado",disabled:"deshabilitado","settings are updated":"los ajustes están actualizados","Updating failed":"Actualización fallida","{{connectionName}} is deleted":"{{connectionName}} ha sido eliminado","Configurable Resources":"Recursos Configurables","Re-authorize":"Reautorizar",Disable:"Deshabilitar",Enable:"Habilitar",Disconnect:"Desconectar",Delete:"Eliminar",Close:"Cerrar",Connection:"Conexión","Are you sure?":"¿Estás seguro?",Settings:"Ajustes",Actions:"Acciones","Configurable resources":"Recursos Configurables","Requires authorization":"Requiere autorización","Authorization denied":"Autorización denegada","Connection disabled":"Conexión deshabilitada","Re-authorization required":"Se requiere reautorización","Deny access?":"¿Denegar acceso?","If you deny access, you will not be able to use this integration. Are you sure?":"Si deniegas el acceso, no podrás utilizar esta integración. ¿Estás seguro?","Yes, deny access":"Sí, denegar acceso","Requested Data Access":"Acceso a datos solicitado","The application is requesting permission to access the following data.":"La aplicación a la que te estás conectando solicita permiso para acceder a los siguientes datos.","New permissions requested":"Nuevos permisos solicitados","The developer has updated the integration and requires additional permissions to keep it working.":"El desarrollador ha actualizado la integración y requiere permisos adicionales para que siga funcionando.","Full Data Access":"Acceso completo a los datos","This application is requesting access to all data available through this connection.":"Esta aplicación solicita acceso a todos los datos disponibles a través de esta conexión.","By authorizing you agree to grant the application access to the data listed above.":"Al autorizar, aceptas conceder a la aplicación acceso a los datos mencionados anteriormente.","{{count}} fields":"{{count}} campos","Updated Permissions Requested":"Permisos Actualizados Solicitados","Integration updated with new permissions":'Esta integración se ha actualizado y requiere acceso a datos adicionales. Los nuevos campos están marcados como "Nuevo" para su revisión.',"Permission required":"Permiso requerido","Permission denied":"Permiso denegado","Permission revoked":"Permiso revocado","New permissions required":"Nuevos permisos requeridos"}}},lng:"en",fallbackLng:"en",interpolation:{escapeValue:!1}});var E,C=x((function(e){var t=function(e){var t=Object.prototype,n=t.hasOwnProperty,r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function l(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=Object.create((t&&t.prototype instanceof d?t:d).prototype),a=new C(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return{value:void 0,done:!0}}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=x(i,n);if(l){if(l===c)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var s=u(e,t,n);if("normal"===s.type){if(r=n.done?"completed":"suspendedYield",s.arg===c)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(r="completed",n.method="throw",n.arg=s.arg)}}}(e,n,a),o}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=s;var c={};function d(){}function p(){}function f(){}var m={};l(m,o,(function(){return this}));var g=Object.getPrototypeOf,h=g&&g(g(k([])));h&&h!==t&&n.call(h,o)&&(m=h);var v=f.prototype=d.prototype=Object.create(m);function b(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function y(e,t){var r;this._invoke=function(o,a){function i(){return new t((function(r,i){!function r(o,a,i,l){var s=u(e[o],e,a);if("throw"!==s.type){var c=s.arg,d=c.value;return d&&"object"==typeof d&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){r("next",e,i,l)}),(function(e){r("throw",e,i,l)})):t.resolve(d).then((function(e){c.value=e,i(c)}),(function(e){return r("throw",e,i,l)}))}l(s.arg)}(o,a,r,i)}))}return r=r?r.then(i,i):i()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return c;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return c}var r=u(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,c;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,c):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,c)}function w(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function C(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(w,this),this.reset(!0)}function k(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,a=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return a.next=a}}return{next:S}}function S(){return{value:void 0,done:!0}}return p.prototype=f,l(v,"constructor",f),l(f,"constructor",p),p.displayName=l(f,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,f):(e.__proto__=f,l(e,i,"GeneratorFunction")),e.prototype=Object.create(v),e},e.awrap=function(e){return{__await:e}},b(y.prototype),l(y.prototype,a,(function(){return this})),e.AsyncIterator=y,e.async=function(t,n,r,o,a){void 0===a&&(a=Promise);var i=new y(s(t,n,r,o),a);return e.isGeneratorFunction(n)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},b(v),l(v,i,"Generator"),l(v,o,(function(){return this})),l(v,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=k,C.prototype={constructor:C,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],i=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var l=n.call(a,"catchLoc"),s=n.call(a,"finallyLoc");if(l&&s){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,c):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),c},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;E(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:k(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=t}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=t:Function("r","regeneratorRuntime = r")(t)}}));!function(e){e.Implicit="implicit",e.Pending="pending",e.Granted="granted",e.Denied="denied",e.Revoked="revoked",e.RequiresReconsent="requires_reconsent"}(E||(E={}));var k=t.createContext({}),S=function(e){var o=e.token,i=e.appId,u=e.consumerId,c=e.isOpen,d=e.unifiedApi,p=e.serviceId,f=e.unifyBaseUrl,m=e.children,g=e.onConnectionChange,h=e.onConnectionDelete,y=e.onClose,x=t.useState(null),w=x[0],S=x[1],N=t.useState([]),_=N[0],O=N[1],M=t.useState(!1),P=M[0],A=M[1],T=l.useSWRConfig().mutate,I=r.useToast().addToast,L=a.useTranslation().t,R=!(null==d||!d.length||null==p||!p.length),D=t.useMemo((function(){return{Authorization:"Bearer "+o,"X-APIDECK-APP-ID":i,"X-APIDECK-CONSUMER-ID":u,"X-APIDECK-AUTH-TYPE":"JWT","Content-Type":"application/json"}}),[o,i,u]),j=function(){var e=v(C.mark((function e(t){var n;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t,{headers:D});case 2:return n=e.sent,e.next=5,n.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=f+"/vault/connections"+(d?"?api="+d:""),z=f+"/vault/connections/"+(null==w?void 0:w.unified_api)+"/"+(null==w?void 0:w.service_id),V=s(F,j,{shouldRetryOnError:!1,revalidateOnFocus:!1}),B=V.data,H=V.error,q=s(w?z:null,j,{shouldRetryOnError:!1}),U=q.data,W=q.error,$=null!=U&&U.data?b({},w,null==U?void 0:U.data):w,G=r.usePrevious($);t.useEffect((function(){R&&S({unified_api:d,service_id:p})}),[R]),t.useEffect((function(){null!=d&&d.length&&null!=p&&p.length&&G&&(null==G||!G.hasOwnProperty("enabled"))&&null!=$&&$.hasOwnProperty("enabled")&&!$.enabled&&J({unifiedApi:d,serviceId:p,values:{enabled:!0},quiet:!0})}),[$]),t.useEffect((function(){if($){var e=$.configurable_resources,t=$.state;(null!=e?e:[]).length>0&&("authorized"===t||"callable"===t)&&!_.length&&!P&&$.enabled&&ae()}}),[$]);var Y=function(){var e=v(C.mark((function e(t,n){var r,o,a,i,l;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,A(!0),r=f+"/vault/connections/"+t.unified_api+"/"+t.service_id+"/consent",e.next=5,fetch(r,{method:"PATCH",headers:D,body:JSON.stringify({granted:!1,resources:n})});case 5:return o=e.sent,e.next=8,o.json();case 8:a=e.sent,o.ok&&a.data?(I({title:L("Consent denied"),description:L("Access to {{name}} was denied.",{name:t.name}),type:"warning"}),S(null),i=b({},t,{consent_state:E.Denied}),l=b({},B,{data:B.data.map((function(e){return e.id===t.id?i:e}))}),T(F,l,{revalidate:!1}),T(z,{data:i},{revalidate:!1})):I({title:L("Updating failed"),description:a.message||"An unexpected error occurred.",type:"error"}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),I({title:L("Updating failed"),description:null==e.t0?void 0:e.t0.message,type:"error"});case 15:return e.prev=15,A(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[0,12,15,18]])})));return function(t,n){return e.apply(this,arguments)}}(),K=function(){var e=v(C.mark((function e(t,n){var r,o,a,i,l;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,A(!0),r=f+"/vault/connections/"+t.unified_api+"/"+t.service_id+"/consent",e.next=5,fetch(r,{method:"PATCH",headers:D,body:JSON.stringify({granted:!1,resources:n})});case 5:if(!(o=e.sent).ok){e.next=15;break}I({title:L("Access revoked"),description:L("Access to {{name}} has been revoked.",{name:t.name}),type:"success"}),S(null),a=b({},t,{consent_state:E.Revoked}),i=b({},B,{data:B.data.map((function(e){return e.id===t.id?a:e}))}),T(F,i,{revalidate:!1}),T(z,{data:a},{revalidate:!1}),e.next=19;break;case 15:return e.next=17,o.json();case 17:l=e.sent,I({title:L("Revocation failed"),description:l.message||"An unexpected error occurred.",type:"error"});case 19:e.next=24;break;case 21:e.prev=21,e.t0=e.catch(0),I({title:L("Revocation failed"),description:null==e.t0?void 0:e.t0.message,type:"error"});case 24:return e.prev=24,A(!1),e.finish(24);case 27:case"end":return e.stop()}}),e,null,[[0,21,24,27]])})));return function(t,n){return e.apply(this,arguments)}}(),Z=function(){var e=v(C.mark((function e(t,n){var r,o,a,i,l;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,A(!0),r=f+"/vault/connections/"+t.unified_api+"/"+t.service_id+"/consent",e.next=5,fetch(r,{method:"PATCH",headers:D,body:JSON.stringify({granted:!0,resources:n})});case 5:return o=e.sent,e.next=8,o.json();case 8:a=e.sent,o.ok&&a.data?(i=b({},t,{consent_state:"granted"}),l=b({},B,{data:B.data.map((function(e){return e.id===t.id?i:e}))}),T(F,l,{revalidate:!1}),T(z,{data:i},{revalidate:!1}),I({title:L("Consent granted"),description:L("You can now authorize the connection."),type:"success"})):I({title:L("Updating failed"),description:a.message||"An unexpected error occurred.",type:"error"}),e.next=15;break;case 12:e.prev=12,e.t0=e.catch(0),I({title:L("Updating failed"),description:null==e.t0?void 0:e.t0.message,type:"error"});case 15:return e.prev=15,A(!1),e.finish(15);case 18:case"end":return e.stop()}}),e,null,[[0,12,15,18]])})));return function(t,n){return e.apply(this,arguments)}}(),J=function(){var e=v(C.mark((function e(t){var n,r,o,a,i,l,s,u,c,d,p,m,h,v;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.unifiedApi,r=t.serviceId,o=t.values,a=t.resource,i=t.quiet,e.prev=1,A(!0),l=f+"/vault/connections/"+n+"/"+r,a&&(l=l+"/"+a+"/config"),e.next=7,fetch(l,{method:"PATCH",headers:D,body:JSON.stringify(o)});case 7:return s=e.sent,e.next=10,s.json();case 10:if(null==(u=e.sent)||!u.data){e.next=24;break}if(R||(d=b({},B,{data:[u.data].concat(null==B||null==(c=B.data)?void 0:c.filter((function(e){return e.id!==u.data.id})))}),T(f+"/vault/connections",d,!1)),p=b({},B,{data:u.data}),T(l,p,!1),S(b({},w,u.data)),!a){e.next=19;break}return e.next=19,ae();case 19:return i||(v=o.hasOwnProperty("enabled")?(null==(m=u.data)?void 0:m.name)+" is "+L(o.enabled?"enabled":"disabled"):(null==(h=u.data)?void 0:h.name)+" "+L("settings are updated"),I({title:v,description:"",type:"success",autoClose:!0})),null==g||g(u.data),e.abrupt("return",u.data);case 24:I({title:L("Updating failed"),description:u.message,type:"error"});case 25:return e.abrupt("return",null);case 28:return e.prev=28,e.t0=e.catch(1),I({title:L("Updating failed"),description:null==e.t0?void 0:e.t0.message,type:"error"}),e.abrupt("return",null);case 32:return e.prev=32,A(!1),e.finish(32);case 35:case"end":return e.stop()}}),e,null,[[1,28,32,35]])})));return function(t){return e.apply(this,arguments)}}(),Q=function(){var e=v(C.mark((function e(t){var n,r,o;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(f+"/vault/connections/"+t.unified_api+"/"+t.service_id,{method:"DELETE",headers:D});case 3:R?(T(f+"/vault/connections/"+t.unified_api+"/"+t.service_id,void 0,!1),y()):(r=b({},t,{enabled:!1,state:"available"}),o=b({},B,{data:[r].concat(null==(n=B.data)?void 0:n.filter((function(e){return e.id!==t.id})))}),T(F,o,!1),null==h||h(r),S(null),I({title:L("{{connectionName}} is deleted",{connectionName:t.name}),type:"success",autoClose:!0})),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),I({title:"Deleting "+t.name+" connection failed",description:null==e.t0?void 0:e.t0.message,type:"error"});case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(t){return e.apply(this,arguments)}}(),X=function(){var e=v(C.mark((function e(t){var n,r;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,fetch(f+"/vault/connections/"+t.unified_api+"/"+t.service_id+"/consent",{headers:D});case 3:return n=e.sent,e.next=6,n.json();case 6:if(r=e.sent,n.ok){e.next=9;break}throw new Error(r.message||"Failed to fetch consent records");case 9:return e.abrupt("return",r.data);case 12:return e.prev=12,e.t0=e.catch(0),I({title:L("Failed to fetch consent records"),description:null==e.t0?void 0:e.t0.message,type:"error"}),e.abrupt("return",[]);case 16:case"end":return e.stop()}}),e,null,[[0,12]])})));return function(t){return e.apply(this,arguments)}}(),ee=function(){var e=v(C.mark((function e(t){var n,r,o;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w){e.next=2;break}return e.abrupt("return");case 2:return e.next=4,fetch(f+"/vault/connections/"+w.unified_api+"/"+w.service_id+"/"+t+"/config",{headers:D});case 4:return r=e.sent,e.next=7,r.json();case 7:if(!(o=e.sent).error){e.next=10;break}return e.abrupt("return",o);case 10:return e.abrupt("return",{resource:t,defaults:null==o||null==(n=o.data)?void 0:n.configuration});case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),te=function(){var e=v(C.mark((function e(t){var n,r,o,a;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,fetch(f+"/vault/connections/"+w.unified_api+"/"+w.service_id+"/"+t+"/custom-mapping",{headers:D});case 5:return r=e.sent,e.next=8,r.json();case 8:if(!(o=e.sent).error){e.next=12;break}return I({title:"Failed to fetch custom mappings",description:(null==o||null==(a=o.error)?void 0:a.message)||(null==o?void 0:o.error),type:"error"}),e.abrupt("return",o);case 12:return e.abrupt("return",{resource:t,defaults:null==o||null==(n=o.data)?void 0:n.configuration});case 15:e.prev=15,e.t0=e.catch(2),console.error(e.t0),I({title:"Failed to fetch custom mappings",description:null==e.t0?void 0:e.t0.message,type:"error"});case 19:case"end":return e.stop()}}),e,null,[[2,15]])})));return function(t){return e.apply(this,arguments)}}(),ne=function(){var e=v(C.mark((function e(t){var n;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w&&t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,fetch(f+"/vault/connections/"+w.unified_api+"/"+w.service_id+"/"+t+"/schema",{headers:D});case 5:return n=e.sent,e.next=8,n.json();case 8:return e.abrupt("return",e.sent);case 11:e.prev=11,e.t0=e.catch(2),console.error(e.t0),I({title:"Failed to fetch schema",description:null==e.t0?void 0:e.t0.message,type:"error"});case 15:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),re=function(){var e=v(C.mark((function e(t){var n;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w&&t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,fetch(f+"/vault/connections/"+w.unified_api+"/"+w.service_id+"/"+t+"/example",{headers:D});case 5:return n=e.sent,e.next=8,n.json();case 8:return e.abrupt("return",e.sent);case 11:e.prev=11,e.t0=e.catch(2),console.error(e.t0),I({title:"Failed to fetch example",description:null==e.t0?void 0:e.t0.message,type:"error"});case 15:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),oe=function(){var e=v(C.mark((function e(t){var n;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(w&&t){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,e.next=5,fetch(f+"/vault/connections/"+w.unified_api+"/"+w.service_id+"/"+t+"/custom-fields",{headers:D});case 5:return n=e.sent,e.next=8,n.json();case 8:return e.abrupt("return",e.sent);case 11:e.prev=11,e.t0=e.catch(2),console.error(e.t0),I({title:"Failed to fetch custom fields",description:null==e.t0?void 0:e.t0.message,type:"error"});case 15:case"end":return e.stop()}}),e,null,[[2,11]])})));return function(t){return e.apply(this,arguments)}}(),ae=function(){var e=v(C.mark((function e(){var t,n,r,o,a,i,l;return C.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=[],null==(n=null==$?void 0:$.configurable_resources)||n.forEach((function(e){t.push(ee(e))})),e.prev=3,A(!0),e.next=7,Promise.all(t);case 7:if(!(o=(r=e.sent).find((function(e){return e.error})))){e.next=14;break}return console.error("Failed to fetch resource config",o),I({title:"Failed to fetch resource config",description:(null==o?void 0:o.message)+" "+(null==o||null==(a=o.detail)||null==(i=a.error)||null==(l=i[0])?void 0:l.message),type:"error",autoClose:!1}),O(r),e.abrupt("return");case 14:O(r),e.next=20;break;case 17:e.prev=17,e.t0=e.catch(3),console.error(e.t0);case 20:return e.prev=20,A(!1),e.finish(20);case 23:case"end":return e.stop()}}),e,null,[[3,17,20,23]])})));return function(){return e.apply(this,arguments)}}();t.useEffect((function(){!w&&null!=_&&_.length&&O([])}),[w]);var ie=t.useMemo((function(){var e;return{connections:null==B||null==(e=B.data)?void 0:e.sort((function(e,t){var n;return null==(n=e.name)?void 0:n.localeCompare(t.name)})),deleteConnection:Q,sessionExpired:401===(null==B?void 0:B.status_code)||401===(null==U?void 0:U.status_code),detailsError:(null==U?void 0:U.message)||W,error:(null==B?void 0:B.message)||(null==H?void 0:H.message),isLoading:!H&&!B,isLoadingDetails:$&&!$.id,isUpdating:P,resources:_,selectedConnection:$,setSelectedConnection:S,singleConnectionMode:R,updateConnection:J,headers:D,token:o,fetchResourceSchema:ne,fetchResourceExample:re,fetchCustomFields:oe,fetchCustomMapping:te,fetcher:j,unifyBaseUrl:f,connectionsUrl:f+"/vault/connections",denyConsent:Y,revokeConsent:K,grantConsent:Z,fetchConsentRecords:X}}),[P,w,B,U,c,_,o,H,W,ne,Y,K,Z,X]);return n.createElement(k.Provider,{value:ie},m)},N=function(){return t.useContext(k)},_=t.createContext({}),O=function(e){return n.createElement(_.Provider,{value:{session:e.session}},e.children)},M=function(){return t.useContext(_)};let P="undefined"!=typeof window?t.useLayoutEffect:t.useEffect;function A(e){let n=t.useRef(e);return P(()=>{n.current=e},[e]),n}function T(){let e=[],t=[],n={enqueue(e){t.push(e)},addEventListener:(e,t,r,o)=>(e.addEventListener(t,r,o),n.add(()=>e.removeEventListener(t,r,o))),requestAnimationFrame(...e){let t=requestAnimationFrame(...e);return n.add(()=>cancelAnimationFrame(t))},nextFrame:(...e)=>n.requestAnimationFrame(()=>n.requestAnimationFrame(...e)),setTimeout(...e){let t=setTimeout(...e);return n.add(()=>clearTimeout(t))},add:t=>(e.push(t),()=>{let n=e.indexOf(t);if(n>=0){let[t]=e.splice(n,1);t()}}),dispose(){for(let t of e.splice(0))t()},async workQueue(){for(let e of t.splice(0))await e()}};return n}function I(){let[e]=t.useState(T);return t.useEffect(()=>()=>e.dispose(),[e]),e}let L=function(e){let t=A(e);return n.useCallback((...e)=>t.current(...e),[t])},R={serverHandoffComplete:!1};function D(){let[e,n]=t.useState(R.serverHandoffComplete);return t.useEffect(()=>{!0!==e&&n(!0)},[e]),t.useEffect(()=>{!1===R.serverHandoffComplete&&(R.serverHandoffComplete=!0)},[]),e}var j;let F=0;function z(){return++F}let V=null!=(j=n.useId)?j:function(){let e=D(),[t,r]=n.useState(e?z:null);return P(()=>{null===t&&r(z())},[t]),null!=t?""+t:void 0};function B(e,t,...n){if(e in t){let r=t[e];return"function"==typeof r?r(...n):r}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(e=>`"${e}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,B),r}fu