@athome-solution/feedjet 3.0.0-rc.1 → 3.0.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/css/feedback.css +1 -1
- package/dist/css/feedbot.css +1 -1
- package/dist/css/integration-test.css +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e={FR:"fr",EN:"en",ES:"es",NL:"nl"},t={fr:{launcher:{label:"Une idée, un souci ?",updates:"{n} mises à jour",updates_one:"1 mise à jour"},form:{tablist:"Type de retour",credit:"Feedjet, s’ouvre dans un nouvel onglet",cancel:"Annuler",close:"Fermer",sending:"Envoi…",required:"(obligatoire)",optional:"(facultatif)",counter:"{n} / {max}",summary:"{n} points à compléter",summary_one:"1 point à compléter",summary_focus:"Le premier champ concerné a reçu le focus.",consent:{label:"J’accepte que mes données servent à améliorer le service.",more:"Quelles données ?",detail:"Votre nom, la page consultée, votre navigateur, votre système, la taille et le zoom de l’écran et votre langue. Elles servent uniquement à analyser votre retour et ne sont jamais partagées.",error:"Cochez cette case pour envoyer."},tech:{label:"Joindre les infos techniques",hint:"Page, navigateur, taille d’écran.",more:"Voir le détail"},capture:{on:"Capture jointe",on_hint:"Page en cours, prise à l’ouverture",off:"Capture non jointe",off_hint:"Activez-la pour nous montrer le problème.",pending:"Capture en cours…",failed:"Capture indisponible, réessayez.",toggle:"Joindre la capture",hide:"Masquer",show:"Afficher"},attachment:{add:"Ajouter un fichier",drop:"ou glissez-le ici",hint:"Image ou PDF · 10 Mo max.",hint_short:"image ou PDF",remove:"Retirer le fichier",too_large:"Le fichier ne doit pas dépasser 10 Mo.",invalid_type:"Ce type de fichier n’est pas accepté. Joignez une image, une vidéo, un PDF, un document bureautique, un texte ou une archive."}},enhancement:{tab:"Idée",title:"Une idée pour améliorer le service ?",subtitle:"Décrivez-la en quelques mots.",field_title:"Votre idée en une phrase",placeholder_title:"Ex. : pouvoir filtrer par date",hint_title:"Une phrase suffit.",field_description:"Dites-nous en plus",placeholder_description:"Quel besoin ? Dans quelle situation ?",error_title:"Résumez votre idée en une phrase.",error_description:"Ajoutez quelques détails.",submit:"Envoyer mon idée",thanks_title:"Merci, votre idée est envoyée !",thanks_text:"Suivez son avancement dans « Mes retours ». Nous vous signalerons chaque changement de statut.",thanks_text_anonymous:"Nous apprécions votre engagement à améliorer notre service."},issue:{tab:"Anomalie",title:"Vous avez repéré un problème ?",subtitle:"Dites-nous ce qui s’est passé.",category:"De quoi s’agit-il ?",categories:{broken:"Ça ne fonctionne pas",display:"Affichage incorrect",slow:"C’est lent",error_message:"Message d’erreur",other:"Autre"},field_title:"Le problème en une phrase",placeholder_title:"Ex. : le bouton Exporter ne répond pas",hint_title:"Une phrase suffit.",field_description:"Que s’est-il passé ?",placeholder_description:"Ce que vous faisiez, ce qui s’est passé, ce que vous attendiez",error_title:"Résumez le problème en une phrase.",error_description:"Décrivez ce qui s’est passé.",submit:"Envoyer le signalement",thanks_title:"Merci, c’est signalé !",thanks_text:"L’équipe va l’analyser. Retrouvez son statut dans « Mes retours ».",thanks_text_anonymous:"L’équipe va l’analyser dans les meilleurs délais."},decision:{tab:"Mes retours",title:"Vos retours",subtitle:"Suivez leur prise en compte.",filter:"Filtrer",all:"Tous · {n}",ideas:"Idées · {n}",issues:"Anomalies · {n}",updates:"{n} mises à jour depuis votre dernière visite",updates_one:"1 mise à jour depuis votre dernière visite",new_status:"Nouveau statut",new_reply:"Nouvelle réponse",reply:"Réponse de l’équipe",more:"Lire la suite",less:"Réduire",sent_on:"Envoyé le {date}",type:{issue:"Anomalie",enhancement:"Idée"},loading:"Chargement de vos retours…",empty_title:"Rien à suivre pour l’instant",empty_text:"Vos idées et signalements apparaîtront ici, avec leur avancement.",empty_filtered:"Aucun retour de ce type pour l’instant.",propose:"Proposer une idée",report:"Signaler un problème",error_title:"Impossible d’afficher vos retours.",error_text:"Vérifiez votre connexion, puis réessayez.",retry:"Réessayer",see:"Voir mes retours",status:{enhancement:{loved:"Coup de cœur",planned:"C’est dans les tuyaux",next_step:"Prochaine étape",to_study:"À étudier",impossible:"Mission impossible",transmitted:"Transmis à la bonne équipe"},issue:{planned:"C’est dans les tuyaux",next_step:"Prochaine étape",not_a_bug:"Comportement normal",impossible:"Mission impossible",transmitted:"Transmis à la bonne équipe",out_of_scope:"Hors périmètre"}}},feedbot:{region:"Enquête de satisfaction",bubble_default:"Un instant pour nous donner votre avis ?",questions:"{n} questions rapides.",questions_one:"1 question rapide.",open:"Donner mon avis",later:"Plus tard",close_bubble:"Fermer l’enquête",progress:"{n} réponses sur {total}",progress_one:"{n} réponse sur {total}",progress_label:"Progression",rating_low:"Décevante",rating_high:"Excellente",rating_value:"{n} / 5 · {label}",rating_labels:{1:"Décevante",2:"Passable",3:"Correcte",4:"Très bien",5:"Excellente"},star_label:"{n} sur 5",rating_error:"Choisissez une note.",choice_error:"Choisissez une réponse.",quality_error:"Écrivez quelques mots.",anonymous:"Répondre anonymement",anonymous_hint:"Votre nom ne sera pas associé à cet avis.",cancel:"Non merci",submit:"Envoyer mon avis",thanks:{title:"Merci pour votre avis !",text:"Il aide l’équipe à choisir les prochaines améliorations."},declined:{title:"C’est noté !",text:"Bonne continuation sur l’application."}},integration:{label:"Test d’intégration {module}",pending:{title:"Vérifions l’intégration de {module}",text:"Un test rapide confirme que votre application communique bien avec Feedjet.",later:"Plus tard",start:"Lancer le test"},checking:{title:"Vérification en cours…",text:"Cela prend quelques secondes.",cancel:"Annuler"},ok:{title:"Intégration validée !",text:"Tout est en place : vos utilisateurs peuvent envoyer leurs retours.",button:"Continuer"},ko:{title:"La connexion n’a pas abouti",text:"Transmettez le diagnostic à votre administrateur.",copy:"Copier le diagnostic",copied:"Diagnostic copié",retry:"Réessayer"},expired:{title:"Abonnement Feedjet expiré",text:"Les retours ne peuvent plus être envoyés. Contactez votre administrateur pour le renouveler.",close:"Fermer"},steps:{project:"Projet reconnu",api:"Connexion à l’API Feedjet",subscription:"Abonnement actif"},state:{ok:" : réussi",run:" : en cours",err:" : échec",wait:" : non vérifié"},details:{project:"Projet introuvable dans Feedjet.",api:"Aucune réponse de l’API.",domain:"Domaine non autorisé pour ce projet.",subscription:"Abonnement arrivé à échéance."}},global:{close:"Fermer",submit_error:"L’envoi n’a pas abouti. Vérifiez votre connexion, puis réessayez.",rate_limited:"Trop d’envois en peu de temps. Réessayez dans quelques minutes."}},en:{launcher:{label:"An idea, an issue?",updates:"{n} updates",updates_one:"1 update"},form:{tablist:"Feedback type",credit:"Feedjet, opens in a new tab",cancel:"Cancel",close:"Close",sending:"Sending…",required:"(required)",optional:"(optional)",counter:"{n} / {max}",summary:"{n} fields to complete",summary_one:"1 field to complete",summary_focus:"The first field concerned has the focus.",consent:{label:"I agree that my data is used to improve the service.",more:"Which data?",detail:"Your name, the page you are on, your browser, your system, screen size and zoom, and your language. They are only used to analyse your feedback and are never shared.",error:"Tick this box to send."},tech:{label:"Attach technical details",hint:"Page, browser, screen size.",more:"See details"},capture:{on:"Screenshot attached",on_hint:"Current page, taken on opening",off:"No screenshot",off_hint:"Turn it on to show us the problem.",pending:"Taking the screenshot…",failed:"Screenshot unavailable, try again.",toggle:"Attach the screenshot",hide:"Hide",show:"Show"},attachment:{add:"Add a file",drop:"or drop it here",hint:"Image or PDF · 10 MB max.",hint_short:"image or PDF",remove:"Remove the file",too_large:"The file must not exceed 10 MB.",invalid_type:"This file type is not accepted. Attach an image, a video, a PDF, an office document, a text or an archive."}},enhancement:{tab:"Idea",title:"An idea to improve the service?",subtitle:"Describe it in a few words.",field_title:"Your idea in one sentence",placeholder_title:"E.g. filter by date",hint_title:"One sentence is enough.",field_description:"Tell us more",placeholder_description:"What do you need? In which situation?",error_title:"Sum up your idea in one sentence.",error_description:"Add a few details.",submit:"Send my idea",thanks_title:"Thanks, your idea is sent!",thanks_text:"Follow its progress in “My feedback”. We will let you know each time its status changes.",thanks_text_anonymous:"We appreciate your commitment to improving our service."},issue:{tab:"Issue",title:"Did you spot a problem?",subtitle:"Tell us what happened.",category:"What is it about?",categories:{broken:"It doesn’t work",display:"Wrong display",slow:"It’s slow",error_message:"Error message",other:"Other"},field_title:"The problem in one sentence",placeholder_title:"E.g. the Export button does nothing",hint_title:"One sentence is enough.",field_description:"What happened?",placeholder_description:"What you were doing, what happened, what you expected",error_title:"Sum up the problem in one sentence.",error_description:"Describe what happened.",submit:"Send the report",thanks_title:"Thanks, it’s reported!",thanks_text:"The team will look into it. Find its status in “My feedback”.",thanks_text_anonymous:"The team will look into it as soon as possible."},decision:{tab:"My feedback",title:"Your feedback",subtitle:"Follow how it is handled.",filter:"Filter",all:"All · {n}",ideas:"Ideas · {n}",issues:"Issues · {n}",updates:"{n} updates since your last visit",updates_one:"1 update since your last visit",new_status:"New status",new_reply:"New reply",reply:"Team reply",more:"Read more",less:"Show less",sent_on:"Sent on {date}",type:{issue:"Issue",enhancement:"Idea"},loading:"Loading your feedback…",empty_title:"Nothing to follow yet",empty_text:"Your ideas and reports will show up here, with their progress.",empty_filtered:"No feedback of this type yet.",propose:"Suggest an idea",report:"Report a problem",error_title:"Your feedback could not be displayed.",error_text:"Check your connection, then try again.",retry:"Try again",see:"See my feedback",status:{enhancement:{loved:"Favourite",planned:"In the pipeline",next_step:"Next step",to_study:"Under review",impossible:"Mission impossible",transmitted:"Sent to the right team"},issue:{planned:"In the pipeline",next_step:"Next step",not_a_bug:"Expected behaviour",impossible:"Mission impossible",transmitted:"Sent to the right team",out_of_scope:"Out of scope"}}},feedbot:{region:"Satisfaction survey",bubble_default:"A moment to share your opinion?",questions:"{n} quick questions.",questions_one:"1 quick question.",open:"Give my opinion",later:"Later",close_bubble:"Close the survey",progress:"{n} answers out of {total}",progress_one:"{n} answer out of {total}",progress_label:"Progress",rating_low:"Disappointing",rating_high:"Excellent",rating_value:"{n} / 5 · {label}",rating_labels:{1:"Disappointing",2:"Fair",3:"Good",4:"Very good",5:"Excellent"},star_label:"{n} out of 5",rating_error:"Choose a rating.",choice_error:"Choose an answer.",quality_error:"Write a few words.",anonymous:"Answer anonymously",anonymous_hint:"Your name will not be linked to this answer.",cancel:"No thanks",submit:"Send my opinion",thanks:{title:"Thanks for your opinion!",text:"It helps the team choose the next improvements."},declined:{title:"Noted!",text:"Enjoy the application."}},integration:{label:"{module} integration test",pending:{title:"Let’s check the {module} integration",text:"A quick test confirms that your application talks to Feedjet.",later:"Later",start:"Run the test"},checking:{title:"Checking…",text:"This takes a few seconds.",cancel:"Cancel"},ok:{title:"Integration validated!",text:"All set: your users can send their feedback.",button:"Continue"},ko:{title:"The connection failed",text:"Send the diagnostic to your administrator.",copy:"Copy the diagnostic",copied:"Diagnostic copied",retry:"Try again"},expired:{title:"Feedjet subscription expired",text:"Feedback can no longer be sent. Ask your administrator to renew it.",close:"Close"},steps:{project:"Project recognised",api:"Connection to the Feedjet API",subscription:"Active subscription"},state:{ok:": passed",run:": running",err:": failed",wait:": not checked"},details:{project:"Project not found in Feedjet.",api:"No answer from the API.",domain:"Domain not allowed for this project.",subscription:"Subscription has ended."}},global:{close:"Close",submit_error:"Sending failed. Check your connection, then try again.",rate_limited:"Too many submissions in a short time. Try again in a few minutes."}},es:{launcher:{label:"¿Una idea, un problema?",updates:"{n} novedades",updates_one:"1 novedad"},form:{tablist:"Tipo de comentario",credit:"Feedjet, se abre en una pestaña nueva",cancel:"Cancelar",close:"Cerrar",sending:"Enviando…",required:"(obligatorio)",optional:"(opcional)",counter:"{n} / {max}",summary:"{n} campos por completar",summary_one:"1 campo por completar",summary_focus:"El primer campo afectado tiene el foco.",consent:{label:"Acepto que mis datos se usen para mejorar el servicio.",more:"¿Qué datos?",detail:"Tu nombre, la página consultada, tu navegador, tu sistema, el tamaño y el zoom de la pantalla y tu idioma. Solo sirven para analizar tu comentario y nunca se comparten.",error:"Marca esta casilla para enviar."},tech:{label:"Adjuntar la información técnica",hint:"Página, navegador, tamaño de pantalla.",more:"Ver el detalle"},capture:{on:"Captura adjunta",on_hint:"Página actual, tomada al abrir",off:"Captura no adjunta",off_hint:"Actívala para mostrarnos el problema.",pending:"Tomando la captura…",failed:"Captura no disponible, inténtalo de nuevo.",toggle:"Adjuntar la captura",hide:"Ocultar",show:"Mostrar"},attachment:{add:"Añadir un archivo",drop:"o arrástralo aquí",hint:"Imagen o PDF · 10 MB máx.",hint_short:"imagen o PDF",remove:"Quitar el archivo",too_large:"El archivo no debe superar 10 MB.",invalid_type:"Este tipo de archivo no se acepta. Adjunta una imagen, un vídeo, un PDF, un documento ofimático, un texto o un archivo comprimido."}},enhancement:{tab:"Idea",title:"¿Una idea para mejorar el servicio?",subtitle:"Descríbela en pocas palabras.",field_title:"Tu idea en una frase",placeholder_title:"Ej.: poder filtrar por fecha",hint_title:"Basta con una frase.",field_description:"Cuéntanos más",placeholder_description:"¿Qué necesitas? ¿En qué situación?",error_title:"Resume tu idea en una frase.",error_description:"Añade algunos detalles.",submit:"Enviar mi idea",thanks_title:"¡Gracias, tu idea se ha enviado!",thanks_text:"Sigue su avance en «Mis comentarios». Te avisaremos de cada cambio de estado.",thanks_text_anonymous:"Agradecemos tu compromiso para mejorar nuestro servicio."},issue:{tab:"Incidencia",title:"¿Has detectado un problema?",subtitle:"Cuéntanos qué ha pasado.",category:"¿De qué se trata?",categories:{broken:"No funciona",display:"Visualización incorrecta",slow:"Va lento",error_message:"Mensaje de error",other:"Otro"},field_title:"El problema en una frase",placeholder_title:"Ej.: el botón Exportar no responde",hint_title:"Basta con una frase.",field_description:"¿Qué ha pasado?",placeholder_description:"Lo que hacías, lo que ha pasado, lo que esperabas",error_title:"Resume el problema en una frase.",error_description:"Describe lo que ha pasado.",submit:"Enviar la incidencia",thanks_title:"¡Gracias, queda registrada!",thanks_text:"El equipo la analizará. Consulta su estado en «Mis comentarios».",thanks_text_anonymous:"El equipo la analizará lo antes posible."},decision:{tab:"Mis comentarios",title:"Tus comentarios",subtitle:"Sigue cómo se tienen en cuenta.",filter:"Filtrar",all:"Todos · {n}",ideas:"Ideas · {n}",issues:"Incidencias · {n}",updates:"{n} novedades desde tu última visita",updates_one:"1 novedad desde tu última visita",new_status:"Nuevo estado",new_reply:"Nueva respuesta",reply:"Respuesta del equipo",more:"Leer más",less:"Mostrar menos",sent_on:"Enviado el {date}",type:{issue:"Incidencia",enhancement:"Idea"},loading:"Cargando tus comentarios…",empty_title:"Nada que seguir por ahora",empty_text:"Tus ideas e incidencias aparecerán aquí, con su avance.",empty_filtered:"Todavía no hay comentarios de este tipo.",propose:"Proponer una idea",report:"Señalar un problema",error_title:"No se pueden mostrar tus comentarios.",error_text:"Comprueba tu conexión e inténtalo de nuevo.",retry:"Reintentar",see:"Ver mis comentarios",status:{enhancement:{loved:"Favorito",planned:"Está en marcha",next_step:"Próximo paso",to_study:"En estudio",impossible:"Misión imposible",transmitted:"Enviado al equipo adecuado"},issue:{planned:"Está en marcha",next_step:"Próximo paso",not_a_bug:"Comportamiento normal",impossible:"Misión imposible",transmitted:"Enviado al equipo adecuado",out_of_scope:"Fuera de alcance"}}},feedbot:{region:"Encuesta de satisfacción",bubble_default:"¿Un momento para darnos tu opinión?",questions:"{n} preguntas rápidas.",questions_one:"1 pregunta rápida.",open:"Dar mi opinión",later:"Más tarde",close_bubble:"Cerrar la encuesta",progress:"{n} respuestas de {total}",progress_one:"{n} respuesta de {total}",progress_label:"Progreso",rating_low:"Decepcionante",rating_high:"Excelente",rating_value:"{n} / 5 · {label}",rating_labels:{1:"Decepcionante",2:"Regular",3:"Correcta",4:"Muy buena",5:"Excelente"},star_label:"{n} de 5",rating_error:"Elige una nota.",choice_error:"Elige una respuesta.",quality_error:"Escribe unas palabras.",anonymous:"Responder de forma anónima",anonymous_hint:"Tu nombre no se asociará a esta opinión.",cancel:"No, gracias",submit:"Enviar mi opinión",thanks:{title:"¡Gracias por tu opinión!",text:"Ayuda al equipo a elegir las próximas mejoras."},declined:{title:"¡Entendido!",text:"Sigue disfrutando de la aplicación."}},integration:{label:"Prueba de integración de {module}",pending:{title:"Comprobemos la integración de {module}",text:"Una prueba rápida confirma que tu aplicación se comunica con Feedjet.",later:"Más tarde",start:"Iniciar la prueba"},checking:{title:"Comprobando…",text:"Tarda unos segundos.",cancel:"Cancelar"},ok:{title:"¡Integración validada!",text:"Todo listo: tus usuarios pueden enviar sus comentarios.",button:"Continuar"},ko:{title:"La conexión ha fallado",text:"Envía el diagnóstico a tu administrador.",copy:"Copiar el diagnóstico",copied:"Diagnóstico copiado",retry:"Reintentar"},expired:{title:"Suscripción a Feedjet caducada",text:"Ya no se pueden enviar comentarios. Pide a tu administrador que la renueve.",close:"Cerrar"},steps:{project:"Proyecto reconocido",api:"Conexión con la API de Feedjet",subscription:"Suscripción activa"},state:{ok:": correcto",run:": en curso",err:": fallido",wait:": sin comprobar"},details:{project:"Proyecto no encontrado en Feedjet.",api:"La API no responde.",domain:"Dominio no autorizado para este proyecto.",subscription:"La suscripción ha vencido."}},global:{close:"Cerrar",submit_error:"El envío ha fallado. Comprueba tu conexión e inténtalo de nuevo.",rate_limited:"Demasiados envíos en poco tiempo. Inténtalo de nuevo en unos minutos."}},nl:{launcher:{label:"Een idee, een probleem?",updates:"{n} updates",updates_one:"1 update"},form:{tablist:"Soort feedback",credit:"Feedjet, opent in een nieuw tabblad",cancel:"Annuleren",close:"Sluiten",sending:"Verzenden…",required:"(verplicht)",optional:"(optioneel)",counter:"{n} / {max}",summary:"{n} punten in te vullen",summary_one:"1 punt in te vullen",summary_focus:"Het eerste betrokken veld heeft de focus.",consent:{label:"Ik ga ermee akkoord dat mijn gegevens worden gebruikt om de dienst te verbeteren.",more:"Welke gegevens?",detail:"Uw naam, de bezochte pagina, uw browser, uw systeem, schermgrootte en zoom en uw taal. Ze dienen alleen om uw feedback te analyseren en worden nooit gedeeld.",error:"Vink dit vakje aan om te verzenden."},tech:{label:"Technische gegevens bijvoegen",hint:"Pagina, browser, schermgrootte.",more:"Details bekijken"},capture:{on:"Schermafbeelding bijgevoegd",on_hint:"Huidige pagina, genomen bij het openen",off:"Geen schermafbeelding",off_hint:"Zet hem aan om ons het probleem te tonen.",pending:"Schermafbeelding maken…",failed:"Schermafbeelding niet beschikbaar, probeer opnieuw.",toggle:"Schermafbeelding bijvoegen",hide:"Verbergen",show:"Tonen"},attachment:{add:"Bestand toevoegen",drop:"of sleep het hierheen",hint:"Afbeelding of pdf · max. 10 MB",hint_short:"afbeelding of pdf",remove:"Bestand verwijderen",too_large:"Het bestand mag niet groter zijn dan 10 MB.",invalid_type:"Dit bestandstype wordt niet geaccepteerd. Voeg een afbeelding, video, pdf, kantoordocument, tekst of archief toe."}},enhancement:{tab:"Idee",title:"Een idee om de dienst te verbeteren?",subtitle:"Beschrijf het in een paar woorden.",field_title:"Uw idee in één zin",placeholder_title:"Bijv.: filteren op datum",hint_title:"Eén zin volstaat.",field_description:"Vertel ons meer",placeholder_description:"Welke behoefte? In welke situatie?",error_title:"Vat uw idee samen in één zin.",error_description:"Voeg wat details toe.",submit:"Mijn idee verzenden",thanks_title:"Bedankt, uw idee is verzonden!",thanks_text:"Volg de voortgang in “Mijn feedback”. We laten u elke statuswijziging weten.",thanks_text_anonymous:"We waarderen uw inzet om onze dienst te verbeteren."},issue:{tab:"Probleem",title:"Een probleem opgemerkt?",subtitle:"Vertel ons wat er gebeurde.",category:"Waar gaat het over?",categories:{broken:"Het werkt niet",display:"Verkeerde weergave",slow:"Het is traag",error_message:"Foutmelding",other:"Anders"},field_title:"Het probleem in één zin",placeholder_title:"Bijv.: de knop Exporteren reageert niet",hint_title:"Eén zin volstaat.",field_description:"Wat is er gebeurd?",placeholder_description:"Wat u deed, wat er gebeurde, wat u verwachtte",error_title:"Vat het probleem samen in één zin.",error_description:"Beschrijf wat er gebeurde.",submit:"Melding verzenden",thanks_title:"Bedankt, het is gemeld!",thanks_text:"Het team gaat het analyseren. Bekijk de status in “Mijn feedback”.",thanks_text_anonymous:"Het team analyseert het zo snel mogelijk."},decision:{tab:"Mijn feedback",title:"Uw feedback",subtitle:"Volg hoe ermee wordt omgegaan.",filter:"Filteren",all:"Alle · {n}",ideas:"Ideeën · {n}",issues:"Problemen · {n}",updates:"{n} updates sinds uw laatste bezoek",updates_one:"1 update sinds uw laatste bezoek",new_status:"Nieuwe status",new_reply:"Nieuw antwoord",reply:"Antwoord van het team",more:"Lees meer",less:"Minder tonen",sent_on:"Verzonden op {date}",type:{issue:"Probleem",enhancement:"Idee"},loading:"Uw feedback laden…",empty_title:"Nog niets te volgen",empty_text:"Uw ideeën en meldingen verschijnen hier, met hun voortgang.",empty_filtered:"Nog geen feedback van dit type.",propose:"Een idee voorstellen",report:"Een probleem melden",error_title:"Uw feedback kan niet worden getoond.",error_text:"Controleer uw verbinding en probeer het opnieuw.",retry:"Opnieuw proberen",see:"Mijn feedback bekijken",status:{enhancement:{loved:"Favoriet",planned:"Staat op de planning",next_step:"Volgende stap",to_study:"In onderzoek",impossible:"Mission impossible",transmitted:"Doorgestuurd naar het juiste team"},issue:{planned:"Staat op de planning",next_step:"Volgende stap",not_a_bug:"Normaal gedrag",impossible:"Mission impossible",transmitted:"Doorgestuurd naar het juiste team",out_of_scope:"Buiten bereik"}}},feedbot:{region:"Tevredenheidsenquête",bubble_default:"Even tijd om uw mening te geven?",questions:"{n} korte vragen.",questions_one:"1 korte vraag.",open:"Mijn mening geven",later:"Later",close_bubble:"Enquête sluiten",progress:"{n} antwoorden van {total}",progress_one:"{n} antwoord van {total}",progress_label:"Voortgang",rating_low:"Teleurstellend",rating_high:"Uitstekend",rating_value:"{n} / 5 · {label}",rating_labels:{1:"Teleurstellend",2:"Matig",3:"Redelijk",4:"Zeer goed",5:"Uitstekend"},star_label:"{n} van 5",rating_error:"Kies een score.",choice_error:"Kies een antwoord.",quality_error:"Schrijf een paar woorden.",anonymous:"Anoniem antwoorden",anonymous_hint:"Uw naam wordt niet aan deze mening gekoppeld.",cancel:"Nee, bedankt",submit:"Mijn mening verzenden",thanks:{title:"Bedankt voor uw mening!",text:"Ze helpt het team de volgende verbeteringen te kiezen."},declined:{title:"Genoteerd!",text:"Veel plezier met de applicatie."}},integration:{label:"Integratietest {module}",pending:{title:"We controleren de integratie van {module}",text:"Een snelle test bevestigt dat uw applicatie met Feedjet communiceert.",later:"Later",start:"Test starten"},checking:{title:"Bezig met controleren…",text:"Dit duurt een paar seconden.",cancel:"Annuleren"},ok:{title:"Integratie gevalideerd!",text:"Alles staat klaar: uw gebruikers kunnen hun feedback verzenden.",button:"Doorgaan"},ko:{title:"De verbinding is mislukt",text:"Stuur de diagnose naar uw beheerder.",copy:"Diagnose kopiëren",copied:"Diagnose gekopieerd",retry:"Opnieuw proberen"},expired:{title:"Feedjet-abonnement verlopen",text:"Er kan geen feedback meer worden verzonden. Vraag uw beheerder het te verlengen.",close:"Sluiten"},steps:{project:"Project herkend",api:"Verbinding met de Feedjet-API",subscription:"Actief abonnement"},state:{ok:": geslaagd",run:": bezig",err:": mislukt",wait:": niet gecontroleerd"},details:{project:"Project niet gevonden in Feedjet.",api:"Geen antwoord van de API.",domain:"Domein niet toegestaan voor dit project.",subscription:"Abonnement is verlopen."}},global:{close:"Sluiten",submit_error:"Verzenden is mislukt. Controleer uw verbinding en probeer het opnieuw.",rate_limited:"Te veel verzendingen in korte tijd. Probeer het over een paar minuten opnieuw."}}},i=Object.values(e);class n{constructor(t=e.FR){i.includes(t),this.locale=i.includes(t)?t:e.FR}t(e){let i=t[this.locale];for(const t of e.split("."))i="object"==typeof i?i[t]:void 0;return"string"==typeof i?i:e}tf(e,t){return Object.entries(t).reduce((e,[t,i])=>e.replace(new RegExp(`\\{${t}\\}`,"g"),String(i)),this.t(e))}tp(t,i,n={}){const a=1===i||0===i&&this.locale===e.FR;return this.tf(a?`${t}_one`:t,Object.assign({n:i},n))}shortDate(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(this.locale,{day:"2-digit",month:"2-digit"}).format(t)}}const a={close:'<path d="M6 6l12 12M18 6L6 18"/>',chat:'<path d="M4 5h16v11H9l-5 4z"/>',idea:'<path d="M9 18h6M10 21h4"/><path d="M12 3a6 6 0 0 0-3.6 10.8c.6.5 1 1.2 1 2V16h5.2v-.2c0-.8.4-1.5 1-2A6 6 0 0 0 12 3z"/>',bug:'<rect x="7" y="8" width="10" height="12" rx="5"/><path d="M12 8v12M9 5l1.5 2M15 5l-1.5 2M4 13h3M17 13h3M5 18l2.5-1.5M19 18l-2.5-1.5M5 8l2.5 1.5M19 8l-2.5 1.5"/>',list:'<path d="M8 6h12M8 12h12M8 18h12"/><circle cx="4" cy="6" r="1"/><circle cx="4" cy="12" r="1"/><circle cx="4" cy="18" r="1"/>',upload:'<path d="M12 16V4M7 9l5-5 5 5M5 20h14"/>',clip:'<path d="M20 11.5l-8.2 8.2a5 5 0 0 1-7-7L13 4.5a3.3 3.3 0 0 1 4.7 4.7l-8.2 8.2a1.7 1.7 0 0 1-2.4-2.4l7.6-7.6"/>',alert:'<circle cx="12" cy="12" r="9"/><path d="M12 7.5v5.5M12 16.5h.01"/>',spinner:'<path d="M12 3a9 9 0 1 0 9 9"/>',camera:'<path d="M4 8h3l2-3h6l2 3h3v11H4z"/><circle cx="12" cy="13" r="3.5"/>',retry:'<path d="M20 12a8 8 0 1 1-2.3-5.6M20 4v5h-5"/>',ok:'<circle cx="12" cy="12" r="9"/><path d="M8 12.5l3 3 5-6"/>',info:'<circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/>',copy:'<rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3"/>',heart:'<path d="M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.4 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10z"/>',flag:'<path d="M5 21V4M5 4h11l-2 4 2 4H5"/>',pipe:'<path d="M3 12h6a3 3 0 0 0 3-3V4M21 12h-6a3 3 0 0 0-3 3v5"/>',team:'<circle cx="9" cy="8" r="3"/><path d="M3 20a6 6 0 0 1 12 0"/><path d="M16 5a3 3 0 0 1 0 6M18 20a6 6 0 0 0-3-5.2"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="M20 20l-4.3-4.3"/>',ban:'<circle cx="12" cy="12" r="9"/><path d="M5.6 5.6l12.8 12.8"/>',star:'<path d="M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.9l-5.2 2.7 1-5.8L3.5 9.7l5.9-.9z"/>'};function s(e,t=18,{stroke:i=1.8,fill:n=!1,className:s=""}={}){return`<svg${s?` class="${s}"`:""} width="${t}" height="${t}" viewBox="0 0 24 24" fill="${n?"currentColor":"none"}" stroke="currentColor" stroke-width="${i}" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${a[e]}</svg>`}function o(e=18){return s("spinner",e,{stroke:2.2,className:"fj-spin"})}const r={welcome:"#4966D8",idea:"#F2B33D",alert:"#EE7B3A",thinking:"#8FA3F5",happy:"#4966D8",bravo:"#36A86A",hello:"#4966D8",sorry:"#9AA3B8"},l='<path d="M21 37q4-5 8 0M35 37q4-5 8 0" stroke="#9EC0FF" stroke-width="3" fill="none" stroke-linecap="round"/>',d={welcome:'<ellipse cx="25" cy="36" rx="3.4" ry="4.2" fill="#9EC0FF"/><ellipse cx="39" cy="36" rx="3.4" ry="4.2" fill="#9EC0FF"/>',idea:'<path d="M21.5 35.5q3.5-5 7 0M35.5 35.5q3.5-5 7 0" stroke="#9EC0FF" stroke-width="3" fill="none" stroke-linecap="round"/><path d="M28.5 40.5q3.5 3 7 0" stroke="#9EC0FF" stroke-width="2.2" fill="none" stroke-linecap="round"/><ellipse cx="19.5" cy="40" rx="2.6" ry="1.6" fill="#FF9DB5" opacity=".55"/><ellipse cx="44.5" cy="40" rx="2.6" ry="1.6" fill="#FF9DB5" opacity=".55"/>',alert:'<path d="M20.5 32.5l7-2.5M36.5 30l7 2.5" stroke="#9EC0FF" stroke-width="2" stroke-linecap="round"/><ellipse cx="25" cy="36.5" rx="3" ry="3.4" fill="#9EC0FF"/><ellipse cx="39" cy="36.5" rx="3" ry="3.4" fill="#9EC0FF"/><path d="M29 43q3-2.4 6 0" stroke="#9EC0FF" stroke-width="2.2" fill="none" stroke-linecap="round"/>',thinking:'<path d="M21 37h7M36 35h7" stroke="#9EC0FF" stroke-width="3" stroke-linecap="round"/>',happy:l,bravo:l,hello:l,sorry:'<path d="M21 36q4 4 8 0M35 36q4 4 8 0" stroke="#9EC0FF" stroke-width="3" fill="none" stroke-linecap="round"/>'},c=new Set(["idea","happy","bravo","hello"]);function u(e,t){const i=r[e];return`<svg class="fj-mascot" data-mood="${e}" width="${t}" height="${t}" viewBox="0 0 64 64" aria-hidden="true">${c.has(e)?`<g class="fj-m-rays" stroke="${i}" stroke-width="2" stroke-linecap="round"><path d="M24 8l-3-3"/><path d="M32 3V0"/><path d="M40 8l3-3"/></g>`:""}<g class="fj-m-body"><g class="fj-m-antenna"><path d="M32 18v-7" stroke="#C3CBE0" stroke-width="2.5"/><circle class="fj-m-light" cx="32" cy="9" r="4.5" fill="${i}"/></g><rect x="7" y="31" width="5" height="12" rx="2.5" fill="#C3CBE0"/><rect x="52" y="31" width="5" height="12" rx="2.5" fill="#C3CBE0"/>${"hello"===e?'<path class="fj-m-arm" d="M54 40q6-6 4-14" stroke="#C3CBE0" stroke-width="5" stroke-linecap="round" fill="none"/>':""}<rect x="10" y="18" width="44" height="40" rx="16" fill="#FFFFFF" stroke="#C3CBE0" stroke-width="2"/><rect x="15" y="26" width="34" height="21" rx="10" fill="#1A2152"/><g class="fj-m-eyes">${d[e]}</g><path d="M28 52h8" stroke="#C3CBE0" stroke-width="2.5" stroke-linecap="round"/></g></svg>`}const p="linear(0, 0.052, 0.17, 0.317, 0.466, 0.6, 0.716, 0.811, 0.883, 0.936, 0.972, 0.996, 1.011, 1.018, 1.02, 1.02, 1.018, 1.015, 1.012, 1.009, 1.007, 1.004, 1.003, 1.002, 1)";function h(){return"function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches}function f(e,t){const i=e.getBoundingClientRect().height;if(t(),h()||!i||"function"!=typeof e.animate)return;const n=e.getBoundingClientRect().height;if(Math.abs(i-n)<2)return;const a=e.querySelector(".fj-body");a&&a.scrollHeight<=a.clientHeight&&e.classList.add("fj-morphing");const s=e.animate([{height:`${i}px`},{height:`${n}px`}],{duration:340,easing:"undefined"!=typeof CSS&&(null===(o=CSS.supports)||void 0===o?void 0:o.call(CSS,"animation-timing-function",p))?p:"cubic-bezier(0.2, 0.8, 0.2, 1)"});var o;const r=()=>e.classList.remove("fj-morphing");s.onfinish=r,s.oncancel=r}function b(e){const t=e.firstElementChild;if(h()||!t||"function"!=typeof t.animate)return void e.remove();const i=t.animate([{opacity:1,transform:"none"},{opacity:0,transform:"translateY(8px) scale(0.98)"}],{duration:140,easing:"ease-in",fill:"forwards"});i.onfinish=()=>e.remove(),i.oncancel=()=>e.remove()}var m=':host{all:initial}.fj{color-scheme:light;--bg: #ffffff;--bg2: #f4f6fb;--bg3: #e9edf8;--text: #161b2e;--muted: #4f586e;--border: #dce1ec;--field: #7a849a;--accent: #4966d8;--accent-h: #3a55c4;--on-accent: #ffffff;--accent-text: #3c55c2;--accent-soft: #edf0fd;--focus: #4966d8;--error: #c0262d;--error-soft: #fdeded;--success: #1d6e3f;--success-soft: #e4f4ea;--warn: #8a5200;--warn-soft: #fdf1de;--s-coeur: #a3245a;--s-coeur-bg: #fce8f0;--s-etape: #0d6767;--s-etape-bg: #e1f3f2;--s-tuyaux: #5a3bc2;--s-tuyaux-bg: #eee9fc;--s-transmis: #1d6e3f;--s-transmis-bg: #e4f4ea;--s-etude: #8a5200;--s-etude-bg: #fdf1de;--s-impossible: #4f586e;--s-impossible-bg: #edeff4;--shadow: 0 1px 2px rgba(22, 27, 46, 0.06), 0 12px 32px -8px rgba(22, 27, 46, 0.18);--tab-on: #ffffff;--host: #e4e8f0;--scrim: rgba(22, 27, 46, 0.32);font-family:"DM Sans","Feedjet DM Sans",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--text);font-size:15px;line-height:1.45;text-align:left;-webkit-font-smoothing:antialiased}.fj[data-fj-theme=dark]{color-scheme:dark;--bg: #171b2c;--bg2: #1f2439;--bg3: #292f49;--text: #eef1f8;--muted: #a9b1c7;--border: #2f3652;--field: #717c9c;--accent: #4966d8;--accent-h: #3d58c8;--on-accent: #ffffff;--accent-text: #9daef7;--accent-soft: #252d52;--focus: #9daef7;--error: #ff8f8f;--error-soft: #3a1d22;--success: #7fd6a0;--success-soft: #15301f;--warn: #f3c177;--warn-soft: #36280f;--s-coeur: #f59bc0;--s-coeur-bg: #3a1c2b;--s-etape: #6fd3ce;--s-etape-bg: #12312f;--s-tuyaux: #b9a6fa;--s-tuyaux-bg: #2a2246;--s-transmis: #7fd6a0;--s-transmis-bg: #15301f;--s-etude: #f3c177;--s-etude-bg: #36280f;--s-impossible: #b4bccd;--s-impossible-bg: #262b3b;--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -8px rgba(0, 0, 0, 0.55);--tab-on: #2a3050;--host: #0c0f1a;--scrim: rgba(0, 0, 0, 0.5)}.fj *,.fj *::before,.fj *::after{box-sizing:border-box}.fj :where(h2,h3,p,ul,li,fieldset,legend,figure){margin:0;padding:0}.fj :where(button,input,textarea){font-family:inherit;font-size:inherit;color:inherit;letter-spacing:normal;text-transform:none;margin:0}.fj :where(button){cursor:pointer}.fj :where(a){color:var(--accent-text)}.fj :focus-visible{outline:2px solid var(--focus);outline-offset:2px}.fj svg{display:block;flex:none}@media(prefers-color-scheme: dark){.fj[data-fj-theme=auto]{color-scheme:dark;--bg: #171b2c;--bg2: #1f2439;--bg3: #292f49;--text: #eef1f8;--muted: #a9b1c7;--border: #2f3652;--field: #717c9c;--accent: #4966d8;--accent-h: #3d58c8;--on-accent: #ffffff;--accent-text: #9daef7;--accent-soft: #252d52;--focus: #9daef7;--error: #ff8f8f;--error-soft: #3a1d22;--success: #7fd6a0;--success-soft: #15301f;--warn: #f3c177;--warn-soft: #36280f;--s-coeur: #f59bc0;--s-coeur-bg: #3a1c2b;--s-etape: #6fd3ce;--s-etape-bg: #12312f;--s-tuyaux: #b9a6fa;--s-tuyaux-bg: #2a2246;--s-transmis: #7fd6a0;--s-transmis-bg: #15301f;--s-etude: #f3c177;--s-etude-bg: #36280f;--s-impossible: #b4bccd;--s-impossible-bg: #262b3b;--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -8px rgba(0, 0, 0, 0.55);--tab-on: #2a3050;--host: #0c0f1a;--scrim: rgba(0, 0, 0, 0.5)}}.fj-launcher-wrap{--fj-s: max(40px, var(--fj-launcher-size, 56px));position:relative;display:inline-flex;vertical-align:top;width:var(--fj-s, 56px);height:var(--fj-s, 56px)}.fj-launcher{position:absolute;top:0;right:0;width:max-content;height:var(--fj-s, 56px);min-width:var(--fj-s, 56px);border-radius:calc(var(--fj-s, 56px)/2);border:1px solid var(--border);padding:0 0 0 calc(calc((var(--fj-s, 56px) - calc(var(--fj-s, 56px) - 12px)) / 2) - 1px);background:var(--bg);color:var(--text);box-shadow:var(--shadow);display:flex;align-items:center;justify-content:flex-start}.fj-launcher[aria-expanded=true]{justify-content:center;padding:0}.fj-launcher[aria-busy=true]{cursor:progress}.fj-launcher .fj-mascot{width:calc(var(--fj-s, 56px) - 12px);height:calc(var(--fj-s, 56px) - 12px)}.fj-launcher .fj-mascot[data-mood=happy]{display:none}[data-grow=right]>.fj-launcher{right:auto;left:0}.fj-launcher-label{display:grid;grid-template-columns:0fr;opacity:0}.fj-launcher-label>span{min-width:0;overflow:hidden}.fj-launcher-label>span>span{display:block;width:max-content;padding:0 18px 0 8px;font-size:15px;font-size:clamp(14px,round(down,var(--fj-s, 56px)*.3,1px),15px);font-weight:600;line-height:20px;white-space:nowrap}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible{padding-left:calc((var(--fj-s, 56px) - calc(var(--fj-s, 56px) - 12px))/2)}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible .fj-launcher-label{grid-template-columns:1fr;opacity:1}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible .fj-mascot[data-mood=welcome]{display:none}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible .fj-mascot[data-mood=happy]{display:block}@media(hover: hover){.fj-launcher[aria-expanded=false]:hover{border-color:var(--accent)}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover{padding-left:calc((var(--fj-s, 56px) - calc(var(--fj-s, 56px) - 12px))/2)}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover .fj-launcher-label{grid-template-columns:1fr;opacity:1}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover .fj-mascot[data-mood=welcome]{display:none}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover .fj-mascot[data-mood=happy]{display:block}}.fj-launcher-pip{position:absolute;left:-2px;bottom:-2px;width:22px;height:22px;width:max(18px,round(var(--fj-s, 56px)*22/56,1px));height:max(18px,round(var(--fj-s, 56px)*22/56,1px));border-radius:50%;background:var(--accent);color:var(--on-accent);display:flex;align-items:center;justify-content:center;border:2px solid var(--bg);pointer-events:none}.fj-launcher[aria-expanded=true]+.fj-launcher-pip,.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible+.fj-launcher-pip{display:none}@media(hover: hover){.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover+.fj-launcher-pip{display:none}}.fj-launcher-badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;border-radius:10px;background:var(--accent);color:var(--on-accent);font-size:11px;font-weight:700;line-height:16px;text-align:center;padding:0 5px;border:2px solid var(--bg);pointer-events:none}.fj-panel{background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:24px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden;position:relative;padding:0}dialog.fj-modal{position:fixed;inset:0;margin:auto;max-width:calc(100vw - 32px);max-height:calc(100dvh - 48px);animation:fj-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both}dialog.fj-modal:not([open]){display:none}dialog.fj-modal::backdrop{background:var(--scrim);animation:fj-scrim 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both}dialog.fj-modal.fj-closing{animation:fj-out 140ms ease-in both}dialog.fj-modal.fj-closing::backdrop{animation:fj-scrim 140ms ease-in reverse both}.fj-feedback{width:520px}dialog.fj-survey{width:400px;margin:auto 24px 24px auto}dialog.fj-survey::backdrop{background:rgba(0,0,0,0)}.fj-check{width:440px}.fj-head{display:flex;align-items:center;gap:12px;padding:16px 16px 12px 20px}.fj-head h2{margin:0;font-size:17px;line-height:1.3;font-weight:600}.fj-head p{margin:2px 0 0;font-size:14px;color:var(--muted);font-weight:400}.fj-head-text{flex:1;min-width:0}.fj-iconbtn{width:40px;height:40px;border-radius:12px;border:0;padding:0;background:rgba(0,0,0,0);color:var(--muted);display:inline-flex;align-items:center;justify-content:center;flex:none}.fj-iconbtn:hover{background:var(--bg2);color:var(--text)}.fj-tabs{margin:0 20px;display:grid;grid-template-columns:repeat(var(--fj-tab-count, 3), minmax(0, 1fr));gap:4px;padding:4px;background:var(--bg2);border-radius:14px;position:relative}.fj-glider{position:absolute;top:4px;left:4px;height:40px;width:calc((100% - 8px - (var(--fj-tab-count, 3) - 1)*4px)/var(--fj-tab-count, 3));border-radius:10px;background:var(--tab-on);box-shadow:0 1px 2px rgba(22,27,46,.1);transform:translateX(calc(var(--fj-tab-index, 0) * (100% + 4px)));transition:transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1)}.fj-tab{position:relative;height:40px;border-radius:10px;border:0;background:rgba(0,0,0,0);color:var(--muted);font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 6px;white-space:nowrap;min-width:0}.fj-tab[aria-selected=true]{color:var(--text)}.fj-tab>span:not(.fj-badge){overflow:hidden;text-overflow:ellipsis}.fj-badge{min-width:18px;height:18px;border-radius:9px;background:var(--accent);color:var(--on-accent);font-size:11px;line-height:18px;padding:0 5px;text-align:center;flex:none}.fj-body{padding:20px;display:flex;flex-direction:column;gap:18px;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.fj-body::-webkit-scrollbar{width:10px}.fj-body::-webkit-scrollbar-track{background:rgba(0,0,0,0)}.fj-body::-webkit-scrollbar-thumb{border:3px solid rgba(0,0,0,0);border-radius:5px;background:color-mix(in srgb, var(--field) 45%, transparent) padding-box}.fj-body::-webkit-scrollbar-thumb:hover{background-color:var(--field)}@supports not selector(::-webkit-scrollbar){.fj-body{scrollbar-width:thin;scrollbar-color:color-mix(in srgb, var(--field) 45%, transparent) rgba(0,0,0,0)}}.fj-morphing .fj-body{overflow:hidden}.fj-body.fj-enter{animation:fj-content 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both}.fj-field{display:flex;flex-direction:column;gap:6px}.fj-lab{font-size:14px;font-weight:600;color:var(--text)}.fj-opt{font-weight:400;color:var(--muted)}.fj-input{height:44px;border-radius:12px;border:1px solid var(--field);background:var(--bg2);padding:0 14px;font-size:15px;line-height:1.45;color:var(--text);width:100%;outline:0}.fj-input::placeholder{color:var(--muted);opacity:1}.fj-input:hover{border-color:var(--text)}.fj-input:focus{border-color:var(--accent);outline:2px solid var(--focus);outline-offset:2px;background:var(--bg)}.fj-input[aria-invalid=true]{border-color:var(--error);border-width:2px}.fj-input[readonly]{opacity:.6}textarea.fj-input{height:112px;padding:12px 14px;resize:none;display:block}.fj-help{font-size:13px;color:var(--muted);display:flex;justify-content:space-between;gap:8px}.fj-errmsg{font-size:13px;color:var(--error);display:flex;align-items:center;gap:6px;font-weight:500}.fj-chips{display:flex;flex-wrap:wrap;gap:8px}.fj-chip{height:32px;border-radius:999px;border:1px solid var(--field);background:rgba(0,0,0,0);color:var(--text);padding:0 12px;font-size:13px;font-weight:500;display:inline-flex;align-items:center;gap:6px}.fj-chip:hover{background:var(--bg2)}.fj-chip[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent)}.fj-group{border:1px solid var(--border);border-radius:16px;padding:4px 14px;display:flex;flex-direction:column}.fj-row{display:flex;align-items:flex-start;gap:12px;padding:10px 0}.fj-row+.fj-row{border-top:1px solid var(--border)}.fj-row-text{flex:1;min-width:0;font-size:14px}.fj-row-text small{display:block;color:var(--muted);font-size:13px;margin-top:2px}.fj-row-text .fj-errmsg{margin-top:4px}.fj-link{border:0;background:none;padding:0;color:var(--accent-text);text-decoration:underline;font-size:inherit}.fj-disclosure{margin-top:6px;font-size:13px;color:var(--muted)}.fj-cb{width:20px;height:20px;margin:1px 0 0;accent-color:var(--accent);flex:none;cursor:pointer}.fj-sw{appearance:none;width:40px;height:24px;border-radius:12px;background:var(--field);position:relative;flex:none;margin:0;cursor:pointer;border:0}.fj-sw::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:9px;background:#fff;transition:left .15s}.fj-sw:checked{background:var(--accent)}.fj-sw:checked::after{left:19px}.fj-drop{border:1.5px dashed var(--field);border-radius:14px;padding:12px 14px;display:flex;align-items:center;gap:12px;color:var(--muted);font-size:14px;background:rgba(0,0,0,0);width:100%;text-align:left;line-height:1.45}.fj-drop b{color:var(--accent-text);font-weight:600}.fj-drop.fj-compact{padding:10px 14px}.fj-drop.fj-over{border-color:var(--accent);background:var(--accent-soft)}.fj-small{font-size:13px}.fj-file{border:1px solid var(--border);border-radius:14px;padding:10px 10px 10px 14px;display:flex;align-items:center;gap:12px;font-size:14px;color:var(--muted)}.fj-file-name{flex:1;min-width:0;color:var(--text);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fj-foot{padding:14px 20px;border-top:1px solid var(--border);display:flex;gap:12px;justify-content:flex-end;align-items:center;background:var(--bg)}.fj-meta,.fj-credit{margin-right:auto;font-size:12px;color:var(--muted)}.fj .fj-credit{display:inline-flex;padding:4px;margin-left:-4px;border-radius:8px;color:var(--muted);text-decoration:none;opacity:.8;transition:opacity 150ms ease,color 150ms ease}.fj .fj-credit:hover{opacity:1;color:var(--text)}.fj-btn{height:44px;border-radius:12px;padding:0 18px;font-size:15px;font-weight:600;line-height:1;border:1px solid rgba(0,0,0,0);display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;text-decoration:none;transition:background-color .15s}.fj-btn[aria-busy=true]{opacity:.85;cursor:progress}.fj-btn-p{background:var(--accent);color:var(--on-accent)}.fj-btn-p:hover{background:var(--accent-h)}.fj-btn-g{background:rgba(0,0,0,0);color:var(--text);border-color:var(--field)}.fj-btn-g:hover{background:var(--bg2)}.fj-btn-t{background:rgba(0,0,0,0);color:var(--accent-text);padding:0 10px;height:36px}.fj-spin{animation:fj-spin 1s linear infinite}.fj-status{display:inline-flex;align-items:center;gap:6px;height:24px;border-radius:999px;padding:0 10px;font-size:12px;font-weight:600;white-space:nowrap}.fj-st-coeur{color:var(--s-coeur);background:var(--s-coeur-bg)}.fj-st-etape{color:var(--s-etape);background:var(--s-etape-bg)}.fj-st-tuyaux{color:var(--s-tuyaux);background:var(--s-tuyaux-bg)}.fj-st-transmis{color:var(--s-transmis);background:var(--s-transmis-bg)}.fj-st-etude{color:var(--s-etude);background:var(--s-etude-bg)}.fj-st-impossible{color:var(--s-impossible);background:var(--s-impossible-bg)}.fj-list{display:flex;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none}.fj-card{border:1px solid var(--border);border-radius:16px;padding:14px 16px;display:flex;flex-direction:column;gap:8px;background:var(--bg)}.fj-card:hover{border-color:var(--field);background:var(--bg2)}.fj-card h3{margin:0;font-size:15px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}.fj-card p{margin:0;font-size:14px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.fj-card p[data-open]{display:block;white-space:pre-line}.fj-more{align-self:flex-start;margin-top:-4px;font-size:13px;font-weight:600;text-decoration:none}.fj-more:hover{text-decoration:underline}.fj-card-top{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);font-weight:600}.fj-card-new{margin-left:auto;display:inline-flex;align-items:center;gap:6px;color:var(--accent-text)}.fj-reply{border-radius:12px;background:var(--accent-soft);padding:10px 12px;display:flex;flex-direction:column;gap:2px}.fj-reply b{font-size:12px;font-weight:600;color:var(--accent-text)}.fj-card .fj-reply p{color:var(--text);display:block;-webkit-line-clamp:none;white-space:pre-line}.fj-card-bot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.fj-date{font-size:12px;color:var(--muted);margin-left:auto}.fj-dot{width:8px;height:8px;border-radius:4px;background:var(--accent);flex:none}.fj-sk{background:var(--bg3);border-radius:8px}.fj-updates{margin:0;font-size:13px;color:var(--muted);font-weight:600}.fj-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:40px 12px}.fj-empty h3{margin:8px 0 0;font-size:17px;font-weight:600}.fj-empty p{margin:0;color:var(--muted);font-size:14px;max-width:300px}.fj-empty-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;justify-content:center}.fj-notice{border-radius:14px;padding:12px 14px;display:flex;gap:10px;font-size:14px;align-items:flex-start}.fj-notice b{font-weight:600}.fj-notice.fj-err{background:var(--error-soft);color:var(--error)}.fj-capt{border:1px solid var(--border);border-radius:14px;padding:10px;display:flex;gap:12px;align-items:center}.fj-capt-text{flex:1;min-width:0;font-size:14px}.fj-capt-text b{font-weight:600}.fj-capt-text span{color:var(--muted);font-size:13px}.fj-thumb{width:88px;height:56px;border-radius:8px;background:var(--bg3);flex:none;position:relative;overflow:hidden;border:1px solid var(--border)}.fj-thumb img{width:100%;height:100%;object-fit:cover;object-position:top left;display:block}.fj-thumb::before,.fj-thumb::after{content:"";position:absolute;border-radius:4px}.fj-thumb::before{left:6px;top:6px;right:30px;height:6px;border-radius:3px;background:var(--field);opacity:.5}.fj-thumb::after{left:6px;top:18px;width:40px;height:26px;background:var(--accent);opacity:.35}.fj-thumb.fj-has-img::before,.fj-thumb.fj-has-img::after{display:none}.fj-capt-icon{color:var(--muted);padding:0 4px}.fj-progress-wrap{padding:0 20px}.fj-prog{height:4px;border-radius:2px;background:var(--bg3);overflow:hidden}.fj-prog i{display:block;height:4px;background:var(--accent);border-radius:2px;transform:translateX(calc(var(--fj-progress, 0%) - 100%));transition:transform .2s cubic-bezier(0.2, 0.8, 0.2, 1)}.fj-intro{font-size:14px;color:var(--muted)}.fj-intro b{display:block;color:var(--text);font-weight:600}.fj-set{border:0;margin:0;padding:0;min-width:0;display:flex;flex-direction:column;gap:8px}.fj-set legend{padding:0;margin-bottom:8px}.fj-stars{display:flex;justify-content:space-between;gap:4px}.fj-star{width:52px;height:52px;border-radius:14px;color:var(--field);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative}.fj-star.fj-on{color:var(--accent)}.fj-star.fj-pop svg{animation:fj-pop 160ms cubic-bezier(0.2, 0.8, 0.2, 1)}.fj-star:has(:focus-visible){outline:2px solid var(--focus);outline-offset:2px}.fj-star-value{color:var(--accent-text);font-weight:600}.fj-choices{display:flex;gap:10px}.fj-choice{flex:1;min-height:48px;border-radius:14px;border:1px solid var(--field);background:rgba(0,0,0,0);color:var(--text);font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px;text-align:center;cursor:pointer}.fj-choice:hover{background:var(--bg2)}.fj-choice:has(:checked){border:2px solid var(--accent);background:var(--accent-soft);color:var(--accent-text)}.fj-choice:has(:focus-visible){outline:2px solid var(--focus);outline-offset:2px}.fj-anon{border-top:1px solid var(--border);padding-top:14px;align-items:center}.fj-float{position:fixed;inset:auto 24px 24px auto;margin:0;padding:0;border:0;background:rgba(0,0,0,0);overflow:visible;z-index:2147483000;color:var(--text)}.fj-float:popover-open,.fj-float:not([popover]){display:flex}.fj-bubble{width:360px;align-items:flex-end;gap:10px;animation:fj-rise 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both}.fj-bubble .fj-panel{flex:1;border-radius:20px 20px 6px;padding:14px 14px 14px 16px;gap:12px}.fj-bubble .fj-iconbtn{width:32px;height:32px;margin:-6px -6px 0 0}.fj-bubble-head{display:flex;gap:8px;align-items:flex-start}.fj-bubble-head p{margin:0;font-weight:600;font-size:15px}.fj-bubble-head small{display:block;margin:2px 0 0;font-size:13px;color:var(--muted)}.fj-bubble-actions{display:flex;gap:8px}.fj-bubble-actions .fj-btn{height:40px}.fj-bubble-actions .fj-btn-p{flex:1}.fj-avatar{width:56px;height:56px;border-radius:28px;background:var(--bg);border:1px solid var(--border);box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;flex:none}.fj-avatar svg{transform-origin:50% 90%;animation:fj-wave 600ms ease-in-out 240ms 1}.fj-toast{width:360px}.fj-toast .fj-panel{width:100%;border-radius:20px;padding:16px;flex-direction:row;gap:14px;align-items:center;animation:fj-rise 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both}.fj-toast .fj-iconbtn{align-self:flex-start;margin:-6px -6px 0 0}.fj-toast p{margin:0;font-weight:600;font-size:16px}.fj-toast small{display:block;margin:2px 0 0;font-size:14px;color:var(--muted)}.fj-toast-text{flex:1;min-width:0}.fj-thanks-close{display:flex;justify-content:flex-end;padding:12px 12px 0}.fj-thanks{align-items:center;justify-content:center;text-align:center;gap:12px;padding:8px 32px 28px}.fj-thanks h2{margin:8px 0 6px;font-size:22px;line-height:1.25;font-weight:600}.fj-thanks h2:focus,.fj-thanks h2:focus-visible{outline:none}.fj-thanks p{margin:0 auto;color:var(--muted);font-size:15px;max-width:360px}.fj-thanks>svg{animation:fj-bounce 400ms cubic-bezier(0.2, 0.8, 0.2, 1) 1}.fj-center{justify-content:center}.fj-check-body{padding:24px 24px 8px;display:flex;flex-direction:column;gap:14px}.fj-check-head{display:flex;gap:14px;align-items:center}.fj-check-head h2{margin:0;font-size:18px;line-height:1.3;font-weight:600}.fj-check-head p{margin:4px 0 0;font-size:14px;color:var(--muted)}.fj-steps{display:flex;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none}.fj-steps li{display:flex;align-items:center;gap:10px;font-size:14px}.fj-step-detail{display:block;font-size:13px;color:var(--error)}.fj-ic-ok{color:var(--success)}.fj-ic-err{color:var(--error)}.fj-ic-wait{color:var(--muted)}.fj-ic-run{color:var(--accent-text)}.fj-check .fj-foot{border-top:0;padding-top:12px}.fj-grabber{display:none;width:36px;height:4px;border-radius:2px;background:var(--border);margin:8px auto 0}.fj-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.fj-hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}@media only screen and (max-width: 600px),only screen and (max-height: 500px){dialog.fj-modal{max-width:100vw;max-height:100dvh;animation-name:fj-sheet-in;animation-duration:240ms}dialog.fj-modal.fj-closing{animation-name:fj-sheet-out}.fj-feedback,dialog.fj-survey{width:100vw;height:100dvh;margin:0;border-radius:0;border:0;box-shadow:none}.fj-feedback .fj-head,.fj-survey .fj-head{padding-top:max(16px,env(safe-area-inset-top))}dialog.fj-check{width:100vw;margin:auto 0 0;border-radius:24px 24px 0 0;border-bottom:0}.fj-grabber{display:block}.fj-feedback .fj-foot,.fj-survey .fj-foot,.fj-check .fj-foot{padding:12px 16px max(20px,env(safe-area-inset-bottom));box-shadow:0 -8px 20px -12px rgba(0,0,0,.25)}.fj-feedback .fj-foot .fj-btn,.fj-survey .fj-foot .fj-btn,.fj-check .fj-foot .fj-btn{flex:1}.fj-check .fj-foot{box-shadow:none}.fj-meta,.fj .fj-credit{display:none}.fj-input{font-size:16px}.fj-float{inset:auto 12px max(12px,env(safe-area-inset-bottom)) 12px;width:auto;justify-content:flex-end}.fj-bubble .fj-panel,.fj-toast .fj-panel{max-width:290px}.fj-toast .fj-panel{max-width:none}}@keyframes fj-in{from{opacity:0;transform:scale(0.96)}}@keyframes fj-out{to{opacity:0;transform:scale(0.96)}}@keyframes fj-sheet-in{from{opacity:0;transform:translateY(24px)}}@keyframes fj-sheet-out{to{opacity:0;transform:translateY(24px)}}@keyframes fj-scrim{from{opacity:0}}@keyframes fj-content{from{opacity:0;transform:translateY(4px)}}@keyframes fj-rise{from{opacity:0;transform:translateY(12px)}}@keyframes fj-fade{from{opacity:0}}@keyframes fj-wave{25%{transform:rotate(-10deg)}75%{transform:rotate(8deg)}}@keyframes fj-bounce{50%{transform:scale(1.08)}}@keyframes fj-pop{50%{transform:scale(1.15)}}@keyframes fj-spin{to{transform:rotate(360deg)}}.fj{--fj-spring: cubic-bezier(0.2, 0.8, 0.2, 1)}@supports(animation-timing-function: linear(0, 1)){.fj{--fj-spring: linear(0, 0.052, 0.17, 0.317, 0.466, 0.6, 0.716, 0.811, 0.883, 0.936, 0.972, 0.996, 1.011, 1.018, 1.02, 1.02, 1.018, 1.015, 1.012, 1.009, 1.007, 1.004, 1.003, 1.002, 1)}}dialog.fj-modal{animation-timing-function:var(--fj-spring);animation-duration:240ms}.fj-btn,.fj-chip,.fj-choice,.fj-iconbtn,.fj-drop,.fj-card,.fj-star{transition:background-color 150ms ease,border-color 150ms ease,color 150ms ease,box-shadow 150ms ease,transform 200ms var(--fj-spring)}.fj-btn:active:not([aria-busy=true],:disabled),.fj-chip:active,.fj-choice:active,.fj-iconbtn:active{transform:scale(0.97)}.fj-launcher{transition:border-color 150ms ease,padding-left 180ms cubic-bezier(0.2, 0.8, 0.2, 1),transform 200ms var(--fj-spring)}.fj-launcher:active{transform:scale(0.97)}.fj-launcher[aria-expanded=true] svg{animation:fj-swap 260ms var(--fj-spring) both}.fj-launcher-label{transition:grid-template-columns 180ms cubic-bezier(0.2, 0.8, 0.2, 1),opacity 120ms ease}.fj-launcher-badge,.fj-badge{animation:fj-pop-in 300ms var(--fj-spring) both}.fj-input{transition:border-color 150ms ease,background-color 150ms ease,opacity 150ms ease}.fj-glider{transition:transform 280ms var(--fj-spring)}.fj-tab{transition:color 150ms ease}.fj-body.fj-enter{animation:fj-slide 200ms var(--fj-spring) both}.fj-notice,.fj-errmsg,.fj-file{animation:fj-drop 220ms var(--fj-spring) both}.fj-foot .fj-spin{animation:fj-fade 120ms ease both,fj-spin 1s linear infinite}.fj-thanks>*,.fj-thanks-close,.fj-foot.fj-center{animation:fj-content 260ms var(--fj-spring) both}.fj-thanks>:nth-child(2){animation-delay:60ms}.fj-foot.fj-center{animation-delay:120ms}.fj-list>li,.fj-steps>li{animation:fj-content 260ms var(--fj-spring) both;animation-delay:calc(min(var(--fj-i, 0),6)*40ms)}.fj-thumb img{animation:fj-fade 200ms ease both}.fj-capt[aria-busy=true] .fj-thumb{animation:fj-breathe 1.2s ease-in-out infinite}.fj-disclosure{display:grid;grid-template-rows:0fr;margin-top:0;opacity:0;visibility:hidden;transition:grid-template-rows 280ms var(--fj-spring),margin-top 280ms var(--fj-spring),opacity 200ms ease,visibility 0s linear 280ms}.fj-disclosure>span{min-height:0;overflow:hidden}.fj-disclosure[data-open]{grid-template-rows:1fr;margin-top:6px;opacity:1;visibility:visible;transition-delay:0s}.fj-cb{appearance:none;position:relative;border:1.5px solid var(--field);border-radius:6px;background:var(--bg);transition:background-color 150ms ease,border-color 150ms ease}.fj-cb::after{content:"";position:absolute;left:5.5px;top:1.5px;width:5px;height:10px;border:solid var(--on-accent);border-width:0 2px 2px 0;transform:rotate(45deg) scale(0);transition:transform 220ms var(--fj-spring)}.fj-cb:checked{background:var(--accent);border-color:var(--accent)}.fj-cb:checked::after{transform:rotate(45deg) scale(1)}.fj-cb:hover:not(:checked){border-color:var(--text)}.fj-cb[aria-invalid=true]{border:2px solid var(--error)}.fj-sw{transition:background-color 200ms ease}.fj-sw::after{transition:transform 260ms var(--fj-spring);box-shadow:0 1px 2px rgba(22,27,46,.25)}.fj-sw:checked::after{left:3px;transform:translateX(16px)}.fj-prog i{transition:transform 420ms var(--fj-spring)}@media(hover: hover){.fj-stars:has(.fj-star:hover) .fj-star:not(.fj-on){color:var(--field)}.fj-star:hover,.fj-star:has(~.fj-star:hover){color:var(--accent) !important;transform:translateY(-1px)}}.fj-star.fj-pop svg{animation:fj-pop 200ms var(--fj-spring)}.fj-bubble{animation:fj-rise 300ms var(--fj-spring) both}.fj-toast .fj-panel{animation:fj-rise 300ms var(--fj-spring) both}.fj-mascot{overflow:visible}.fj-mascot g,.fj-mascot circle,.fj-mascot path{transform-box:fill-box}.fj-mascot .fj-m-body{transform-origin:50% 100%;animation:fj-m-settle 420ms var(--fj-spring) both}.fj-mascot .fj-m-light{transform-origin:center;animation:fj-m-light 360ms var(--fj-spring) 80ms both}.fj-mascot .fj-m-eyes{transform-origin:center;animation:fj-m-blink 220ms ease-in-out 900ms 1}.fj-mascot .fj-m-rays path{transform-origin:50% 100%;animation:fj-m-ray 320ms var(--fj-spring) both}.fj-mascot .fj-m-rays path:nth-child(1){animation-delay:140ms}.fj-mascot .fj-m-rays path:nth-child(2){animation-delay:190ms}.fj-mascot .fj-m-rays path:nth-child(3){animation-delay:240ms}.fj-mascot .fj-m-arm{transform-origin:0% 100%;animation:fj-m-wave 700ms ease-in-out 300ms 1}.fj-mascot[data-mood=alert] .fj-m-antenna{transform-origin:50% 100%;animation:fj-m-wilt 620ms var(--fj-spring) 120ms both}.fj-mascot[data-mood=alert] .fj-m-body{animation:fj-m-droop 520ms var(--fj-spring) both}.fj-mascot[data-mood=idea] .fj-m-body{animation:fj-m-hop 520ms var(--fj-spring) both}.fj-mascot[data-mood=sorry] .fj-m-body{animation:fj-m-droop 520ms var(--fj-spring) both}.fj-mascot[data-mood=thinking] .fj-m-light{animation:fj-m-think 1.1s ease-in-out infinite}.fj-mascot[data-mood=bravo] .fj-m-body{animation:fj-m-cheer 520ms var(--fj-spring) both}.fj-capt-text .fj-capt-title{display:flex;align-items:baseline;gap:10px;white-space:nowrap;color:var(--text);font-size:14px}.fj-capt-text .fj-capt-title .fj-link{font-size:13px;font-weight:600;text-decoration:none}.fj-capt-text .fj-capt-title .fj-link:hover{text-decoration:underline}.fj-capt-hint{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fj-row-text{font-size:14px}.fj-thanks p{max-width:400px}@media only screen and (max-width: 600px),only screen and (max-height: 500px){.fj-feedback .fj-head,.fj-survey .fj-head{gap:10px;padding-left:16px;padding-right:4px}.fj-feedback .fj-head .fj-mascot,.fj-survey .fj-head .fj-mascot{width:36px;height:36px}.fj-feedback .fj-head h2,.fj-survey .fj-head h2{font-size:16px}.fj-feedback .fj-head p,.fj-survey .fj-head p{font-size:13px}.fj-tabs{margin:0 16px}.fj-tab{font-size:13px;padding:0 4px}.fj-tab>svg{display:none}.fj-check-head{gap:12px}.fj-check-head .fj-mascot{width:44px;height:44px}.fj-check-head h2{font-size:17px}.fj-thumb{width:64px;height:42px}.fj-capt-hint{font-size:12px !important}}.fj h2,.fj h3,.fj .fj-bubble-head p{text-wrap:balance}.fj p,.fj small,.fj .fj-row-text,.fj .fj-step-detail{text-wrap:pretty}.fj .fj-opt{white-space:nowrap}.fj-thanks p,.fj-empty p,.fj-toast-text small{text-wrap:balance}@keyframes fj-swap{from{opacity:0;transform:rotate(-90deg) scale(0.6)}}@keyframes fj-pop-in{from{opacity:0;transform:scale(0.4)}}@keyframes fj-slide{from{opacity:0;transform:translateX(calc(var(--fj-dir, 0) * 12px)) translateY(calc((1 - var(--fj-dir, 0) * var(--fj-dir, 0)) * 4px))}}@keyframes fj-drop{from{opacity:0;transform:translateY(-4px)}}@keyframes fj-breathe{50%{opacity:.55}}@keyframes fj-m-settle{from{transform:translateY(3px) scale(0.94)}}@keyframes fj-m-light{from{opacity:.3;transform:scale(0.4)}}@keyframes fj-m-blink{50%{transform:scaleY(0.12)}}@keyframes fj-m-ray{from{opacity:0;transform:scale(0.2)}}@keyframes fj-m-wave{20%,60%{transform:rotate(-16deg)}40%,80%{transform:rotate(10deg)}}@keyframes fj-m-wobble{25%{transform:rotate(-9deg)}60%{transform:rotate(6deg)}}@keyframes fj-m-droop{from{transform:translateY(-3px) rotate(0)}to{transform:rotate(-4deg)}}@keyframes fj-m-wilt{to{transform:rotate(-12deg)}}@keyframes fj-m-hop{0%{transform:scale(0.92)}40%{transform:translateY(-3px) scale(1.04)}}@keyframes fj-m-think{50%{opacity:.35;transform:scale(0.8)}}@keyframes fj-m-cheer{0%{transform:scale(0.9)}45%{transform:translateY(-4px) scale(1.06)}}@media(prefers-reduced-motion: reduce){.fj *,.fj *::before,.fj *::after{animation-duration:1ms !important;animation-iteration-count:1 !important;transition-duration:1ms !important}.fj dialog.fj-modal,.fj .fj-bubble,.fj .fj-toast .fj-panel{animation:fj-fade 120ms linear both !important}.fj dialog.fj-modal.fj-closing{animation:none !important}.fj .fj-spin,.fj .fj-mascot *,.fj .fj-capt .fj-thumb{animation:none !important}}\n';let g=null;class v{constructor(e,t,i=document.body,n="div"){this.host=document.createElement(n),this.host.id=e;const a=this.host.attachShadow({mode:"open"});!function(e){try{null!=g||(g=new CSSStyleSheet),g.cssRules.length||g.replaceSync(m),e.adoptedStyleSheets=[g]}catch(t){const i=document.createElement("style");i.textContent=m,e.prepend(i)}}(a),this.root=document.createElement(n),this.root.className="fj",this.root.dataset.fjTheme=t,a.append(this.root),i.append(this.host)}find(e){return this.root.querySelector(e)}remove(){this.host.remove()}}let j=0,y="",x="";function w(e){const t=document.documentElement;e&&0===j&&(y=t.style.overflow,x=t.style.scrollbarGutter,window.innerWidth>t.clientWidth&&(t.style.scrollbarGutter="stable")),j=Math.max(0,j+(e?1:-1)),t.classList.toggle("fj-modal-open",j>0),t.style.overflow=j>0?"hidden":y,0===j&&(t.style.scrollbarGutter=x)}class k{constructor(e,t){this.surface=e,this.options=t,this.returnFocus=null,this.closing=!1,this.closeRun=0,this.locked=!1,this.dialog=document.createElement("dialog"),this.dialog.className=`fj-panel fj-modal ${t.className}`,t.labelledBy?this.dialog.setAttribute("aria-labelledby",t.labelledBy):t.label&&this.dialog.setAttribute("aria-label",t.label),this.dialog.addEventListener("cancel",e=>{e.preventDefault(),this.close()}),this.dialog.addEventListener("keydown",e=>this.wrapFocus(e)),this.dialog.addEventListener("click",e=>{var i,n;e.target===this.dialog&&this.isOutside(e)&&null!==(n=null===(i=t.closeOnBackdrop)||void 0===i?void 0:i.call(t))&&void 0!==n&&n&&this.close()}),e.root.append(this.dialog)}get isOpen(){return this.dialog.open&&!this.closing}open(){if(this.closing)return this.closeRun++,this.closing=!1,void this.dialog.classList.remove("fj-closing");this.dialog.open||(this.returnFocus=$(),this.dialog.classList.remove("fj-closing"),this.closing=!1,this.dialog.showModal(),!1===this.options.lockScroll||this.locked||(this.locked=!0,w(!0)))}close(){if(!this.dialog.open||this.closing)return Promise.resolve();this.closing=!0,this.dialog.classList.add("fj-closing");const e=++this.closeRun;return new Promise(t=>{!function(e,t){const i=getComputedStyle(e).animationName;if(!i||"none"===i)return void t();let n=!1;const a=()=>{n||(n=!0,e.removeEventListener("animationend",a),t())};e.addEventListener("animationend",a),setTimeout(a,400)}(this.dialog,()=>{e===this.closeRun&&this.finish(),t()})})}destroy(){this.dialog.open&&this.finish(!1),this.dialog.remove()}finish(e=!0){var t,i;this.dialog.close(),this.dialog.classList.remove("fj-closing"),this.closing=!1,this.locked&&(this.locked=!1,w(!1));const n=this.returnFocus;this.returnFocus=null,(null==n?void 0:n.isConnected)&&n.focus(),e&&(null===(i=(t=this.options).onClose)||void 0===i||i.call(t))}wrapFocus(e){if("Tab"!==e.key)return;const t=[...this.dialog.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')].filter(e=>e.getClientRects().length>0&&!e.closest('[hidden], [aria-hidden="true"]'));if(!t.length)return;const i=t[0],n=t[t.length-1],a=$();!e.shiftKey||a!==i&&a!==this.dialog?e.shiftKey||a!==n||(e.preventDefault(),i.focus()):(e.preventDefault(),n.focus())}isOutside(e){const t=this.dialog.getBoundingClientRect();return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}get root(){return this.surface.root}}function $(){var e;let t=document.activeElement;for(;null===(e=null==t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement;)t=t.shadowRoot.activeElement;return t instanceof HTMLElement?t:null}function C(e){"function"==typeof e.showPopover&&(e.setAttribute("popover","manual"),e.showPopover())}"function"==typeof SuppressedError&&SuppressedError;const _=[{name:"Edge",regex:/Edg(?:e|A|iOS)?\/(\d+(?:\.\d+)*)/},{name:"Opera",regex:/(?:OPR|Opera)\/(\d+(?:\.\d+)*)/},{name:"Firefox",regex:/(?:Firefox|FxiOS)\/(\d+(?:\.\d+)*)/},{name:"Chrome",regex:/(?:Chrome|CriOS)\/(\d+(?:\.\d+)*)/},{name:"Safari",regex:/Version\/(\d+(?:\.\d+)*) (?:Mobile\/\w+ )?Safari/}],S={WindowsPhone:/windows phone/i,Android:/android/i,iOS:/iPad|iPhone|iPod/,Windows:/Win/i,MacOS:/Mac/i,Linux:/Linux/i};let q=null;async function E(){null!=q||(q=import("modern-screenshot"));try{return await q}catch(e){throw q=null,e}}const A="data-fj-auto-height",M=new Set(["absolute","fixed"]),F=new Set(["block","list-item","flex","grid","table","flow-root"]),z=new Set(["block","list-item"]),T=new Set(["visible","clip"]),L=/flex|grid/;function D(e){return"none"!==e.display&&"none"===e.float&&!M.has(e.position)}function I(e,t){var i;return z.has(t.display)&&T.has(t.overflowY)&&D(t)&&0===Number.parseFloat(t.paddingBottom)&&0===Number.parseFloat(t.borderBottomWidth)&&"none"===t.contain&&"normal"===t.containerType&&"auto"===t.columnCount&&"auto"===t.columnWidth&&"horizontal-tb"===t.writingMode&&!L.test(getComputedStyle(null!==(i=e.parentElement)&&void 0!==i?i:e).display)}function N(e){for(let t=e.lastChild;t;t=t.previousSibling){if(t instanceof Text&&""!==t.data.trim())return null;if(!(t instanceof Element))continue;const e=getComputedStyle(t);if(D(e))return F.has(e.display)?t:null}return null}function O(e,t,i,n){const a=e.getBoundingClientRect().bottom,s=function(e){for(let t=e.nextElementSibling;t;t=t.nextElementSibling){const e=getComputedStyle(t);if(D(e))return F.has(e.display)?t:null}return null}(e);return s?n>Math.max(i,Number.parseFloat(getComputedStyle(s).marginTop)||0)&&Math.abs(s.getBoundingClientRect().top-a-n)<=.5:Math.abs(t.getBoundingClientRect().bottom-a)<=.5}function P(e){e instanceof HTMLElement&&e.hasAttribute(A)&&(e.removeAttribute(A),e.style.removeProperty("height"),e.style.removeProperty("block-size"))}const B=/[&<>"']/g,V={"&":"&","<":"<",">":">",'"':""","'":"'"};function U(e){return String(null!=e?e:"").replace(B,e=>V[e])}const R=1e4,H=new Set(["GET","HEAD"]);function W(){return new DOMException("Aborted","AbortError")}function Q(e,t){return new Promise((i,n)=>{const a=setTimeout(()=>{null==t||t.removeEventListener("abort",s),i()},e);function s(){clearTimeout(a),n(W())}null==t||t.addEventListener("abort",s,{once:!0})})}async function Y(e,t={}){var i,n,{timeout:a=R,retries:s=0,signal:o}=t,r=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(i[n[a]]=e[n[a]])}return i}(t,["timeout","retries","signal"]);const l=H.has((null!==(i=r.method)&&void 0!==i?i:"GET").toUpperCase())?s:0;for(let t=0;;t++){if(null==o?void 0:o.aborted)throw W();const i=new AbortController,s=()=>i.abort(),d=setTimeout(s,a);null==o||o.addEventListener("abort",s,{once:!0});try{const a=await fetch(e,Object.assign(Object.assign({},r),{signal:i.signal}));if(a.status<500||t>=l)return a;null===(n=a.body)||void 0===n||n.cancel()}catch(e){if((null==o?void 0:o.aborted)||t>=l)throw e}finally{clearTimeout(d),null==o||o.removeEventListener("abort",s)}await Q(500*2**t,o)}}function K(e){try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}}function Z(e,t){try{null===t?sessionStorage.removeItem(e):sessionStorage.setItem(e,JSON.stringify(t))}catch(e){}}function G(e,...t){try{null==e||e(...t)}catch(e){}}const J="fj-check-title";class X{constructor(e){this.config=e,this.status="pending",this.error=null,this.modal=null,this.check=null}get i18n(){return this.config.i18n()}get integrationStatus(){return this.status}setStatus(e,t){this.status=e,void 0!==t&&(this.error=t)}handleIntegrationStatus(){return"ok"!==this.status&&("no_subscription"===this.error?this.show("expired",{project:"ok",api:"ok",subscription:"err"}):"communication_error"===this.error?this.show("ko",{project:"wait",api:"err",subscription:"wait"}):this.show("pending"),!0)}destroy(){var e,t;null===(e=this.check)||void 0===e||e.abort(),null===(t=this.modal)||void 0===t||t.destroy(),this.modal=null}ensureModal(){var e;return null!==(e=this.modal)&&void 0!==e||(this.modal=new k(this.config.surface,{className:"fj-check",labelledBy:J,closeOnBackdrop:()=>!0,onClose:()=>{var e;return null===(e=this.check)||void 0===e?void 0:e.abort()}})),this.modal}show(e,t){var i;const n=this.ensureModal();f(n.dialog,()=>n.dialog.innerHTML=this.render(e,t)),this.bind(e,n),n.open();const a="checking"===e?'[data-action="cancel"]':".fj-btn-p";null===(i=n.dialog.querySelector(a))||void 0===i||i.focus()}render(e,t){const i=this.config.module,n={pending:{mood:"welcome",title:this.i18n.tf("integration.pending.title",{module:i}),text:this.i18n.t("integration.pending.text"),role:""},checking:{mood:"thinking",title:this.i18n.t("integration.checking.title"),text:this.i18n.t("integration.checking.text"),role:"status"},ok:{mood:"bravo",title:this.i18n.t("integration.ok.title"),text:this.i18n.t("integration.ok.text"),role:"status"},ko:{mood:"sorry",title:this.i18n.t("integration.ko.title"),text:this.i18n.t("integration.ko.text"),role:"alert"},expired:{mood:"sorry",title:this.i18n.t("integration.expired.title"),text:this.i18n.t("integration.expired.text"),role:"alert"}},{mood:a,title:s,text:o,role:r}=n[e],l=r?` role="${r}"`:"";return`\n <div class="fj-grabber" aria-hidden="true"></div>\n <div class="fj-check-body" data-version="v3.0.0-rc.1" data-screen="${e}">\n <div class="fj-check-head">\n ${u(a,56)}\n <div${l}>\n <h2 id="${J}">${U(s)}</h2>\n <p>${U(o)}</p>\n </div>\n </div>\n ${t?this.renderSteps(t):""}\n </div>\n <div class="fj-foot">${this.renderActions(e)}</div>`}renderSteps(e){const t={project:this.i18n.t("integration.details.project"),api:this.i18n.t("domain_not_allowed"===this.error?"integration.details.domain":"integration.details.api"),subscription:this.i18n.t("integration.details.subscription")},i={ok:`<span class="fj-ic-ok">${s("ok",20)}</span>`,run:`<span class="fj-ic-run">${o(20)}</span>`,err:`<span class="fj-ic-err">${s("alert",20)}</span>`,wait:`<span class="fj-ic-wait">${s("info",20)}</span>`};return`<ul class="fj-steps">${Object.keys(e).map((n,a)=>{const s=e[n],o="wait"===s?"var(--muted)":"var(--text)",r="err"===s?`<span class="fj-step-detail">${U(t[n])}</span>`:"";return`<li data-step="${n}" data-state="${s}" style="--fj-i:${a}">${i[s]}<span style="color:${o}">${this.i18n.t(`integration.steps.${n}`)}<span class="fj-sr-only">${this.i18n.t(`integration.state.${s}`)}</span>${r}</span></li>`}).join("")}</ul>`}renderActions(e){switch(e){case"pending":return`<button type="button" class="fj-btn fj-btn-g" data-action="close">${this.i18n.t("integration.pending.later")}</button>\n <button type="button" class="fj-btn fj-btn-p" data-action="run">${this.i18n.t("integration.pending.start")}</button>`;case"checking":return`<button type="button" class="fj-btn fj-btn-g" data-action="cancel" aria-busy="true">${this.i18n.t("integration.checking.cancel")}</button>`;case"ok":return`<button type="button" class="fj-btn fj-btn-p" data-action="continue">${this.i18n.t("integration.ok.button")}</button>`;case"ko":return`<button type="button" class="fj-btn fj-btn-g" data-action="copy">${s("copy")}<span>${this.i18n.t("integration.ko.copy")}</span></button>\n <button type="button" class="fj-btn fj-btn-p" data-action="run">${s("retry")}${this.i18n.t("integration.ko.retry")}</button>`;case"expired":return`<button type="button" class="fj-btn fj-btn-p" data-action="close">${this.i18n.t("integration.expired.close")}</button>`}}bind(e,t){const i=(e,i)=>{var n;null===(n=t.dialog.querySelector(`[data-action="${e}"]`))||void 0===n||n.addEventListener("click",i)};i("close",()=>{t.close()}),i("run",()=>{this.run()}),i("cancel",()=>{var e;null===(e=this.check)||void 0===e||e.abort(),this.show("pending")}),i("continue",async()=>{await t.close(),this.config.onSuccess()}),i("copy",()=>{this.copyDiagnostic(t)}),"checking"!==e&&(this.check=null)}async run(){var e;this.show("checking",{project:"ok",api:"run",subscription:"wait"});const t=await this.checkConnectivity();if(!this.config.signal.aborted&&(null===(e=this.modal)||void 0===e?void 0:e.isOpen)&&null!==this.check){if(this.check=null,t)return this.status="ok",void this.show("ok",{project:"ok",api:"ok",subscription:"ok"});this.status="ko","no_subscription"===this.error?this.show("expired",{project:"ok",api:"ok",subscription:"err"}):"project_not_found"===this.error?this.show("ko",{project:"err",api:"ok",subscription:"wait"}):this.show("ko",{project:"ok",api:"err",subscription:"wait"})}}async checkConnectivity(){var e;const t=new AbortController;this.check=t;const i=()=>t.abort();this.config.signal.addEventListener("abort",i,{once:!0});try{const i=await Y(this.config.connectivityCheckUrl,{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify(this.config.connectivityCheckBody)});if(i.ok)return this.error=null,!0;let n="";try{n=null!==(e=(await i.json()).error)&&void 0!==e?e:""}catch(e){}return this.error="no_subscription"===n||"project_not_found"===n?n:403===i.status?"domain_not_allowed":"communication_error",!1}catch(e){return this.error="communication_error",!1}finally{this.config.signal.removeEventListener("abort",i)}}async copyDiagnostic(e){var t,i;const n=[...e.dialog.querySelectorAll(".fj-steps li")].map(e=>`- ${e.dataset.step}: ${e.dataset.state}`),a=[`Feedjet ${this.config.module} v3.0.0-rc.1`,`Date: ${(new Date).toISOString()}`,`Page: ${location.origin}${location.pathname}`,`API: ${this.config.connectivityCheckUrl}`,`Error: ${null!==(t=this.error)&&void 0!==t?t:"none"}`,`Locale: ${this.i18n.locale}`,`Browser: ${navigator.userAgent}`,...n].join("\n"),s=e.dialog.querySelector('[data-action="copy"] span');try{await navigator.clipboard.writeText(a),s&&(s.textContent=this.i18n.t("integration.ko.copied"))}catch(t){const n=document.createElement("textarea");n.className="fj-input",n.readOnly=!0,n.rows=6,n.value=a,n.setAttribute("aria-label",this.i18n.t("integration.ko.copy")),null===(i=e.dialog.querySelector(".fj-check-body"))||void 0===i||i.append(n),n.select()}}}const ee="fjHp";function te(){return`<div class="fj-hp" aria-hidden="true"><input type="text" name="${ee}" tabindex="-1" autocomplete="off"></div>`}function ie(e){var t,i;return null!==(i=null===(t=e.querySelector(`input[name="${ee}"]`))||void 0===t?void 0:t.value)&&void 0!==i?i:""}function ne(e){return"dark"===e||"auto"===e?e:"light"}function ae(e,t){return`<a class="fj-credit" href="https://www.feedjet.io/?utm_source=widget&utm_medium=${t}" target="_blank" rel="noopener nofollow" aria-label="${U(e.t("form.credit"))}" title="Feedjet"><svg width="22" height="22" viewBox="0 0 46 46" fill="none" aria-hidden="true"><path d="M22.7393 36.3239C30.2453 36.3239 36.3302 30.2391 36.3302 22.7331C36.3302 15.227 30.2453 9.14221 22.7393 9.14221C15.2333 9.14221 9.14844 15.227 9.14844 22.7331C9.14844 30.2391 15.2333 36.3239 22.7393 36.3239Z" fill="currentColor"/><path d="M28.2375 15.3261C29.9301 16.4746 29.647 18.8588 29.9442 22.1003C30.2172 25.093 25.6997 29.9118 22.3046 29.8552C18.9073 29.7986 15.678 28.4963 13.8641 25.1456C12.121 21.9223 12.3232 20.0377 13.219 17.783C14.2665 15.1522 17.6597 12.4668 21.706 12.6204C25.7523 12.7741 26.452 14.1148 28.2375 15.3261Z" fill="#5B76C4"/><path d="M29.8269 30.5225C31.4709 29.3395 34.0107 25.9868 33.2828 21.7969C32.4456 16.9741 30.5286 13.864 27.1637 14.3594C23.7382 14.8629 20.9739 16.1167 21.0528 19.3986C21.1317 22.6806 22.8748 25.097 20.7677 27.2102C18.6606 29.3233 20.8425 33.6244 23.3176 33.3231C27.0667 32.8681 28.2334 31.667 29.8269 30.5225Z" fill="#3D55A3"/><path d="M18.9803 20.8425C20.4605 20.1448 23.3037 18.8527 23.884 17.3623C24.4644 15.872 24.523 13.7811 23.0226 12.6548C21.5201 11.5305 19.3989 11.0108 17.6376 12.3454C15.8763 13.68 12.9503 15.8356 14.0604 17.8274C15.1686 19.8213 15.0007 21.5462 16.8732 21.2975C18.7437 21.0487 18.9823 20.8425 18.9823 20.8425H18.9803Z" fill="#C0D2FF"/><path d="M35.0728 6.918C34.729 6.918 34.3812 6.80071 34.0981 6.5621C32.8969 5.55102 30.7049 4.53793 29.9608 4.23258C29.1863 3.91511 28.8163 3.02738 29.1337 2.2529C29.4512 1.47842 30.3389 1.10837 31.1134 1.42584C31.2408 1.47842 34.2417 2.72002 36.0495 4.23865C36.6905 4.77856 36.7734 5.73504 36.2355 6.37606C35.9362 6.73398 35.5055 6.918 35.0728 6.918Z" fill="currentColor"/><path d="M17.0873 3.82C16.4362 3.82 15.8336 3.39535 15.6354 2.74018C15.3948 1.93738 15.8498 1.09212 16.6505 0.851488C16.7597 0.819134 19.3602 0.0446511 21.8171 0.000163831C22.6604 -0.0119691 23.3459 0.651296 23.36 1.49049C23.3742 2.32766 22.7089 3.01923 21.8697 3.03339C19.8273 3.06978 17.5463 3.74923 17.5241 3.75529C17.3785 3.79978 17.2309 3.82 17.0873 3.82Z" fill="currentColor"/><path d="M6.11523 11.0977C5.78765 11.0977 5.46006 10.9925 5.181 10.7762C4.52178 10.2605 4.4045 9.30608 4.92014 8.64685C4.99092 8.55586 6.69963 6.38407 8.72178 4.90992C9.3992 4.41652 10.3476 4.56414 10.841 5.24156C11.3344 5.91898 11.1868 6.86736 10.5094 7.36077C8.82491 8.58821 7.32448 10.4971 7.31032 10.5153C7.01104 10.8975 6.56617 11.0977 6.11523 11.0977Z" fill="currentColor"/><path d="M1.51683 23.633C1.51683 23.633 1.50066 23.633 1.49257 23.633C0.655398 23.6209 -0.0139346 22.9313 0.000220439 22.0942C0.000220439 21.9769 0.0527967 19.2167 0.774704 16.8285C1.01736 16.0277 1.86464 15.5728 2.66541 15.8154C3.46618 16.0581 3.92117 16.9053 3.67851 17.7061C3.07793 19.6919 3.03344 22.1144 3.03344 22.1387C3.02131 22.9677 2.34389 23.631 1.51683 23.631V23.633Z" fill="currentColor"/><path d="M4.96255 36.4008C4.47723 36.4008 3.99798 36.1683 3.70477 35.7335C3.64006 35.6385 2.12547 33.3878 1.35301 31.0563C1.09013 30.2616 1.52085 29.4042 2.31556 29.1393C3.11026 28.8764 3.96967 29.3071 4.23255 30.1018C4.87155 32.0289 6.20415 34.0147 6.2183 34.0349C6.68744 34.7285 6.50343 35.6708 5.80983 36.1399C5.54897 36.3159 5.25374 36.4008 4.96255 36.4008Z" fill="currentColor"/><path d="M15.5426 44.722C15.3768 44.722 15.209 44.6957 15.0452 44.637C14.938 44.5986 12.3739 43.7008 10.3639 42.2934C9.67636 41.8141 9.51054 40.8678 9.98979 40.1823C10.469 39.4947 11.4154 39.3289 12.1009 39.8082C13.7712 40.977 16.0178 41.7636 16.0421 41.7717C16.8327 42.0467 17.2513 42.9101 16.9763 43.7028C16.7579 44.3297 16.1715 44.722 15.5446 44.722H15.5426Z" fill="currentColor"/><path d="M23.8416 46C23.0064 46 22.327 45.3246 22.325 44.4874C22.3229 43.6503 23.0004 42.9688 23.8375 42.9668C25.9102 42.9607 28.2559 42.2954 28.2802 42.2894C29.085 42.0588 29.9242 42.5239 30.1567 43.3288C30.3873 44.1336 29.9242 44.9728 29.1194 45.2053C29.0082 45.2377 26.3511 45.994 23.8456 46H23.8416Z" fill="currentColor"/><path d="M36.3607 41.3187C35.9037 41.3187 35.4507 41.1125 35.1515 40.7202C34.6439 40.0529 34.7733 39.1025 35.4406 38.5949C37.0826 37.3472 38.5507 35.4019 38.5648 35.3817C39.0684 34.7124 40.0167 34.5749 40.6881 35.0784C41.3574 35.5799 41.4949 36.5303 40.9934 37.1996C40.9247 37.2926 39.2645 39.4988 37.2767 41.0093C37.0017 41.2176 36.6802 41.3187 36.3607 41.3187Z" fill="currentColor"/><path d="M43.5453 30.3365C43.3876 30.3365 43.2279 30.3122 43.0681 30.2597C42.2734 29.9968 41.8407 29.1394 42.1035 28.3427C42.7547 26.3751 42.8679 23.9384 42.8699 23.9142C42.9063 23.077 43.6141 22.4299 44.4513 22.4663C45.2884 22.5027 45.9355 23.2105 45.9011 24.0456C45.8971 24.1609 45.7697 26.9211 44.9851 29.2951C44.7748 29.9321 44.1823 30.3365 43.5453 30.3365Z" fill="currentColor"/><path d="M43.6627 16.5513C43.0864 16.5513 42.5364 16.2217 42.2816 15.6616C41.3878 13.694 39.8267 12.2461 39.8105 12.232C39.1897 11.6698 39.1432 10.7093 39.7054 10.0905C40.2675 9.46974 41.228 9.42323 41.8468 9.98538C41.9297 10.0602 43.875 11.8437 45.0418 14.4058C45.3876 15.1682 45.0519 16.068 44.2896 16.4138C44.0853 16.5068 43.873 16.5513 43.6627 16.5513Z" fill="currentColor"/></svg></a>`}const se=["broken","display","slow","error_message","other"],oe="fj-feedback-title",re="fj-feedback-panel";function le(e){var t;const i=null!==(t=e.status)&&void 0!==t?t:"";if(!e.reply)return i;let n=5381;for(let t=0;t<e.reply.length;t++)n=33*n+e.reply.charCodeAt(t)>>>0;return`${i}\0${n.toString(36)}`}const de={loved:{className:"fj-st-coeur",icon:"heart"},next_step:{className:"fj-st-etape",icon:"flag"},planned:{className:"fj-st-tuyaux",icon:"pipe"},transmitted:{className:"fj-st-transmis",icon:"team"},to_study:{className:"fj-st-etude",icon:"search"},impossible:{className:"fj-st-impossible",icon:"ban"},not_a_bug:{className:"fj-st-impossible",icon:"ban"},out_of_scope:{className:"fj-st-impossible",icon:"ban"}};class ce{constructor(e){var t;this.abortController=new AbortController,this.destroyed=!1,this.launcher=null,this.launcherSurface=null,this.opening=!1,this.updatesCount=0,this.hasConsentFeedback=!1,this.hasConsentScreenFeedback=!1,this.hasConsentAttachment=!1,this.view="form",this.tab="enhancement",this.sentType="enhancement",this.title="",this.description="",this.category=null,this.consent=!1,this.file=null,this.fileError="",this.capture=ce.emptyCapture(),this.errors={},this.submitError=null,this.sending=!1,this.startedAt=null,this.disclosure=!1,this.decisions=[],this.decisionsStatus="idle",this.filter="all",this.expanded=new Set,this.newIds=new Map,this.decisionsViewed=!1,this.onLauncherClick=()=>{this.modal.isOpen?this.modal.close():this.open()},this.placeLauncherLabel=()=>{var e;const t=this.launcherSurface,i=null==t?void 0:t.find(".fj-launcher-wrap"),n=null===(e=this.launcher)||void 0===e?void 0:e.querySelector(".fj-launcher-label > span > span");if(!t||!i||!n)return;const a=i.getBoundingClientRect(),s=function(e){let t=0,i=document.documentElement.clientWidth;for(let n=e.parentElement;n&&n!==document.documentElement;n=n.parentElement){if("visible"===getComputedStyle(n).overflowX)continue;const e=n.getBoundingClientRect();t=Math.max(t,e.left),i=Math.min(i,e.right)}return{left:t,right:i}}(t.host),o=a.height-4+n.offsetWidth,r=a.right-s.left>=o?"left":s.right-a.left>=o?"right":"none";i.setAttribute("data-grow",r)},this.i18n=new n(e.locale);const i=null!==(t=e.apiUrl)&&void 0!==t?t:e.baseApiUrl;if(!i)throw new Error("Feedback: `apiUrl` option is required");this.options=Object.assign(Object.assign({},e),{apiUrl:i.trim().replace(/\/$/,"")}),this.surface=new v("fj-feedback-root",this.theme),this.modal=new k(this.surface,{className:"fj-feedback",labelledBy:oe,closeOnBackdrop:()=>"thanks"===this.view,onClose:()=>this.onClosed()}),this.integrationTest=new X({i18n:()=>this.i18n,surface:this.surface,module:"Feedback",connectivityCheckUrl:`${this.options.apiUrl}/api/connectivity_check/feedback`,connectivityCheckBody:{uuidProject:e.projectId},signal:this.abortController.signal,onSuccess:()=>{this.startFeedback(this.tab)}}),this.init(e.target)}launcherFace(){return`${u("welcome",44)}${u("happy",44)}<span class="fj-launcher-label" aria-hidden="true"><span><span>${U(this.i18n.t("launcher.label"))}</span></span></span>`}static emptyCapture(){return{enabled:!1,state:"idle",blob:null,url:null,visible:!0,job:null}}get theme(){return ne(this.options.theme)}get user(){return"function"==typeof this.options.user?this.options.user():this.options.user}get canFollow(){var e;return!!(null===(e=this.user)||void 0===e?void 0:e.id)}get tabs(){return this.canFollow?["enhancement","issue","decision"]:["enhancement","issue"]}get draftKey(){var e,t;return`fj-feedback-draft:${this.options.projectId}:${null!==(t=null===(e=this.user)||void 0===e?void 0:e.id)&&void 0!==t?t:""}`}get seenKey(){var e,t;return`fj-feedback-seen:${this.options.projectId}:${null!==(t=null===(e=this.user)||void 0===e?void 0:e.id)&&void 0!==t?t:""}`}get updatesKey(){var e,t;return`fj-feedback-updates:${this.options.projectId}:${null!==(t=null===(e=this.user)||void 0===e?void 0:e.id)&&void 0!==t?t:""}`}destroy(){var e,t,i;this.destroyed||(this.destroyed=!0,this.abortController.abort(),null===(e=this.launcher)||void 0===e||e.removeEventListener("click",this.onLauncherClick),null===(t=this.launcher)||void 0===t||t.removeAttribute("data-feedjet-updates"),null===(i=this.launcherSurface)||void 0===i||i.remove(),this.integrationTest.destroy(),this.modal.destroy(),this.surface.remove(),this.dropCapture())}showThanks(e="enhancement"){this.sentType="issue"===e?"issue":"enhancement",this.view="thanks",this.renderThanks(),this.openModal()}async open(e="enhancement"){var t,i;if(!this.destroyed&&!this.opening)if(this.modal.isOpen)"form"===this.view&&this.tabs.includes(e)&&this.selectTab(e);else{this.opening=!0,null===(t=this.launcher)||void 0===t||t.setAttribute("aria-busy","true");try{await this.startFeedback(e)}finally{this.opening=!1,null===(i=this.launcher)||void 0===i||i.removeAttribute("aria-busy")}}}close(){return this.modal.close()}setLocale(e){this.i18n=new n(e),this.launcherSurface&&this.setLauncherOpen(this.modal.isOpen),this.rerender()}setTheme(e){this.options.theme=e;for(const e of[this.surface,this.launcherSurface])null==e||e.root.setAttribute("data-fj-theme",this.theme)}setUser(e){this.options.user=e,this.decisions=[],this.decisionsStatus="idle",this.decisionsViewed=!1,this.newIds=new Map,this.expanded.clear(),this.filter="all",this.updatesCount=0,this.renderLauncherBadge(),this.refreshUpdates(),this.tabs.includes(this.tab)||(this.tab="enhancement"),this.rerender(),this.modal.isOpen&&"decision"===this.tab&&this.loadDecisions()}rerender(){this.modal.isOpen&&("thanks"===this.view?this.renderThanks():this.renderForm())}init(e){var t,i,n,a;e&&(e instanceof HTMLElement?(function(){try{CSS.registerProperty({name:"--fj-launcher-size",syntax:"<length>",inherits:!0,initialValue:"56px"})}catch(e){}}(),this.launcherSurface=new v("fj-feedback-launcher",this.theme,e,"span"),this.launcherSurface.root.innerHTML=`\n <span class="fj-launcher-wrap">\n <button type="button" class="fj-launcher" aria-label="${U(this.i18n.t("launcher.label"))}" aria-haspopup="dialog" aria-expanded="false">${this.launcherFace()}</button>\n <span class="fj-launcher-pip" aria-hidden="true">${s("chat",12,{stroke:2.6})}</span>\n </span>`,this.launcher=this.launcherSurface.find(".fj-launcher"),null===(t=this.launcher)||void 0===t||t.addEventListener("pointerenter",this.placeLauncherLabel),null===(i=this.launcher)||void 0===i||i.addEventListener("focus",this.placeLauncherLabel)):this.launcher=null!==(n=e.feedback)&&void 0!==n?n:null,null===(a=this.launcher)||void 0===a||a.addEventListener("click",this.onLauncherClick),this.refreshUpdates())}setLauncherOpen(e){this.launcherSurface&&this.launcher&&(this.launcher.setAttribute("aria-expanded",String(e)),this.launcher.innerHTML=e?s("close",22,{stroke:2.2}):this.launcherFace(),this.renderLauncherBadge())}renderLauncherBadge(){var e,t;if(!(null===(e=this.launcherSurface)||void 0===e?void 0:e.find(".fj-launcher-wrap"))||!this.launcher)return;null===(t=this.launcher.querySelector(".fj-launcher-badge"))||void 0===t||t.remove();const i=this.i18n.t("launcher.label");this.updatesCount>0&&!this.modal.isOpen?(this.launcher.insertAdjacentHTML("beforeend",`<span class="fj-launcher-badge" aria-hidden="true">${this.updatesCount}</span>`),this.launcher.setAttribute("aria-label",`${i} ${this.i18n.tp("launcher.updates",this.updatesCount)}`)):this.launcher.setAttribute("aria-label",i)}setUpdatesCount(e){var t,i,n,a;this.updatesCount=e,this.renderLauncherBadge(),this.launcherSurface||(e>0?null===(t=this.launcher)||void 0===t||t.setAttribute("data-feedjet-updates",String(e)):null===(i=this.launcher)||void 0===i||i.removeAttribute("data-feedjet-updates"));try{null===(a=(n=this.options).onUpdates)||void 0===a||a.call(n,e)}catch(e){}}async refreshUpdates(){if(!this.canFollow)return;const e=K(this.updatesKey);if(e&&Date.now()-e.at<6e5)this.setUpdatesCount(e.count);else try{const e=await this.fetchDecisions(0);if(this.destroyed)return;const t=this.findNew(e).size;Z(this.updatesKey,{at:Date.now(),count:t}),this.setUpdatesCount(t)}catch(e){}}async startFeedback(e){var t;await this.loadConsents(),this.destroyed||this.integrationTest.handleIntegrationStatus()||(this.restoreDraft(),null!==(t=this.startedAt)&&void 0!==t||(this.startedAt=Date.now()),this.tab=this.tabs.includes(e)?e:"enhancement",this.view="form",this.renderForm(),this.openModal(),this.focusFirstField(),this.canFollow&&this.loadDecisions())}openModal(){this.modal.isOpen||G(this.options.onOpen),this.modal.open(),this.setLauncherOpen(!0)}onClosed(){this.decisionsViewed&&this.markSeen(),this.decisionsViewed=!1,"loading"!==this.decisionsStatus&&(this.decisionsStatus="idle"),this.filter="all",this.resetForm(),this.setLauncherOpen(!1),G(this.options.onClose)}resetForm(){this.title="",this.description="",this.category=null,this.consent=!1,this.file=null,this.fileError="",this.errors={},this.submitError=null,this.sending=!1,this.disclosure=!1,this.startedAt=null,this.dropCapture()}dropCapture(){this.capture.url&&URL.revokeObjectURL(this.capture.url),this.capture=ce.emptyCapture()}restoreDraft(){var e,t;const i=K(this.draftKey);i&&(this.title||(this.title=i.title),this.description||(this.description=i.description),null!==(e=this.startedAt)&&void 0!==e||(this.startedAt=null!==(t=i.startedAt)&&void 0!==t?t:null))}saveDraft(){var e;Z(this.draftKey,this.title||this.description?{title:this.title,description:this.description,startedAt:null!==(e=this.startedAt)&&void 0!==e?e:void 0}:null)}async loadConsents(){try{const e=await Y(`${this.options.apiUrl}/api/projects/${this.options.projectId}/consents`,{retries:2,signal:this.abortController.signal});if(!e.ok)throw new Error("Failed to fetch consents");const t=await e.json();this.hasConsentFeedback=!!t.consentFeedback,this.hasConsentScreenFeedback=!!t.consentScreenFeedback,this.hasConsentAttachment=!!t.consentAttachmentsFeedback,this.integrationTest.setStatus(t.feedbackIntegrationTest||"pending","no_subscription"===t.error?"no_subscription":null)}catch(e){if(this.destroyed)return;this.hasConsentFeedback=!1,this.hasConsentScreenFeedback=!1,this.hasConsentAttachment=!1,this.integrationTest.setStatus("ko","communication_error")}}renderForm(){const e=this.tabs,t=e.indexOf(this.tab);this.modal.dialog.innerHTML=`\n <div class="fj-head" data-slot="head"></div>\n <div class="fj-tabs" role="tablist" aria-label="${U(this.i18n.t("form.tablist"))}" style="--fj-tab-count:${e.length};--fj-tab-index:${t}">\n <span class="fj-glider" aria-hidden="true"></span>\n ${e.map(e=>this.renderTab(e)).join("")}\n </div>\n <form class="fj-form" novalidate style="display:contents">\n <div class="fj-body" id="${re}" role="tabpanel" aria-labelledby="fj-tab-${this.tab}" data-version="v3.0.0-rc.1"></div>\n <div class="fj-foot" data-slot="foot"></div>\n </form>`,this.bindShell(),this.renderView()}renderTab(e){const t=e===this.tab,i="enhancement"===e?"idea":"issue"===e?"bug":"list",n="decision"===e&&this.newIds.size>0?`<span class="fj-badge" aria-label="${U(this.i18n.tp("launcher.updates",this.newIds.size))}">${this.newIds.size}</span>`:"";return`<button type="button" role="tab" class="fj-tab" id="fj-tab-${e}" data-tab="${e}" aria-controls="${re}" aria-selected="${t}" tabindex="${t?0:-1}">${s(i)}<span>${U(this.i18n.t(`${e}.tab`))}</span>${n}</button>`}renderView(e=!1,t=0){this.modal.isOpen?f(this.modal.dialog,()=>this.drawView(e,t)):this.drawView(e,t)}drawView(e,t){const i=this.modal.dialog,n=i.querySelector('[data-slot="head"]'),a=i.querySelector(`#${re}`),s=i.querySelector('[data-slot="foot"]');n&&a&&s&&(n.innerHTML=this.renderHead(),a.setAttribute("aria-labelledby",`fj-tab-${this.tab}`),a.innerHTML="decision"===this.tab?this.renderDecisions():this.renderFields(this.tab),a.setAttribute("aria-busy",String("decision"===this.tab&&"loading"===this.decisionsStatus)),"decision"===this.tab?a.tabIndex=0:a.removeAttribute("tabindex"),s.innerHTML=this.renderFoot(),e&&(a.scrollTop=0,a.style.setProperty("--fj-dir",String(t)),a.classList.remove("fj-enter"),a.offsetWidth,a.classList.add("fj-enter")),this.bindView())}renderHead(){return`${u("enhancement"===this.tab?"idea":"issue"===this.tab?"alert":"happy",44)}\n <div class="fj-head-text">\n <h2 id="${oe}">${U(this.i18n.t(`${this.tab}.title`))}</h2>\n <p>${U(this.i18n.t(`${this.tab}.subtitle`))}</p>\n </div>\n <button type="button" class="fj-iconbtn" data-action="close" aria-label="${U(this.i18n.t("form.close"))}">${s("close",20)}</button>`}renderFoot(){const e=this.options.removeCredit?'<span class="fj-meta"></span>':ae(this.i18n,"feedback");if("decision"===this.tab)return`${e}<button type="button" class="fj-btn fj-btn-p" data-action="close">${U(this.i18n.t("form.close"))}</button>`;const t=this.sending?`${o()}${U(this.i18n.t("form.sending"))}`:U(this.i18n.t(`${this.tab}.submit`));return`${e}\n <button type="button" class="fj-btn fj-btn-g" data-action="close">${U(this.i18n.t("form.cancel"))}</button>\n <button type="submit" class="fj-btn fj-btn-p" data-action="submit"${this.sending?' aria-busy="true"':""}>${t}</button>`}renderFields(e){const t=this.sending?" readonly":"",i=Object.keys(this.errors).length;return`\n ${i?`<div class="fj-notice fj-err" role="alert" data-slot="summary">${s("alert",20)}<span><b>${U(this.i18n.tp("form.summary",i))}</b><br><span class="fj-small">${U(this.i18n.t("form.summary_focus"))}</span></span></div>`:""}\n ${this.submitError?`<div class="fj-notice fj-err" role="alert">${s("alert",20)}<span>${U(this.i18n.t(this.submitError))}</span></div>`:""}\n ${"issue"===e?this.renderCategories():""}\n <div class="fj-field">\n <label class="fj-lab" for="fj-title">${U(this.i18n.t(`${e}.field_title`))}</label>\n <input id="fj-title" name="feedbackTitle" type="text" class="fj-input" maxlength="120" autocomplete="off" placeholder="${U(this.i18n.t(`${e}.placeholder_title`))}" value="${U(this.title)}"${this.invalid("title","fj-title-msg")}${t}>\n <span data-slot="title-msg">${this.fieldMessage("title")}</span>\n </div>\n <div class="fj-field">\n <label class="fj-lab" for="fj-description">${U(this.i18n.t(`${e}.field_description`))}</label>\n <textarea id="fj-description" name="feedbackDescription" class="fj-input" maxlength="10000" placeholder="${U(this.i18n.t(`${e}.placeholder_description`))}"${"issue"===e?' style="height:96px"':""}${this.invalid("description","fj-description-msg")}${t}>${U(this.description)}</textarea>\n <span data-slot="description-msg">${this.fieldMessage("description")}</span>\n </div>\n ${"issue"===e&&this.hasConsentScreenFeedback?`<div data-slot="capture">${this.renderCapture()}</div>`:""}\n ${this.hasConsentFeedback?this.renderConsent(e):""}\n ${this.hasConsentAttachment?`<div class="fj-field" data-slot="file">${this.renderFile(e)}</div>`:""}\n ${te()}`}invalid(e,t){return this.errors[e]?` aria-invalid="true" aria-describedby="${t}"`:"title"===e?' aria-describedby="fj-title-help"':""}fieldMessage(e){const t=this.errors[e];return t?`<span class="fj-errmsg" id="fj-${e}-msg">${s("alert",16)}${U(this.i18n.t(t))}</span>`:"title"===e?`<span class="fj-help" id="fj-title-help"><span>${U(this.i18n.t(`${this.tab}.hint_title`))}</span><span data-slot="counter" aria-hidden="true">${U(this.i18n.tf("form.counter",{n:this.title.length,max:120}))}</span></span>`:""}renderCategories(){return`<div class="fj-field">\n <span class="fj-lab" id="fj-category-label">${U(this.i18n.t("issue.category"))} <span class="fj-opt">${U(this.i18n.t("form.optional"))}</span></span>\n <div class="fj-chips" role="group" aria-labelledby="fj-category-label">\n ${se.map(e=>`<button type="button" class="fj-chip" data-category="${e}" aria-pressed="${this.category===e}">${U(this.i18n.t(`issue.categories.${e}`))}</button>`).join("")}\n </div>\n </div>`}renderCapture(){const e=e=>`<input type="checkbox" role="switch" class="fj-sw" data-action="capture" aria-label="${U(this.i18n.t("form.capture.toggle"))}"${e?" checked":""}${this.sending?" disabled":""}>`,t=this.capture;if(!t.enabled||"failed"===t.state){const i="failed"===t.state?this.i18n.t("form.capture.failed"):this.i18n.t("form.capture.off_hint");return`<div class="fj-capt"><span class="fj-capt-icon">${s("camera",22)}</span><div class="fj-capt-text"><span class="fj-capt-title"><b>${U(this.i18n.t("form.capture.off"))}</b></span><span class="fj-capt-hint">${U(i)}</span></div>${e(!1)}</div>`}const i="ready"!==t.state,n=t.url&&t.visible?`<img src="${t.url}" alt="">`:"",a=t.visible?`<div class="fj-thumb${n?" fj-has-img":""}" aria-hidden="true">${n}</div>`:"",o=i?this.i18n.t("form.capture.pending"):this.i18n.t("form.capture.on_hint"),r=i?"":`<button type="button" class="fj-link" data-action="thumb" aria-pressed="${!t.visible}">${U(this.i18n.t(t.visible?"form.capture.hide":"form.capture.show"))}</button>`;return`<div class="fj-capt"${i?' aria-busy="true"':""}>${a}<div class="fj-capt-text"><span class="fj-capt-title"><b>${U(this.i18n.t("form.capture.on"))}</b>${r}</span><span class="fj-capt-hint">${U(o)}</span></div>${e(!0)}</div>`}renderConsent(e){const t=this.errors.consent?`<span class="fj-errmsg" id="fj-consent-msg">${s("alert",16)}${U(this.i18n.t(this.errors.consent))}</span>`:"",i=U("issue"===e?this.i18n.t("form.tech.label"):this.i18n.t("form.consent.label")),n="issue"===e?`${U(this.i18n.t("form.tech.hint"))} `:"",a="issue"===e?this.i18n.t("form.tech.more"):this.i18n.t("form.consent.more");return`<div class="fj-group">\n <label class="fj-row">\n <input type="checkbox" class="fj-cb" name="consentFeedback"${this.consent?" checked":""}${this.errors.consent?' aria-invalid="true" aria-describedby="fj-consent-msg"':""}${this.sending?" disabled":""}>\n <span class="fj-row-text">${i}${"issue"===e?` <span class="fj-opt">${U(this.i18n.t("form.required"))}</span>`:""}\n <small>${"issue"===e?"":`<span class="fj-opt">${U(this.i18n.t("form.required"))}</span> · `}${n}<button type="button" class="fj-link" data-action="disclosure" aria-expanded="${this.disclosure}" aria-controls="fj-consent-detail">${U(a)}</button></small>\n <span class="fj-disclosure" id="fj-consent-detail"${this.disclosure?" data-open":""}><span>${U(this.i18n.t("form.consent.detail"))}</span></span>\n <span data-slot="consent-msg">${t}</span>\n </span>\n </label>\n </div>`}renderFile(e){const t=this.fileError?`<span class="fj-errmsg" role="alert">${s("alert",16)}${U(this.i18n.t(this.fileError))}</span>`:"",i='<input type="file" name="attachment" accept=".jpg,.jpeg,.png,.gif,.webp,.bmp,.tif,.tiff,.heic,.heif,.mp4,.webm,.mov,.pdf,.txt,.log,.csv,.json,.har,.rtf,.eml,.zip,.gz,.7z,.rar,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.odt,.ods,.odp" hidden>';if(this.file)return`${i}<div class="fj-file">${s("clip",20)}<span class="fj-file-name">${U(this.file.name)}</span><span>${n=this.file.size,n<1048576?`${Math.max(1,Math.round(n/1024))} Ko`:`${(n/1024/1024).toFixed(1)} Mo`}</span><button type="button" class="fj-iconbtn" data-action="remove-file" aria-label="${U(this.i18n.t("form.attachment.remove"))}"${this.sending?" disabled":""}>${s("close",18)}</button></div>${t}`;var n;const a="issue"===e?`${s("clip",20)}<span><b>${U(this.i18n.t("form.attachment.add"))}</b> <span class="fj-small">· ${U(this.i18n.t("form.attachment.hint_short"))}</span></span>`:`${s("upload",20)}<span><b>${U(this.i18n.t("form.attachment.add"))}</b> ${U(this.i18n.t("form.attachment.drop"))}<br><span class="fj-small">${U(this.i18n.t("form.attachment.hint"))}</span></span>`;return`${i}<button type="button" class="fj-drop${"issue"===e?" fj-compact":""}" data-action="pick-file"${this.sending?" disabled":""}>${a}</button>${t}`}renderDecisions(){if("error"===this.decisionsStatus)return`<div class="fj-notice fj-err" role="alert">${s("alert",20)}<span><b>${U(this.i18n.t("decision.error_title"))}</b><br><span class="fj-small">${U(this.i18n.t("decision.error_text"))}</span></span></div>\n <div><button type="button" class="fj-btn fj-btn-g" data-action="retry">${s("retry")}${U(this.i18n.t("decision.retry"))}</button></div>`;if("loaded"!==this.decisionsStatus){const e='<div class="fj-card" aria-hidden="true"><div class="fj-sk" style="width:90px;height:12px"></div><div class="fj-sk" style="width:70%;height:16px"></div><div class="fj-sk" style="width:95%;height:12px"></div><div class="fj-sk" style="width:120px;height:22px;border-radius:11px"></div></div>';return`<span class="fj-sr-only" role="status">${U(this.i18n.t("decision.loading"))}</span><div class="fj-list">${e.repeat(3)}</div>`}if(0===this.decisions.length)return`<div class="fj-empty">\n ${u("hello",72)}\n <h3>${U(this.i18n.t("decision.empty_title"))}</h3>\n <p>${U(this.i18n.t("decision.empty_text"))}</p>\n <div class="fj-empty-actions">\n <button type="button" class="fj-btn fj-btn-g" data-goto="enhancement">${s("idea")}${U(this.i18n.t("decision.propose"))}</button>\n <button type="button" class="fj-btn fj-btn-g" data-goto="issue">${s("bug")}${U(this.i18n.t("decision.report"))}</button>\n </div>\n </div>`;const e=e=>"all"===e?this.decisions.length:this.decisions.filter(t=>t.type===e).length,t=(t,i)=>`<button type="button" class="fj-chip" data-filter="${t}" aria-pressed="${this.filter===t}">${U(this.i18n.tf(i,{n:e(t)}))}</button>`,i=this.sortedDecisions().filter(e=>"all"===this.filter||e.type===this.filter),n=this.newIds.size?`<p class="fj-updates">${U(this.i18n.tp("decision.updates",this.newIds.size))}</p>`:"",a=i.length?`<ul class="fj-list">${i.map((e,t)=>`<li style="--fj-i:${t}">${this.renderCard(e)}</li>`).join("")}</ul>`:`<p class="fj-updates">${U(this.i18n.t("decision.empty_filtered"))}</p>`;return`<div class="fj-chips" role="group" aria-label="${U(this.i18n.t("decision.filter"))}">\n ${t("all","decision.all")}${t("enhancement","decision.ideas")}${t("issue","decision.issues")}\n </div>\n ${n}\n ${a}`}sortedDecisions(){return[...this.decisions].sort((e,t)=>Number(this.newIds.has(t.id))-Number(this.newIds.has(e.id))||new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())}renderCard(e){const t="issue"===e.type?"issue":"enhancement",i=this.newIds.get(e.id),n=i?`<span class="fj-card-new"><span class="fj-dot" aria-hidden="true"></span>${U(this.i18n.t("reply"===i?"decision.new_reply":"decision.new_status"))}</span>`:"",a=e.status?this.renderStatus(t,e.status):"",o=U(`fj-desc-${e.id}`),r=this.expanded.has(e.id);return`<article class="fj-card" data-type="${t}">\n <div class="fj-card-top">${s("issue"===t?"bug":"idea",14,{stroke:2})}<span>${U(this.i18n.t(`decision.type.${t}`))}</span>${n}</div>\n <h3>${U(e.title)}</h3>\n <p id="${o}" data-slot="description"${r?" data-open":""}>${U(e.description)}</p>\n <button type="button" class="fj-link fj-more" data-expand="${U(e.id)}" aria-controls="${o}" aria-expanded="${r}"${r?"":" hidden"}>${U(this.i18n.t(r?"decision.less":"decision.more"))}</button>\n ${e.reply?`<section class="fj-reply" aria-label="${U(this.i18n.t("decision.reply"))}"><b aria-hidden="true">${U(this.i18n.t("decision.reply"))}</b><p>${U(e.reply)}</p></section>`:""}\n <div class="fj-card-bot">${a}<span class="fj-date">${U(this.i18n.tf("decision.sent_on",{date:this.i18n.shortDate(e.createdAt)}))}</span></div>\n </article>`}renderStatus(e,t){var i;const n=null!==(i=de[t])&&void 0!==i?i:{className:"fj-st-impossible",icon:"info"},a=`decision.status.${e}.${t}`,o=this.i18n.t(a);return`<span class="fj-status ${n.className}">${s(n.icon,14,{stroke:2})}${U(o===a?t:o)}</span>`}renderThanks(){var e;const t=this.sentType,i=this.canFollow?this.i18n.t(`${t}.thanks_text`):this.i18n.t(`${t}.thanks_text_anonymous`),n=this.canFollow?`<button type="button" class="fj-btn fj-btn-g" data-action="follow">${U(this.i18n.t("decision.see"))}</button>`:"",a=`\n <div class="fj-thanks-close"><button type="button" class="fj-iconbtn" data-action="close" aria-label="${U(this.i18n.t("form.close"))}">${s("close",20)}</button></div>\n <div class="fj-body fj-thanks" data-version="v3.0.0-rc.1">\n ${u("bravo",96)}\n <div role="status">\n <h2 id="${oe}" tabindex="-1">${U(this.i18n.t(`${t}.thanks_title`))}</h2>\n <p>${U(i)}</p>\n </div>\n </div>\n <div class="fj-foot fj-center">${n}<button type="button" class="fj-btn fj-btn-p" data-action="close">${U(this.i18n.t("form.close"))}</button></div>`,o=this.modal.dialog;f(o,()=>o.innerHTML=a);for(const e of o.querySelectorAll('[data-action="close"]'))e.addEventListener("click",()=>{this.modal.close()});null===(e=o.querySelector('[data-action="follow"]'))||void 0===e||e.addEventListener("click",()=>{var e;this.decisionsStatus="idle",this.view="form",this.tab="decision",f(o,()=>this.renderForm()),null===(e=o.querySelector("#fj-tab-decision"))||void 0===e||e.focus(),this.loadDecisions()}),requestAnimationFrame(()=>{var e;return null===(e=o.querySelector(`#${oe}`))||void 0===e?void 0:e.focus()})}bindShell(){var e;const t=this.modal.dialog,i=[...t.querySelectorAll('[role="tab"]')];for(const e of i)e.addEventListener("click",()=>this.selectTab(e.dataset.tab)),e.addEventListener("keydown",t=>{const n=i.indexOf(e),a="ArrowRight"===t.key?(n+1)%i.length:"ArrowLeft"===t.key?(n-1+i.length)%i.length:"Home"===t.key?0:"End"===t.key?i.length-1:-1;a<0||(t.preventDefault(),i[a].focus(),this.selectTab(i[a].dataset.tab))});null===(e=t.querySelector("form"))||void 0===e||e.addEventListener("submit",e=>{e.preventDefault(),this.submit()})}selectTab(e){if(e===this.tab||this.sending)return;const t=Math.sign(this.tabs.indexOf(e)-this.tabs.indexOf(this.tab));this.tab=e,this.errors={},this.submitError=null;const i=this.modal.dialog,n=i.querySelector('[role="tablist"]');null==n||n.style.setProperty("--fj-tab-index",String(this.tabs.indexOf(e)));for(const t of i.querySelectorAll('[role="tab"]')){const i=t.dataset.tab===e;t.setAttribute("aria-selected",String(i)),t.tabIndex=i?0:-1}this.renderView(!0,t),"decision"===e&&(this.decisionsViewed="loaded"===this.decisionsStatus,this.loadDecisions())}bindView(){var e,t;const i=this.modal.dialog;for(const e of i.querySelectorAll('[data-action="close"]'))e.addEventListener("click",()=>{this.modal.close()});if("decision"===this.tab)return void this.bindDecisions();const n=i.querySelector("#fj-title"),a=i.querySelector("#fj-description");null==n||n.addEventListener("input",()=>{this.title=n.value,this.saveDraft(),this.clearError("title");const e=i.querySelector('[data-slot="counter"]');e&&(e.textContent=this.i18n.tf("form.counter",{n:this.title.length,max:120}))}),null==a||a.addEventListener("input",()=>{this.description=a.value,this.saveDraft(),this.clearError("description")}),null===(e=i.querySelector('[name="consentFeedback"]'))||void 0===e||e.addEventListener("change",e=>{this.consent=e.target.checked,this.clearError("consent")}),null===(t=i.querySelector('[data-action="disclosure"]'))||void 0===t||t.addEventListener("click",e=>{var t;e.preventDefault(),this.disclosure=!this.disclosure,e.currentTarget.setAttribute("aria-expanded",String(this.disclosure)),null===(t=i.querySelector("#fj-consent-detail"))||void 0===t||t.toggleAttribute("data-open",this.disclosure)});for(const e of i.querySelectorAll("[data-category]"))e.addEventListener("click",()=>{const t=e.dataset.category;this.category=this.category===t?null:t;for(const e of i.querySelectorAll("[data-category]"))e.setAttribute("aria-pressed",String(e.dataset.category===this.category))});this.bindCapture(),this.bindFile()}bindDecisions(){var e;const t=this.modal.dialog;null===(e=t.querySelector('[data-action="retry"]'))||void 0===e||e.addEventListener("click",()=>{this.decisionsStatus="idle",this.loadDecisions()});for(const e of t.querySelectorAll("[data-filter]"))e.addEventListener("click",()=>{var i;this.filter=e.dataset.filter,this.refreshDecisions(),null===(i=t.querySelector(`[data-filter="${this.filter}"]`))||void 0===i||i.focus()});for(const e of t.querySelectorAll("[data-expand]")){const t=e.closest(".fj-card"),i=null==t?void 0:t.querySelector('[data-slot="description"]');t&&i&&(i.scrollHeight>i.clientHeight+1&&(e.hidden=!1),e.addEventListener("click",()=>{const n=e.dataset.expand,a=!this.expanded.has(n);a?this.expanded.add(n):this.expanded.delete(n),f(t,()=>{i.toggleAttribute("data-open",a),e.setAttribute("aria-expanded",String(a)),e.textContent=this.i18n.t(a?"decision.less":"decision.more")})}))}for(const e of t.querySelectorAll("[data-goto]"))e.addEventListener("click",()=>{var i;const n=e.dataset.goto;this.selectTab(n),null===(i=t.querySelector(`#fj-tab-${n}`))||void 0===i||i.focus()})}bindCapture(){var e,t;const i=this.modal.dialog.querySelector('[data-slot="capture"]');i&&(null===(e=i.querySelector('[data-action="capture"]'))||void 0===e||e.addEventListener("change",e=>{e.target.checked?this.takeCapture():this.dropCapture(),this.refreshCapture(!0)}),null===(t=i.querySelector('[data-action="thumb"]'))||void 0===t||t.addEventListener("click",()=>{var e;this.capture.visible=!this.capture.visible,this.refreshCapture(),null===(e=i.querySelector('[data-action="thumb"]'))||void 0===e||e.focus()}))}refreshCapture(e=!1){var t;const i=this.modal.dialog.querySelector('[data-slot="capture"]');i&&(i.innerHTML=this.renderCapture(),this.bindCapture(),e&&(null===(t=i.querySelector('[data-action="capture"]'))||void 0===t||t.focus()))}async takeCapture(){this.capture=Object.assign(Object.assign({},ce.emptyCapture()),{enabled:!0,state:"pending"});const e=this.capture;e.job=(async()=>{await async function(){try{await E()}catch(e){}}();const t=await async function(){var e;try{const{domToBlob:t}=await E(),i=document.documentElement,n=null!==(e=[document.body,i].map(e=>getComputedStyle(e).backgroundColor).find(e=>"rgba(0, 0, 0, 0)"!==e))&&void 0!==e?e:"#fff";return function(e){var t;const i=[...e.querySelectorAll('body *:not([id^="fj-"], [id^="fj-"] *)')].reverse(),n=new Map,a=[];for(const e of i){const i=getComputedStyle(e),s=Number.parseFloat(i.marginBottom)||0;n.set(e,s);const o=I(e,i)?N(e):null,r=o&&null!==(t=n.get(o))&&void 0!==t?t:0;!o||r<=0||!O(e,o,s,r)||(n.set(e,Math.max(s,r)),a.push(e))}for(const e of a)e.setAttribute(A,"")}(i),await t(i,{type:"image/jpeg",quality:.8,width:i.scrollWidth,height:i.scrollHeight,backgroundColor:n,filter:e=>!(e instanceof Element&&e.id.startsWith("fj-")),onCloneEachNode:P})}catch(e){return null}finally{for(const e of document.querySelectorAll(`[${A}]`))e.removeAttribute(A)}}();this.capture===e&&(t?(e.blob=t,e.url=URL.createObjectURL(t),e.state="ready"):(e.state="failed",e.enabled=!1),!this.destroyed&&this.modal.isOpen&&"issue"===this.tab&&this.refreshCapture())})(),await e.job}bindFile(){var e;const t=this.modal.dialog.querySelector('[data-slot="file"]');if(!t)return;const i=t.querySelector('input[type="file"]'),n=t.querySelector('[data-action="pick-file"]');null==n||n.addEventListener("click",()=>null==i?void 0:i.click()),null==i||i.addEventListener("change",()=>{var e,t;return this.setFile(null!==(t=null===(e=i.files)||void 0===e?void 0:e[0])&&void 0!==t?t:null,!0)}),null===(e=t.querySelector('[data-action="remove-file"]'))||void 0===e||e.addEventListener("click",()=>{var e;this.setFile(null),null===(e=t.querySelector('[data-action="pick-file"]'))||void 0===e||e.focus()}),n&&(n.addEventListener("dragover",e=>{e.preventDefault(),n.classList.add("fj-over")}),n.addEventListener("dragleave",()=>n.classList.remove("fj-over")),n.addEventListener("drop",e=>{var t,i,a;e.preventDefault(),n.classList.remove("fj-over"),this.setFile(null!==(a=null===(i=null===(t=e.dataTransfer)||void 0===t?void 0:t.files)||void 0===i?void 0:i[0])&&void 0!==a?a:null,!0)}))}setFile(e,t=!1){var i;this.fileError="",e&&e.size>10485760&&(this.fileError="form.attachment.too_large",e=null),this.file=e;const n=this.modal.dialog.querySelector('[data-slot="file"]');n&&"decision"!==this.tab&&(n.innerHTML=this.renderFile(this.tab),this.bindFile(),t&&(null===(i=n.querySelector('[data-action="remove-file"], [data-action="pick-file"]'))||void 0===i||i.focus()))}clearError(e){var t;if(!this.errors[e])return;delete this.errors[e];const i=this.modal.dialog;if("consent"===e){const e=i.querySelector('[name="consentFeedback"]');null==e||e.removeAttribute("aria-invalid"),null==e||e.removeAttribute("aria-describedby");const t=i.querySelector('[data-slot="consent-msg"]');t&&(t.innerHTML="")}else{const t=i.querySelector(`#fj-${e}`);null==t||t.removeAttribute("aria-invalid"),"title"===e?null==t||t.setAttribute("aria-describedby","fj-title-help"):null==t||t.removeAttribute("aria-describedby");const n=i.querySelector(`[data-slot="${e}-msg"]`);n&&(n.innerHTML=this.fieldMessage(e))}const n=i.querySelector('[data-slot="summary"] b'),a=Object.keys(this.errors).length;0===a?null===(t=i.querySelector('[data-slot="summary"]'))||void 0===t||t.remove():n&&(n.textContent=this.i18n.tp("form.summary",a))}focusFirstField(){const e=this.modal.dialog,t="decision"===this.tab||matchMedia("(pointer: coarse)").matches?e.querySelector(`#fj-tab-${this.tab}`):e.querySelector("#fj-title");null==t||t.focus()}async fetchDecisions(e=2){var t,i;const n=await Y(`${this.options.apiUrl}/api/projects/${this.options.projectId}/decisions?userId=${encodeURIComponent(null!==(i=null===(t=this.user)||void 0===t?void 0:t.id)&&void 0!==i?i:"")}`,{retries:e,signal:this.abortController.signal});if(!n.ok)throw new Error("Failed to fetch decisions");const a=await n.json();return Array.isArray(a)?a:[]}async loadDecisions(){if("loading"!==this.decisionsStatus&&"loaded"!==this.decisionsStatus){this.decisionsStatus="loading",this.refreshDecisions();try{this.decisions=await this.fetchDecisions(),this.newIds=this.findNew(this.decisions),this.decisionsStatus="loaded","decision"===this.tab&&this.modal.isOpen&&(this.decisionsViewed=!0)}catch(e){if(this.destroyed)return;this.decisionsStatus="error"}this.refreshDecisions(),this.refreshTabBadge()}}refreshDecisions(){if(this.destroyed||!this.modal.isOpen||"form"!==this.view||"decision"!==this.tab)return;const e=this.modal.dialog.querySelector(`#${re}`);e&&(f(this.modal.dialog,()=>e.innerHTML=this.renderDecisions()),e.setAttribute("aria-busy",String("loading"===this.decisionsStatus)),this.bindDecisions())}refreshTabBadge(){var e;const t=this.modal.dialog.querySelector("#fj-tab-decision");t&&(null===(e=t.querySelector(".fj-badge"))||void 0===e||e.remove(),this.newIds.size&&t.insertAdjacentHTML("beforeend",`<span class="fj-badge" aria-label="${U(this.i18n.tp("launcher.updates",this.newIds.size))}">${this.newIds.size}</span>`))}findNew(e){var t,i;const n=this.readSeen(),a=new Map;for(const s of e){const e=le(s);if(!e||n[s.id]===e)continue;const[o]=(null!==(t=n[s.id])&&void 0!==t?t:"").split("\0");a.set(s.id,o===(null!==(i=s.status)&&void 0!==i?i:"")&&s.reply?"reply":"status")}return a}readSeen(){var e;try{return JSON.parse(null!==(e=localStorage.getItem(this.seenKey))&&void 0!==e?e:"{}")}catch(e){return{}}}markSeen(){const e={};for(const t of this.decisions){const i=le(t);i&&(e[t.id]=i)}try{localStorage.setItem(this.seenKey,JSON.stringify(e))}catch(e){}this.newIds=new Map,Z(this.updatesKey,{at:Date.now(),count:0}),this.setUpdatesCount(0)}validate(){const e={},t=this.tab;return this.title.trim()||(e.title=`${t}.error_title`),this.description.trim()||(e.description=`${t}.error_description`),this.hasConsentFeedback&&!this.consent&&(e.consent="form.consent.error"),e}async submit(){var e,t,i;if(this.sending||"decision"===this.tab)return;const n=this.modal.dialog;if(this.errors=this.validate(),this.submitError=null,Object.keys(this.errors).length){this.renderView();const t=["title","description","consent"].find(e=>this.errors[e]),i="consent"===t?'[name="consentFeedback"]':`#fj-${t}`;return void(null===(e=n.querySelector(i))||void 0===e||e.focus())}const a=ie(n),s=n.querySelector('[data-action="submit"]'),o=null==s?void 0:s.offsetWidth;this.sending=!0,this.renderView();const r=n.querySelector('[data-action="submit"]');r&&o&&(r.style.width=`${o}px`),null==r||r.focus();const l=this.tab;try{await this.capture.job;const e=await Y(`${this.options.apiUrl}/api/import_feedback`,{method:"POST",body:this.toFormData(l,a),timeout:6e4,signal:this.abortController.signal});if(!e.ok)throw this.submitError=await async function(e){if(429===e.status)return"global.rate_limited";if(400!==e.status)return"global.submit_error";let t="";try{const i=await e.json();t="string"==typeof i.errors?i.errors:""}catch(e){}return t.includes(".attachment:")?"form.attachment.invalid_type":"global.submit_error"}(e),new Error("Failed to submit feedback");if(Z(this.draftKey,null),G(this.options.onSubmit,{type:l}),this.decisionsStatus="idle",this.sending=!1,!this.modal.isOpen)return;this.resetForm(),this.sentType=l,this.view="thanks",this.renderThanks()}catch(e){if(this.destroyed)return;null!==(t=this.submitError)&&void 0!==t||(this.submitError="global.submit_error"),this.sending=!1,this.modal.isOpen&&"form"===this.view&&(this.renderView(),null===(i=n.querySelector('[data-action="submit"]'))||void 0===i||i.focus())}}toFormData(e,t){var i;const n=this.user,a=function(){for(const{name:e,regex:t}of _){const i=navigator.userAgent.match(t);if(i)return{name:e,version:i[1]}}return{name:"Unknown",version:"Unknown"}}(),s=function(){var e;const t=window.screen.width,i=window.screen.height,n=window.devicePixelRatio||1;return{resolution:`${t}x${i}`,zoom:`${null!==(e=Math.round(100*n))&&void 0!==e?e:100}%`}}(),o=this.consent,r=new FormData,l="issue"===e&&this.category?`[${this.i18n.t(`issue.categories.${this.category}`)}] `:"",d=e=>o?e:"Unknown";return r.append("uuidProject",this.options.projectId),r.append("feedbackType",e),r.append("feedbackTitle",this.title.trim()),r.append("feedbackDescription",`${l}${this.description.trim()}`),r.append("userId",o&&(null==n?void 0:n.id)||"Unknown"),r.append("userName",o&&(null==n?void 0:n.fullName)||"Unknown User"),r.append("operatingSystem",d(function(){const e=navigator.userAgent;for(const[t,i]of Object.entries(S))if(i.test(e))return t;return"Unknown"}())),r.append("browserName",d(a.name)),r.append("browserVersion",d(a.version)),r.append("resolution",d(s.resolution)),r.append("zoom",d(s.zoom)),r.append("localLanguage",d(navigator.language||"Unknown")),r.append("url",d(window.location.href.slice(0,2048))),r.append("userProfile",o&&(null==n?void 0:n.profile)||"Unknown"),r.append("ip","Unknown"),r.append("widgetVersion","3.0.0-rc.1"),r.append("widgetLocale",this.i18n.locale),r.append("fjHp",t),r.append("fillDurationMs",String(Date.now()-(null!==(i=this.startedAt)&&void 0!==i?i:Date.now()))),o&&r.append("consentFeedback","true"),"issue"===e&&this.capture.enabled&&this.capture.blob&&(r.append("consentScreenFeedback","true"),r.append("screenShot",this.capture.blob,"screenshot.jpg")),this.hasConsentAttachment&&this.file&&(r.append("consentAttachmentFeedback","true"),r.append("attachment",this.file)),r}}const ue="fj-survey-title";class pe{constructor(e){var t;this.abortController=new AbortController,this.destroyed=!1,this.survey=null,this.bubble=null,this.toast=null,this.rating=0,this.quality="",this.closed=0,this.anonymous=!1,this.errors={},this.submitError=null,this.sending=null,this.i18n=new n(e.locale);const i=null!==(t=e.apiUrl)&&void 0!==t?t:e.baseApiUrl;if(!i)throw new Error("Feedbot: `apiUrl` option is required");this.options=e,this.apiUrl=i.trim().replace(/\/$/,""),this.surface=new v("fj-feedbot-root",this.theme),this.modal=new k(this.surface,{className:"fj-survey",labelledBy:ue,lockScroll:!1,onClose:()=>{this.resetAnswers(),G(this.options.onClose)}}),this.integrationTest=new X({i18n:()=>this.i18n,surface:this.surface,module:"Feedbot",connectivityCheckUrl:`${this.apiUrl}/api/connectivity_check/survey`,connectivityCheckBody:{uuidSurvey:e.surveyId},signal:this.abortController.signal,onSuccess:()=>{this.increment()}})}get theme(){return ne(this.options.theme)}get user(){return"function"==typeof this.options.user?this.options.user():this.options.user}destroy(){this.destroyed||(this.destroyed=!0,this.abortController.abort(),clearTimeout(this.toastTimer),this.integrationTest.destroy(),this.modal.destroy(),this.surface.remove())}showThanks(e=!1){this.showToast(e?"DECLINED":"SENT")}async increment(){var e;try{const t=await Y(`${this.apiUrl}/api/survey_logs/increment`,{method:"POST",signal:this.abortController.signal,body:JSON.stringify({uuidSurvey:this.options.surveyId,userId:(null===(e=this.user)||void 0===e?void 0:e.id)||null,locale:this.i18n.locale}),headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error("Failed to increment log");const i=await t.json();if(this.destroyed)return;if(this.integrationTest.setStatus(i.surveyIntegrationTest||"pending"),this.integrationTest.handleIntegrationStatus())return;this.survey=i.isValid?i.survey:null,this.survey&&!this.snoozed&&this.showBubble()}catch(e){if(this.destroyed)return}}get questions(){const e=this.survey;return e?[e.quantityQuestion?"rating":null,e.qualityQuestion?"quality":null,e.closedQuestion?"closed":null].filter(e=>null!==e):[]}showBubble(){var e;if(!this.survey||this.modal.isOpen||this.bubble)return;const t=this.questions.length,i=document.createElement("div");i.className="fj-float fj-bubble",i.setAttribute("role","complementary"),i.setAttribute("aria-label",this.i18n.t("feedbot.region")),i.innerHTML=`\n <div class="fj-panel">\n <div class="fj-bubble-head">\n <div style="flex:1">\n <p>${U(this.survey.bubbleText||this.i18n.t("feedbot.bubble_default"))}</p>\n ${t?`<small>${U(this.i18n.tp("feedbot.questions",t))}</small>`:""}\n </div>\n <button type="button" class="fj-iconbtn" data-action="dismiss" aria-label="${U(this.i18n.t("feedbot.close_bubble"))}">${s("close",20)}</button>\n </div>\n <div class="fj-bubble-actions">\n <button type="button" class="fj-btn fj-btn-p" data-action="open">${U(this.i18n.t("feedbot.open"))}</button>\n <button type="button" class="fj-btn fj-btn-g" data-action="dismiss">${U(this.i18n.t("feedbot.later"))}</button>\n </div>\n </div>\n <div class="fj-avatar" aria-hidden="true">${u("hello",44)}</div>`,this.surface.root.append(i),C(i),this.bubble=i,null===(e=i.querySelector('[data-action="open"]'))||void 0===e||e.addEventListener("click",()=>{this.hideBubble(),this.openSurvey()});for(const e of i.querySelectorAll('[data-action="dismiss"]'))e.addEventListener("click",()=>{this.snooze(),this.hideBubble()})}get snoozeKey(){var e,t;return`fj-feedbot-snooze:${this.options.surveyId}:${null!==(t=null===(e=this.user)||void 0===e?void 0:e.id)&&void 0!==t?t:""}`}get snoozed(){var e;try{return Date.now()<Number(null!==(e=localStorage.getItem(this.snoozeKey))&&void 0!==e?e:0)+864e5}catch(e){return!1}}snooze(){try{localStorage.setItem(this.snoozeKey,String(Date.now()))}catch(e){}}hideBubble(){this.bubble&&b(this.bubble),this.bubble=null}open(){return!(this.destroyed||!this.survey||(this.modal.isOpen||(this.hideBubble(),this.openSurvey()),0))}close(){return this.modal.close()}setLocale(e){this.i18n=new n(e),this.bubble&&(this.bubble.remove(),this.bubble=null,this.showBubble()),this.modal.isOpen&&this.renderSurvey()}setTheme(e){this.options.theme=e,this.surface.root.setAttribute("data-fj-theme",this.theme)}setUser(e){this.options.user=e}openSurvey(){var e;G(this.options.onOpen),this.renderSurvey(),this.modal.open(),null===(e=this.modal.dialog.querySelector("input, textarea, button.fj-btn"))||void 0===e||e.focus()}resetAnswers(){this.rating=0,this.quality="",this.closed=0,this.anonymous=!1,this.errors={},this.submitError=null,this.sending=null}get answered(){return this.questions.filter(e=>"rating"===e?this.rating>0:"quality"===e?!!this.quality.trim():this.closed>0).length}get progressPercent(){const e=this.questions.length;return e?Math.round(this.answered/e*100):0}renderProgress(){return`<div class="fj-prog" role="progressbar" aria-valuenow="${this.answered}" aria-valuemin="0" aria-valuemax="${this.questions.length}" aria-label="${U(this.i18n.t("feedbot.progress_label"))}"><i style="--fj-progress:${this.progressPercent}%"></i></div>`}renderSurvey(){const e=this.survey;if(!e)return;const t=this.questions.length,i=[e.subTitle,e.mainQuestion].filter(Boolean),n=`\n <div class="fj-head" style="padding-bottom:8px">\n ${u("happy",44)}\n <div class="fj-head-text">\n <h2 id="${ue}">${U(e.title)}</h2>\n ${t?`<p data-slot="progress-text">${U(this.i18n.tp("feedbot.progress",this.answered,{total:t}))}</p>`:""}\n </div>\n <button type="button" class="fj-iconbtn" data-action="close" aria-label="${U(this.i18n.t("global.close"))}">${s("close",20)}</button>\n </div>\n ${t?`<div class="fj-progress-wrap" data-slot="progress">${this.renderProgress()}</div>`:""}\n <form novalidate style="display:contents">\n <div class="fj-body" style="gap:20px" data-version="v3.0.0-rc.1">\n ${i.length?`<div class="fj-intro">${i.map((e,t)=>0===t&&i.length>1?`<b>${U(e)}</b>`:U(e)).join("")}</div>`:""}\n ${this.submitError?`<div class="fj-notice fj-err" role="alert">${s("alert",20)}<span>${U(this.i18n.t(this.submitError))}</span></div>`:""}\n ${e.quantityQuestion?this.renderRating(e.quantityQuestion):""}\n ${e.qualityQuestion?this.renderQuality(e.qualityQuestion):""}\n ${e.closedQuestion?this.renderClosed(e):""}\n <label class="fj-row fj-anon">\n <span class="fj-row-text">${U(this.i18n.t("feedbot.anonymous"))}<small>${U(this.i18n.t("feedbot.anonymous_hint"))}</small></span>\n <input type="checkbox" role="switch" class="fj-sw" name="anonymousAnswer"${this.anonymous?" checked":""}${this.sending?" disabled":""}>\n </label>\n ${te()}\n </div>\n <div class="fj-foot">\n ${this.options.removeCredit?"":ae(this.i18n,"feedbot")}\n <button type="button" class="fj-btn fj-btn-g" data-action="decline"${this.sending?" disabled":""}${"DECLINED"===this.sending?' aria-busy="true"':""}>${"DECLINED"===this.sending?`${o()}${U(this.i18n.t("form.sending"))}`:U(this.i18n.t("feedbot.cancel"))}</button>\n <button type="submit" class="fj-btn fj-btn-p" data-action="submit"${"DECLINED"===this.sending?" disabled":""}${"SENT"===this.sending?' aria-busy="true"':""}>${"SENT"===this.sending?`${o()}${U(this.i18n.t("form.sending"))}`:U(this.i18n.t("feedbot.submit"))}</button>\n </div>\n </form>`,a=this.modal.dialog;this.modal.isOpen?f(a,()=>a.innerHTML=n):a.innerHTML=n,this.bindSurvey()}error(e){const t=this.errors[e];return t?`<span class="fj-errmsg" id="fj-${e}-msg">${s("alert",16)}${U(this.i18n.t(t))}</span>`:""}renderRating(e){const t=[1,2,3,4,5].map(e=>`\n <label class="fj-star${e<=this.rating?" fj-on":""}">\n <input type="radio" class="fj-sr-only" name="rating" value="${e}" aria-label="${U(this.i18n.tf("feedbot.star_label",{n:e}))}"${e===this.rating?" checked":""}${this.sending?" disabled":""}>\n ${s("star",32,{stroke:1.6,fill:e<=this.rating})}\n </label>`).join("");return`<fieldset class="fj-set"${this.errors.rating?' aria-describedby="fj-rating-msg"':""}>\n <legend class="fj-lab">${U(e)}</legend>\n <div class="fj-stars">${t}</div>\n <div class="fj-help" data-slot="rating-help">${this.renderRatingHelp()}</div>\n ${this.error("rating")}\n </fieldset>`}renderRatingHelp(){const e=this.rating?`<span class="fj-star-value">${U(this.i18n.tf("feedbot.rating_value",{n:this.rating,label:this.i18n.t(`feedbot.rating_labels.${this.rating}`)}))}</span>`:"";return`<span>${U(this.i18n.t("feedbot.rating_low"))}</span>${e}<span>${U(this.i18n.t("feedbot.rating_high"))}</span>`}renderQuality(e){return`<div class="fj-field">\n <label class="fj-lab" for="fj-quality">${U(e)}</label>\n <textarea id="fj-quality" name="qualityAnswer" class="fj-input" style="height:88px" maxlength="1000"${this.errors.quality?' aria-invalid="true" aria-describedby="fj-quality-msg"':""}${this.sending?" readonly":""}>${U(this.quality)}</textarea>\n ${this.error("quality")}\n </div>`}renderClosed(e){const t=(e,t)=>`<label class="fj-choice"><input type="radio" class="fj-sr-only" name="closedAnswer" value="${e}"${this.closed===e?" checked":""}${this.sending?" disabled":""}>${U(t)}</label>`;return`<fieldset class="fj-set"${this.errors.closed?' aria-describedby="fj-closed-msg"':""}>\n <legend class="fj-lab">${U(e.closedQuestion)}</legend>\n <div class="fj-choices">${t(1,e.closedAnswerOne)}${t(2,e.closedAnswerTwo)}</div>\n ${this.error("closed")}\n </fieldset>`}bindSurvey(){var e,t,i,n,a;const s=this.modal.dialog;null===(e=s.querySelector('[data-action="close"]'))||void 0===e||e.addEventListener("click",()=>{this.modal.close()});for(const e of s.querySelectorAll('input[name="rating"]'))e.addEventListener("change",()=>{this.rating=Number(e.value),this.updateStars(e),this.clearError("rating"),this.updateProgress()});null===(t=s.querySelector("#fj-quality"))||void 0===t||t.addEventListener("input",e=>{this.quality=e.target.value,this.quality.trim()&&this.clearError("quality"),this.updateProgress()});for(const e of s.querySelectorAll('input[name="closedAnswer"]'))e.addEventListener("change",()=>{this.closed=Number(e.value),this.clearError("closed"),this.updateProgress()});null===(i=s.querySelector('[name="anonymousAnswer"]'))||void 0===i||i.addEventListener("change",e=>{this.anonymous=e.target.checked}),null===(n=s.querySelector("form"))||void 0===n||n.addEventListener("submit",e=>{e.preventDefault(),this.send("SENT")}),null===(a=s.querySelector('[data-action="decline"]'))||void 0===a||a.addEventListener("click",()=>{this.send("DECLINED")})}updateStars(e){const t=this.modal.dialog;for(const e of t.querySelectorAll(".fj-star")){const t=e.querySelector("input"),i=Number(null==t?void 0:t.value)<=this.rating;e.classList.toggle("fj-on",i),e.classList.remove("fj-pop");const n=e.querySelector("svg");null==n||n.setAttribute("fill",i?"currentColor":"none")}const i=e.closest(".fj-star");i&&(i.offsetWidth,i.classList.add("fj-pop"));const n=t.querySelector('[data-slot="rating-help"]');n&&(n.innerHTML=this.renderRatingHelp())}updateProgress(){var e;const t=this.modal.dialog,i=this.questions.length,n=t.querySelector('[data-slot="progress-text"]');n&&(n.textContent=this.i18n.tp("feedbot.progress",this.answered,{total:i}));const a=t.querySelector('[data-slot="progress"] .fj-prog');null==a||a.setAttribute("aria-valuenow",String(this.answered)),null===(e=null==a?void 0:a.querySelector("i"))||void 0===e||e.style.setProperty("--fj-progress",`${this.progressPercent}%`)}clearError(e){var t;if(!this.errors[e])return;delete this.errors[e];const i=this.modal.dialog;null===(t=i.querySelector(`#fj-${e}-msg`))||void 0===t||t.remove();const n="quality"===e?i.querySelector("#fj-quality"):i.querySelector(`[aria-describedby="fj-${e}-msg"]`);null==n||n.removeAttribute("aria-describedby"),null==n||n.removeAttribute("aria-invalid")}validate(){const e={};for(const t of this.questions)"rating"!==t||this.rating||(e.rating="feedbot.rating_error"),"quality"!==t||this.quality.trim()||(e.quality="feedbot.quality_error"),"closed"!==t||this.closed||(e.closed="feedbot.choice_error");return e}async send(e){var t,i,n;if(this.sending)return;const a=this.modal.dialog;if(this.submitError=null,"SENT"===e){this.errors=this.validate();const e=this.questions.find(e=>this.errors[e]);if(e){this.renderSurvey();const i="rating"===e?'input[name="rating"]':"quality"===e?"#fj-quality":'input[name="closedAnswer"]';return void(null===(t=a.querySelector(i))||void 0===t||t.focus())}}const s=ie(a);this.sending=e,this.renderSurvey(),null===(i=a.querySelector(`[data-action="${"SENT"===e?"submit":"decline"}"]`))||void 0===i||i.focus();try{const t=await Y(`${this.apiUrl}/api/reviews/submit`,{method:"POST",signal:this.abortController.signal,body:JSON.stringify(this.toJson(e,s)),headers:{"Content-Type":"application/json"}});if(!t.ok)throw this.submitError=429===t.status?"global.rate_limited":"global.submit_error",new Error("Failed to submit feedback");await this.modal.close(),this.showToast(e),this.survey=null,G(this.options.onAnswer,{status:e})}catch(e){if(this.destroyed)return;null!==(n=this.submitError)&&void 0!==n||(this.submitError="global.submit_error"),this.sending=null,this.modal.isOpen&&this.renderSurvey()}}toJson(e,t){var i,n,a,s,o;const r=this.survey;return{quantityAnswer:this.rating,quantityQuestion:null!==(i=null==r?void 0:r.quantityQuestion)&&void 0!==i?i:"",qualityAnswer:this.quality,qualityQuestion:null!==(n=null==r?void 0:r.qualityQuestion)&&void 0!==n?n:"",anonymousAnswer:this.anonymous,closedAnswer:this.closed,closedQuestion:null!==(a=null==r?void 0:r.closedQuestion)&&void 0!==a?a:"",userId:null===(s=this.user)||void 0===s?void 0:s.id,userName:this.anonymous?null:(null===(o=this.user)||void 0===o?void 0:o.fullName)||null,uuidSurvey:`/api/surveys/${this.options.surveyId}`,answerStatus:e,widgetVersion:"3.0.0-rc.1",widgetLocale:this.i18n.locale,fjHp:t}}showToast(e){var t;this.hideToast();const i="DECLINED"===e?"feedbot.declined":"feedbot.thanks",n=document.createElement("div");n.className="fj-float fj-toast",n.innerHTML=`\n <div class="fj-panel" role="status" data-version="v3.0.0-rc.1">\n ${u("DECLINED"===e?"hello":"bravo",56)}\n <div class="fj-toast-text">\n <p>${U(this.i18n.t(`${i}.title`))}</p>\n <small>${U(this.i18n.t(`${i}.text`))}</small>\n </div>\n <button type="button" class="fj-iconbtn" aria-label="${U(this.i18n.t("global.close"))}">${s("close",20)}</button>\n </div>`,this.surface.root.append(n),C(n),this.toast=n,null===(t=n.querySelector("button"))||void 0===t||t.addEventListener("click",()=>this.hideToast()),this.toastTimer=setTimeout(()=>this.hideToast(),8e3)}hideToast(){clearTimeout(this.toastTimer);const e=this.toast;this.toast=null,e&&b(e)}}"undefined"!=typeof window&&(window.Feedback=ce,window.Feedbot=pe);export{ce as Feedback,pe as Feedbot,e as Locales,t as messages};
|
|
1
|
+
const e={FR:"fr",EN:"en",ES:"es",NL:"nl"},t={fr:{launcher:{label:"Une idée, un souci ?",updates:"{n} mises à jour",updates_one:"1 mise à jour"},form:{tablist:"Type de retour",credit:"Feedjet, s’ouvre dans un nouvel onglet",cancel:"Annuler",close:"Fermer",sending:"Envoi…",required:"(obligatoire)",optional:"(facultatif)",counter:"{n} / {max}",summary:"{n} points à compléter",summary_one:"1 point à compléter",summary_focus:"Le premier champ concerné a reçu le focus.",consent:{label:"J’accepte que mes données servent à améliorer le service.",more:"Quelles données ?",detail:"Votre nom, la page consultée, votre navigateur, votre système, la taille et le zoom de l’écran et votre langue. Elles servent uniquement à analyser votre retour et ne sont jamais partagées.",error:"Cochez cette case pour envoyer."},tech:{label:"Joindre les infos techniques",hint:"Page, navigateur, taille d’écran.",more:"Voir le détail"},capture:{on:"Capture jointe",on_hint:"Page en cours, prise à l’ouverture",off:"Capture non jointe",off_hint:"Activez-la pour nous montrer le problème.",pending:"Capture en cours…",failed:"Capture indisponible, réessayez.",toggle:"Joindre la capture",hide:"Masquer",show:"Afficher"},attachment:{add:"Ajouter un fichier",drop:"ou glissez-le ici",hint:"Image ou PDF · 10 Mo max.",hint_short:"image ou PDF",remove:"Retirer le fichier",too_large:"Le fichier ne doit pas dépasser 10 Mo.",invalid_type:"Ce type de fichier n’est pas accepté. Joignez une image, une vidéo, un PDF, un document bureautique, un texte ou une archive."}},enhancement:{tab:"Idée",title:"Une idée pour améliorer le service ?",subtitle:"Décrivez-la en quelques mots.",field_title:"Votre idée en une phrase",placeholder_title:"Ex. : pouvoir filtrer par date",hint_title:"Une phrase suffit.",field_description:"Dites-nous en plus",placeholder_description:"Quel besoin ? Dans quelle situation ?",error_title:"Résumez votre idée en une phrase.",error_description:"Ajoutez quelques détails.",submit:"Envoyer mon idée",thanks_title:"Merci, votre idée est envoyée !",thanks_text:"Suivez son avancement dans « Mes retours ». Nous vous signalerons chaque changement de statut.",thanks_text_anonymous:"Nous apprécions votre engagement à améliorer notre service."},issue:{tab:"Anomalie",title:"Vous avez repéré un problème ?",subtitle:"Dites-nous ce qui s’est passé.",category:"De quoi s’agit-il ?",categories:{broken:"Ça ne fonctionne pas",display:"Affichage incorrect",slow:"C’est lent",error_message:"Message d’erreur",other:"Autre"},field_title:"Le problème en une phrase",placeholder_title:"Ex. : le bouton Exporter ne répond pas",hint_title:"Une phrase suffit.",field_description:"Que s’est-il passé ?",placeholder_description:"Ce que vous faisiez, ce qui s’est passé, ce que vous attendiez",error_title:"Résumez le problème en une phrase.",error_description:"Décrivez ce qui s’est passé.",submit:"Envoyer le signalement",thanks_title:"Merci, c’est signalé !",thanks_text:"L’équipe va l’analyser. Retrouvez son statut dans « Mes retours ».",thanks_text_anonymous:"L’équipe va l’analyser dans les meilleurs délais."},decision:{tab:"Mes retours",title:"Vos retours",subtitle:"Suivez leur prise en compte.",filter:"Filtrer",all:"Tous · {n}",ideas:"Idées · {n}",issues:"Anomalies · {n}",updates:"{n} mises à jour depuis votre dernière visite",updates_one:"1 mise à jour depuis votre dernière visite",new_status:"Nouveau statut",new_reply:"Nouvelle réponse",reply:"Réponse de l’équipe",more:"Lire la suite",less:"Réduire",sent_on:"Envoyé le {date}",type:{issue:"Anomalie",enhancement:"Idée"},loading:"Chargement de vos retours…",empty_title:"Rien à suivre pour l’instant",empty_text:"Vos idées et signalements apparaîtront ici, avec leur avancement.",empty_filtered:"Aucun retour de ce type pour l’instant.",propose:"Proposer une idée",report:"Signaler un problème",error_title:"Impossible d’afficher vos retours.",error_text:"Vérifiez votre connexion, puis réessayez.",retry:"Réessayer",see:"Voir mes retours",status:{enhancement:{loved:"Coup de cœur",planned:"C’est dans les tuyaux",next_step:"Prochaine étape",to_study:"À étudier",impossible:"Mission impossible",transmitted:"Transmis à la bonne équipe"},issue:{planned:"C’est dans les tuyaux",next_step:"Prochaine étape",not_a_bug:"Comportement normal",impossible:"Mission impossible",transmitted:"Transmis à la bonne équipe",out_of_scope:"Hors périmètre"}}},feedbot:{region:"Enquête de satisfaction",bubble_default:"Un instant pour nous donner votre avis ?",questions:"{n} questions rapides.",questions_one:"1 question rapide.",open:"Donner mon avis",later:"Plus tard",close_bubble:"Fermer l’enquête",progress:"{n} réponses sur {total}",progress_one:"{n} réponse sur {total}",progress_label:"Progression",rating_low:"Décevante",rating_high:"Excellente",rating_value:"{n} / 5 · {label}",rating_labels:{1:"Décevante",2:"Passable",3:"Correcte",4:"Très bien",5:"Excellente"},star_label:"{n} sur 5",rating_error:"Choisissez une note.",choice_error:"Choisissez une réponse.",quality_error:"Écrivez quelques mots.",anonymous:"Répondre anonymement",anonymous_hint:"Votre nom ne sera pas associé à cet avis.",cancel:"Non merci",submit:"Envoyer mon avis",thanks:{title:"Merci pour votre avis !",text:"Il aide l’équipe à choisir les prochaines améliorations."},declined:{title:"C’est noté !",text:"Bonne continuation sur l’application."}},integration:{label:"Test d’intégration {module}",pending:{title:"Vérifions l’intégration de {module}",text:"Un test rapide confirme que votre application communique bien avec Feedjet.",later:"Plus tard",start:"Lancer le test"},checking:{title:"Vérification en cours…",text:"Cela prend quelques secondes.",cancel:"Annuler"},ok:{title:"Intégration validée !",text:"Tout est en place : vos utilisateurs peuvent envoyer leurs retours.",button:"Continuer"},ko:{title:"La connexion n’a pas abouti",text:"Transmettez le diagnostic à votre administrateur.",copy:"Copier le diagnostic",copied:"Diagnostic copié",retry:"Réessayer"},expired:{title:"Abonnement Feedjet expiré",text:"Les retours ne peuvent plus être envoyés. Contactez votre administrateur pour le renouveler.",close:"Fermer"},steps:{project:"Projet reconnu",api:"Connexion à l’API Feedjet",subscription:"Abonnement actif"},state:{ok:" : réussi",run:" : en cours",err:" : échec",wait:" : non vérifié"},details:{project:"Projet introuvable dans Feedjet.",api:"Aucune réponse de l’API.",domain:"Domaine non autorisé pour ce projet.",subscription:"Abonnement arrivé à échéance."}},global:{close:"Fermer",submit_error:"L’envoi n’a pas abouti. Vérifiez votre connexion, puis réessayez.",rate_limited:"Trop d’envois en peu de temps. Réessayez dans quelques minutes."}},en:{launcher:{label:"An idea, an issue?",updates:"{n} updates",updates_one:"1 update"},form:{tablist:"Feedback type",credit:"Feedjet, opens in a new tab",cancel:"Cancel",close:"Close",sending:"Sending…",required:"(required)",optional:"(optional)",counter:"{n} / {max}",summary:"{n} fields to complete",summary_one:"1 field to complete",summary_focus:"The first field concerned has the focus.",consent:{label:"I agree that my data is used to improve the service.",more:"Which data?",detail:"Your name, the page you are on, your browser, your system, screen size and zoom, and your language. They are only used to analyse your feedback and are never shared.",error:"Tick this box to send."},tech:{label:"Attach technical details",hint:"Page, browser, screen size.",more:"See details"},capture:{on:"Screenshot attached",on_hint:"Current page, taken on opening",off:"No screenshot",off_hint:"Turn it on to show us the problem.",pending:"Taking the screenshot…",failed:"Screenshot unavailable, try again.",toggle:"Attach the screenshot",hide:"Hide",show:"Show"},attachment:{add:"Add a file",drop:"or drop it here",hint:"Image or PDF · 10 MB max.",hint_short:"image or PDF",remove:"Remove the file",too_large:"The file must not exceed 10 MB.",invalid_type:"This file type is not accepted. Attach an image, a video, a PDF, an office document, a text or an archive."}},enhancement:{tab:"Idea",title:"An idea to improve the service?",subtitle:"Describe it in a few words.",field_title:"Your idea in one sentence",placeholder_title:"E.g. filter by date",hint_title:"One sentence is enough.",field_description:"Tell us more",placeholder_description:"What do you need? In which situation?",error_title:"Sum up your idea in one sentence.",error_description:"Add a few details.",submit:"Send my idea",thanks_title:"Thanks, your idea is sent!",thanks_text:"Follow its progress in “My feedback”. We will let you know each time its status changes.",thanks_text_anonymous:"We appreciate your commitment to improving our service."},issue:{tab:"Issue",title:"Did you spot a problem?",subtitle:"Tell us what happened.",category:"What is it about?",categories:{broken:"It doesn’t work",display:"Wrong display",slow:"It’s slow",error_message:"Error message",other:"Other"},field_title:"The problem in one sentence",placeholder_title:"E.g. the Export button does nothing",hint_title:"One sentence is enough.",field_description:"What happened?",placeholder_description:"What you were doing, what happened, what you expected",error_title:"Sum up the problem in one sentence.",error_description:"Describe what happened.",submit:"Send the report",thanks_title:"Thanks, it’s reported!",thanks_text:"The team will look into it. Find its status in “My feedback”.",thanks_text_anonymous:"The team will look into it as soon as possible."},decision:{tab:"My feedback",title:"Your feedback",subtitle:"Follow how it is handled.",filter:"Filter",all:"All · {n}",ideas:"Ideas · {n}",issues:"Issues · {n}",updates:"{n} updates since your last visit",updates_one:"1 update since your last visit",new_status:"New status",new_reply:"New reply",reply:"Team reply",more:"Read more",less:"Show less",sent_on:"Sent on {date}",type:{issue:"Issue",enhancement:"Idea"},loading:"Loading your feedback…",empty_title:"Nothing to follow yet",empty_text:"Your ideas and reports will show up here, with their progress.",empty_filtered:"No feedback of this type yet.",propose:"Suggest an idea",report:"Report a problem",error_title:"Your feedback could not be displayed.",error_text:"Check your connection, then try again.",retry:"Try again",see:"See my feedback",status:{enhancement:{loved:"Favourite",planned:"In the pipeline",next_step:"Next step",to_study:"Under review",impossible:"Mission impossible",transmitted:"Sent to the right team"},issue:{planned:"In the pipeline",next_step:"Next step",not_a_bug:"Expected behaviour",impossible:"Mission impossible",transmitted:"Sent to the right team",out_of_scope:"Out of scope"}}},feedbot:{region:"Satisfaction survey",bubble_default:"A moment to share your opinion?",questions:"{n} quick questions.",questions_one:"1 quick question.",open:"Give my opinion",later:"Later",close_bubble:"Close the survey",progress:"{n} answers out of {total}",progress_one:"{n} answer out of {total}",progress_label:"Progress",rating_low:"Disappointing",rating_high:"Excellent",rating_value:"{n} / 5 · {label}",rating_labels:{1:"Disappointing",2:"Fair",3:"Good",4:"Very good",5:"Excellent"},star_label:"{n} out of 5",rating_error:"Choose a rating.",choice_error:"Choose an answer.",quality_error:"Write a few words.",anonymous:"Answer anonymously",anonymous_hint:"Your name will not be linked to this answer.",cancel:"No thanks",submit:"Send my opinion",thanks:{title:"Thanks for your opinion!",text:"It helps the team choose the next improvements."},declined:{title:"Noted!",text:"Enjoy the application."}},integration:{label:"{module} integration test",pending:{title:"Let’s check the {module} integration",text:"A quick test confirms that your application talks to Feedjet.",later:"Later",start:"Run the test"},checking:{title:"Checking…",text:"This takes a few seconds.",cancel:"Cancel"},ok:{title:"Integration validated!",text:"All set: your users can send their feedback.",button:"Continue"},ko:{title:"The connection failed",text:"Send the diagnostic to your administrator.",copy:"Copy the diagnostic",copied:"Diagnostic copied",retry:"Try again"},expired:{title:"Feedjet subscription expired",text:"Feedback can no longer be sent. Ask your administrator to renew it.",close:"Close"},steps:{project:"Project recognised",api:"Connection to the Feedjet API",subscription:"Active subscription"},state:{ok:": passed",run:": running",err:": failed",wait:": not checked"},details:{project:"Project not found in Feedjet.",api:"No answer from the API.",domain:"Domain not allowed for this project.",subscription:"Subscription has ended."}},global:{close:"Close",submit_error:"Sending failed. Check your connection, then try again.",rate_limited:"Too many submissions in a short time. Try again in a few minutes."}},es:{launcher:{label:"¿Una idea, un problema?",updates:"{n} novedades",updates_one:"1 novedad"},form:{tablist:"Tipo de comentario",credit:"Feedjet, se abre en una pestaña nueva",cancel:"Cancelar",close:"Cerrar",sending:"Enviando…",required:"(obligatorio)",optional:"(opcional)",counter:"{n} / {max}",summary:"{n} campos por completar",summary_one:"1 campo por completar",summary_focus:"El primer campo afectado tiene el foco.",consent:{label:"Acepto que mis datos se usen para mejorar el servicio.",more:"¿Qué datos?",detail:"Tu nombre, la página consultada, tu navegador, tu sistema, el tamaño y el zoom de la pantalla y tu idioma. Solo sirven para analizar tu comentario y nunca se comparten.",error:"Marca esta casilla para enviar."},tech:{label:"Adjuntar la información técnica",hint:"Página, navegador, tamaño de pantalla.",more:"Ver el detalle"},capture:{on:"Captura adjunta",on_hint:"Página actual, tomada al abrir",off:"Captura no adjunta",off_hint:"Actívala para mostrarnos el problema.",pending:"Tomando la captura…",failed:"Captura no disponible, inténtalo de nuevo.",toggle:"Adjuntar la captura",hide:"Ocultar",show:"Mostrar"},attachment:{add:"Añadir un archivo",drop:"o arrástralo aquí",hint:"Imagen o PDF · 10 MB máx.",hint_short:"imagen o PDF",remove:"Quitar el archivo",too_large:"El archivo no debe superar 10 MB.",invalid_type:"Este tipo de archivo no se acepta. Adjunta una imagen, un vídeo, un PDF, un documento ofimático, un texto o un archivo comprimido."}},enhancement:{tab:"Idea",title:"¿Una idea para mejorar el servicio?",subtitle:"Descríbela en pocas palabras.",field_title:"Tu idea en una frase",placeholder_title:"Ej.: poder filtrar por fecha",hint_title:"Basta con una frase.",field_description:"Cuéntanos más",placeholder_description:"¿Qué necesitas? ¿En qué situación?",error_title:"Resume tu idea en una frase.",error_description:"Añade algunos detalles.",submit:"Enviar mi idea",thanks_title:"¡Gracias, tu idea se ha enviado!",thanks_text:"Sigue su avance en «Mis comentarios». Te avisaremos de cada cambio de estado.",thanks_text_anonymous:"Agradecemos tu compromiso para mejorar nuestro servicio."},issue:{tab:"Incidencia",title:"¿Has detectado un problema?",subtitle:"Cuéntanos qué ha pasado.",category:"¿De qué se trata?",categories:{broken:"No funciona",display:"Visualización incorrecta",slow:"Va lento",error_message:"Mensaje de error",other:"Otro"},field_title:"El problema en una frase",placeholder_title:"Ej.: el botón Exportar no responde",hint_title:"Basta con una frase.",field_description:"¿Qué ha pasado?",placeholder_description:"Lo que hacías, lo que ha pasado, lo que esperabas",error_title:"Resume el problema en una frase.",error_description:"Describe lo que ha pasado.",submit:"Enviar la incidencia",thanks_title:"¡Gracias, queda registrada!",thanks_text:"El equipo la analizará. Consulta su estado en «Mis comentarios».",thanks_text_anonymous:"El equipo la analizará lo antes posible."},decision:{tab:"Mis comentarios",title:"Tus comentarios",subtitle:"Sigue cómo se tienen en cuenta.",filter:"Filtrar",all:"Todos · {n}",ideas:"Ideas · {n}",issues:"Incidencias · {n}",updates:"{n} novedades desde tu última visita",updates_one:"1 novedad desde tu última visita",new_status:"Nuevo estado",new_reply:"Nueva respuesta",reply:"Respuesta del equipo",more:"Leer más",less:"Mostrar menos",sent_on:"Enviado el {date}",type:{issue:"Incidencia",enhancement:"Idea"},loading:"Cargando tus comentarios…",empty_title:"Nada que seguir por ahora",empty_text:"Tus ideas e incidencias aparecerán aquí, con su avance.",empty_filtered:"Todavía no hay comentarios de este tipo.",propose:"Proponer una idea",report:"Señalar un problema",error_title:"No se pueden mostrar tus comentarios.",error_text:"Comprueba tu conexión e inténtalo de nuevo.",retry:"Reintentar",see:"Ver mis comentarios",status:{enhancement:{loved:"Favorito",planned:"Está en marcha",next_step:"Próximo paso",to_study:"En estudio",impossible:"Misión imposible",transmitted:"Enviado al equipo adecuado"},issue:{planned:"Está en marcha",next_step:"Próximo paso",not_a_bug:"Comportamiento normal",impossible:"Misión imposible",transmitted:"Enviado al equipo adecuado",out_of_scope:"Fuera de alcance"}}},feedbot:{region:"Encuesta de satisfacción",bubble_default:"¿Un momento para darnos tu opinión?",questions:"{n} preguntas rápidas.",questions_one:"1 pregunta rápida.",open:"Dar mi opinión",later:"Más tarde",close_bubble:"Cerrar la encuesta",progress:"{n} respuestas de {total}",progress_one:"{n} respuesta de {total}",progress_label:"Progreso",rating_low:"Decepcionante",rating_high:"Excelente",rating_value:"{n} / 5 · {label}",rating_labels:{1:"Decepcionante",2:"Regular",3:"Correcta",4:"Muy buena",5:"Excelente"},star_label:"{n} de 5",rating_error:"Elige una nota.",choice_error:"Elige una respuesta.",quality_error:"Escribe unas palabras.",anonymous:"Responder de forma anónima",anonymous_hint:"Tu nombre no se asociará a esta opinión.",cancel:"No, gracias",submit:"Enviar mi opinión",thanks:{title:"¡Gracias por tu opinión!",text:"Ayuda al equipo a elegir las próximas mejoras."},declined:{title:"¡Entendido!",text:"Sigue disfrutando de la aplicación."}},integration:{label:"Prueba de integración de {module}",pending:{title:"Comprobemos la integración de {module}",text:"Una prueba rápida confirma que tu aplicación se comunica con Feedjet.",later:"Más tarde",start:"Iniciar la prueba"},checking:{title:"Comprobando…",text:"Tarda unos segundos.",cancel:"Cancelar"},ok:{title:"¡Integración validada!",text:"Todo listo: tus usuarios pueden enviar sus comentarios.",button:"Continuar"},ko:{title:"La conexión ha fallado",text:"Envía el diagnóstico a tu administrador.",copy:"Copiar el diagnóstico",copied:"Diagnóstico copiado",retry:"Reintentar"},expired:{title:"Suscripción a Feedjet caducada",text:"Ya no se pueden enviar comentarios. Pide a tu administrador que la renueve.",close:"Cerrar"},steps:{project:"Proyecto reconocido",api:"Conexión con la API de Feedjet",subscription:"Suscripción activa"},state:{ok:": correcto",run:": en curso",err:": fallido",wait:": sin comprobar"},details:{project:"Proyecto no encontrado en Feedjet.",api:"La API no responde.",domain:"Dominio no autorizado para este proyecto.",subscription:"La suscripción ha vencido."}},global:{close:"Cerrar",submit_error:"El envío ha fallado. Comprueba tu conexión e inténtalo de nuevo.",rate_limited:"Demasiados envíos en poco tiempo. Inténtalo de nuevo en unos minutos."}},nl:{launcher:{label:"Een idee, een probleem?",updates:"{n} updates",updates_one:"1 update"},form:{tablist:"Soort feedback",credit:"Feedjet, opent in een nieuw tabblad",cancel:"Annuleren",close:"Sluiten",sending:"Verzenden…",required:"(verplicht)",optional:"(optioneel)",counter:"{n} / {max}",summary:"{n} punten in te vullen",summary_one:"1 punt in te vullen",summary_focus:"Het eerste betrokken veld heeft de focus.",consent:{label:"Ik ga ermee akkoord dat mijn gegevens worden gebruikt om de dienst te verbeteren.",more:"Welke gegevens?",detail:"Uw naam, de bezochte pagina, uw browser, uw systeem, schermgrootte en zoom en uw taal. Ze dienen alleen om uw feedback te analyseren en worden nooit gedeeld.",error:"Vink dit vakje aan om te verzenden."},tech:{label:"Technische gegevens bijvoegen",hint:"Pagina, browser, schermgrootte.",more:"Details bekijken"},capture:{on:"Schermafbeelding bijgevoegd",on_hint:"Huidige pagina, genomen bij het openen",off:"Geen schermafbeelding",off_hint:"Zet hem aan om ons het probleem te tonen.",pending:"Schermafbeelding maken…",failed:"Schermafbeelding niet beschikbaar, probeer opnieuw.",toggle:"Schermafbeelding bijvoegen",hide:"Verbergen",show:"Tonen"},attachment:{add:"Bestand toevoegen",drop:"of sleep het hierheen",hint:"Afbeelding of pdf · max. 10 MB",hint_short:"afbeelding of pdf",remove:"Bestand verwijderen",too_large:"Het bestand mag niet groter zijn dan 10 MB.",invalid_type:"Dit bestandstype wordt niet geaccepteerd. Voeg een afbeelding, video, pdf, kantoordocument, tekst of archief toe."}},enhancement:{tab:"Idee",title:"Een idee om de dienst te verbeteren?",subtitle:"Beschrijf het in een paar woorden.",field_title:"Uw idee in één zin",placeholder_title:"Bijv.: filteren op datum",hint_title:"Eén zin volstaat.",field_description:"Vertel ons meer",placeholder_description:"Welke behoefte? In welke situatie?",error_title:"Vat uw idee samen in één zin.",error_description:"Voeg wat details toe.",submit:"Mijn idee verzenden",thanks_title:"Bedankt, uw idee is verzonden!",thanks_text:"Volg de voortgang in “Mijn feedback”. We laten u elke statuswijziging weten.",thanks_text_anonymous:"We waarderen uw inzet om onze dienst te verbeteren."},issue:{tab:"Probleem",title:"Een probleem opgemerkt?",subtitle:"Vertel ons wat er gebeurde.",category:"Waar gaat het over?",categories:{broken:"Het werkt niet",display:"Verkeerde weergave",slow:"Het is traag",error_message:"Foutmelding",other:"Anders"},field_title:"Het probleem in één zin",placeholder_title:"Bijv.: de knop Exporteren reageert niet",hint_title:"Eén zin volstaat.",field_description:"Wat is er gebeurd?",placeholder_description:"Wat u deed, wat er gebeurde, wat u verwachtte",error_title:"Vat het probleem samen in één zin.",error_description:"Beschrijf wat er gebeurde.",submit:"Melding verzenden",thanks_title:"Bedankt, het is gemeld!",thanks_text:"Het team gaat het analyseren. Bekijk de status in “Mijn feedback”.",thanks_text_anonymous:"Het team analyseert het zo snel mogelijk."},decision:{tab:"Mijn feedback",title:"Uw feedback",subtitle:"Volg hoe ermee wordt omgegaan.",filter:"Filteren",all:"Alle · {n}",ideas:"Ideeën · {n}",issues:"Problemen · {n}",updates:"{n} updates sinds uw laatste bezoek",updates_one:"1 update sinds uw laatste bezoek",new_status:"Nieuwe status",new_reply:"Nieuw antwoord",reply:"Antwoord van het team",more:"Lees meer",less:"Minder tonen",sent_on:"Verzonden op {date}",type:{issue:"Probleem",enhancement:"Idee"},loading:"Uw feedback laden…",empty_title:"Nog niets te volgen",empty_text:"Uw ideeën en meldingen verschijnen hier, met hun voortgang.",empty_filtered:"Nog geen feedback van dit type.",propose:"Een idee voorstellen",report:"Een probleem melden",error_title:"Uw feedback kan niet worden getoond.",error_text:"Controleer uw verbinding en probeer het opnieuw.",retry:"Opnieuw proberen",see:"Mijn feedback bekijken",status:{enhancement:{loved:"Favoriet",planned:"Staat op de planning",next_step:"Volgende stap",to_study:"In onderzoek",impossible:"Mission impossible",transmitted:"Doorgestuurd naar het juiste team"},issue:{planned:"Staat op de planning",next_step:"Volgende stap",not_a_bug:"Normaal gedrag",impossible:"Mission impossible",transmitted:"Doorgestuurd naar het juiste team",out_of_scope:"Buiten bereik"}}},feedbot:{region:"Tevredenheidsenquête",bubble_default:"Even tijd om uw mening te geven?",questions:"{n} korte vragen.",questions_one:"1 korte vraag.",open:"Mijn mening geven",later:"Later",close_bubble:"Enquête sluiten",progress:"{n} antwoorden van {total}",progress_one:"{n} antwoord van {total}",progress_label:"Voortgang",rating_low:"Teleurstellend",rating_high:"Uitstekend",rating_value:"{n} / 5 · {label}",rating_labels:{1:"Teleurstellend",2:"Matig",3:"Redelijk",4:"Zeer goed",5:"Uitstekend"},star_label:"{n} van 5",rating_error:"Kies een score.",choice_error:"Kies een antwoord.",quality_error:"Schrijf een paar woorden.",anonymous:"Anoniem antwoorden",anonymous_hint:"Uw naam wordt niet aan deze mening gekoppeld.",cancel:"Nee, bedankt",submit:"Mijn mening verzenden",thanks:{title:"Bedankt voor uw mening!",text:"Ze helpt het team de volgende verbeteringen te kiezen."},declined:{title:"Genoteerd!",text:"Veel plezier met de applicatie."}},integration:{label:"Integratietest {module}",pending:{title:"We controleren de integratie van {module}",text:"Een snelle test bevestigt dat uw applicatie met Feedjet communiceert.",later:"Later",start:"Test starten"},checking:{title:"Bezig met controleren…",text:"Dit duurt een paar seconden.",cancel:"Annuleren"},ok:{title:"Integratie gevalideerd!",text:"Alles staat klaar: uw gebruikers kunnen hun feedback verzenden.",button:"Doorgaan"},ko:{title:"De verbinding is mislukt",text:"Stuur de diagnose naar uw beheerder.",copy:"Diagnose kopiëren",copied:"Diagnose gekopieerd",retry:"Opnieuw proberen"},expired:{title:"Feedjet-abonnement verlopen",text:"Er kan geen feedback meer worden verzonden. Vraag uw beheerder het te verlengen.",close:"Sluiten"},steps:{project:"Project herkend",api:"Verbinding met de Feedjet-API",subscription:"Actief abonnement"},state:{ok:": geslaagd",run:": bezig",err:": mislukt",wait:": niet gecontroleerd"},details:{project:"Project niet gevonden in Feedjet.",api:"Geen antwoord van de API.",domain:"Domein niet toegestaan voor dit project.",subscription:"Abonnement is verlopen."}},global:{close:"Sluiten",submit_error:"Verzenden is mislukt. Controleer uw verbinding en probeer het opnieuw.",rate_limited:"Te veel verzendingen in korte tijd. Probeer het over een paar minuten opnieuw."}}},i=Object.values(e);class n{constructor(t=e.FR){i.includes(t),this.locale=i.includes(t)?t:e.FR}t(e){let i=t[this.locale];for(const t of e.split("."))i="object"==typeof i?i[t]:void 0;return"string"==typeof i?i:e}tf(e,t){return Object.entries(t).reduce((e,[t,i])=>e.replace(new RegExp(`\\{${t}\\}`,"g"),String(i)),this.t(e))}tp(t,i,n={}){const a=1===i||0===i&&this.locale===e.FR;return this.tf(a?`${t}_one`:t,Object.assign({n:i},n))}shortDate(e){const t=new Date(e);return Number.isNaN(t.getTime())?"":new Intl.DateTimeFormat(this.locale,{day:"2-digit",month:"2-digit"}).format(t)}}const a={close:'<path d="M6 6l12 12M18 6L6 18"/>',chat:'<path d="M4 5h16v11H9l-5 4z"/>',idea:'<path d="M9 18h6M10 21h4"/><path d="M12 3a6 6 0 0 0-3.6 10.8c.6.5 1 1.2 1 2V16h5.2v-.2c0-.8.4-1.5 1-2A6 6 0 0 0 12 3z"/>',bug:'<rect x="7" y="8" width="10" height="12" rx="5"/><path d="M12 8v12M9 5l1.5 2M15 5l-1.5 2M4 13h3M17 13h3M5 18l2.5-1.5M19 18l-2.5-1.5M5 8l2.5 1.5M19 8l-2.5 1.5"/>',list:'<path d="M8 6h12M8 12h12M8 18h12"/><circle cx="4" cy="6" r="1"/><circle cx="4" cy="12" r="1"/><circle cx="4" cy="18" r="1"/>',upload:'<path d="M12 16V4M7 9l5-5 5 5M5 20h14"/>',clip:'<path d="M20 11.5l-8.2 8.2a5 5 0 0 1-7-7L13 4.5a3.3 3.3 0 0 1 4.7 4.7l-8.2 8.2a1.7 1.7 0 0 1-2.4-2.4l7.6-7.6"/>',alert:'<circle cx="12" cy="12" r="9"/><path d="M12 7.5v5.5M12 16.5h.01"/>',spinner:'<path d="M12 3a9 9 0 1 0 9 9"/>',camera:'<path d="M4 8h3l2-3h6l2 3h3v11H4z"/><circle cx="12" cy="13" r="3.5"/>',retry:'<path d="M20 12a8 8 0 1 1-2.3-5.6M20 4v5h-5"/>',ok:'<circle cx="12" cy="12" r="9"/><path d="M8 12.5l3 3 5-6"/>',info:'<circle cx="12" cy="12" r="9"/><path d="M12 11v5M12 8h.01"/>',copy:'<rect x="8" y="8" width="12" height="12" rx="2"/><path d="M16 8V5a1 1 0 0 0-1-1H5a1 1 0 0 0-1 1v10a1 1 0 0 0 1 1h3"/>',heart:'<path d="M12 20s-7.5-4.6-7.5-10A4.3 4.3 0 0 1 12 7.4 4.3 4.3 0 0 1 19.5 10c0 5.4-7.5 10-7.5 10z"/>',flag:'<path d="M5 21V4M5 4h11l-2 4 2 4H5"/>',pipe:'<path d="M3 12h6a3 3 0 0 0 3-3V4M21 12h-6a3 3 0 0 0-3 3v5"/>',team:'<circle cx="9" cy="8" r="3"/><path d="M3 20a6 6 0 0 1 12 0"/><path d="M16 5a3 3 0 0 1 0 6M18 20a6 6 0 0 0-3-5.2"/>',search:'<circle cx="11" cy="11" r="6.5"/><path d="M20 20l-4.3-4.3"/>',ban:'<circle cx="12" cy="12" r="9"/><path d="M5.6 5.6l12.8 12.8"/>',star:'<path d="M12 3.5l2.6 5.3 5.9.9-4.3 4.1 1 5.8L12 16.9l-5.2 2.7 1-5.8L3.5 9.7l5.9-.9z"/>'};function s(e,t=18,{stroke:i=1.8,fill:n=!1,className:s=""}={}){return`<svg${s?` class="${s}"`:""} width="${t}" height="${t}" viewBox="0 0 24 24" fill="${n?"currentColor":"none"}" stroke="currentColor" stroke-width="${i}" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${a[e]}</svg>`}function o(e=18){return s("spinner",e,{stroke:2.2,className:"fj-spin"})}const r={welcome:"#4966D8",idea:"#F2B33D",alert:"#EE7B3A",thinking:"#8FA3F5",happy:"#4966D8",bravo:"#36A86A",hello:"#4966D8",sorry:"#9AA3B8"},l='<path d="M21 37q4-5 8 0M35 37q4-5 8 0" stroke="#9EC0FF" stroke-width="3" fill="none" stroke-linecap="round"/>',d={welcome:'<ellipse cx="25" cy="36" rx="3.4" ry="4.2" fill="#9EC0FF"/><ellipse cx="39" cy="36" rx="3.4" ry="4.2" fill="#9EC0FF"/>',idea:'<path d="M21.5 35.5q3.5-5 7 0M35.5 35.5q3.5-5 7 0" stroke="#9EC0FF" stroke-width="3" fill="none" stroke-linecap="round"/><path d="M28.5 40.5q3.5 3 7 0" stroke="#9EC0FF" stroke-width="2.2" fill="none" stroke-linecap="round"/><ellipse cx="19.5" cy="40" rx="2.6" ry="1.6" fill="#FF9DB5" opacity=".55"/><ellipse cx="44.5" cy="40" rx="2.6" ry="1.6" fill="#FF9DB5" opacity=".55"/>',alert:'<path d="M20.5 32.5l7-2.5M36.5 30l7 2.5" stroke="#9EC0FF" stroke-width="2" stroke-linecap="round"/><ellipse cx="25" cy="36.5" rx="3" ry="3.4" fill="#9EC0FF"/><ellipse cx="39" cy="36.5" rx="3" ry="3.4" fill="#9EC0FF"/><path d="M29 43q3-2.4 6 0" stroke="#9EC0FF" stroke-width="2.2" fill="none" stroke-linecap="round"/>',thinking:'<path d="M21 37h7M36 35h7" stroke="#9EC0FF" stroke-width="3" stroke-linecap="round"/>',happy:l,bravo:l,hello:l,sorry:'<path d="M21 36q4 4 8 0M35 36q4 4 8 0" stroke="#9EC0FF" stroke-width="3" fill="none" stroke-linecap="round"/>'},c=new Set(["idea","happy","bravo","hello"]);function u(e,t){const i=r[e];return`<svg class="fj-mascot" data-mood="${e}" width="${t}" height="${t}" viewBox="0 0 64 64" aria-hidden="true">${c.has(e)?`<g class="fj-m-rays" stroke="${i}" stroke-width="2" stroke-linecap="round"><path d="M24 8l-3-3"/><path d="M32 3V0"/><path d="M40 8l3-3"/></g>`:""}<g class="fj-m-body"><g class="fj-m-antenna"><path d="M32 18v-7" stroke="#C3CBE0" stroke-width="2.5"/><circle class="fj-m-light" cx="32" cy="9" r="4.5" fill="${i}"/></g><rect x="7" y="31" width="5" height="12" rx="2.5" fill="#C3CBE0"/><rect x="52" y="31" width="5" height="12" rx="2.5" fill="#C3CBE0"/>${"hello"===e?'<path class="fj-m-arm" d="M54 40q6-6 4-14" stroke="#C3CBE0" stroke-width="5" stroke-linecap="round" fill="none"/>':""}<rect x="10" y="18" width="44" height="40" rx="16" fill="#FFFFFF" stroke="#C3CBE0" stroke-width="2"/><rect x="15" y="26" width="34" height="21" rx="10" fill="#1A2152"/><g class="fj-m-eyes">${d[e]}</g><path d="M28 52h8" stroke="#C3CBE0" stroke-width="2.5" stroke-linecap="round"/></g></svg>`}const p="linear(0, 0.052, 0.17, 0.317, 0.466, 0.6, 0.716, 0.811, 0.883, 0.936, 0.972, 0.996, 1.011, 1.018, 1.02, 1.02, 1.018, 1.015, 1.012, 1.009, 1.007, 1.004, 1.003, 1.002, 1)";function h(){return"function"==typeof matchMedia&&matchMedia("(prefers-reduced-motion: reduce)").matches}function f(e,t){const i=e.getBoundingClientRect().height;if(t(),h()||!i||"function"!=typeof e.animate)return;const n=e.getBoundingClientRect().height;if(Math.abs(i-n)<2)return;const a=e.querySelector(".fj-body");a&&a.scrollHeight<=a.clientHeight&&e.classList.add("fj-morphing");const s=e.animate([{height:`${i}px`},{height:`${n}px`}],{duration:340,easing:"undefined"!=typeof CSS&&(null===(o=CSS.supports)||void 0===o?void 0:o.call(CSS,"animation-timing-function",p))?p:"cubic-bezier(0.2, 0.8, 0.2, 1)"});var o;const r=()=>e.classList.remove("fj-morphing");s.onfinish=r,s.oncancel=r}function b(e){const t=e.firstElementChild;if(h()||!t||"function"!=typeof t.animate)return void e.remove();const i=t.animate([{opacity:1,transform:"none"},{opacity:0,transform:"translateY(8px) scale(0.98)"}],{duration:140,easing:"ease-in",fill:"forwards"});i.onfinish=()=>e.remove(),i.oncancel=()=>e.remove()}var m=':host{all:initial}.fj{color-scheme:light;--bg: #ffffff;--bg2: #f4f6fb;--bg3: #e9edf8;--text: #161b2e;--muted: #4f586e;--border: #dce1ec;--field: #7a849a;--accent: #4966d8;--accent-h: #3a55c4;--on-accent: #ffffff;--accent-text: #3c55c2;--accent-soft: #edf0fd;--focus: #4966d8;--error: #c0262d;--error-soft: #fdeded;--success: #1d6e3f;--success-soft: #e4f4ea;--warn: #8a5200;--warn-soft: #fdf1de;--s-coeur: #a3245a;--s-coeur-bg: #fce8f0;--s-etape: #0d6767;--s-etape-bg: #e1f3f2;--s-tuyaux: #5a3bc2;--s-tuyaux-bg: #eee9fc;--s-transmis: #1d6e3f;--s-transmis-bg: #e4f4ea;--s-etude: #8a5200;--s-etude-bg: #fdf1de;--s-impossible: #4f586e;--s-impossible-bg: #edeff4;--shadow: 0 1px 2px rgba(22, 27, 46, 0.06), 0 12px 32px -8px rgba(22, 27, 46, 0.18);--tab-on: #ffffff;--host: #e4e8f0;--scrim: rgba(22, 27, 46, 0.32);font-family:"DM Sans","Feedjet DM Sans",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;color:var(--text);font-size:15px;line-height:1.45;text-align:left;-webkit-font-smoothing:antialiased}.fj[data-fj-theme=dark]{color-scheme:dark;--bg: #171b2c;--bg2: #1f2439;--bg3: #292f49;--text: #eef1f8;--muted: #a9b1c7;--border: #2f3652;--field: #717c9c;--accent: #4966d8;--accent-h: #3d58c8;--on-accent: #ffffff;--accent-text: #9daef7;--accent-soft: #252d52;--focus: #9daef7;--error: #ff8f8f;--error-soft: #3a1d22;--success: #7fd6a0;--success-soft: #15301f;--warn: #f3c177;--warn-soft: #36280f;--s-coeur: #f59bc0;--s-coeur-bg: #3a1c2b;--s-etape: #6fd3ce;--s-etape-bg: #12312f;--s-tuyaux: #b9a6fa;--s-tuyaux-bg: #2a2246;--s-transmis: #7fd6a0;--s-transmis-bg: #15301f;--s-etude: #f3c177;--s-etude-bg: #36280f;--s-impossible: #b4bccd;--s-impossible-bg: #262b3b;--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -8px rgba(0, 0, 0, 0.55);--tab-on: #2a3050;--host: #0c0f1a;--scrim: rgba(0, 0, 0, 0.5)}.fj *,.fj *::before,.fj *::after{box-sizing:border-box}.fj :where(h2,h3,p,ul,li,fieldset,legend,figure){margin:0;padding:0}.fj :where(button,input,textarea){font-family:inherit;font-size:inherit;color:inherit;letter-spacing:normal;text-transform:none;margin:0}.fj :where(button){cursor:pointer}.fj :where(a){color:var(--accent-text)}.fj :focus-visible{outline:2px solid var(--focus);outline-offset:2px}.fj svg{display:block;flex:none}@media(prefers-color-scheme: dark){.fj[data-fj-theme=auto]{color-scheme:dark;--bg: #171b2c;--bg2: #1f2439;--bg3: #292f49;--text: #eef1f8;--muted: #a9b1c7;--border: #2f3652;--field: #717c9c;--accent: #4966d8;--accent-h: #3d58c8;--on-accent: #ffffff;--accent-text: #9daef7;--accent-soft: #252d52;--focus: #9daef7;--error: #ff8f8f;--error-soft: #3a1d22;--success: #7fd6a0;--success-soft: #15301f;--warn: #f3c177;--warn-soft: #36280f;--s-coeur: #f59bc0;--s-coeur-bg: #3a1c2b;--s-etape: #6fd3ce;--s-etape-bg: #12312f;--s-tuyaux: #b9a6fa;--s-tuyaux-bg: #2a2246;--s-transmis: #7fd6a0;--s-transmis-bg: #15301f;--s-etude: #f3c177;--s-etude-bg: #36280f;--s-impossible: #b4bccd;--s-impossible-bg: #262b3b;--shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 16px 40px -8px rgba(0, 0, 0, 0.55);--tab-on: #2a3050;--host: #0c0f1a;--scrim: rgba(0, 0, 0, 0.5)}}.fj-launcher-wrap{--fj-s: max(40px, var(--fj-launcher-size, 56px));position:relative;display:inline-flex;vertical-align:top;width:var(--fj-s, 56px);height:var(--fj-s, 56px)}.fj-launcher{position:absolute;top:0;right:0;width:max-content;height:var(--fj-s, 56px);min-width:var(--fj-s, 56px);border-radius:calc(var(--fj-s, 56px)/2);border:1px solid var(--border);padding:0 0 0 calc(calc((var(--fj-s, 56px) - calc(var(--fj-s, 56px) - 12px)) / 2) - 1px);background:var(--bg);color:var(--text);box-shadow:var(--shadow);display:flex;align-items:center;justify-content:flex-start}.fj-launcher[aria-expanded=true]{justify-content:center;padding:0}.fj-launcher[aria-busy=true]{cursor:progress}.fj-launcher .fj-mascot{width:calc(var(--fj-s, 56px) - 12px);height:calc(var(--fj-s, 56px) - 12px)}.fj-launcher .fj-mascot[data-mood=happy]{display:none}[data-grow=right]>.fj-launcher{right:auto;left:0}.fj-launcher-label{display:grid;grid-template-columns:0fr;opacity:0}.fj-launcher-label>span{min-width:0;overflow:hidden}.fj-launcher-label>span>span{display:block;width:max-content;padding:0 18px 0 8px;font-size:15px;font-size:clamp(14px,round(down,var(--fj-s, 56px)*.3,1px),15px);font-weight:600;line-height:20px;white-space:nowrap}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible{padding-left:calc((var(--fj-s, 56px) - calc(var(--fj-s, 56px) - 12px))/2)}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible .fj-launcher-label{grid-template-columns:1fr;opacity:1}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible .fj-mascot[data-mood=welcome]{display:none}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible .fj-mascot[data-mood=happy]{display:block}@media(hover: hover){.fj-launcher[aria-expanded=false]:hover{border-color:var(--accent)}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover{padding-left:calc((var(--fj-s, 56px) - calc(var(--fj-s, 56px) - 12px))/2)}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover .fj-launcher-label{grid-template-columns:1fr;opacity:1}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover .fj-mascot[data-mood=welcome]{display:none}.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover .fj-mascot[data-mood=happy]{display:block}}.fj-launcher-pip{position:absolute;left:-2px;bottom:-2px;width:22px;height:22px;width:max(18px,round(var(--fj-s, 56px)*22/56,1px));height:max(18px,round(var(--fj-s, 56px)*22/56,1px));border-radius:50%;background:var(--accent);color:var(--on-accent);display:flex;align-items:center;justify-content:center;border:2px solid var(--bg);pointer-events:none}.fj-launcher[aria-expanded=true]+.fj-launcher-pip,.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:focus-visible+.fj-launcher-pip{display:none}@media(hover: hover){.fj-launcher-wrap:not([data-grow=none])>.fj-launcher[aria-expanded=false]:hover+.fj-launcher-pip{display:none}}.fj-launcher-badge{position:absolute;top:-4px;right:-4px;min-width:20px;height:20px;border-radius:10px;background:var(--accent);color:var(--on-accent);font-size:11px;font-weight:700;line-height:16px;text-align:center;padding:0 5px;border:2px solid var(--bg);pointer-events:none}.fj-panel{background:var(--bg);color:var(--text);border:1px solid var(--border);border-radius:24px;box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:hidden;position:relative;padding:0}dialog.fj-modal{position:fixed;inset:0;margin:auto;max-width:calc(100vw - 32px);max-height:calc(100dvh - 48px);animation:fj-in 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both}dialog.fj-modal:not([open]){display:none}dialog.fj-modal::backdrop{background:var(--scrim);animation:fj-scrim 180ms cubic-bezier(0.2, 0.8, 0.2, 1) both}dialog.fj-modal.fj-closing{animation:fj-out 140ms ease-in both}dialog.fj-modal.fj-closing::backdrop{animation:fj-scrim 140ms ease-in reverse both}.fj-feedback{width:520px}dialog.fj-survey{width:400px;margin:auto 24px 24px auto}dialog.fj-survey::backdrop{background:rgba(0,0,0,0)}.fj-check{width:440px}.fj-head{display:flex;align-items:center;gap:12px;padding:16px 16px 12px 20px}.fj-head h2{margin:0;font-size:17px;line-height:1.3;font-weight:600}.fj-head p{margin:2px 0 0;font-size:14px;color:var(--muted);font-weight:400}.fj-head-text{flex:1;min-width:0}.fj-iconbtn{width:40px;height:40px;border-radius:12px;border:0;padding:0;background:rgba(0,0,0,0);color:var(--muted);display:inline-flex;align-items:center;justify-content:center;flex:none}.fj-iconbtn:hover{background:var(--bg2);color:var(--text)}.fj-tabs{margin:0 20px;display:grid;grid-template-columns:repeat(var(--fj-tab-count, 3), minmax(0, 1fr));gap:4px;padding:4px;background:var(--bg2);border-radius:14px;position:relative}.fj-glider{position:absolute;top:4px;left:4px;height:40px;width:calc((100% - 8px - (var(--fj-tab-count, 3) - 1)*4px)/var(--fj-tab-count, 3));border-radius:10px;background:var(--tab-on);box-shadow:0 1px 2px rgba(22,27,46,.1);transform:translateX(calc(var(--fj-tab-index, 0) * (100% + 4px)));transition:transform 200ms cubic-bezier(0.2, 0.8, 0.2, 1)}.fj-tab{position:relative;height:40px;border-radius:10px;border:0;background:rgba(0,0,0,0);color:var(--muted);font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:6px;padding:0 6px;white-space:nowrap;min-width:0}.fj-tab[aria-selected=true]{color:var(--text)}.fj-tab>span:not(.fj-badge){overflow:hidden;text-overflow:ellipsis}.fj-badge{min-width:18px;height:18px;border-radius:9px;background:var(--accent);color:var(--on-accent);font-size:11px;line-height:18px;padding:0 5px;text-align:center;flex:none}.fj-body{padding:20px;display:flex;flex-direction:column;gap:18px;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain}.fj-body::-webkit-scrollbar{width:10px}.fj-body::-webkit-scrollbar-track{background:rgba(0,0,0,0)}.fj-body::-webkit-scrollbar-thumb{border:3px solid rgba(0,0,0,0);border-radius:5px;background:color-mix(in srgb, var(--field) 45%, transparent) padding-box}.fj-body::-webkit-scrollbar-thumb:hover{background-color:var(--field)}@supports not selector(::-webkit-scrollbar){.fj-body{scrollbar-width:thin;scrollbar-color:color-mix(in srgb, var(--field) 45%, transparent) rgba(0,0,0,0)}}.fj-morphing .fj-body{overflow:hidden}.fj-body.fj-enter{animation:fj-content 120ms cubic-bezier(0.2, 0.8, 0.2, 1) both}.fj-field{display:flex;flex-direction:column;gap:6px}.fj-lab{font-size:14px;font-weight:600;color:var(--text)}.fj-opt{font-weight:400;color:var(--muted)}.fj-input{height:44px;border-radius:12px;border:1px solid var(--field);background:var(--bg2);padding:0 14px;font-size:15px;line-height:1.45;color:var(--text);width:100%;outline:0}.fj-input::placeholder{color:var(--muted);opacity:1}.fj-input:hover{border-color:var(--text)}.fj-input:focus{border-color:var(--accent);outline:2px solid var(--focus);outline-offset:2px;background:var(--bg)}.fj-input[aria-invalid=true]{border-color:var(--error);border-width:2px}.fj-input[readonly]{opacity:.6}textarea.fj-input{height:112px;padding:12px 14px;resize:none;display:block}.fj-help{font-size:13px;color:var(--muted);display:flex;justify-content:space-between;gap:8px}.fj-errmsg{font-size:13px;color:var(--error);display:flex;align-items:center;gap:6px;font-weight:500}.fj-chips{display:flex;flex-wrap:wrap;gap:8px}.fj-chip{height:32px;border-radius:999px;border:1px solid var(--field);background:rgba(0,0,0,0);color:var(--text);padding:0 12px;font-size:13px;font-weight:500;display:inline-flex;align-items:center;gap:6px}.fj-chip:hover{background:var(--bg2)}.fj-chip[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-text);border-color:var(--accent)}.fj-group{border:1px solid var(--border);border-radius:16px;padding:4px 14px;display:flex;flex-direction:column}.fj-row{display:flex;align-items:flex-start;gap:12px;padding:10px 0}.fj-row+.fj-row{border-top:1px solid var(--border)}.fj-row-text{flex:1;min-width:0;font-size:14px}.fj-row-text small{display:block;color:var(--muted);font-size:13px;margin-top:2px}.fj-row-text .fj-errmsg{margin-top:4px}.fj-link{border:0;background:none;padding:0;color:var(--accent-text);text-decoration:underline;font-size:inherit}.fj-disclosure{margin-top:6px;font-size:13px;color:var(--muted)}.fj-cb{width:20px;height:20px;margin:1px 0 0;accent-color:var(--accent);flex:none;cursor:pointer}.fj-sw{appearance:none;width:40px;height:24px;border-radius:12px;background:var(--field);position:relative;flex:none;margin:0;cursor:pointer;border:0}.fj-sw::after{content:"";position:absolute;top:3px;left:3px;width:18px;height:18px;border-radius:9px;background:#fff;transition:left .15s}.fj-sw:checked{background:var(--accent)}.fj-sw:checked::after{left:19px}.fj-drop{border:1.5px dashed var(--field);border-radius:14px;padding:12px 14px;display:flex;align-items:center;gap:12px;color:var(--muted);font-size:14px;background:rgba(0,0,0,0);width:100%;text-align:left;line-height:1.45}.fj-drop b{color:var(--accent-text);font-weight:600}.fj-drop.fj-compact{padding:10px 14px}.fj-drop.fj-over{border-color:var(--accent);background:var(--accent-soft)}.fj-small{font-size:13px}.fj-file{border:1px solid var(--border);border-radius:14px;padding:10px 10px 10px 14px;display:flex;align-items:center;gap:12px;font-size:14px;color:var(--muted)}.fj-file-name{flex:1;min-width:0;color:var(--text);font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.fj-foot{padding:14px 20px;border-top:1px solid var(--border);display:flex;gap:12px;justify-content:flex-end;align-items:center;background:var(--bg)}.fj-foot-meta{margin-right:auto;display:inline-flex;align-items:center;gap:6px}.fj-meta,.fj-credit{font-size:12px;color:var(--muted)}.fj-foot>.fj-credit{margin-right:auto}.fj .fj-credit{display:inline-flex;padding:4px;margin-left:-4px;border-radius:8px;color:var(--muted);text-decoration:none;opacity:.8;transition:opacity 150ms ease,color 150ms ease}.fj .fj-credit:hover{opacity:1;color:var(--text)}.fj-btn{height:44px;border-radius:12px;padding:0 18px;font-size:15px;font-weight:600;line-height:1;border:1px solid rgba(0,0,0,0);display:inline-flex;align-items:center;justify-content:center;gap:8px;white-space:nowrap;text-decoration:none;transition:background-color .15s}.fj-btn[aria-busy=true]{opacity:.85;cursor:progress}.fj-btn-p{background:var(--accent);color:var(--on-accent)}.fj-btn-p:hover{background:var(--accent-h)}.fj-btn-g{background:rgba(0,0,0,0);color:var(--text);border-color:var(--field)}.fj-btn-g:hover{background:var(--bg2)}.fj-btn-t{background:rgba(0,0,0,0);color:var(--accent-text);padding:0 10px;height:36px}.fj-spin{animation:fj-spin 1s linear infinite}.fj-status{display:inline-flex;align-items:center;gap:6px;height:24px;border-radius:999px;padding:0 10px;font-size:12px;font-weight:600;white-space:nowrap}.fj-st-coeur{color:var(--s-coeur);background:var(--s-coeur-bg)}.fj-st-etape{color:var(--s-etape);background:var(--s-etape-bg)}.fj-st-tuyaux{color:var(--s-tuyaux);background:var(--s-tuyaux-bg)}.fj-st-transmis{color:var(--s-transmis);background:var(--s-transmis-bg)}.fj-st-etude{color:var(--s-etude);background:var(--s-etude-bg)}.fj-st-impossible{color:var(--s-impossible);background:var(--s-impossible-bg)}.fj-list{display:flex;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none}.fj-card{border:1px solid var(--border);border-radius:16px;padding:14px 16px;display:flex;flex-direction:column;gap:8px;background:var(--bg)}.fj-card:hover{border-color:var(--field);background:var(--bg2)}.fj-card h3{margin:0;font-size:15px;font-weight:600;line-height:1.35;overflow-wrap:anywhere}.fj-card p{margin:0;font-size:14px;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}.fj-card p[data-open]{display:block;white-space:pre-line}.fj-more{align-self:flex-start;margin-top:-4px;font-size:13px;font-weight:600;text-decoration:none}.fj-more:hover{text-decoration:underline}.fj-card-top{display:flex;align-items:center;gap:8px;font-size:12px;color:var(--muted);font-weight:600}.fj-card-new{margin-left:auto;display:inline-flex;align-items:center;gap:6px;color:var(--accent-text)}.fj-reply{border-radius:12px;background:var(--accent-soft);padding:10px 12px;display:flex;flex-direction:column;gap:2px}.fj-reply b{font-size:12px;font-weight:600;color:var(--accent-text)}.fj-card .fj-reply p{color:var(--text);display:block;-webkit-line-clamp:none;white-space:pre-line}.fj-card-bot{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap}.fj-date{font-size:12px;color:var(--muted);margin-left:auto}.fj-dot{width:8px;height:8px;border-radius:4px;background:var(--accent);flex:none}.fj-sk{background:var(--bg3);border-radius:8px}.fj-updates{margin:0;font-size:13px;color:var(--muted);font-weight:600}.fj-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:10px;padding:40px 12px}.fj-empty h3{margin:8px 0 0;font-size:17px;font-weight:600}.fj-empty p{margin:0;color:var(--muted);font-size:14px;max-width:300px}.fj-empty-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap;justify-content:center}.fj-notice{border-radius:14px;padding:12px 14px;display:flex;gap:10px;font-size:14px;align-items:flex-start}.fj-notice b{font-weight:600}.fj-notice.fj-err{background:var(--error-soft);color:var(--error)}.fj-capt{border:1px solid var(--border);border-radius:14px;padding:10px;display:flex;gap:12px;align-items:center}.fj-capt-text{flex:1;min-width:0;font-size:14px}.fj-capt-text b{font-weight:600}.fj-capt-text span{color:var(--muted);font-size:13px}.fj-thumb{width:88px;height:56px;border-radius:8px;background:var(--bg3);flex:none;position:relative;overflow:hidden;border:1px solid var(--border)}.fj-thumb img{width:100%;height:100%;object-fit:cover;object-position:top left;display:block}.fj-thumb::before,.fj-thumb::after{content:"";position:absolute;border-radius:4px}.fj-thumb::before{left:6px;top:6px;right:30px;height:6px;border-radius:3px;background:var(--field);opacity:.5}.fj-thumb::after{left:6px;top:18px;width:40px;height:26px;background:var(--accent);opacity:.35}.fj-thumb.fj-has-img::before,.fj-thumb.fj-has-img::after{display:none}.fj-capt-icon{color:var(--muted);padding:0 4px}.fj-progress-wrap{padding:0 20px}.fj-prog{height:4px;border-radius:2px;background:var(--bg3);overflow:hidden}.fj-prog i{display:block;height:4px;background:var(--accent);border-radius:2px;transform:translateX(calc(var(--fj-progress, 0%) - 100%));transition:transform .2s cubic-bezier(0.2, 0.8, 0.2, 1)}.fj-intro{font-size:14px;color:var(--muted)}.fj-intro b{display:block;color:var(--text);font-weight:600}.fj-set{border:0;margin:0;padding:0;min-width:0;display:flex;flex-direction:column;gap:8px}.fj-set legend{padding:0;margin-bottom:8px}.fj-stars{display:flex;justify-content:space-between;gap:4px}.fj-star{width:52px;height:52px;border-radius:14px;color:var(--field);display:flex;align-items:center;justify-content:center;cursor:pointer;position:relative}.fj-star.fj-on{color:var(--accent)}.fj-star.fj-pop svg{animation:fj-pop 160ms cubic-bezier(0.2, 0.8, 0.2, 1)}.fj-star:has(:focus-visible){outline:2px solid var(--focus);outline-offset:2px}.fj-star-value{color:var(--accent-text);font-weight:600}.fj-choices{display:flex;gap:10px}.fj-choice{flex:1;min-height:48px;border-radius:14px;border:1px solid var(--field);background:rgba(0,0,0,0);color:var(--text);font-size:14px;font-weight:600;display:flex;align-items:center;justify-content:center;gap:8px;padding:8px 12px;text-align:center;cursor:pointer}.fj-choice:hover{background:var(--bg2)}.fj-choice:has(:checked){border:2px solid var(--accent);background:var(--accent-soft);color:var(--accent-text)}.fj-choice:has(:focus-visible){outline:2px solid var(--focus);outline-offset:2px}.fj-anon{border-top:1px solid var(--border);padding-top:14px;align-items:center}.fj-float{position:fixed;inset:auto 24px 24px auto;margin:0;padding:0;border:0;background:rgba(0,0,0,0);overflow:visible;z-index:2147483000;color:var(--text)}.fj-float:popover-open,.fj-float:not([popover]){display:flex}.fj-bubble{width:360px;align-items:flex-end;gap:10px;animation:fj-rise 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both}.fj-bubble .fj-panel{flex:1;border-radius:20px 20px 6px;padding:14px 14px 14px 16px;gap:12px}.fj-bubble .fj-iconbtn{width:32px;height:32px;margin:-6px -6px 0 0}.fj-bubble-head{display:flex;gap:8px;align-items:flex-start}.fj-bubble-head p{margin:0;font-weight:600;font-size:15px}.fj-bubble-head small{display:block;margin:2px 0 0;font-size:13px;color:var(--muted)}.fj-bubble-actions{display:flex;gap:8px}.fj-bubble-actions .fj-btn{height:40px}.fj-bubble-actions .fj-btn-p{flex:1}.fj-avatar{width:56px;height:56px;border-radius:28px;background:var(--bg);border:1px solid var(--border);box-shadow:var(--shadow);display:flex;align-items:center;justify-content:center;flex:none}.fj-avatar svg{transform-origin:50% 90%;animation:fj-wave 600ms ease-in-out 240ms 1}.fj-toast{width:360px}.fj-toast .fj-panel{width:100%;border-radius:20px;padding:16px;flex-direction:row;gap:14px;align-items:center;animation:fj-rise 240ms cubic-bezier(0.2, 0.8, 0.2, 1) both}.fj-toast .fj-iconbtn{align-self:flex-start;margin:-6px -6px 0 0}.fj-toast p{margin:0;font-weight:600;font-size:16px}.fj-toast small{display:block;margin:2px 0 0;font-size:14px;color:var(--muted)}.fj-toast-text{flex:1;min-width:0}.fj-thanks-close{display:flex;justify-content:flex-end;padding:12px 12px 0}.fj-thanks{align-items:center;justify-content:center;text-align:center;gap:12px;padding:8px 32px 28px}.fj-thanks h2{margin:8px 0 6px;font-size:22px;line-height:1.25;font-weight:600}.fj-thanks h2:focus,.fj-thanks h2:focus-visible{outline:none}.fj-thanks p{margin:0 auto;color:var(--muted);font-size:15px;max-width:360px}.fj-thanks>svg{animation:fj-bounce 400ms cubic-bezier(0.2, 0.8, 0.2, 1) 1}.fj-center{justify-content:center}.fj-check-body{padding:24px 24px 8px;display:flex;flex-direction:column;gap:14px}.fj-check-head{display:flex;gap:14px;align-items:center}.fj-check-head h2{margin:0;font-size:18px;line-height:1.3;font-weight:600}.fj-check-head p{margin:4px 0 0;font-size:14px;color:var(--muted)}.fj-steps{display:flex;flex-direction:column;gap:10px;margin:0;padding:0;list-style:none}.fj-steps li{display:flex;align-items:center;gap:10px;font-size:14px}.fj-step-detail{display:block;font-size:13px;color:var(--error)}.fj-ic-ok{color:var(--success)}.fj-ic-err{color:var(--error)}.fj-ic-wait{color:var(--muted)}.fj-ic-run{color:var(--accent-text)}.fj-check .fj-foot{border-top:0;padding-top:12px}.fj-grabber{display:none;width:36px;height:4px;border-radius:2px;background:var(--border);margin:8px auto 0}.fj-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border:0}.fj-hp{position:absolute;left:-10000px;width:1px;height:1px;overflow:hidden}@media only screen and (max-width: 600px),only screen and (max-height: 500px){dialog.fj-modal{max-width:100vw;max-height:100dvh;animation-name:fj-sheet-in;animation-duration:240ms}dialog.fj-modal.fj-closing{animation-name:fj-sheet-out}.fj-feedback,dialog.fj-survey{width:100vw;height:100dvh;margin:0;border-radius:0;border:0;box-shadow:none}.fj-feedback .fj-head,.fj-survey .fj-head{padding-top:max(16px,env(safe-area-inset-top))}dialog.fj-check{width:100vw;margin:auto 0 0;border-radius:24px 24px 0 0;border-bottom:0}.fj-grabber{display:block}.fj-feedback .fj-foot,.fj-survey .fj-foot,.fj-check .fj-foot{padding:12px 16px max(20px,env(safe-area-inset-bottom));box-shadow:0 -8px 20px -12px rgba(0,0,0,.25)}.fj-feedback .fj-foot .fj-btn,.fj-survey .fj-foot .fj-btn,.fj-check .fj-foot .fj-btn{flex:1}.fj-check .fj-foot{box-shadow:none}.fj-foot-meta,.fj .fj-credit{display:none}.fj-input{font-size:16px}.fj-float{inset:auto 12px max(12px,env(safe-area-inset-bottom)) 12px;width:auto;justify-content:flex-end}.fj-bubble .fj-panel,.fj-toast .fj-panel{max-width:290px}.fj-toast .fj-panel{max-width:none}}@keyframes fj-in{from{opacity:0;transform:scale(0.96)}}@keyframes fj-out{to{opacity:0;transform:scale(0.96)}}@keyframes fj-sheet-in{from{opacity:0;transform:translateY(24px)}}@keyframes fj-sheet-out{to{opacity:0;transform:translateY(24px)}}@keyframes fj-scrim{from{opacity:0}}@keyframes fj-content{from{opacity:0;transform:translateY(4px)}}@keyframes fj-rise{from{opacity:0;transform:translateY(12px)}}@keyframes fj-fade{from{opacity:0}}@keyframes fj-wave{25%{transform:rotate(-10deg)}75%{transform:rotate(8deg)}}@keyframes fj-bounce{50%{transform:scale(1.08)}}@keyframes fj-pop{50%{transform:scale(1.15)}}@keyframes fj-spin{to{transform:rotate(360deg)}}.fj{--fj-spring: cubic-bezier(0.2, 0.8, 0.2, 1)}@supports(animation-timing-function: linear(0, 1)){.fj{--fj-spring: linear(0, 0.052, 0.17, 0.317, 0.466, 0.6, 0.716, 0.811, 0.883, 0.936, 0.972, 0.996, 1.011, 1.018, 1.02, 1.02, 1.018, 1.015, 1.012, 1.009, 1.007, 1.004, 1.003, 1.002, 1)}}dialog.fj-modal{animation-timing-function:var(--fj-spring);animation-duration:240ms}.fj-btn,.fj-chip,.fj-choice,.fj-iconbtn,.fj-drop,.fj-card,.fj-star{transition:background-color 150ms ease,border-color 150ms ease,color 150ms ease,box-shadow 150ms ease,transform 200ms var(--fj-spring)}.fj-btn:active:not([aria-busy=true],:disabled),.fj-chip:active,.fj-choice:active,.fj-iconbtn:active{transform:scale(0.97)}.fj-launcher{transition:border-color 150ms ease,padding-left 180ms cubic-bezier(0.2, 0.8, 0.2, 1),transform 200ms var(--fj-spring)}.fj-launcher:active{transform:scale(0.97)}.fj-launcher[aria-expanded=true] svg{animation:fj-swap 260ms var(--fj-spring) both}.fj-launcher-label{transition:grid-template-columns 180ms cubic-bezier(0.2, 0.8, 0.2, 1),opacity 120ms ease}.fj-launcher-badge,.fj-badge{animation:fj-pop-in 300ms var(--fj-spring) both}.fj-input{transition:border-color 150ms ease,background-color 150ms ease,opacity 150ms ease}.fj-glider{transition:transform 280ms var(--fj-spring)}.fj-tab{transition:color 150ms ease}.fj-body.fj-enter{animation:fj-slide 200ms var(--fj-spring) both}.fj-notice,.fj-errmsg,.fj-file{animation:fj-drop 220ms var(--fj-spring) both}.fj-foot .fj-spin{animation:fj-fade 120ms ease both,fj-spin 1s linear infinite}.fj-thanks>*,.fj-thanks-close,.fj-foot.fj-center{animation:fj-content 260ms var(--fj-spring) both}.fj-thanks>:nth-child(2){animation-delay:60ms}.fj-foot.fj-center{animation-delay:120ms}.fj-list>li,.fj-steps>li{animation:fj-content 260ms var(--fj-spring) both;animation-delay:calc(min(var(--fj-i, 0),6)*40ms)}.fj-thumb img{animation:fj-fade 200ms ease both}.fj-capt[aria-busy=true] .fj-thumb{animation:fj-breathe 1.2s ease-in-out infinite}.fj-disclosure{display:grid;grid-template-rows:0fr;margin-top:0;opacity:0;visibility:hidden;transition:grid-template-rows 280ms var(--fj-spring),margin-top 280ms var(--fj-spring),opacity 200ms ease,visibility 0s linear 280ms}.fj-disclosure>span{min-height:0;overflow:hidden}.fj-disclosure[data-open]{grid-template-rows:1fr;margin-top:6px;opacity:1;visibility:visible;transition-delay:0s}.fj-cb{appearance:none;position:relative;border:1.5px solid var(--field);border-radius:6px;background:var(--bg);transition:background-color 150ms ease,border-color 150ms ease}.fj-cb::after{content:"";position:absolute;left:5.5px;top:1.5px;width:5px;height:10px;border:solid var(--on-accent);border-width:0 2px 2px 0;transform:rotate(45deg) scale(0);transition:transform 220ms var(--fj-spring)}.fj-cb:checked{background:var(--accent);border-color:var(--accent)}.fj-cb:checked::after{transform:rotate(45deg) scale(1)}.fj-cb:hover:not(:checked){border-color:var(--text)}.fj-cb[aria-invalid=true]{border:2px solid var(--error)}.fj-sw{transition:background-color 200ms ease}.fj-sw::after{transition:transform 260ms var(--fj-spring);box-shadow:0 1px 2px rgba(22,27,46,.25)}.fj-sw:checked::after{left:3px;transform:translateX(16px)}.fj-prog i{transition:transform 420ms var(--fj-spring)}@media(hover: hover){.fj-stars:has(.fj-star:hover) .fj-star:not(.fj-on){color:var(--field)}.fj-star:hover,.fj-star:has(~.fj-star:hover){color:var(--accent) !important;transform:translateY(-1px)}}.fj-star.fj-pop svg{animation:fj-pop 200ms var(--fj-spring)}.fj-bubble{animation:fj-rise 300ms var(--fj-spring) both}.fj-toast .fj-panel{animation:fj-rise 300ms var(--fj-spring) both}.fj-mascot{overflow:visible}.fj-mascot g,.fj-mascot circle,.fj-mascot path{transform-box:fill-box}.fj-mascot .fj-m-body{transform-origin:50% 100%;animation:fj-m-settle 420ms var(--fj-spring) both}.fj-mascot .fj-m-light{transform-origin:center;animation:fj-m-light 360ms var(--fj-spring) 80ms both}.fj-mascot .fj-m-eyes{transform-origin:center;animation:fj-m-blink 220ms ease-in-out 900ms 1}.fj-mascot .fj-m-rays path{transform-origin:50% 100%;animation:fj-m-ray 320ms var(--fj-spring) both}.fj-mascot .fj-m-rays path:nth-child(1){animation-delay:140ms}.fj-mascot .fj-m-rays path:nth-child(2){animation-delay:190ms}.fj-mascot .fj-m-rays path:nth-child(3){animation-delay:240ms}.fj-mascot .fj-m-arm{transform-origin:0% 100%;animation:fj-m-wave 700ms ease-in-out 300ms 1}.fj-mascot[data-mood=alert] .fj-m-antenna{transform-origin:50% 100%;animation:fj-m-wilt 620ms var(--fj-spring) 120ms both}.fj-mascot[data-mood=alert] .fj-m-body{animation:fj-m-droop 520ms var(--fj-spring) both}.fj-mascot[data-mood=idea] .fj-m-body{animation:fj-m-hop 520ms var(--fj-spring) both}.fj-mascot[data-mood=sorry] .fj-m-body{animation:fj-m-droop 520ms var(--fj-spring) both}.fj-mascot[data-mood=thinking] .fj-m-light{animation:fj-m-think 1.1s ease-in-out infinite}.fj-mascot[data-mood=bravo] .fj-m-body{animation:fj-m-cheer 520ms var(--fj-spring) both}.fj-capt-text .fj-capt-title{display:flex;align-items:baseline;gap:10px;white-space:nowrap;color:var(--text);font-size:14px}.fj-capt-text .fj-capt-title .fj-link{font-size:13px;font-weight:600;text-decoration:none}.fj-capt-text .fj-capt-title .fj-link:hover{text-decoration:underline}.fj-capt-hint{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.fj-row-text{font-size:14px}.fj-thanks p{max-width:400px}@media only screen and (max-width: 600px),only screen and (max-height: 500px){.fj-feedback .fj-head,.fj-survey .fj-head{gap:10px;padding-left:16px;padding-right:4px}.fj-feedback .fj-head .fj-mascot,.fj-survey .fj-head .fj-mascot{width:36px;height:36px}.fj-feedback .fj-head h2,.fj-survey .fj-head h2{font-size:16px}.fj-feedback .fj-head p,.fj-survey .fj-head p{font-size:13px}.fj-tabs{margin:0 16px}.fj-tab{font-size:13px;padding:0 4px}.fj-tab>svg{display:none}.fj-check-head{gap:12px}.fj-check-head .fj-mascot{width:44px;height:44px}.fj-check-head h2{font-size:17px}.fj-thumb{width:64px;height:42px}.fj-capt-hint{font-size:12px !important}}.fj h2,.fj h3,.fj .fj-bubble-head p{text-wrap:balance}.fj p,.fj small,.fj .fj-row-text,.fj .fj-step-detail{text-wrap:pretty}.fj .fj-opt{white-space:nowrap}.fj-thanks p,.fj-empty p,.fj-toast-text small{text-wrap:balance}@keyframes fj-swap{from{opacity:0;transform:rotate(-90deg) scale(0.6)}}@keyframes fj-pop-in{from{opacity:0;transform:scale(0.4)}}@keyframes fj-slide{from{opacity:0;transform:translateX(calc(var(--fj-dir, 0) * 12px)) translateY(calc((1 - var(--fj-dir, 0) * var(--fj-dir, 0)) * 4px))}}@keyframes fj-drop{from{opacity:0;transform:translateY(-4px)}}@keyframes fj-breathe{50%{opacity:.55}}@keyframes fj-m-settle{from{transform:translateY(3px) scale(0.94)}}@keyframes fj-m-light{from{opacity:.3;transform:scale(0.4)}}@keyframes fj-m-blink{50%{transform:scaleY(0.12)}}@keyframes fj-m-ray{from{opacity:0;transform:scale(0.2)}}@keyframes fj-m-wave{20%,60%{transform:rotate(-16deg)}40%,80%{transform:rotate(10deg)}}@keyframes fj-m-wobble{25%{transform:rotate(-9deg)}60%{transform:rotate(6deg)}}@keyframes fj-m-droop{from{transform:translateY(-3px) rotate(0)}to{transform:rotate(-4deg)}}@keyframes fj-m-wilt{to{transform:rotate(-12deg)}}@keyframes fj-m-hop{0%{transform:scale(0.92)}40%{transform:translateY(-3px) scale(1.04)}}@keyframes fj-m-think{50%{opacity:.35;transform:scale(0.8)}}@keyframes fj-m-cheer{0%{transform:scale(0.9)}45%{transform:translateY(-4px) scale(1.06)}}@media(prefers-reduced-motion: reduce){.fj *,.fj *::before,.fj *::after{animation-duration:1ms !important;animation-iteration-count:1 !important;transition-duration:1ms !important}.fj dialog.fj-modal,.fj .fj-bubble,.fj .fj-toast .fj-panel{animation:fj-fade 120ms linear both !important}.fj dialog.fj-modal.fj-closing{animation:none !important}.fj .fj-spin,.fj .fj-mascot *,.fj .fj-capt .fj-thumb{animation:none !important}}\n';let g=null;class v{constructor(e,t,i=document.body,n="div"){this.host=document.createElement(n),this.host.id=e;const a=this.host.attachShadow({mode:"open"});!function(e){try{null!=g||(g=new CSSStyleSheet),g.cssRules.length||g.replaceSync(m),e.adoptedStyleSheets=[g]}catch(t){const i=document.createElement("style");i.textContent=m,e.prepend(i)}}(a),this.root=document.createElement(n),this.root.className="fj",this.root.dataset.fjTheme=t,a.append(this.root),i.append(this.host)}find(e){return this.root.querySelector(e)}remove(){this.host.remove()}}let j=0,y="",x="";function w(e){const t=document.documentElement;e&&0===j&&(y=t.style.overflow,x=t.style.scrollbarGutter,window.innerWidth>t.clientWidth&&(t.style.scrollbarGutter="stable")),j=Math.max(0,j+(e?1:-1)),t.classList.toggle("fj-modal-open",j>0),t.style.overflow=j>0?"hidden":y,0===j&&(t.style.scrollbarGutter=x)}class k{constructor(e,t){this.surface=e,this.options=t,this.returnFocus=null,this.closing=!1,this.closeRun=0,this.locked=!1,this.dialog=document.createElement("dialog"),this.dialog.className=`fj-panel fj-modal ${t.className}`,t.labelledBy?this.dialog.setAttribute("aria-labelledby",t.labelledBy):t.label&&this.dialog.setAttribute("aria-label",t.label),this.dialog.addEventListener("cancel",e=>{e.preventDefault(),this.close()}),this.dialog.addEventListener("keydown",e=>this.wrapFocus(e)),this.dialog.addEventListener("click",e=>{var i,n;e.target===this.dialog&&this.isOutside(e)&&null!==(n=null===(i=t.closeOnBackdrop)||void 0===i?void 0:i.call(t))&&void 0!==n&&n&&this.close()}),e.root.append(this.dialog)}get isOpen(){return this.dialog.open&&!this.closing}open(){if(this.closing)return this.closeRun++,this.closing=!1,void this.dialog.classList.remove("fj-closing");this.dialog.open||(this.returnFocus=$(),this.dialog.classList.remove("fj-closing"),this.closing=!1,this.dialog.showModal(),!1===this.options.lockScroll||this.locked||(this.locked=!0,w(!0)))}close(){if(!this.dialog.open||this.closing)return Promise.resolve();this.closing=!0,this.dialog.classList.add("fj-closing");const e=++this.closeRun;return new Promise(t=>{!function(e,t){const i=getComputedStyle(e).animationName;if(!i||"none"===i)return void t();let n=!1;const a=()=>{n||(n=!0,e.removeEventListener("animationend",a),t())};e.addEventListener("animationend",a),setTimeout(a,400)}(this.dialog,()=>{e===this.closeRun&&this.finish(),t()})})}destroy(){this.dialog.open&&this.finish(!1),this.dialog.remove()}finish(e=!0){var t,i;this.dialog.close(),this.dialog.classList.remove("fj-closing"),this.closing=!1,this.locked&&(this.locked=!1,w(!1));const n=this.returnFocus;this.returnFocus=null,(null==n?void 0:n.isConnected)&&n.focus(),e&&(null===(i=(t=this.options).onClose)||void 0===i||i.call(t))}wrapFocus(e){if("Tab"!==e.key)return;const t=[...this.dialog.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]):not([type="hidden"]), textarea:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')].filter(e=>e.getClientRects().length>0&&!e.closest('[hidden], [aria-hidden="true"]'));if(!t.length)return;const i=t[0],n=t[t.length-1],a=$();!e.shiftKey||a!==i&&a!==this.dialog?e.shiftKey||a!==n||(e.preventDefault(),i.focus()):(e.preventDefault(),n.focus())}isOutside(e){const t=this.dialog.getBoundingClientRect();return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}get root(){return this.surface.root}}function $(){var e;let t=document.activeElement;for(;null===(e=null==t?void 0:t.shadowRoot)||void 0===e?void 0:e.activeElement;)t=t.shadowRoot.activeElement;return t instanceof HTMLElement?t:null}function C(e){"function"==typeof e.showPopover&&(e.setAttribute("popover","manual"),e.showPopover())}"function"==typeof SuppressedError&&SuppressedError;const _=[{name:"Edge",regex:/Edg(?:e|A|iOS)?\/(\d+(?:\.\d+)*)/},{name:"Opera",regex:/(?:OPR|Opera)\/(\d+(?:\.\d+)*)/},{name:"Firefox",regex:/(?:Firefox|FxiOS)\/(\d+(?:\.\d+)*)/},{name:"Chrome",regex:/(?:Chrome|CriOS)\/(\d+(?:\.\d+)*)/},{name:"Safari",regex:/Version\/(\d+(?:\.\d+)*) (?:Mobile\/\w+ )?Safari/}],S={WindowsPhone:/windows phone/i,Android:/android/i,iOS:/iPad|iPhone|iPod/,Windows:/Win/i,MacOS:/Mac/i,Linux:/Linux/i};let q=null;async function E(){null!=q||(q=import("modern-screenshot"));try{return await q}catch(e){throw q=null,e}}const A="data-fj-auto-height",M=new Set(["absolute","fixed"]),F=new Set(["block","list-item","flex","grid","table","flow-root"]),z=new Set(["block","list-item"]),T=new Set(["visible","clip"]),L=/flex|grid/;function D(e){return"none"!==e.display&&"none"===e.float&&!M.has(e.position)}function I(e,t){var i;return z.has(t.display)&&T.has(t.overflowY)&&D(t)&&0===Number.parseFloat(t.paddingBottom)&&0===Number.parseFloat(t.borderBottomWidth)&&"none"===t.contain&&"normal"===t.containerType&&"auto"===t.columnCount&&"auto"===t.columnWidth&&"horizontal-tb"===t.writingMode&&!L.test(getComputedStyle(null!==(i=e.parentElement)&&void 0!==i?i:e).display)}function N(e){for(let t=e.lastChild;t;t=t.previousSibling){if(t instanceof Text&&""!==t.data.trim())return null;if(!(t instanceof Element))continue;const e=getComputedStyle(t);if(D(e))return F.has(e.display)?t:null}return null}function O(e,t,i,n){const a=e.getBoundingClientRect().bottom,s=function(e){for(let t=e.nextElementSibling;t;t=t.nextElementSibling){const e=getComputedStyle(t);if(D(e))return F.has(e.display)?t:null}return null}(e);return s?n>Math.max(i,Number.parseFloat(getComputedStyle(s).marginTop)||0)&&Math.abs(s.getBoundingClientRect().top-a-n)<=.5:Math.abs(t.getBoundingClientRect().bottom-a)<=.5}function P(e){e instanceof HTMLElement&&e.hasAttribute(A)&&(e.removeAttribute(A),e.style.removeProperty("height"),e.style.removeProperty("block-size"))}const B=/[&<>"']/g,V={"&":"&","<":"<",">":">",'"':""","'":"'"};function U(e){return String(null!=e?e:"").replace(B,e=>V[e])}const R=1e4,H=new Set(["GET","HEAD"]);function W(){return new DOMException("Aborted","AbortError")}function Q(e,t){return new Promise((i,n)=>{const a=setTimeout(()=>{null==t||t.removeEventListener("abort",s),i()},e);function s(){clearTimeout(a),n(W())}null==t||t.addEventListener("abort",s,{once:!0})})}async function Y(e,t={}){var i,n,{timeout:a=R,retries:s=0,signal:o}=t,r=function(e,t){var i={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(i[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(n=Object.getOwnPropertySymbols(e);a<n.length;a++)t.indexOf(n[a])<0&&Object.prototype.propertyIsEnumerable.call(e,n[a])&&(i[n[a]]=e[n[a]])}return i}(t,["timeout","retries","signal"]);const l=H.has((null!==(i=r.method)&&void 0!==i?i:"GET").toUpperCase())?s:0;for(let t=0;;t++){if(null==o?void 0:o.aborted)throw W();const i=new AbortController,s=()=>i.abort(),d=setTimeout(s,a);null==o||o.addEventListener("abort",s,{once:!0});try{const a=await fetch(e,Object.assign(Object.assign({},r),{signal:i.signal}));if(a.status<500||t>=l)return a;null===(n=a.body)||void 0===n||n.cancel()}catch(e){if((null==o?void 0:o.aborted)||t>=l)throw e}finally{clearTimeout(d),null==o||o.removeEventListener("abort",s)}await Q(500*2**t,o)}}function K(e){try{const t=sessionStorage.getItem(e);return t?JSON.parse(t):null}catch(e){return null}}function Z(e,t){try{null===t?sessionStorage.removeItem(e):sessionStorage.setItem(e,JSON.stringify(t))}catch(e){}}function G(e,...t){try{null==e||e(...t)}catch(e){}}const J="fj-check-title";class X{constructor(e){this.config=e,this.status="pending",this.error=null,this.modal=null,this.check=null}get i18n(){return this.config.i18n()}get integrationStatus(){return this.status}setStatus(e,t){this.status=e,void 0!==t&&(this.error=t)}handleIntegrationStatus(){return"ok"!==this.status&&("no_subscription"===this.error?this.show("expired",{project:"ok",api:"ok",subscription:"err"}):"communication_error"===this.error?this.show("ko",{project:"wait",api:"err",subscription:"wait"}):this.show("pending"),!0)}destroy(){var e,t;null===(e=this.check)||void 0===e||e.abort(),null===(t=this.modal)||void 0===t||t.destroy(),this.modal=null}ensureModal(){var e;return null!==(e=this.modal)&&void 0!==e||(this.modal=new k(this.config.surface,{className:"fj-check",labelledBy:J,closeOnBackdrop:()=>!0,onClose:()=>{var e;return null===(e=this.check)||void 0===e?void 0:e.abort()}})),this.modal}show(e,t){var i;const n=this.ensureModal();f(n.dialog,()=>n.dialog.innerHTML=this.render(e,t)),this.bind(e,n),n.open();const a="checking"===e?'[data-action="cancel"]':".fj-btn-p";null===(i=n.dialog.querySelector(a))||void 0===i||i.focus()}render(e,t){const i=this.config.module,n={pending:{mood:"welcome",title:this.i18n.tf("integration.pending.title",{module:i}),text:this.i18n.t("integration.pending.text"),role:""},checking:{mood:"thinking",title:this.i18n.t("integration.checking.title"),text:this.i18n.t("integration.checking.text"),role:"status"},ok:{mood:"bravo",title:this.i18n.t("integration.ok.title"),text:this.i18n.t("integration.ok.text"),role:"status"},ko:{mood:"sorry",title:this.i18n.t("integration.ko.title"),text:this.i18n.t("integration.ko.text"),role:"alert"},expired:{mood:"sorry",title:this.i18n.t("integration.expired.title"),text:this.i18n.t("integration.expired.text"),role:"alert"}},{mood:a,title:s,text:o,role:r}=n[e],l=r?` role="${r}"`:"";return`\n <div class="fj-grabber" aria-hidden="true"></div>\n <div class="fj-check-body" data-version="v3.0.0-rc.2" data-screen="${e}">\n <div class="fj-check-head">\n ${u(a,56)}\n <div${l}>\n <h2 id="${J}">${U(s)}</h2>\n <p>${U(o)}</p>\n </div>\n </div>\n ${t?this.renderSteps(t):""}\n </div>\n <div class="fj-foot">${this.renderActions(e)}</div>`}renderSteps(e){const t={project:this.i18n.t("integration.details.project"),api:this.i18n.t("domain_not_allowed"===this.error?"integration.details.domain":"integration.details.api"),subscription:this.i18n.t("integration.details.subscription")},i={ok:`<span class="fj-ic-ok">${s("ok",20)}</span>`,run:`<span class="fj-ic-run">${o(20)}</span>`,err:`<span class="fj-ic-err">${s("alert",20)}</span>`,wait:`<span class="fj-ic-wait">${s("info",20)}</span>`};return`<ul class="fj-steps">${Object.keys(e).map((n,a)=>{const s=e[n],o="wait"===s?"var(--muted)":"var(--text)",r="err"===s?`<span class="fj-step-detail">${U(t[n])}</span>`:"";return`<li data-step="${n}" data-state="${s}" style="--fj-i:${a}">${i[s]}<span style="color:${o}">${this.i18n.t(`integration.steps.${n}`)}<span class="fj-sr-only">${this.i18n.t(`integration.state.${s}`)}</span>${r}</span></li>`}).join("")}</ul>`}renderActions(e){switch(e){case"pending":return`<button type="button" class="fj-btn fj-btn-g" data-action="close">${this.i18n.t("integration.pending.later")}</button>\n <button type="button" class="fj-btn fj-btn-p" data-action="run">${this.i18n.t("integration.pending.start")}</button>`;case"checking":return`<button type="button" class="fj-btn fj-btn-g" data-action="cancel" aria-busy="true">${this.i18n.t("integration.checking.cancel")}</button>`;case"ok":return`<button type="button" class="fj-btn fj-btn-p" data-action="continue">${this.i18n.t("integration.ok.button")}</button>`;case"ko":return`<button type="button" class="fj-btn fj-btn-g" data-action="copy">${s("copy")}<span>${this.i18n.t("integration.ko.copy")}</span></button>\n <button type="button" class="fj-btn fj-btn-p" data-action="run">${s("retry")}${this.i18n.t("integration.ko.retry")}</button>`;case"expired":return`<button type="button" class="fj-btn fj-btn-p" data-action="close">${this.i18n.t("integration.expired.close")}</button>`}}bind(e,t){const i=(e,i)=>{var n;null===(n=t.dialog.querySelector(`[data-action="${e}"]`))||void 0===n||n.addEventListener("click",i)};i("close",()=>{t.close()}),i("run",()=>{this.run()}),i("cancel",()=>{var e;null===(e=this.check)||void 0===e||e.abort(),this.show("pending")}),i("continue",async()=>{await t.close(),this.config.onSuccess()}),i("copy",()=>{this.copyDiagnostic(t)}),"checking"!==e&&(this.check=null)}async run(){var e;this.show("checking",{project:"ok",api:"run",subscription:"wait"});const t=await this.checkConnectivity();if(!this.config.signal.aborted&&(null===(e=this.modal)||void 0===e?void 0:e.isOpen)&&null!==this.check){if(this.check=null,t)return this.status="ok",void this.show("ok",{project:"ok",api:"ok",subscription:"ok"});this.status="ko","no_subscription"===this.error?this.show("expired",{project:"ok",api:"ok",subscription:"err"}):"project_not_found"===this.error?this.show("ko",{project:"err",api:"ok",subscription:"wait"}):this.show("ko",{project:"ok",api:"err",subscription:"wait"})}}async checkConnectivity(){var e;const t=new AbortController;this.check=t;const i=()=>t.abort();this.config.signal.addEventListener("abort",i,{once:!0});try{const i=await Y(this.config.connectivityCheckUrl,{method:"POST",signal:t.signal,headers:{"Content-Type":"application/json"},body:JSON.stringify(this.config.connectivityCheckBody)});if(i.ok)return this.error=null,!0;let n="";try{n=null!==(e=(await i.json()).error)&&void 0!==e?e:""}catch(e){}return this.error="no_subscription"===n||"project_not_found"===n?n:403===i.status?"domain_not_allowed":"communication_error",!1}catch(e){return this.error="communication_error",!1}finally{this.config.signal.removeEventListener("abort",i)}}async copyDiagnostic(e){var t,i;const n=[...e.dialog.querySelectorAll(".fj-steps li")].map(e=>`- ${e.dataset.step}: ${e.dataset.state}`),a=[`Feedjet ${this.config.module} v3.0.0-rc.2`,`Date: ${(new Date).toISOString()}`,`Page: ${location.origin}${location.pathname}`,`API: ${this.config.connectivityCheckUrl}`,`Error: ${null!==(t=this.error)&&void 0!==t?t:"none"}`,`Locale: ${this.i18n.locale}`,`Browser: ${navigator.userAgent}`,...n].join("\n"),s=e.dialog.querySelector('[data-action="copy"] span');try{await navigator.clipboard.writeText(a),s&&(s.textContent=this.i18n.t("integration.ko.copied"))}catch(t){const n=document.createElement("textarea");n.className="fj-input",n.readOnly=!0,n.rows=6,n.value=a,n.setAttribute("aria-label",this.i18n.t("integration.ko.copy")),null===(i=e.dialog.querySelector(".fj-check-body"))||void 0===i||i.append(n),n.select()}}}const ee="fjHp";function te(){return`<div class="fj-hp" aria-hidden="true"><input type="text" name="${ee}" tabindex="-1" autocomplete="off"></div>`}function ie(e){var t,i;return null!==(i=null===(t=e.querySelector(`input[name="${ee}"]`))||void 0===t?void 0:t.value)&&void 0!==i?i:""}function ne(e){return"dark"===e||"auto"===e?e:"light"}function ae(e,t){return`<a class="fj-credit" href="https://www.feedjet.io/?utm_source=widget&utm_medium=${t}" target="_blank" rel="noopener nofollow" aria-label="${U(e.t("form.credit"))}" title="Feedjet"><svg width="22" height="22" viewBox="0 0 46 46" fill="none" aria-hidden="true"><path d="M22.7393 36.3239C30.2453 36.3239 36.3302 30.2391 36.3302 22.7331C36.3302 15.227 30.2453 9.14221 22.7393 9.14221C15.2333 9.14221 9.14844 15.227 9.14844 22.7331C9.14844 30.2391 15.2333 36.3239 22.7393 36.3239Z" fill="currentColor"/><path d="M28.2375 15.3261C29.9301 16.4746 29.647 18.8588 29.9442 22.1003C30.2172 25.093 25.6997 29.9118 22.3046 29.8552C18.9073 29.7986 15.678 28.4963 13.8641 25.1456C12.121 21.9223 12.3232 20.0377 13.219 17.783C14.2665 15.1522 17.6597 12.4668 21.706 12.6204C25.7523 12.7741 26.452 14.1148 28.2375 15.3261Z" fill="#5B76C4"/><path d="M29.8269 30.5225C31.4709 29.3395 34.0107 25.9868 33.2828 21.7969C32.4456 16.9741 30.5286 13.864 27.1637 14.3594C23.7382 14.8629 20.9739 16.1167 21.0528 19.3986C21.1317 22.6806 22.8748 25.097 20.7677 27.2102C18.6606 29.3233 20.8425 33.6244 23.3176 33.3231C27.0667 32.8681 28.2334 31.667 29.8269 30.5225Z" fill="#3D55A3"/><path d="M18.9803 20.8425C20.4605 20.1448 23.3037 18.8527 23.884 17.3623C24.4644 15.872 24.523 13.7811 23.0226 12.6548C21.5201 11.5305 19.3989 11.0108 17.6376 12.3454C15.8763 13.68 12.9503 15.8356 14.0604 17.8274C15.1686 19.8213 15.0007 21.5462 16.8732 21.2975C18.7437 21.0487 18.9823 20.8425 18.9823 20.8425H18.9803Z" fill="#C0D2FF"/><path d="M35.0728 6.918C34.729 6.918 34.3812 6.80071 34.0981 6.5621C32.8969 5.55102 30.7049 4.53793 29.9608 4.23258C29.1863 3.91511 28.8163 3.02738 29.1337 2.2529C29.4512 1.47842 30.3389 1.10837 31.1134 1.42584C31.2408 1.47842 34.2417 2.72002 36.0495 4.23865C36.6905 4.77856 36.7734 5.73504 36.2355 6.37606C35.9362 6.73398 35.5055 6.918 35.0728 6.918Z" fill="currentColor"/><path d="M17.0873 3.82C16.4362 3.82 15.8336 3.39535 15.6354 2.74018C15.3948 1.93738 15.8498 1.09212 16.6505 0.851488C16.7597 0.819134 19.3602 0.0446511 21.8171 0.000163831C22.6604 -0.0119691 23.3459 0.651296 23.36 1.49049C23.3742 2.32766 22.7089 3.01923 21.8697 3.03339C19.8273 3.06978 17.5463 3.74923 17.5241 3.75529C17.3785 3.79978 17.2309 3.82 17.0873 3.82Z" fill="currentColor"/><path d="M6.11523 11.0977C5.78765 11.0977 5.46006 10.9925 5.181 10.7762C4.52178 10.2605 4.4045 9.30608 4.92014 8.64685C4.99092 8.55586 6.69963 6.38407 8.72178 4.90992C9.3992 4.41652 10.3476 4.56414 10.841 5.24156C11.3344 5.91898 11.1868 6.86736 10.5094 7.36077C8.82491 8.58821 7.32448 10.4971 7.31032 10.5153C7.01104 10.8975 6.56617 11.0977 6.11523 11.0977Z" fill="currentColor"/><path d="M1.51683 23.633C1.51683 23.633 1.50066 23.633 1.49257 23.633C0.655398 23.6209 -0.0139346 22.9313 0.000220439 22.0942C0.000220439 21.9769 0.0527967 19.2167 0.774704 16.8285C1.01736 16.0277 1.86464 15.5728 2.66541 15.8154C3.46618 16.0581 3.92117 16.9053 3.67851 17.7061C3.07793 19.6919 3.03344 22.1144 3.03344 22.1387C3.02131 22.9677 2.34389 23.631 1.51683 23.631V23.633Z" fill="currentColor"/><path d="M4.96255 36.4008C4.47723 36.4008 3.99798 36.1683 3.70477 35.7335C3.64006 35.6385 2.12547 33.3878 1.35301 31.0563C1.09013 30.2616 1.52085 29.4042 2.31556 29.1393C3.11026 28.8764 3.96967 29.3071 4.23255 30.1018C4.87155 32.0289 6.20415 34.0147 6.2183 34.0349C6.68744 34.7285 6.50343 35.6708 5.80983 36.1399C5.54897 36.3159 5.25374 36.4008 4.96255 36.4008Z" fill="currentColor"/><path d="M15.5426 44.722C15.3768 44.722 15.209 44.6957 15.0452 44.637C14.938 44.5986 12.3739 43.7008 10.3639 42.2934C9.67636 41.8141 9.51054 40.8678 9.98979 40.1823C10.469 39.4947 11.4154 39.3289 12.1009 39.8082C13.7712 40.977 16.0178 41.7636 16.0421 41.7717C16.8327 42.0467 17.2513 42.9101 16.9763 43.7028C16.7579 44.3297 16.1715 44.722 15.5446 44.722H15.5426Z" fill="currentColor"/><path d="M23.8416 46C23.0064 46 22.327 45.3246 22.325 44.4874C22.3229 43.6503 23.0004 42.9688 23.8375 42.9668C25.9102 42.9607 28.2559 42.2954 28.2802 42.2894C29.085 42.0588 29.9242 42.5239 30.1567 43.3288C30.3873 44.1336 29.9242 44.9728 29.1194 45.2053C29.0082 45.2377 26.3511 45.994 23.8456 46H23.8416Z" fill="currentColor"/><path d="M36.3607 41.3187C35.9037 41.3187 35.4507 41.1125 35.1515 40.7202C34.6439 40.0529 34.7733 39.1025 35.4406 38.5949C37.0826 37.3472 38.5507 35.4019 38.5648 35.3817C39.0684 34.7124 40.0167 34.5749 40.6881 35.0784C41.3574 35.5799 41.4949 36.5303 40.9934 37.1996C40.9247 37.2926 39.2645 39.4988 37.2767 41.0093C37.0017 41.2176 36.6802 41.3187 36.3607 41.3187Z" fill="currentColor"/><path d="M43.5453 30.3365C43.3876 30.3365 43.2279 30.3122 43.0681 30.2597C42.2734 29.9968 41.8407 29.1394 42.1035 28.3427C42.7547 26.3751 42.8679 23.9384 42.8699 23.9142C42.9063 23.077 43.6141 22.4299 44.4513 22.4663C45.2884 22.5027 45.9355 23.2105 45.9011 24.0456C45.8971 24.1609 45.7697 26.9211 44.9851 29.2951C44.7748 29.9321 44.1823 30.3365 43.5453 30.3365Z" fill="currentColor"/><path d="M43.6627 16.5513C43.0864 16.5513 42.5364 16.2217 42.2816 15.6616C41.3878 13.694 39.8267 12.2461 39.8105 12.232C39.1897 11.6698 39.1432 10.7093 39.7054 10.0905C40.2675 9.46974 41.228 9.42323 41.8468 9.98538C41.9297 10.0602 43.875 11.8437 45.0418 14.4058C45.3876 15.1682 45.0519 16.068 44.2896 16.4138C44.0853 16.5068 43.873 16.5513 43.6627 16.5513Z" fill="currentColor"/></svg></a>`}const se=["broken","display","slow","error_message","other"],oe="fj-feedback-title",re="fj-feedback-panel";function le(e){var t;const i=null!==(t=e.status)&&void 0!==t?t:"";if(!e.reply)return i;let n=5381;for(let t=0;t<e.reply.length;t++)n=33*n+e.reply.charCodeAt(t)>>>0;return`${i}\0${n.toString(36)}`}const de={loved:{className:"fj-st-coeur",icon:"heart"},next_step:{className:"fj-st-etape",icon:"flag"},planned:{className:"fj-st-tuyaux",icon:"pipe"},transmitted:{className:"fj-st-transmis",icon:"team"},to_study:{className:"fj-st-etude",icon:"search"},impossible:{className:"fj-st-impossible",icon:"ban"},not_a_bug:{className:"fj-st-impossible",icon:"ban"},out_of_scope:{className:"fj-st-impossible",icon:"ban"}};class ce{constructor(e){var t;this.abortController=new AbortController,this.destroyed=!1,this.launcher=null,this.launcherSurface=null,this.opening=!1,this.updatesCount=0,this.hasConsentFeedback=!1,this.hasConsentScreenFeedback=!1,this.hasConsentAttachment=!1,this.view="form",this.tab="enhancement",this.sentType="enhancement",this.title="",this.description="",this.category=null,this.consent=!1,this.file=null,this.fileError="",this.capture=ce.emptyCapture(),this.errors={},this.submitError=null,this.sending=!1,this.startedAt=null,this.disclosure=!1,this.decisions=[],this.decisionsStatus="idle",this.filter="all",this.expanded=new Set,this.newIds=new Map,this.decisionsViewed=!1,this.onLauncherClick=()=>{this.modal.isOpen?this.modal.close():this.open()},this.placeLauncherLabel=()=>{var e;const t=this.launcherSurface,i=null==t?void 0:t.find(".fj-launcher-wrap"),n=null===(e=this.launcher)||void 0===e?void 0:e.querySelector(".fj-launcher-label > span > span");if(!t||!i||!n)return;const a=i.getBoundingClientRect(),s=function(e){let t=0,i=document.documentElement.clientWidth;for(let n=e.parentElement;n&&n!==document.documentElement;n=n.parentElement){if("visible"===getComputedStyle(n).overflowX)continue;const e=n.getBoundingClientRect();t=Math.max(t,e.left),i=Math.min(i,e.right)}return{left:t,right:i}}(t.host),o=a.height-4+n.offsetWidth,r=a.right-s.left>=o?"left":s.right-a.left>=o?"right":"none";i.setAttribute("data-grow",r)},this.i18n=new n(e.locale);const i=null!==(t=e.apiUrl)&&void 0!==t?t:e.baseApiUrl;if(!i)throw new Error("Feedback: `apiUrl` option is required");this.options=Object.assign(Object.assign({},e),{apiUrl:i.trim().replace(/\/$/,"")}),this.surface=new v("fj-feedback-root",this.theme),this.modal=new k(this.surface,{className:"fj-feedback",labelledBy:oe,closeOnBackdrop:()=>"thanks"===this.view,onClose:()=>this.onClosed()}),this.integrationTest=new X({i18n:()=>this.i18n,surface:this.surface,module:"Feedback",connectivityCheckUrl:`${this.options.apiUrl}/api/connectivity_check/feedback`,connectivityCheckBody:{uuidProject:e.projectId},signal:this.abortController.signal,onSuccess:()=>{this.startFeedback(this.tab)}}),this.init(e.target)}launcherFace(){return`${u("welcome",44)}${u("happy",44)}<span class="fj-launcher-label" aria-hidden="true"><span><span>${U(this.i18n.t("launcher.label"))}</span></span></span>`}static emptyCapture(){return{enabled:!1,state:"idle",blob:null,url:null,visible:!0,job:null}}get theme(){return ne(this.options.theme)}get user(){return"function"==typeof this.options.user?this.options.user():this.options.user}get canFollow(){var e;return!!(null===(e=this.user)||void 0===e?void 0:e.id)}get tabs(){return this.canFollow?["enhancement","issue","decision"]:["enhancement","issue"]}get draftKey(){var e,t;return`fj-feedback-draft:${this.options.projectId}:${null!==(t=null===(e=this.user)||void 0===e?void 0:e.id)&&void 0!==t?t:""}`}get seenKey(){var e,t;return`fj-feedback-seen:${this.options.projectId}:${null!==(t=null===(e=this.user)||void 0===e?void 0:e.id)&&void 0!==t?t:""}`}get updatesKey(){var e,t;return`fj-feedback-updates:${this.options.projectId}:${null!==(t=null===(e=this.user)||void 0===e?void 0:e.id)&&void 0!==t?t:""}`}destroy(){var e,t,i;this.destroyed||(this.destroyed=!0,this.abortController.abort(),null===(e=this.launcher)||void 0===e||e.removeEventListener("click",this.onLauncherClick),null===(t=this.launcher)||void 0===t||t.removeAttribute("data-feedjet-updates"),null===(i=this.launcherSurface)||void 0===i||i.remove(),this.integrationTest.destroy(),this.modal.destroy(),this.surface.remove(),this.dropCapture())}showThanks(e="enhancement"){this.sentType="issue"===e?"issue":"enhancement",this.view="thanks",this.renderThanks(),this.openModal()}async open(e="enhancement"){var t,i;if(!this.destroyed&&!this.opening)if(this.modal.isOpen)"form"===this.view&&this.tabs.includes(e)&&this.selectTab(e);else{this.opening=!0,null===(t=this.launcher)||void 0===t||t.setAttribute("aria-busy","true");try{await this.startFeedback(e)}finally{this.opening=!1,null===(i=this.launcher)||void 0===i||i.removeAttribute("aria-busy")}}}close(){return this.modal.close()}setLocale(e){this.i18n=new n(e),this.launcherSurface&&this.setLauncherOpen(this.modal.isOpen),this.rerender()}setTheme(e){this.options.theme=e;for(const e of[this.surface,this.launcherSurface])null==e||e.root.setAttribute("data-fj-theme",this.theme)}setUser(e){this.options.user=e,this.decisions=[],this.decisionsStatus="idle",this.decisionsViewed=!1,this.newIds=new Map,this.expanded.clear(),this.filter="all",this.updatesCount=0,this.renderLauncherBadge(),this.refreshUpdates(),this.tabs.includes(this.tab)||(this.tab="enhancement"),this.rerender(),this.modal.isOpen&&"decision"===this.tab&&this.loadDecisions()}rerender(){this.modal.isOpen&&("thanks"===this.view?this.renderThanks():this.renderForm())}init(e){var t,i,n,a;e&&(e instanceof HTMLElement?(function(){try{CSS.registerProperty({name:"--fj-launcher-size",syntax:"<length>",inherits:!0,initialValue:"56px"})}catch(e){}}(),this.launcherSurface=new v("fj-feedback-launcher",this.theme,e,"span"),this.launcherSurface.root.innerHTML=`\n <span class="fj-launcher-wrap">\n <button type="button" class="fj-launcher" aria-label="${U(this.i18n.t("launcher.label"))}" aria-haspopup="dialog" aria-expanded="false">${this.launcherFace()}</button>\n <span class="fj-launcher-pip" aria-hidden="true">${s("chat",12,{stroke:2.6})}</span>\n </span>`,this.launcher=this.launcherSurface.find(".fj-launcher"),null===(t=this.launcher)||void 0===t||t.addEventListener("pointerenter",this.placeLauncherLabel),null===(i=this.launcher)||void 0===i||i.addEventListener("focus",this.placeLauncherLabel)):this.launcher=null!==(n=e.feedback)&&void 0!==n?n:null,null===(a=this.launcher)||void 0===a||a.addEventListener("click",this.onLauncherClick),this.refreshUpdates())}setLauncherOpen(e){this.launcherSurface&&this.launcher&&(this.launcher.setAttribute("aria-expanded",String(e)),this.launcher.innerHTML=e?s("close",22,{stroke:2.2}):this.launcherFace(),this.renderLauncherBadge())}renderLauncherBadge(){var e,t;if(!(null===(e=this.launcherSurface)||void 0===e?void 0:e.find(".fj-launcher-wrap"))||!this.launcher)return;null===(t=this.launcher.querySelector(".fj-launcher-badge"))||void 0===t||t.remove();const i=this.i18n.t("launcher.label");this.updatesCount>0&&!this.modal.isOpen?(this.launcher.insertAdjacentHTML("beforeend",`<span class="fj-launcher-badge" aria-hidden="true">${this.updatesCount}</span>`),this.launcher.setAttribute("aria-label",`${i} ${this.i18n.tp("launcher.updates",this.updatesCount)}`)):this.launcher.setAttribute("aria-label",i)}setUpdatesCount(e){var t,i,n,a;this.updatesCount=e,this.renderLauncherBadge(),this.launcherSurface||(e>0?null===(t=this.launcher)||void 0===t||t.setAttribute("data-feedjet-updates",String(e)):null===(i=this.launcher)||void 0===i||i.removeAttribute("data-feedjet-updates"));try{null===(a=(n=this.options).onUpdates)||void 0===a||a.call(n,e)}catch(e){}}async refreshUpdates(){if(!this.canFollow)return;const e=K(this.updatesKey);if(e&&Date.now()-e.at<6e5)this.setUpdatesCount(e.count);else try{const e=await this.fetchDecisions(0);if(this.destroyed)return;const t=this.findNew(e).size;Z(this.updatesKey,{at:Date.now(),count:t}),this.setUpdatesCount(t)}catch(e){}}async startFeedback(e){var t;await this.loadConsents(),this.destroyed||this.integrationTest.handleIntegrationStatus()||(this.restoreDraft(),null!==(t=this.startedAt)&&void 0!==t||(this.startedAt=Date.now()),this.tab=this.tabs.includes(e)?e:"enhancement",this.view="form",this.renderForm(),this.openModal(),this.focusFirstField(),this.canFollow&&this.loadDecisions())}openModal(){this.modal.isOpen||G(this.options.onOpen),this.modal.open(),this.setLauncherOpen(!0)}onClosed(){this.decisionsViewed&&this.markSeen(),this.decisionsViewed=!1,"loading"!==this.decisionsStatus&&(this.decisionsStatus="idle"),this.filter="all",this.resetForm(),this.setLauncherOpen(!1),G(this.options.onClose)}resetForm(){this.title="",this.description="",this.category=null,this.consent=!1,this.file=null,this.fileError="",this.errors={},this.submitError=null,this.sending=!1,this.disclosure=!1,this.startedAt=null,this.dropCapture()}dropCapture(){this.capture.url&&URL.revokeObjectURL(this.capture.url),this.capture=ce.emptyCapture()}restoreDraft(){var e,t;const i=K(this.draftKey);i&&(this.title||(this.title=i.title),this.description||(this.description=i.description),null!==(e=this.startedAt)&&void 0!==e||(this.startedAt=null!==(t=i.startedAt)&&void 0!==t?t:null))}saveDraft(){var e;Z(this.draftKey,this.title||this.description?{title:this.title,description:this.description,startedAt:null!==(e=this.startedAt)&&void 0!==e?e:void 0}:null)}async loadConsents(){try{const e=await Y(`${this.options.apiUrl}/api/projects/${this.options.projectId}/consents`,{retries:2,signal:this.abortController.signal});if(!e.ok)throw new Error("Failed to fetch consents");const t=await e.json();this.hasConsentFeedback=!!t.consentFeedback,this.hasConsentScreenFeedback=!!t.consentScreenFeedback,this.hasConsentAttachment=!!t.consentAttachmentsFeedback,this.integrationTest.setStatus(t.feedbackIntegrationTest||"pending","no_subscription"===t.error?"no_subscription":null)}catch(e){if(this.destroyed)return;this.hasConsentFeedback=!1,this.hasConsentScreenFeedback=!1,this.hasConsentAttachment=!1,this.integrationTest.setStatus("ko","communication_error")}}renderForm(){const e=this.tabs,t=e.indexOf(this.tab);this.modal.dialog.innerHTML=`\n <div class="fj-head" data-slot="head"></div>\n <div class="fj-tabs" role="tablist" aria-label="${U(this.i18n.t("form.tablist"))}" style="--fj-tab-count:${e.length};--fj-tab-index:${t}">\n <span class="fj-glider" aria-hidden="true"></span>\n ${e.map(e=>this.renderTab(e)).join("")}\n </div>\n <form class="fj-form" novalidate style="display:contents">\n <div class="fj-body" id="${re}" role="tabpanel" aria-labelledby="fj-tab-${this.tab}" data-version="v3.0.0-rc.2"></div>\n <div class="fj-foot" data-slot="foot"></div>\n </form>`,this.bindShell(),this.renderView()}renderTab(e){const t=e===this.tab,i="enhancement"===e?"idea":"issue"===e?"bug":"list",n="decision"===e&&this.newIds.size>0?`<span class="fj-badge" aria-label="${U(this.i18n.tp("launcher.updates",this.newIds.size))}">${this.newIds.size}</span>`:"";return`<button type="button" role="tab" class="fj-tab" id="fj-tab-${e}" data-tab="${e}" aria-controls="${re}" aria-selected="${t}" tabindex="${t?0:-1}">${s(i)}<span>${U(this.i18n.t(`${e}.tab`))}</span>${n}</button>`}renderView(e=!1,t=0){this.modal.isOpen?f(this.modal.dialog,()=>this.drawView(e,t)):this.drawView(e,t)}drawView(e,t){const i=this.modal.dialog,n=i.querySelector('[data-slot="head"]'),a=i.querySelector(`#${re}`),s=i.querySelector('[data-slot="foot"]');n&&a&&s&&(n.innerHTML=this.renderHead(),a.setAttribute("aria-labelledby",`fj-tab-${this.tab}`),a.innerHTML="decision"===this.tab?this.renderDecisions():this.renderFields(this.tab),a.setAttribute("aria-busy",String("decision"===this.tab&&"loading"===this.decisionsStatus)),"decision"===this.tab?a.tabIndex=0:a.removeAttribute("tabindex"),s.innerHTML=this.renderFoot(),e&&(a.scrollTop=0,a.style.setProperty("--fj-dir",String(t)),a.classList.remove("fj-enter"),a.offsetWidth,a.classList.add("fj-enter")),this.bindView())}renderHead(){return`${u("enhancement"===this.tab?"idea":"issue"===this.tab?"alert":"happy",44)}\n <div class="fj-head-text">\n <h2 id="${oe}">${U(this.i18n.t(`${this.tab}.title`))}</h2>\n <p>${U(this.i18n.t(`${this.tab}.subtitle`))}</p>\n </div>\n <button type="button" class="fj-iconbtn" data-action="close" aria-label="${U(this.i18n.t("form.close"))}">${s("close",20)}</button>`}renderFoot(){const e=`<span class="fj-foot-meta">${this.options.removeCredit?"":ae(this.i18n,"feedback")}<span class="fj-meta">v${U("3.0.0-rc.2")}</span></span>`;if("decision"===this.tab)return`${e}<button type="button" class="fj-btn fj-btn-p" data-action="close">${U(this.i18n.t("form.close"))}</button>`;const t=this.sending?`${o()}${U(this.i18n.t("form.sending"))}`:U(this.i18n.t(`${this.tab}.submit`));return`${e}\n <button type="button" class="fj-btn fj-btn-g" data-action="close">${U(this.i18n.t("form.cancel"))}</button>\n <button type="submit" class="fj-btn fj-btn-p" data-action="submit"${this.sending?' aria-busy="true"':""}>${t}</button>`}renderFields(e){const t=this.sending?" readonly":"",i=Object.keys(this.errors).length;return`\n ${i?`<div class="fj-notice fj-err" role="alert" data-slot="summary">${s("alert",20)}<span><b>${U(this.i18n.tp("form.summary",i))}</b><br><span class="fj-small">${U(this.i18n.t("form.summary_focus"))}</span></span></div>`:""}\n ${this.submitError?`<div class="fj-notice fj-err" role="alert">${s("alert",20)}<span>${U(this.i18n.t(this.submitError))}</span></div>`:""}\n ${"issue"===e?this.renderCategories():""}\n <div class="fj-field">\n <label class="fj-lab" for="fj-title">${U(this.i18n.t(`${e}.field_title`))}</label>\n <input id="fj-title" name="feedbackTitle" type="text" class="fj-input" maxlength="120" autocomplete="off" placeholder="${U(this.i18n.t(`${e}.placeholder_title`))}" value="${U(this.title)}"${this.invalid("title","fj-title-msg")}${t}>\n <span data-slot="title-msg">${this.fieldMessage("title")}</span>\n </div>\n <div class="fj-field">\n <label class="fj-lab" for="fj-description">${U(this.i18n.t(`${e}.field_description`))}</label>\n <textarea id="fj-description" name="feedbackDescription" class="fj-input" maxlength="10000" placeholder="${U(this.i18n.t(`${e}.placeholder_description`))}"${"issue"===e?' style="height:96px"':""}${this.invalid("description","fj-description-msg")}${t}>${U(this.description)}</textarea>\n <span data-slot="description-msg">${this.fieldMessage("description")}</span>\n </div>\n ${"issue"===e&&this.hasConsentScreenFeedback?`<div data-slot="capture">${this.renderCapture()}</div>`:""}\n ${this.hasConsentFeedback?this.renderConsent(e):""}\n ${this.hasConsentAttachment?`<div class="fj-field" data-slot="file">${this.renderFile(e)}</div>`:""}\n ${te()}`}invalid(e,t){return this.errors[e]?` aria-invalid="true" aria-describedby="${t}"`:"title"===e?' aria-describedby="fj-title-help"':""}fieldMessage(e){const t=this.errors[e];return t?`<span class="fj-errmsg" id="fj-${e}-msg">${s("alert",16)}${U(this.i18n.t(t))}</span>`:"title"===e?`<span class="fj-help" id="fj-title-help"><span>${U(this.i18n.t(`${this.tab}.hint_title`))}</span><span data-slot="counter" aria-hidden="true">${U(this.i18n.tf("form.counter",{n:this.title.length,max:120}))}</span></span>`:""}renderCategories(){return`<div class="fj-field">\n <span class="fj-lab" id="fj-category-label">${U(this.i18n.t("issue.category"))} <span class="fj-opt">${U(this.i18n.t("form.optional"))}</span></span>\n <div class="fj-chips" role="group" aria-labelledby="fj-category-label">\n ${se.map(e=>`<button type="button" class="fj-chip" data-category="${e}" aria-pressed="${this.category===e}">${U(this.i18n.t(`issue.categories.${e}`))}</button>`).join("")}\n </div>\n </div>`}renderCapture(){const e=e=>`<input type="checkbox" role="switch" class="fj-sw" data-action="capture" aria-label="${U(this.i18n.t("form.capture.toggle"))}"${e?" checked":""}${this.sending?" disabled":""}>`,t=this.capture;if(!t.enabled||"failed"===t.state){const i="failed"===t.state?this.i18n.t("form.capture.failed"):this.i18n.t("form.capture.off_hint");return`<div class="fj-capt"><span class="fj-capt-icon">${s("camera",22)}</span><div class="fj-capt-text"><span class="fj-capt-title"><b>${U(this.i18n.t("form.capture.off"))}</b></span><span class="fj-capt-hint">${U(i)}</span></div>${e(!1)}</div>`}const i="ready"!==t.state,n=t.url&&t.visible?`<img src="${t.url}" alt="">`:"",a=t.visible?`<div class="fj-thumb${n?" fj-has-img":""}" aria-hidden="true">${n}</div>`:"",o=i?this.i18n.t("form.capture.pending"):this.i18n.t("form.capture.on_hint"),r=i?"":`<button type="button" class="fj-link" data-action="thumb" aria-pressed="${!t.visible}">${U(this.i18n.t(t.visible?"form.capture.hide":"form.capture.show"))}</button>`;return`<div class="fj-capt"${i?' aria-busy="true"':""}>${a}<div class="fj-capt-text"><span class="fj-capt-title"><b>${U(this.i18n.t("form.capture.on"))}</b>${r}</span><span class="fj-capt-hint">${U(o)}</span></div>${e(!0)}</div>`}renderConsent(e){const t=this.errors.consent?`<span class="fj-errmsg" id="fj-consent-msg">${s("alert",16)}${U(this.i18n.t(this.errors.consent))}</span>`:"",i=U("issue"===e?this.i18n.t("form.tech.label"):this.i18n.t("form.consent.label")),n="issue"===e?`${U(this.i18n.t("form.tech.hint"))} `:"",a="issue"===e?this.i18n.t("form.tech.more"):this.i18n.t("form.consent.more");return`<div class="fj-group">\n <label class="fj-row">\n <input type="checkbox" class="fj-cb" name="consentFeedback"${this.consent?" checked":""}${this.errors.consent?' aria-invalid="true" aria-describedby="fj-consent-msg"':""}${this.sending?" disabled":""}>\n <span class="fj-row-text">${i}${"issue"===e?` <span class="fj-opt">${U(this.i18n.t("form.required"))}</span>`:""}\n <small>${"issue"===e?"":`<span class="fj-opt">${U(this.i18n.t("form.required"))}</span> · `}${n}<button type="button" class="fj-link" data-action="disclosure" aria-expanded="${this.disclosure}" aria-controls="fj-consent-detail">${U(a)}</button></small>\n <span class="fj-disclosure" id="fj-consent-detail"${this.disclosure?" data-open":""}><span>${U(this.i18n.t("form.consent.detail"))}</span></span>\n <span data-slot="consent-msg">${t}</span>\n </span>\n </label>\n </div>`}renderFile(e){const t=this.fileError?`<span class="fj-errmsg" role="alert">${s("alert",16)}${U(this.i18n.t(this.fileError))}</span>`:"",i='<input type="file" name="attachment" accept=".jpg,.jpeg,.png,.gif,.webp,.bmp,.tif,.tiff,.heic,.heif,.mp4,.webm,.mov,.pdf,.txt,.log,.csv,.json,.har,.rtf,.eml,.zip,.gz,.7z,.rar,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.odt,.ods,.odp" hidden>';if(this.file)return`${i}<div class="fj-file">${s("clip",20)}<span class="fj-file-name">${U(this.file.name)}</span><span>${n=this.file.size,n<1048576?`${Math.max(1,Math.round(n/1024))} Ko`:`${(n/1024/1024).toFixed(1)} Mo`}</span><button type="button" class="fj-iconbtn" data-action="remove-file" aria-label="${U(this.i18n.t("form.attachment.remove"))}"${this.sending?" disabled":""}>${s("close",18)}</button></div>${t}`;var n;const a="issue"===e?`${s("clip",20)}<span><b>${U(this.i18n.t("form.attachment.add"))}</b> <span class="fj-small">· ${U(this.i18n.t("form.attachment.hint_short"))}</span></span>`:`${s("upload",20)}<span><b>${U(this.i18n.t("form.attachment.add"))}</b> ${U(this.i18n.t("form.attachment.drop"))}<br><span class="fj-small">${U(this.i18n.t("form.attachment.hint"))}</span></span>`;return`${i}<button type="button" class="fj-drop${"issue"===e?" fj-compact":""}" data-action="pick-file"${this.sending?" disabled":""}>${a}</button>${t}`}renderDecisions(){if("error"===this.decisionsStatus)return`<div class="fj-notice fj-err" role="alert">${s("alert",20)}<span><b>${U(this.i18n.t("decision.error_title"))}</b><br><span class="fj-small">${U(this.i18n.t("decision.error_text"))}</span></span></div>\n <div><button type="button" class="fj-btn fj-btn-g" data-action="retry">${s("retry")}${U(this.i18n.t("decision.retry"))}</button></div>`;if("loaded"!==this.decisionsStatus){const e='<div class="fj-card" aria-hidden="true"><div class="fj-sk" style="width:90px;height:12px"></div><div class="fj-sk" style="width:70%;height:16px"></div><div class="fj-sk" style="width:95%;height:12px"></div><div class="fj-sk" style="width:120px;height:22px;border-radius:11px"></div></div>';return`<span class="fj-sr-only" role="status">${U(this.i18n.t("decision.loading"))}</span><div class="fj-list">${e.repeat(3)}</div>`}if(0===this.decisions.length)return`<div class="fj-empty">\n ${u("hello",72)}\n <h3>${U(this.i18n.t("decision.empty_title"))}</h3>\n <p>${U(this.i18n.t("decision.empty_text"))}</p>\n <div class="fj-empty-actions">\n <button type="button" class="fj-btn fj-btn-g" data-goto="enhancement">${s("idea")}${U(this.i18n.t("decision.propose"))}</button>\n <button type="button" class="fj-btn fj-btn-g" data-goto="issue">${s("bug")}${U(this.i18n.t("decision.report"))}</button>\n </div>\n </div>`;const e=e=>"all"===e?this.decisions.length:this.decisions.filter(t=>t.type===e).length,t=(t,i)=>`<button type="button" class="fj-chip" data-filter="${t}" aria-pressed="${this.filter===t}">${U(this.i18n.tf(i,{n:e(t)}))}</button>`,i=this.sortedDecisions().filter(e=>"all"===this.filter||e.type===this.filter),n=this.newIds.size?`<p class="fj-updates">${U(this.i18n.tp("decision.updates",this.newIds.size))}</p>`:"",a=i.length?`<ul class="fj-list">${i.map((e,t)=>`<li style="--fj-i:${t}">${this.renderCard(e)}</li>`).join("")}</ul>`:`<p class="fj-updates">${U(this.i18n.t("decision.empty_filtered"))}</p>`;return`<div class="fj-chips" role="group" aria-label="${U(this.i18n.t("decision.filter"))}">\n ${t("all","decision.all")}${t("enhancement","decision.ideas")}${t("issue","decision.issues")}\n </div>\n ${n}\n ${a}`}sortedDecisions(){return[...this.decisions].sort((e,t)=>Number(this.newIds.has(t.id))-Number(this.newIds.has(e.id))||new Date(t.createdAt).getTime()-new Date(e.createdAt).getTime())}renderCard(e){const t="issue"===e.type?"issue":"enhancement",i=this.newIds.get(e.id),n=i?`<span class="fj-card-new"><span class="fj-dot" aria-hidden="true"></span>${U(this.i18n.t("reply"===i?"decision.new_reply":"decision.new_status"))}</span>`:"",a=e.status?this.renderStatus(t,e.status):"",o=U(`fj-desc-${e.id}`),r=this.expanded.has(e.id);return`<article class="fj-card" data-type="${t}">\n <div class="fj-card-top">${s("issue"===t?"bug":"idea",14,{stroke:2})}<span>${U(this.i18n.t(`decision.type.${t}`))}</span>${n}</div>\n <h3>${U(e.title)}</h3>\n <p id="${o}" data-slot="description"${r?" data-open":""}>${U(e.description)}</p>\n <button type="button" class="fj-link fj-more" data-expand="${U(e.id)}" aria-controls="${o}" aria-expanded="${r}"${r?"":" hidden"}>${U(this.i18n.t(r?"decision.less":"decision.more"))}</button>\n ${e.reply?`<section class="fj-reply" aria-label="${U(this.i18n.t("decision.reply"))}"><b aria-hidden="true">${U(this.i18n.t("decision.reply"))}</b><p>${U(e.reply)}</p></section>`:""}\n <div class="fj-card-bot">${a}<span class="fj-date">${U(this.i18n.tf("decision.sent_on",{date:this.i18n.shortDate(e.createdAt)}))}</span></div>\n </article>`}renderStatus(e,t){var i;const n=null!==(i=de[t])&&void 0!==i?i:{className:"fj-st-impossible",icon:"info"},a=`decision.status.${e}.${t}`,o=this.i18n.t(a);return`<span class="fj-status ${n.className}">${s(n.icon,14,{stroke:2})}${U(o===a?t:o)}</span>`}renderThanks(){var e;const t=this.sentType,i=this.canFollow?this.i18n.t(`${t}.thanks_text`):this.i18n.t(`${t}.thanks_text_anonymous`),n=this.canFollow?`<button type="button" class="fj-btn fj-btn-g" data-action="follow">${U(this.i18n.t("decision.see"))}</button>`:"",a=`\n <div class="fj-thanks-close"><button type="button" class="fj-iconbtn" data-action="close" aria-label="${U(this.i18n.t("form.close"))}">${s("close",20)}</button></div>\n <div class="fj-body fj-thanks" data-version="v3.0.0-rc.2">\n ${u("bravo",96)}\n <div role="status">\n <h2 id="${oe}" tabindex="-1">${U(this.i18n.t(`${t}.thanks_title`))}</h2>\n <p>${U(i)}</p>\n </div>\n </div>\n <div class="fj-foot fj-center">${n}<button type="button" class="fj-btn fj-btn-p" data-action="close">${U(this.i18n.t("form.close"))}</button></div>`,o=this.modal.dialog;f(o,()=>o.innerHTML=a);for(const e of o.querySelectorAll('[data-action="close"]'))e.addEventListener("click",()=>{this.modal.close()});null===(e=o.querySelector('[data-action="follow"]'))||void 0===e||e.addEventListener("click",()=>{var e;this.decisionsStatus="idle",this.view="form",this.tab="decision",f(o,()=>this.renderForm()),null===(e=o.querySelector("#fj-tab-decision"))||void 0===e||e.focus(),this.loadDecisions()}),requestAnimationFrame(()=>{var e;return null===(e=o.querySelector(`#${oe}`))||void 0===e?void 0:e.focus()})}bindShell(){var e;const t=this.modal.dialog,i=[...t.querySelectorAll('[role="tab"]')];for(const e of i)e.addEventListener("click",()=>this.selectTab(e.dataset.tab)),e.addEventListener("keydown",t=>{const n=i.indexOf(e),a="ArrowRight"===t.key?(n+1)%i.length:"ArrowLeft"===t.key?(n-1+i.length)%i.length:"Home"===t.key?0:"End"===t.key?i.length-1:-1;a<0||(t.preventDefault(),i[a].focus(),this.selectTab(i[a].dataset.tab))});null===(e=t.querySelector("form"))||void 0===e||e.addEventListener("submit",e=>{e.preventDefault(),this.submit()})}selectTab(e){if(e===this.tab||this.sending)return;const t=Math.sign(this.tabs.indexOf(e)-this.tabs.indexOf(this.tab));this.tab=e,this.errors={},this.submitError=null;const i=this.modal.dialog,n=i.querySelector('[role="tablist"]');null==n||n.style.setProperty("--fj-tab-index",String(this.tabs.indexOf(e)));for(const t of i.querySelectorAll('[role="tab"]')){const i=t.dataset.tab===e;t.setAttribute("aria-selected",String(i)),t.tabIndex=i?0:-1}this.renderView(!0,t),"decision"===e&&(this.decisionsViewed="loaded"===this.decisionsStatus,this.loadDecisions())}bindView(){var e,t;const i=this.modal.dialog;for(const e of i.querySelectorAll('[data-action="close"]'))e.addEventListener("click",()=>{this.modal.close()});if("decision"===this.tab)return void this.bindDecisions();const n=i.querySelector("#fj-title"),a=i.querySelector("#fj-description");null==n||n.addEventListener("input",()=>{this.title=n.value,this.saveDraft(),this.clearError("title");const e=i.querySelector('[data-slot="counter"]');e&&(e.textContent=this.i18n.tf("form.counter",{n:this.title.length,max:120}))}),null==a||a.addEventListener("input",()=>{this.description=a.value,this.saveDraft(),this.clearError("description")}),null===(e=i.querySelector('[name="consentFeedback"]'))||void 0===e||e.addEventListener("change",e=>{this.consent=e.target.checked,this.clearError("consent")}),null===(t=i.querySelector('[data-action="disclosure"]'))||void 0===t||t.addEventListener("click",e=>{var t;e.preventDefault(),this.disclosure=!this.disclosure,e.currentTarget.setAttribute("aria-expanded",String(this.disclosure)),null===(t=i.querySelector("#fj-consent-detail"))||void 0===t||t.toggleAttribute("data-open",this.disclosure)});for(const e of i.querySelectorAll("[data-category]"))e.addEventListener("click",()=>{const t=e.dataset.category;this.category=this.category===t?null:t;for(const e of i.querySelectorAll("[data-category]"))e.setAttribute("aria-pressed",String(e.dataset.category===this.category))});this.bindCapture(),this.bindFile()}bindDecisions(){var e;const t=this.modal.dialog;null===(e=t.querySelector('[data-action="retry"]'))||void 0===e||e.addEventListener("click",()=>{this.decisionsStatus="idle",this.loadDecisions()});for(const e of t.querySelectorAll("[data-filter]"))e.addEventListener("click",()=>{var i;this.filter=e.dataset.filter,this.refreshDecisions(),null===(i=t.querySelector(`[data-filter="${this.filter}"]`))||void 0===i||i.focus()});for(const e of t.querySelectorAll("[data-expand]")){const t=e.closest(".fj-card"),i=null==t?void 0:t.querySelector('[data-slot="description"]');t&&i&&(i.scrollHeight>i.clientHeight+1&&(e.hidden=!1),e.addEventListener("click",()=>{const n=e.dataset.expand,a=!this.expanded.has(n);a?this.expanded.add(n):this.expanded.delete(n),f(t,()=>{i.toggleAttribute("data-open",a),e.setAttribute("aria-expanded",String(a)),e.textContent=this.i18n.t(a?"decision.less":"decision.more")})}))}for(const e of t.querySelectorAll("[data-goto]"))e.addEventListener("click",()=>{var i;const n=e.dataset.goto;this.selectTab(n),null===(i=t.querySelector(`#fj-tab-${n}`))||void 0===i||i.focus()})}bindCapture(){var e,t;const i=this.modal.dialog.querySelector('[data-slot="capture"]');i&&(null===(e=i.querySelector('[data-action="capture"]'))||void 0===e||e.addEventListener("change",e=>{e.target.checked?this.takeCapture():this.dropCapture(),this.refreshCapture(!0)}),null===(t=i.querySelector('[data-action="thumb"]'))||void 0===t||t.addEventListener("click",()=>{var e;this.capture.visible=!this.capture.visible,this.refreshCapture(),null===(e=i.querySelector('[data-action="thumb"]'))||void 0===e||e.focus()}))}refreshCapture(e=!1){var t;const i=this.modal.dialog.querySelector('[data-slot="capture"]');i&&(i.innerHTML=this.renderCapture(),this.bindCapture(),e&&(null===(t=i.querySelector('[data-action="capture"]'))||void 0===t||t.focus()))}async takeCapture(){this.capture=Object.assign(Object.assign({},ce.emptyCapture()),{enabled:!0,state:"pending"});const e=this.capture;e.job=(async()=>{await async function(){try{await E()}catch(e){}}();const t=await async function(){var e;try{const{domToBlob:t}=await E(),i=document.documentElement,n=null!==(e=[document.body,i].map(e=>getComputedStyle(e).backgroundColor).find(e=>"rgba(0, 0, 0, 0)"!==e))&&void 0!==e?e:"#fff";return function(e){var t;const i=[...e.querySelectorAll('body *:not([id^="fj-"], [id^="fj-"] *)')].reverse(),n=new Map,a=[];for(const e of i){const i=getComputedStyle(e),s=Number.parseFloat(i.marginBottom)||0;n.set(e,s);const o=I(e,i)?N(e):null,r=o&&null!==(t=n.get(o))&&void 0!==t?t:0;!o||r<=0||!O(e,o,s,r)||(n.set(e,Math.max(s,r)),a.push(e))}for(const e of a)e.setAttribute(A,"")}(i),await t(i,{type:"image/jpeg",quality:.8,width:i.scrollWidth,height:i.scrollHeight,backgroundColor:n,filter:e=>!(e instanceof Element&&e.id.startsWith("fj-")),onCloneEachNode:P})}catch(e){return null}finally{for(const e of document.querySelectorAll(`[${A}]`))e.removeAttribute(A)}}();this.capture===e&&(t?(e.blob=t,e.url=URL.createObjectURL(t),e.state="ready"):(e.state="failed",e.enabled=!1),!this.destroyed&&this.modal.isOpen&&"issue"===this.tab&&this.refreshCapture())})(),await e.job}bindFile(){var e;const t=this.modal.dialog.querySelector('[data-slot="file"]');if(!t)return;const i=t.querySelector('input[type="file"]'),n=t.querySelector('[data-action="pick-file"]');null==n||n.addEventListener("click",()=>null==i?void 0:i.click()),null==i||i.addEventListener("change",()=>{var e,t;return this.setFile(null!==(t=null===(e=i.files)||void 0===e?void 0:e[0])&&void 0!==t?t:null,!0)}),null===(e=t.querySelector('[data-action="remove-file"]'))||void 0===e||e.addEventListener("click",()=>{var e;this.setFile(null),null===(e=t.querySelector('[data-action="pick-file"]'))||void 0===e||e.focus()}),n&&(n.addEventListener("dragover",e=>{e.preventDefault(),n.classList.add("fj-over")}),n.addEventListener("dragleave",()=>n.classList.remove("fj-over")),n.addEventListener("drop",e=>{var t,i,a;e.preventDefault(),n.classList.remove("fj-over"),this.setFile(null!==(a=null===(i=null===(t=e.dataTransfer)||void 0===t?void 0:t.files)||void 0===i?void 0:i[0])&&void 0!==a?a:null,!0)}))}setFile(e,t=!1){var i;this.fileError="",e&&e.size>10485760&&(this.fileError="form.attachment.too_large",e=null),this.file=e;const n=this.modal.dialog.querySelector('[data-slot="file"]');n&&"decision"!==this.tab&&(n.innerHTML=this.renderFile(this.tab),this.bindFile(),t&&(null===(i=n.querySelector('[data-action="remove-file"], [data-action="pick-file"]'))||void 0===i||i.focus()))}clearError(e){var t;if(!this.errors[e])return;delete this.errors[e];const i=this.modal.dialog;if("consent"===e){const e=i.querySelector('[name="consentFeedback"]');null==e||e.removeAttribute("aria-invalid"),null==e||e.removeAttribute("aria-describedby");const t=i.querySelector('[data-slot="consent-msg"]');t&&(t.innerHTML="")}else{const t=i.querySelector(`#fj-${e}`);null==t||t.removeAttribute("aria-invalid"),"title"===e?null==t||t.setAttribute("aria-describedby","fj-title-help"):null==t||t.removeAttribute("aria-describedby");const n=i.querySelector(`[data-slot="${e}-msg"]`);n&&(n.innerHTML=this.fieldMessage(e))}const n=i.querySelector('[data-slot="summary"] b'),a=Object.keys(this.errors).length;0===a?null===(t=i.querySelector('[data-slot="summary"]'))||void 0===t||t.remove():n&&(n.textContent=this.i18n.tp("form.summary",a))}focusFirstField(){const e=this.modal.dialog,t="decision"===this.tab||matchMedia("(pointer: coarse)").matches?e.querySelector(`#fj-tab-${this.tab}`):e.querySelector("#fj-title");null==t||t.focus()}async fetchDecisions(e=2){var t,i;const n=await Y(`${this.options.apiUrl}/api/projects/${this.options.projectId}/decisions?userId=${encodeURIComponent(null!==(i=null===(t=this.user)||void 0===t?void 0:t.id)&&void 0!==i?i:"")}`,{retries:e,signal:this.abortController.signal});if(!n.ok)throw new Error("Failed to fetch decisions");const a=await n.json();return Array.isArray(a)?a:[]}async loadDecisions(){if("loading"!==this.decisionsStatus&&"loaded"!==this.decisionsStatus){this.decisionsStatus="loading",this.refreshDecisions();try{this.decisions=await this.fetchDecisions(),this.newIds=this.findNew(this.decisions),this.decisionsStatus="loaded","decision"===this.tab&&this.modal.isOpen&&(this.decisionsViewed=!0)}catch(e){if(this.destroyed)return;this.decisionsStatus="error"}this.refreshDecisions(),this.refreshTabBadge()}}refreshDecisions(){if(this.destroyed||!this.modal.isOpen||"form"!==this.view||"decision"!==this.tab)return;const e=this.modal.dialog.querySelector(`#${re}`);e&&(f(this.modal.dialog,()=>e.innerHTML=this.renderDecisions()),e.setAttribute("aria-busy",String("loading"===this.decisionsStatus)),this.bindDecisions())}refreshTabBadge(){var e;const t=this.modal.dialog.querySelector("#fj-tab-decision");t&&(null===(e=t.querySelector(".fj-badge"))||void 0===e||e.remove(),this.newIds.size&&t.insertAdjacentHTML("beforeend",`<span class="fj-badge" aria-label="${U(this.i18n.tp("launcher.updates",this.newIds.size))}">${this.newIds.size}</span>`))}findNew(e){var t,i;const n=this.readSeen(),a=new Map;for(const s of e){const e=le(s);if(!e||n[s.id]===e)continue;const[o]=(null!==(t=n[s.id])&&void 0!==t?t:"").split("\0");a.set(s.id,o===(null!==(i=s.status)&&void 0!==i?i:"")&&s.reply?"reply":"status")}return a}readSeen(){var e;try{return JSON.parse(null!==(e=localStorage.getItem(this.seenKey))&&void 0!==e?e:"{}")}catch(e){return{}}}markSeen(){const e={};for(const t of this.decisions){const i=le(t);i&&(e[t.id]=i)}try{localStorage.setItem(this.seenKey,JSON.stringify(e))}catch(e){}this.newIds=new Map,Z(this.updatesKey,{at:Date.now(),count:0}),this.setUpdatesCount(0)}validate(){const e={},t=this.tab;return this.title.trim()||(e.title=`${t}.error_title`),this.description.trim()||(e.description=`${t}.error_description`),this.hasConsentFeedback&&!this.consent&&(e.consent="form.consent.error"),e}async submit(){var e,t,i;if(this.sending||"decision"===this.tab)return;const n=this.modal.dialog;if(this.errors=this.validate(),this.submitError=null,Object.keys(this.errors).length){this.renderView();const t=["title","description","consent"].find(e=>this.errors[e]),i="consent"===t?'[name="consentFeedback"]':`#fj-${t}`;return void(null===(e=n.querySelector(i))||void 0===e||e.focus())}const a=ie(n),s=n.querySelector('[data-action="submit"]'),o=null==s?void 0:s.offsetWidth;this.sending=!0,this.renderView();const r=n.querySelector('[data-action="submit"]');r&&o&&(r.style.width=`${o}px`),null==r||r.focus();const l=this.tab;try{await this.capture.job;const e=await Y(`${this.options.apiUrl}/api/import_feedback`,{method:"POST",body:this.toFormData(l,a),timeout:6e4,signal:this.abortController.signal});if(!e.ok)throw this.submitError=await async function(e){if(429===e.status)return"global.rate_limited";if(400!==e.status)return"global.submit_error";let t="";try{const i=await e.json();t="string"==typeof i.errors?i.errors:""}catch(e){}return t.includes(".attachment:")?"form.attachment.invalid_type":"global.submit_error"}(e),new Error("Failed to submit feedback");if(Z(this.draftKey,null),G(this.options.onSubmit,{type:l}),this.decisionsStatus="idle",this.sending=!1,!this.modal.isOpen)return;this.resetForm(),this.sentType=l,this.view="thanks",this.renderThanks()}catch(e){if(this.destroyed)return;null!==(t=this.submitError)&&void 0!==t||(this.submitError="global.submit_error"),this.sending=!1,this.modal.isOpen&&"form"===this.view&&(this.renderView(),null===(i=n.querySelector('[data-action="submit"]'))||void 0===i||i.focus())}}toFormData(e,t){var i;const n=this.user,a=function(){for(const{name:e,regex:t}of _){const i=navigator.userAgent.match(t);if(i)return{name:e,version:i[1]}}return{name:"Unknown",version:"Unknown"}}(),s=function(){var e;const t=window.screen.width,i=window.screen.height,n=window.devicePixelRatio||1;return{resolution:`${t}x${i}`,zoom:`${null!==(e=Math.round(100*n))&&void 0!==e?e:100}%`}}(),o=this.consent,r=new FormData,l="issue"===e&&this.category?`[${this.i18n.t(`issue.categories.${this.category}`)}] `:"",d=e=>o?e:"Unknown";return r.append("uuidProject",this.options.projectId),r.append("feedbackType",e),r.append("feedbackTitle",this.title.trim()),r.append("feedbackDescription",`${l}${this.description.trim()}`),r.append("userId",o&&(null==n?void 0:n.id)||"Unknown"),r.append("userName",o&&(null==n?void 0:n.fullName)||"Unknown User"),r.append("operatingSystem",d(function(){const e=navigator.userAgent;for(const[t,i]of Object.entries(S))if(i.test(e))return t;return"Unknown"}())),r.append("browserName",d(a.name)),r.append("browserVersion",d(a.version)),r.append("resolution",d(s.resolution)),r.append("zoom",d(s.zoom)),r.append("localLanguage",d(navigator.language||"Unknown")),r.append("url",d(window.location.href.slice(0,2048))),r.append("userProfile",o&&(null==n?void 0:n.profile)||"Unknown"),r.append("ip","Unknown"),r.append("widgetVersion","3.0.0-rc.2"),r.append("widgetLocale",this.i18n.locale),r.append("fjHp",t),r.append("fillDurationMs",String(Date.now()-(null!==(i=this.startedAt)&&void 0!==i?i:Date.now()))),o&&r.append("consentFeedback","true"),"issue"===e&&this.capture.enabled&&this.capture.blob&&(r.append("consentScreenFeedback","true"),r.append("screenShot",this.capture.blob,"screenshot.jpg")),this.hasConsentAttachment&&this.file&&(r.append("consentAttachmentFeedback","true"),r.append("attachment",this.file)),r}}const ue="fj-survey-title";class pe{constructor(e){var t;this.abortController=new AbortController,this.destroyed=!1,this.survey=null,this.bubble=null,this.toast=null,this.rating=0,this.quality="",this.closed=0,this.anonymous=!1,this.errors={},this.submitError=null,this.sending=null,this.i18n=new n(e.locale);const i=null!==(t=e.apiUrl)&&void 0!==t?t:e.baseApiUrl;if(!i)throw new Error("Feedbot: `apiUrl` option is required");this.options=e,this.apiUrl=i.trim().replace(/\/$/,""),this.surface=new v("fj-feedbot-root",this.theme),this.modal=new k(this.surface,{className:"fj-survey",labelledBy:ue,lockScroll:!1,onClose:()=>{this.resetAnswers(),G(this.options.onClose)}}),this.integrationTest=new X({i18n:()=>this.i18n,surface:this.surface,module:"Feedbot",connectivityCheckUrl:`${this.apiUrl}/api/connectivity_check/survey`,connectivityCheckBody:{uuidSurvey:e.surveyId},signal:this.abortController.signal,onSuccess:()=>{this.increment()}})}get theme(){return ne(this.options.theme)}get user(){return"function"==typeof this.options.user?this.options.user():this.options.user}destroy(){this.destroyed||(this.destroyed=!0,this.abortController.abort(),clearTimeout(this.toastTimer),this.integrationTest.destroy(),this.modal.destroy(),this.surface.remove())}showThanks(e=!1){this.showToast(e?"DECLINED":"SENT")}async increment(){var e;try{const t=await Y(`${this.apiUrl}/api/survey_logs/increment`,{method:"POST",signal:this.abortController.signal,body:JSON.stringify({uuidSurvey:this.options.surveyId,userId:(null===(e=this.user)||void 0===e?void 0:e.id)||null,locale:this.i18n.locale}),headers:{"Content-Type":"application/json"}});if(!t.ok)throw new Error("Failed to increment log");const i=await t.json();if(this.destroyed)return;if(this.integrationTest.setStatus(i.surveyIntegrationTest||"pending"),this.integrationTest.handleIntegrationStatus())return;this.survey=i.isValid?i.survey:null,this.survey&&!this.snoozed&&this.showBubble()}catch(e){if(this.destroyed)return}}get questions(){const e=this.survey;return e?[e.quantityQuestion?"rating":null,e.qualityQuestion?"quality":null,e.closedQuestion?"closed":null].filter(e=>null!==e):[]}showBubble(){var e;if(!this.survey||this.modal.isOpen||this.bubble)return;const t=this.questions.length,i=document.createElement("div");i.className="fj-float fj-bubble",i.setAttribute("role","complementary"),i.setAttribute("aria-label",this.i18n.t("feedbot.region")),i.innerHTML=`\n <div class="fj-panel">\n <div class="fj-bubble-head">\n <div style="flex:1">\n <p>${U(this.survey.bubbleText||this.i18n.t("feedbot.bubble_default"))}</p>\n ${t?`<small>${U(this.i18n.tp("feedbot.questions",t))}</small>`:""}\n </div>\n <button type="button" class="fj-iconbtn" data-action="dismiss" aria-label="${U(this.i18n.t("feedbot.close_bubble"))}">${s("close",20)}</button>\n </div>\n <div class="fj-bubble-actions">\n <button type="button" class="fj-btn fj-btn-p" data-action="open">${U(this.i18n.t("feedbot.open"))}</button>\n <button type="button" class="fj-btn fj-btn-g" data-action="dismiss">${U(this.i18n.t("feedbot.later"))}</button>\n </div>\n </div>\n <div class="fj-avatar" aria-hidden="true">${u("hello",44)}</div>`,this.surface.root.append(i),C(i),this.bubble=i,null===(e=i.querySelector('[data-action="open"]'))||void 0===e||e.addEventListener("click",()=>{this.hideBubble(),this.openSurvey()});for(const e of i.querySelectorAll('[data-action="dismiss"]'))e.addEventListener("click",()=>{this.snooze(),this.hideBubble()})}get snoozeKey(){var e,t;return`fj-feedbot-snooze:${this.options.surveyId}:${null!==(t=null===(e=this.user)||void 0===e?void 0:e.id)&&void 0!==t?t:""}`}get snoozed(){var e;try{return Date.now()<Number(null!==(e=localStorage.getItem(this.snoozeKey))&&void 0!==e?e:0)+864e5}catch(e){return!1}}snooze(){try{localStorage.setItem(this.snoozeKey,String(Date.now()))}catch(e){}}hideBubble(){this.bubble&&b(this.bubble),this.bubble=null}open(){return!(this.destroyed||!this.survey||(this.modal.isOpen||(this.hideBubble(),this.openSurvey()),0))}close(){return this.modal.close()}setLocale(e){this.i18n=new n(e),this.bubble&&(this.bubble.remove(),this.bubble=null,this.showBubble()),this.modal.isOpen&&this.renderSurvey()}setTheme(e){this.options.theme=e,this.surface.root.setAttribute("data-fj-theme",this.theme)}setUser(e){this.options.user=e}openSurvey(){var e;G(this.options.onOpen),this.renderSurvey(),this.modal.open(),null===(e=this.modal.dialog.querySelector("input, textarea, button.fj-btn"))||void 0===e||e.focus()}resetAnswers(){this.rating=0,this.quality="",this.closed=0,this.anonymous=!1,this.errors={},this.submitError=null,this.sending=null}get answered(){return this.questions.filter(e=>"rating"===e?this.rating>0:"quality"===e?!!this.quality.trim():this.closed>0).length}get progressPercent(){const e=this.questions.length;return e?Math.round(this.answered/e*100):0}renderProgress(){return`<div class="fj-prog" role="progressbar" aria-valuenow="${this.answered}" aria-valuemin="0" aria-valuemax="${this.questions.length}" aria-label="${U(this.i18n.t("feedbot.progress_label"))}"><i style="--fj-progress:${this.progressPercent}%"></i></div>`}renderSurvey(){const e=this.survey;if(!e)return;const t=this.questions.length,i=[e.subTitle,e.mainQuestion].filter(Boolean),n=`\n <div class="fj-head" style="padding-bottom:8px">\n ${u("happy",44)}\n <div class="fj-head-text">\n <h2 id="${ue}">${U(e.title)}</h2>\n ${t?`<p data-slot="progress-text">${U(this.i18n.tp("feedbot.progress",this.answered,{total:t}))}</p>`:""}\n </div>\n <button type="button" class="fj-iconbtn" data-action="close" aria-label="${U(this.i18n.t("global.close"))}">${s("close",20)}</button>\n </div>\n ${t?`<div class="fj-progress-wrap" data-slot="progress">${this.renderProgress()}</div>`:""}\n <form novalidate style="display:contents">\n <div class="fj-body" style="gap:20px" data-version="v3.0.0-rc.2">\n ${i.length?`<div class="fj-intro">${i.map((e,t)=>0===t&&i.length>1?`<b>${U(e)}</b>`:U(e)).join("")}</div>`:""}\n ${this.submitError?`<div class="fj-notice fj-err" role="alert">${s("alert",20)}<span>${U(this.i18n.t(this.submitError))}</span></div>`:""}\n ${e.quantityQuestion?this.renderRating(e.quantityQuestion):""}\n ${e.qualityQuestion?this.renderQuality(e.qualityQuestion):""}\n ${e.closedQuestion?this.renderClosed(e):""}\n <label class="fj-row fj-anon">\n <span class="fj-row-text">${U(this.i18n.t("feedbot.anonymous"))}<small>${U(this.i18n.t("feedbot.anonymous_hint"))}</small></span>\n <input type="checkbox" role="switch" class="fj-sw" name="anonymousAnswer"${this.anonymous?" checked":""}${this.sending?" disabled":""}>\n </label>\n ${te()}\n </div>\n <div class="fj-foot">\n ${this.options.removeCredit?"":ae(this.i18n,"feedbot")}\n <button type="button" class="fj-btn fj-btn-g" data-action="decline"${this.sending?" disabled":""}${"DECLINED"===this.sending?' aria-busy="true"':""}>${"DECLINED"===this.sending?`${o()}${U(this.i18n.t("form.sending"))}`:U(this.i18n.t("feedbot.cancel"))}</button>\n <button type="submit" class="fj-btn fj-btn-p" data-action="submit"${"DECLINED"===this.sending?" disabled":""}${"SENT"===this.sending?' aria-busy="true"':""}>${"SENT"===this.sending?`${o()}${U(this.i18n.t("form.sending"))}`:U(this.i18n.t("feedbot.submit"))}</button>\n </div>\n </form>`,a=this.modal.dialog;this.modal.isOpen?f(a,()=>a.innerHTML=n):a.innerHTML=n,this.bindSurvey()}error(e){const t=this.errors[e];return t?`<span class="fj-errmsg" id="fj-${e}-msg">${s("alert",16)}${U(this.i18n.t(t))}</span>`:""}renderRating(e){const t=[1,2,3,4,5].map(e=>`\n <label class="fj-star${e<=this.rating?" fj-on":""}">\n <input type="radio" class="fj-sr-only" name="rating" value="${e}" aria-label="${U(this.i18n.tf("feedbot.star_label",{n:e}))}"${e===this.rating?" checked":""}${this.sending?" disabled":""}>\n ${s("star",32,{stroke:1.6,fill:e<=this.rating})}\n </label>`).join("");return`<fieldset class="fj-set"${this.errors.rating?' aria-describedby="fj-rating-msg"':""}>\n <legend class="fj-lab">${U(e)}</legend>\n <div class="fj-stars">${t}</div>\n <div class="fj-help" data-slot="rating-help">${this.renderRatingHelp()}</div>\n ${this.error("rating")}\n </fieldset>`}renderRatingHelp(){const e=this.rating?`<span class="fj-star-value">${U(this.i18n.tf("feedbot.rating_value",{n:this.rating,label:this.i18n.t(`feedbot.rating_labels.${this.rating}`)}))}</span>`:"";return`<span>${U(this.i18n.t("feedbot.rating_low"))}</span>${e}<span>${U(this.i18n.t("feedbot.rating_high"))}</span>`}renderQuality(e){return`<div class="fj-field">\n <label class="fj-lab" for="fj-quality">${U(e)}</label>\n <textarea id="fj-quality" name="qualityAnswer" class="fj-input" style="height:88px" maxlength="1000"${this.errors.quality?' aria-invalid="true" aria-describedby="fj-quality-msg"':""}${this.sending?" readonly":""}>${U(this.quality)}</textarea>\n ${this.error("quality")}\n </div>`}renderClosed(e){const t=(e,t)=>`<label class="fj-choice"><input type="radio" class="fj-sr-only" name="closedAnswer" value="${e}"${this.closed===e?" checked":""}${this.sending?" disabled":""}>${U(t)}</label>`;return`<fieldset class="fj-set"${this.errors.closed?' aria-describedby="fj-closed-msg"':""}>\n <legend class="fj-lab">${U(e.closedQuestion)}</legend>\n <div class="fj-choices">${t(1,e.closedAnswerOne)}${t(2,e.closedAnswerTwo)}</div>\n ${this.error("closed")}\n </fieldset>`}bindSurvey(){var e,t,i,n,a;const s=this.modal.dialog;null===(e=s.querySelector('[data-action="close"]'))||void 0===e||e.addEventListener("click",()=>{this.modal.close()});for(const e of s.querySelectorAll('input[name="rating"]'))e.addEventListener("change",()=>{this.rating=Number(e.value),this.updateStars(e),this.clearError("rating"),this.updateProgress()});null===(t=s.querySelector("#fj-quality"))||void 0===t||t.addEventListener("input",e=>{this.quality=e.target.value,this.quality.trim()&&this.clearError("quality"),this.updateProgress()});for(const e of s.querySelectorAll('input[name="closedAnswer"]'))e.addEventListener("change",()=>{this.closed=Number(e.value),this.clearError("closed"),this.updateProgress()});null===(i=s.querySelector('[name="anonymousAnswer"]'))||void 0===i||i.addEventListener("change",e=>{this.anonymous=e.target.checked}),null===(n=s.querySelector("form"))||void 0===n||n.addEventListener("submit",e=>{e.preventDefault(),this.send("SENT")}),null===(a=s.querySelector('[data-action="decline"]'))||void 0===a||a.addEventListener("click",()=>{this.send("DECLINED")})}updateStars(e){const t=this.modal.dialog;for(const e of t.querySelectorAll(".fj-star")){const t=e.querySelector("input"),i=Number(null==t?void 0:t.value)<=this.rating;e.classList.toggle("fj-on",i),e.classList.remove("fj-pop");const n=e.querySelector("svg");null==n||n.setAttribute("fill",i?"currentColor":"none")}const i=e.closest(".fj-star");i&&(i.offsetWidth,i.classList.add("fj-pop"));const n=t.querySelector('[data-slot="rating-help"]');n&&(n.innerHTML=this.renderRatingHelp())}updateProgress(){var e;const t=this.modal.dialog,i=this.questions.length,n=t.querySelector('[data-slot="progress-text"]');n&&(n.textContent=this.i18n.tp("feedbot.progress",this.answered,{total:i}));const a=t.querySelector('[data-slot="progress"] .fj-prog');null==a||a.setAttribute("aria-valuenow",String(this.answered)),null===(e=null==a?void 0:a.querySelector("i"))||void 0===e||e.style.setProperty("--fj-progress",`${this.progressPercent}%`)}clearError(e){var t;if(!this.errors[e])return;delete this.errors[e];const i=this.modal.dialog;null===(t=i.querySelector(`#fj-${e}-msg`))||void 0===t||t.remove();const n="quality"===e?i.querySelector("#fj-quality"):i.querySelector(`[aria-describedby="fj-${e}-msg"]`);null==n||n.removeAttribute("aria-describedby"),null==n||n.removeAttribute("aria-invalid")}validate(){const e={};for(const t of this.questions)"rating"!==t||this.rating||(e.rating="feedbot.rating_error"),"quality"!==t||this.quality.trim()||(e.quality="feedbot.quality_error"),"closed"!==t||this.closed||(e.closed="feedbot.choice_error");return e}async send(e){var t,i,n;if(this.sending)return;const a=this.modal.dialog;if(this.submitError=null,"SENT"===e){this.errors=this.validate();const e=this.questions.find(e=>this.errors[e]);if(e){this.renderSurvey();const i="rating"===e?'input[name="rating"]':"quality"===e?"#fj-quality":'input[name="closedAnswer"]';return void(null===(t=a.querySelector(i))||void 0===t||t.focus())}}const s=ie(a);this.sending=e,this.renderSurvey(),null===(i=a.querySelector(`[data-action="${"SENT"===e?"submit":"decline"}"]`))||void 0===i||i.focus();try{const t=await Y(`${this.apiUrl}/api/reviews/submit`,{method:"POST",signal:this.abortController.signal,body:JSON.stringify(this.toJson(e,s)),headers:{"Content-Type":"application/json"}});if(!t.ok)throw this.submitError=429===t.status?"global.rate_limited":"global.submit_error",new Error("Failed to submit feedback");await this.modal.close(),this.showToast(e),this.survey=null,G(this.options.onAnswer,{status:e})}catch(e){if(this.destroyed)return;null!==(n=this.submitError)&&void 0!==n||(this.submitError="global.submit_error"),this.sending=null,this.modal.isOpen&&this.renderSurvey()}}toJson(e,t){var i,n,a,s,o;const r=this.survey;return{quantityAnswer:this.rating,quantityQuestion:null!==(i=null==r?void 0:r.quantityQuestion)&&void 0!==i?i:"",qualityAnswer:this.quality,qualityQuestion:null!==(n=null==r?void 0:r.qualityQuestion)&&void 0!==n?n:"",anonymousAnswer:this.anonymous,closedAnswer:this.closed,closedQuestion:null!==(a=null==r?void 0:r.closedQuestion)&&void 0!==a?a:"",userId:null===(s=this.user)||void 0===s?void 0:s.id,userName:this.anonymous?null:(null===(o=this.user)||void 0===o?void 0:o.fullName)||null,uuidSurvey:`/api/surveys/${this.options.surveyId}`,answerStatus:e,widgetVersion:"3.0.0-rc.2",widgetLocale:this.i18n.locale,fjHp:t}}showToast(e){var t;this.hideToast();const i="DECLINED"===e?"feedbot.declined":"feedbot.thanks",n=document.createElement("div");n.className="fj-float fj-toast",n.innerHTML=`\n <div class="fj-panel" role="status" data-version="v3.0.0-rc.2">\n ${u("DECLINED"===e?"hello":"bravo",56)}\n <div class="fj-toast-text">\n <p>${U(this.i18n.t(`${i}.title`))}</p>\n <small>${U(this.i18n.t(`${i}.text`))}</small>\n </div>\n <button type="button" class="fj-iconbtn" aria-label="${U(this.i18n.t("global.close"))}">${s("close",20)}</button>\n </div>`,this.surface.root.append(n),C(n),this.toast=n,null===(t=n.querySelector("button"))||void 0===t||t.addEventListener("click",()=>this.hideToast()),this.toastTimer=setTimeout(()=>this.hideToast(),8e3)}hideToast(){clearTimeout(this.toastTimer);const e=this.toast;this.toast=null,e&&b(e)}}"undefined"!=typeof window&&(window.Feedback=ce,window.Feedbot=pe);export{ce as Feedback,pe as Feedbot,e as Locales,t as messages};
|