odaptos_design_system 2.0.142 → 2.0.144

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.
@@ -13024,723 +13024,6 @@ var css_248z$t = ".Scenario-modules_start_interview_container__xpnL8{align-items
13024
13024
  var styles$t = {"start_interview_container":"Scenario-modules_start_interview_container__xpnL8","name":"Scenario-modules_name__hM-lS","description":"Scenario-modules_description__U4c7P"};
13025
13025
  styleInject(css_248z$t);
13026
13026
 
13027
- const PipModerated = ({
13028
- tasks,
13029
- messages,
13030
- contentFunc,
13031
- buttonText,
13032
- buttonIcon,
13033
- disabled,
13034
- url
13035
- }) => {
13036
- const pipWindowRef = React.useRef(null);
13037
- const [tabOpen, setTabOpen] = React.useState('tasks');
13038
- const [lastMessageRead, setLastMessageRead] = React.useState(null);
13039
- const [lastTaskRead, setLastTaskRead] = React.useState(null);
13040
- const [currentTask, setCurrentTask] = React.useState(null);
13041
- const [currentScenario, setCurrentScenario] = React.useState(null);
13042
- const [isMinimized, setIsMinimized] = React.useState(false);
13043
- const handleMinimize = () => {
13044
- try {
13045
- if (pipWindowRef.current) {
13046
- const currentHeight = pipWindowRef.current.window.innerHeight;
13047
- const newHeight = currentHeight <= 120 ? 800 : 120;
13048
- pipWindowRef.current.window.resizeTo(400, newHeight);
13049
- setIsMinimized(currentHeight <= 120 ? false : true);
13050
- }
13051
- } catch (error) {
13052
- console.error('Erreur lors du redimensionnement:', error);
13053
- }
13054
- };
13055
- const replaceURLs = message => {
13056
- if (!message) return;
13057
- const urlRegex = /(((https?:\/\/)|(www\.))[^\s]+)/g;
13058
- return message.replace(urlRegex, url => {
13059
- let hyperlink = url;
13060
- if (!hyperlink.match('^https?://')) {
13061
- hyperlink = 'https://' + hyperlink;
13062
- }
13063
- return `<a href="${hyperlink}" target="_blank" rel="noopener noreferrer">${url}</a>`;
13064
- });
13065
- };
13066
- const renderTasksInPiP = pipWindow => {
13067
- if (pipWindow) {
13068
- const root = pipWindow.document.createElement('div');
13069
- pipWindow.document.body.innerHTML = ''; // Nettoyer le contenu précédent
13070
- pipWindow.document.body.appendChild(root);
13071
- const pipIcon = `<svg width="59" height="15" viewBox="0 0 59 15" xmlns="http://www.w3.org/2000/svg">
13072
- <g fill="#66ADFF" fill-rule="evenodd">
13073
- <path d="M42.037 2.48h-.947v-.013A1.896 1.896 0 0 0 39.194.57V7.934c0 3.264 2.843 3.141 2.843 3.141V8.917s-.947-.091-.947-1.57V4.391h.947V2.48zm-17.88 0c2.286 0 4.153 1.813 4.26 4.09l.005.208v4.673c-.799 0-1.483-.495-1.761-1.195a4.219 4.219 0 0 1-2.504.82c-2.356 0-4.266-1.925-4.266-4.298s1.91-4.297 4.266-4.297zm0 1.91a2.379 2.379 0 0 0-2.37 2.388 2.379 2.379 0 0 0 2.37 2.387 2.379 2.379 0 0 0 2.37-2.387 2.379 2.379 0 0 0-2.37-2.387zm9.823-1.91c2.356 0 4.266 1.925 4.266 4.298s-1.91 4.297-4.266 4.297a4.223 4.223 0 0 1-2.37-.724v.738c0 .997-.77 1.815-1.747 1.89l-.148.006V6.778c0-2.373 1.91-4.297 4.265-4.297zm0 1.91a2.379 2.379 0 0 0-2.37 2.388 2.379 2.379 0 0 0 2.37 2.387 2.379 2.379 0 0 0 2.37-2.387 2.379 2.379 0 0 0-2.37-2.387zm12.934-1.91c2.356 0 4.265 1.925 4.265 4.298s-1.91 4.297-4.265 4.297c-2.356 0-4.266-1.924-4.266-4.297 0-2.373 1.91-4.297 4.266-4.297zm0 1.91a2.379 2.379 0 0 0-2.37 2.388 2.379 2.379 0 0 0 2.37 2.387 2.379 2.379 0 0 0 2.37-2.387 2.379 2.379 0 0 0-2.37-2.387zm8.253 6.706c.503 0 .961-.07 1.374-.21.412-.142.766-.334 1.06-.577.295-.244.523-.522.683-.836.161-.314.241-.644.241-.99 0-.585-.195-1.091-.586-1.519-.391-.427-.988-.738-1.792-.933l-1.205-.293a3.245 3.245 0 0 1-.764-.292c-.187-.108-.28-.254-.28-.438 0-.195.112-.355.337-.48a1.6 1.6 0 0 1 .787-.186c.29 0 .579.07.868.211.29.141.509.368.659.682l1.816-.747c-.279-.65-.713-1.123-1.302-1.42-.59-.298-1.259-.447-2.009-.447-.45 0-.87.057-1.261.17a3.256 3.256 0 0 0-1.02.488c-.29.21-.518.468-.684.771-.166.303-.249.65-.249 1.039 0 .346.07.65.21.91.138.259.315.48.53.665.214.184.452.335.715.455.262.119.516.205.763.26l1.109.243c.46.108.785.23.972.365a.623.623 0 0 1 .281.528c0 .195-.112.362-.337.503-.225.14-.53.211-.916.211-.375 0-.715-.1-1.02-.3-.204-.134-.448-.44-.732-.918l-1.88.812c.107.282.262.56.466.836.203.276.453.52.747.731.295.211.643.382 1.045.511.401.13.86.195 1.374.195zM5.177 2.46c2.352 0 4.259 1.918 4.259 4.285s-1.907 4.286-4.26 4.286c-2.352 0-4.259-1.919-4.259-4.286 0-2.367 1.907-4.286 4.26-4.286zm0 1.904A2.374 2.374 0 0 0 2.81 6.745a2.374 2.374 0 0 0 2.367 2.381 2.374 2.374 0 0 0 2.366-2.38 2.374 2.374 0 0 0-2.366-2.382zM18.9 1.031v5.714c0 2.367-1.907 4.286-4.26 4.286-2.352 0-4.259-1.919-4.259-4.286 0-2.367 1.907-4.286 4.26-4.286.875 0 1.69.266 2.366.722v-.257c0-.996.769-1.812 1.745-1.888l.148-.005zm-4.26 3.333a2.374 2.374 0 0 0-2.366 2.381 2.374 2.374 0 0 0 2.367 2.381 2.374 2.374 0 0 0 2.366-2.38 2.374 2.374 0 0 0-2.366-2.382zm-7.426 7.822.708-.17a.28.28 0 0 1 .145 0c.06.019.104.106.279.243.175.137.496.458 1.503.486 1.007.028 1.54-.534 1.614-.598.073-.064.14-.16.211-.145.048.009.195.041.443.096l1.123.255c.065.025.105.056.12.092.023.055.023.101-.048.2-.072.1-.93 1.72-3.463 1.72-1.505 0-2.642-.549-3.41-1.645-.112-.126-.146-.218-.101-.275.045-.057.128-.097.25-.119l.626-.14z"/>
13074
- </g>
13075
- </svg>
13076
- `;
13077
- const favicon = pipWindow.document.createElement('link');
13078
- favicon.rel = 'icon';
13079
- favicon.type = 'image/svg+xml'; // ou 'image/png' selon votre icône
13080
- favicon.href = pipIcon;
13081
- pipWindow.document.head.appendChild(favicon);
13082
- const selectedFlagIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
13083
- <g clip-path="url(#clip0_5988_1004)">
13084
- <path fill-rule="evenodd" clip-rule="evenodd" d="M10 0C10.2761 0 10.5 0.223858 10.5 0.5V20.5C10.5 20.7761 10.2761 21 10 21C9.72386 21 9.5 20.7761 9.5 20.5V0.5C9.5 0.223858 9.72386 0 10 0Z" fill="#00040A"/>
13085
- <path fill-rule="evenodd" clip-rule="evenodd" d="M3.87267 20.4089C3.57858 20.6572 3.5 20.8591 3.5 21C3.5 21.1409 3.57858 21.3428 3.87267 21.5911C4.16445 21.8375 4.6163 22.0819 5.21842 22.2969C6.4183 22.7254 8.1088 23 10 23C11.8912 23 13.5817 22.7254 14.7816 22.2969C15.3837 22.0819 15.8356 21.8375 16.1273 21.5911C16.4214 21.3428 16.5 21.1409 16.5 21C16.5 20.8591 16.4214 20.6572 16.1273 20.4089C15.8356 20.1625 15.3837 19.9181 14.7816 19.7031C13.5817 19.2746 11.8912 19 10 19C8.1088 19 6.4183 19.2746 5.21842 19.7031C4.6163 19.9181 4.16445 20.1625 3.87267 20.4089ZM4.88208 18.7614C6.2157 18.2851 8.02521 18 10 18C11.9748 18 13.7843 18.2851 15.1179 18.7614C15.7825 18.9987 16.3558 19.293 16.7725 19.6449C17.1868 19.9947 17.5 20.4506 17.5 21C17.5 21.5494 17.1868 22.0053 16.7725 22.3551C16.3558 22.707 15.7825 23.0013 15.1179 23.2386C13.7843 23.7149 11.9748 24 10 24C8.02521 24 6.2157 23.7149 4.88208 23.2386C4.21745 23.0013 3.64418 22.707 3.22752 22.3551C2.81318 22.0053 2.5 21.5494 2.5 21C2.5 20.4506 2.81318 19.9947 3.22752 19.6449C3.64418 19.293 4.21745 18.9987 4.88208 18.7614Z" fill="#00040A"/>
13086
- <path fill-rule="evenodd" clip-rule="evenodd" d="M20.4996 1C20.6975 0.99975 20.891 1.0582 21.0556 1.16796C21.2204 1.27782 21.3488 1.43413 21.4247 1.61707C21.5005 1.80002 21.5203 2.00137 21.4816 2.19558C21.4429 2.38964 21.3475 2.56786 21.2074 2.70767M21.2074 2.70767L18.4133 5.50006L21.2061 8.292C21.3461 8.43171 21.4417 8.60998 21.4805 8.80393C21.5193 8.99796 21.4996 9.19913 21.4241 9.382C21.3485 9.56487 21.2203 9.7212 21.0559 9.83121C20.8914 9.94121 20.698 9.99996 20.5001 10H10C9.72386 10 9.5 9.77614 9.5 9.5C9.5 9.22386 9.72386 9 10 9H20.4999L17.3525 5.85361C17.2587 5.75983 17.206 5.63261 17.206 5.49996C17.206 5.36731 17.2587 5.2401 17.3526 5.14633L20.5006 2.00033L10 2C9.72386 2 9.5 1.77614 9.5 1.5C9.5 1.22386 9.72386 1 10 1H20.4996" fill="#00040A"/>
13087
- <path d="M20.4996 1C20.6975 0.99975 20.891 1.0582 21.0556 1.16796C21.2204 1.27782 21.3488 1.43413 21.4247 1.61707C21.5005 1.80002 21.5203 2.00137 21.4816 2.19558C21.4429 2.38964 21.3475 2.56786 21.2074 2.70767M20.4996 1L21.2074 2.70767M20.4996 1H10C9.72386 1 9.5 1.22386 9.5 1.5C9.5 1.77614 9.72386 2 10 2L20.5006 2.00033L17.3526 5.14633C17.2587 5.2401 17.206 5.36731 17.206 5.49996C17.206 5.63261 17.2587 5.75983 17.3525 5.85361L20.4999 9H10C9.72386 9 9.5 9.22386 9.5 9.5C9.5 9.77614 9.72386 10 10 10H20.5001C20.698 9.99996 20.8914 9.94121 21.0559 9.83121C21.2203 9.7212 21.3485 9.56487 21.4241 9.382C21.4996 9.19914 21.5193 8.99796 21.4805 8.80393C21.4417 8.60998 21.3461 8.43171 21.2061 8.292M21.2074 2.70767L18.4133 5.50006L21.2061 8.292M21.2061 8.292V8.292ZM10.5 0.5C10.5 0.223858 10.2761 0 10 0C9.72386 0 9.5 0.223858 9.5 0.5V20.5C9.5 20.7761 9.72386 21 10 21C10.2761 21 10.5 20.7761 10.5 20.5V0.5ZM3.5 21C3.5 20.8591 3.57858 20.6572 3.87267 20.4089C4.16445 20.1625 4.6163 19.9181 5.21842 19.7031C6.4183 19.2746 8.1088 19 10 19C11.8912 19 13.5817 19.2746 14.7816 19.7031C15.3837 19.9181 15.8356 20.1625 16.1273 20.4089C16.4214 20.6572 16.5 20.8591 16.5 21C16.5 21.1409 16.4214 21.3428 16.1273 21.5911C15.8356 21.8375 15.3837 22.0819 14.7816 22.2969C13.5817 22.7254 11.8912 23 10 23C8.1088 23 6.4183 22.7254 5.21842 22.2969C4.6163 22.0819 4.16445 21.8375 3.87267 21.5911C3.57858 21.3428 3.5 21.1409 3.5 21ZM10 18C8.02521 18 6.2157 18.2851 4.88208 18.7614C4.21745 18.9987 3.64418 19.293 3.22752 19.6449C2.81318 19.9947 2.5 20.4506 2.5 21C2.5 21.5494 2.81318 22.0053 3.22752 22.3551C3.64418 22.707 4.21745 23.0013 4.88208 23.2386C6.2157 23.7149 8.02521 24 10 24C11.9748 24 13.7843 23.7149 15.1179 23.2386C15.7825 23.0013 16.3558 22.707 16.7725 22.3551C17.1868 22.0053 17.5 21.5494 17.5 21C17.5 20.4506 17.1868 19.9947 16.7725 19.6449C16.3558 19.293 15.7825 18.9987 15.1179 18.7614C13.7843 18.2851 11.9748 18 10 18Z" stroke="#00040A" stroke-width="0.2" stroke-linecap="round" stroke-linejoin="round"/>
13088
- </g>
13089
- <defs>
13090
- <clipPath id="clip0_5988_1004">
13091
- <rect width="24" height="24" fill="black"/>
13092
- </clipPath>
13093
- </defs>
13094
- </svg>`;
13095
- const flagIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
13096
- <g clip-path="url(#clip0_5988_1004)">
13097
- <path fill-rule="evenodd" clip-rule="evenodd" d="M10 0C10.2761 0 10.5 0.223858 10.5 0.5V20.5C10.5 20.7761 10.2761 21 10 21C9.72386 21 9.5 20.7761 9.5 20.5V0.5C9.5 0.223858 9.72386 0 10 0Z" fill="white"/>
13098
- <path fill-rule="evenodd" clip-rule="evenodd" d="M3.87267 20.4089C3.57858 20.6572 3.5 20.8591 3.5 21C3.5 21.1409 3.57858 21.3428 3.87267 21.5911C4.16445 21.8375 4.6163 22.0819 5.21842 22.2969C6.4183 22.7254 8.1088 23 10 23C11.8912 23 13.5817 22.7254 14.7816 22.2969C15.3837 22.0819 15.8356 21.8375 16.1273 21.5911C16.4214 21.3428 16.5 21.1409 16.5 21C16.5 20.8591 16.4214 20.6572 16.1273 20.4089C15.8356 20.1625 15.3837 19.9181 14.7816 19.7031C13.5817 19.2746 11.8912 19 10 19C8.1088 19 6.4183 19.2746 5.21842 19.7031C4.6163 19.9181 4.16445 20.1625 3.87267 20.4089ZM4.88208 18.7614C6.2157 18.2851 8.02521 18 10 18C11.9748 18 13.7843 18.2851 15.1179 18.7614C15.7825 18.9987 16.3558 19.293 16.7725 19.6449C17.1868 19.9947 17.5 20.4506 17.5 21C17.5 21.5494 17.1868 22.0053 16.7725 22.3551C16.3558 22.707 15.7825 23.0013 15.1179 23.2386C13.7843 23.7149 11.9748 24 10 24C8.02521 24 6.2157 23.7149 4.88208 23.2386C4.21745 23.0013 3.64418 22.707 3.22752 22.3551C2.81318 22.0053 2.5 21.5494 2.5 21C2.5 20.4506 2.81318 19.9947 3.22752 19.6449C3.64418 19.293 4.21745 18.9987 4.88208 18.7614Z" fill="white"/>
13099
- <path fill-rule="evenodd" clip-rule="evenodd" d="M20.4996 1C20.6975 0.99975 20.891 1.0582 21.0556 1.16796C21.2204 1.27782 21.3488 1.43413 21.4247 1.61707C21.5005 1.80002 21.5203 2.00137 21.4816 2.19558C21.4429 2.38964 21.3475 2.56786 21.2074 2.70767M21.2074 2.70767L18.4133 5.50006L21.2061 8.292C21.3461 8.43171 21.4417 8.60998 21.4805 8.80393C21.5193 8.99796 21.4996 9.19913 21.4241 9.382C21.3485 9.56487 21.2203 9.7212 21.0559 9.83121C20.8914 9.94121 20.698 9.99996 20.5001 10H10C9.72386 10 9.5 9.77614 9.5 9.5C9.5 9.22386 9.72386 9 10 9H20.4999L17.3525 5.85361C17.2587 5.75983 17.206 5.63261 17.206 5.49996C17.206 5.36731 17.2587 5.2401 17.3526 5.14633L20.5006 2.00033L10 2C9.72386 2 9.5 1.77614 9.5 1.5C9.5 1.22386 9.72386 1 10 1H20.4996" fill="white"/>
13100
- <path d="M20.4996 1C20.6975 0.99975 20.891 1.0582 21.0556 1.16796C21.2204 1.27782 21.3488 1.43413 21.4247 1.61707C21.5005 1.80002 21.5203 2.00137 21.4816 2.19558C21.4429 2.38964 21.3475 2.56786 21.2074 2.70767M20.4996 1L21.2074 2.70767M20.4996 1H10C9.72386 1 9.5 1.22386 9.5 1.5C9.5 1.77614 9.72386 2 10 2L20.5006 2.00033L17.3526 5.14633C17.2587 5.2401 17.206 5.36731 17.206 5.49996C17.206 5.63261 17.2587 5.75983 17.3525 5.85361L20.4999 9H10C9.72386 9 9.5 9.22386 9.5 9.5C9.5 9.77614 9.72386 10 10 10H20.5001C20.698 9.99996 20.8914 9.94121 21.0559 9.83121C21.2203 9.7212 21.3485 9.56487 21.4241 9.382C21.4996 9.19914 21.5193 8.99796 21.4805 8.80393C21.4417 8.60998 21.3461 8.43171 21.2061 8.292M21.2074 2.70767L18.4133 5.50006L21.2061 8.292M21.2061 8.292V8.292ZM10.5 0.5C10.5 0.223858 10.2761 0 10 0C9.72386 0 9.5 0.223858 9.5 0.5V20.5C9.5 20.7761 9.72386 21 10 21C10.2761 21 10.5 20.7761 10.5 20.5V0.5ZM3.5 21C3.5 20.8591 3.57858 20.6572 3.87267 20.4089C4.16445 20.1625 4.6163 19.9181 5.21842 19.7031C6.4183 19.2746 8.1088 19 10 19C11.8912 19 13.5817 19.2746 14.7816 19.7031C15.3837 19.9181 15.8356 20.1625 16.1273 20.4089C16.4214 20.6572 16.5 20.8591 16.5 21C16.5 21.1409 16.4214 21.3428 16.1273 21.5911C15.8356 21.8375 15.3837 22.0819 14.7816 22.2969C13.5817 22.7254 11.8912 23 10 23C8.1088 23 6.4183 22.7254 5.21842 22.2969C4.6163 22.0819 4.16445 21.8375 3.87267 21.5911C3.57858 21.3428 3.5 21.1409 3.5 21ZM10 18C8.02521 18 6.2157 18.2851 4.88208 18.7614C4.21745 18.9987 3.64418 19.293 3.22752 19.6449C2.81318 19.9947 2.5 20.4506 2.5 21C2.5 21.5494 2.81318 22.0053 3.22752 22.3551C3.64418 22.707 4.21745 23.0013 4.88208 23.2386C6.2157 23.7149 8.02521 24 10 24C11.9748 24 13.7843 23.7149 15.1179 23.2386C15.7825 23.0013 16.3558 22.707 16.7725 22.3551C17.1868 22.0053 17.5 21.5494 17.5 21C17.5 20.4506 17.1868 19.9947 16.7725 19.6449C16.3558 19.293 15.7825 18.9987 15.1179 18.7614C13.7843 18.2851 11.9748 18 10 18Z" stroke="white" stroke-width="0.2" stroke-linecap="round" stroke-linejoin="round"/>
13101
- </g>
13102
- <defs>
13103
- <clipPath id="clip0_5988_1004">
13104
- <rect width="24" height="24" fill="white"/>
13105
- </clipPath>
13106
- </defs>
13107
- </svg>`;
13108
- const messageIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
13109
- <g clip-path="url(#clip0_5988_1031)">
13110
- <path d="M12.75 0.75C10.8788 0.747302 9.04097 1.24541 7.42723 2.19264C5.81349 3.13987 4.48264 4.5017 3.5728 6.13681C2.66295 7.77192 2.20726 9.62073 2.25302 11.4914C2.29877 13.362 2.8443 15.1863 3.833 16.775L0.75 23.25L7.224 20.167C8.6047 21.0254 10.1659 21.5515 11.7846 21.7038C13.4032 21.8561 15.0351 21.6304 16.5517 21.0446C18.0683 20.4587 19.4281 19.5287 20.524 18.3278C21.62 17.1268 22.422 15.6878 22.8671 14.1241C23.3121 12.5604 23.3879 10.9147 23.0886 9.31668C22.7892 7.71867 22.1229 6.212 21.142 4.91539C20.1612 3.61877 18.8926 2.56764 17.4363 1.84481C15.9801 1.12198 14.3758 0.747201 12.75 0.75Z" stroke="#00040A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
13111
- <path d="M8.24805 8.25H17.248" stroke="#00040A"" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
13112
- <path d="M6.74805 11.25H18.748" stroke="#00040A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
13113
- <path d="M8.24805 14.25H17.248" stroke="#00040A" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
13114
- </g>
13115
- <defs>
13116
- <clipPath id="clip0_5988_1031">
13117
- <rect width="24" height="24" fill="#00040A"/>
13118
- </clipPath>
13119
- </defs>
13120
- </svg>`;
13121
- const selectedChatIcon = `<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
13122
- <g clip-path="url(#clip0_5988_1031)">
13123
- <path d="M12.75 0.75C10.8788 0.747302 9.04097 1.24541 7.42723 2.19264C5.81349 3.13987 4.48264 4.5017 3.5728 6.13681C2.66295 7.77192 2.20726 9.62073 2.25302 11.4914C2.29877 13.362 2.8443 15.1863 3.833 16.775L0.75 23.25L7.224 20.167C8.6047 21.0254 10.1659 21.5515 11.7846 21.7038C13.4032 21.8561 15.0351 21.6304 16.5517 21.0446C18.0683 20.4587 19.4281 19.5287 20.524 18.3278C21.62 17.1268 22.422 15.6878 22.8671 14.1241C23.3121 12.5604 23.3879 10.9147 23.0886 9.31668C22.7892 7.71867 22.1229 6.212 21.142 4.91539C20.1612 3.61877 18.8926 2.56764 17.4363 1.84481C15.9801 1.12198 14.3758 0.747201 12.75 0.75Z" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
13124
- <path d="M8.24805 8.25H17.248" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
13125
- <path d="M6.74805 11.25H18.748" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
13126
- <path d="M8.24805 14.25H17.248" stroke="white" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
13127
- </g>
13128
- <defs>
13129
- <clipPath id="clip0_5988_1031">
13130
- <rect width="24" height="24" fill="white"/>
13131
- </clipPath>
13132
- </defs>
13133
- </svg>`;
13134
- // Ajouter une balise style dans le head de la fenêtre PiP
13135
- const styleSheet = pipWindow.document.createElement('style');
13136
- styleSheet.textContent = `
13137
- @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&family=Open+Sans:wght@400;600&display=swap');
13138
-
13139
- html {
13140
- height: 100%;
13141
- border: 2px solid #00040A;
13142
- border-radius: 0 0 0.5rem 0.5rem;
13143
- &::-webkit-scrollbar {
13144
- display: none;
13145
- }
13146
- -ms-overflow-style: none;
13147
- scrollbar-width: none;
13148
- overflow: hidden;
13149
- }
13150
-
13151
- .pipContainer {
13152
- height:100%;
13153
- }
13154
-
13155
- .banneryellow {
13156
- display: flex;
13157
- padding: 0.5rem 0.75rem;
13158
- flex-direction: column;
13159
- align-items: flex-start;
13160
- align-self: stretch;
13161
- border-radius: 0.5rem;
13162
- border: 1px solid #9E7200;
13163
- background: #FFFCF2;
13164
- margin-bottom: 0.5rem;
13165
- }
13166
- .pbanneryellow {
13167
- color: #9E7200;
13168
- font-family: "Open Sans";
13169
- font-size: 0.875rem;
13170
- font-style: normal;
13171
- font-weight: 600;
13172
- line-height: 140%; /* 1.225rem */
13173
- margin: 0;
13174
- }
13175
-
13176
- .tasksContainer {
13177
- display: flex;
13178
- flex-direction: column;
13179
- flex: 1;
13180
- width: 100%;
13181
- height: 460px;
13182
- overflow-y: scroll;
13183
- padding-bottom: 5rem;
13184
- }
13185
- .messagesContainer {
13186
- display: flex;
13187
- flex-direction: column;
13188
- flex: 1;
13189
- width: 100%;
13190
- height: 460px;
13191
- overflow-y: scroll;
13192
- padding-bottom: 5rem;
13193
- }
13194
-
13195
- .taskQuestion {
13196
- display: flex;
13197
- flex-direction: column;
13198
- padding: 0.5rem 0.75rem;
13199
- justify-content: center;
13200
- align-items: flex-start;
13201
- max-width: 100%;
13202
-
13203
- border-radius: 0.5rem;
13204
- border: 1px solid var(--color-neutral-dark-shades-950, #26292e);
13205
- background: var(--color-neutral-basics-white, #fff);
13206
- margin-bottom: 0.5rem;
13207
-
13208
- .name {
13209
- margin:0;
13210
- font-family: Poppins;
13211
- font-size: 0.875rem;
13212
- font-style: normal;
13213
- font-weight: 600;
13214
- line-height: 140%; /* 1.225rem */
13215
- text-transform: capitalize;
13216
- }
13217
- .description {
13218
- margin:0;
13219
- font-family: "Open Sans";
13220
- font-size: 0.875rem;
13221
- font-style: normal;
13222
- font-weight: 400;
13223
- line-height: 140%; /* 1.225rem */
13224
- }
13225
- }
13226
-
13227
- .taskNormal {
13228
- display: flex;
13229
- flex-direction: column;
13230
- padding: 0.5rem 0.75rem;
13231
- justify-content: center;
13232
- align-items: flex-start;
13233
- max-width: 100%;
13234
- border-radius: 0.5rem;
13235
- border: 1px solid var(--color-neutral-dark-shades-950, #26292e);
13236
- background: var(--color-neutral-basics-white, #fff);
13237
- margin-bottom: 0.5rem;
13238
-
13239
- .name {
13240
- margin:0;
13241
- font-family: Poppins;
13242
- font-size: 0.875rem;
13243
- font-style: normal;
13244
- font-weight: 600;
13245
- line-height: 140%; /* 1.225rem */
13246
- text-transform: capitalize;
13247
-
13248
- }
13249
- .description {
13250
- margin:0;
13251
- font-family: "Open Sans";
13252
- font-size: 0.875rem;
13253
- font-style: normal;
13254
- font-weight: 400;
13255
- line-height: 140%; /* 1.225rem */
13256
- }
13257
- }
13258
- .taskScenario {
13259
- display: flex;
13260
- padding: 0.5rem 0.75rem;
13261
- flex-direction: column;
13262
- align-items: flex-start;
13263
- align-self: stretch;
13264
- border-radius: 0.5rem;
13265
- border: 1px solid #66adff;
13266
- background: #e5f1ff;
13267
- margin-bottom: 0.5rem;
13268
- .name {
13269
- margin:0;
13270
- font-family: Poppins;
13271
- font-size: 0.875rem;
13272
- font-style: normal;
13273
- font-weight: 600;
13274
- line-height: 140%; /* 1.225rem */
13275
- text-transform: capitalize;
13276
-
13277
- }
13278
- .description {
13279
- margin:0;
13280
- font-family: "Open Sans";
13281
- font-size: 0.875rem;
13282
- font-style: normal;
13283
- font-weight: 400;
13284
- line-height: 140%; /* 1.225rem */
13285
- }
13286
- .buttonScenario {
13287
- background: #26292e;
13288
- color: white;
13289
- border: none;
13290
- height: 2rem;
13291
- display: flex;
13292
- align-items: center;
13293
- justify-content: center;
13294
- gap: 0.5rem;
13295
- padding: 0.375rem 0.75rem;
13296
- border-radius: 0.5rem;
13297
- width: 100%;
13298
- margin-top: 0.5rem;
13299
- cursor: pointer;
13300
-
13301
- .buttonText {
13302
- margin: 0;
13303
- font-family: Poppins;
13304
- text-align: center;
13305
- font-size: 0.875rem;
13306
- font-style: normal;
13307
- font-weight: 500;
13308
- line-height: 140%; /* 1.225rem */
13309
- text-overflow: ellipsis;
13310
- max-width: 99%;
13311
- overflow: hidden;
13312
- white-space: nowrap;
13313
- text-decoration: none;
13314
- }
13315
- }
13316
- }
13317
-
13318
- .taskTitle {
13319
- color: var(--Color-Neutral-Dark-Shades-950, #26292e);
13320
- font-family: Poppins;
13321
- font-size: 2rem;
13322
- font-style: normal;
13323
- font-weight: 700;
13324
- line-height: 150%;
13325
- letter-spacing: -0.04rem;
13326
- margin: 0;
13327
- }
13328
-
13329
- .footer {
13330
- height: 2rem;
13331
- position:fixed;
13332
- bottom: 1rem;
13333
- max-width: 90vw;
13334
- width: 100%;
13335
- border-radius: 3.5rem;
13336
- padding: 0.6rem;
13337
- background: var(--Color-Neutral-Dark-Shades-950, #26292e);
13338
- display: flex;
13339
- flex-direction: row;
13340
- align-items: center;
13341
- gap: 0.5rem;
13342
- #minimize-btn {
13343
- width: 2.5rem;
13344
- height: 2.5rem;
13345
- background: #64666a;
13346
- border-radius: 2.5rem;
13347
- display: flex;
13348
- align-items: center;
13349
- justify-content: center;
13350
- color: white;
13351
- margin-right: auto;
13352
- border: none;
13353
- }
13354
- }
13355
-
13356
- .notSelectedTabTask {
13357
- background: #64666A;
13358
- color: #fff;
13359
- border: none;
13360
- padding: 0.375rem 0.75rem;
13361
- border-radius: 3.5rem;
13362
- display: flex;
13363
- align-items: center;
13364
- gap: 0.5rem;
13365
- font-family: "Open Sans";
13366
- font-size: 0.875rem;
13367
- font-style: normal;
13368
- font-weight: 600;
13369
- line-height: 140%; /* 1.225rem */
13370
- }
13371
- .selectedTabTask {
13372
- background: #66adff;
13373
- color: #26292e;
13374
- border: none;
13375
- height: 2rem;
13376
- display: flex;
13377
- align-items: center;
13378
- gap: 0.5rem;
13379
- padding: 0.375rem 0.75rem;
13380
- border-radius: 3.5rem;
13381
- font-family: "Open Sans";
13382
- font-size: 0.875rem;
13383
- font-style: normal;
13384
- font-weight: 600;
13385
- line-height: 140%; /* 1.225rem */
13386
-
13387
- }
13388
-
13389
- .notSelectedTabMessage {
13390
- background: #64666A;
13391
- border: none;
13392
- padding: 0.375rem 0.75rem;
13393
- border-radius: 3.5rem;
13394
- display: flex;
13395
- align-items: center;
13396
- gap: 0.5rem;
13397
- font-family: "Open Sans";
13398
- font-size: 0.875rem;
13399
- font-style: normal;
13400
- font-weight: 600;
13401
- line-height: 140%; /* 1.225rem */
13402
- }
13403
- .selectedTabMessage {
13404
- background: #66adff;
13405
- border: none;
13406
- height: 2rem;
13407
- display: flex;
13408
- align-items: center;
13409
- gap: 0.5rem;
13410
- padding: 0.375rem 0.75rem;
13411
- border-radius: 3.5rem;
13412
- font-family: "Open Sans";
13413
- font-size: 0.875rem;
13414
- font-style: normal;
13415
- font-weight: 600;
13416
- line-height: 140%; /* 1.225rem */
13417
-
13418
- }
13419
-
13420
- .user_message_container {
13421
- display: flex;
13422
- flex-direction: row;
13423
- justify-content: flex-end;
13424
- gap: 0.5rem;
13425
- width: 100%;
13426
- animation: floatup 0.5s forwards;
13427
- margin: 0.5rem 0;
13428
- margin-bottom: 0.75rem;
13429
-
13430
- @keyframes floatup {
13431
- from {
13432
- transform: translateY(0.875rem);
13433
- opacity: 0;
13434
- }
13435
-
13436
- to {
13437
- transform: translateY(0px);
13438
- opacity: 1;
13439
- }
13440
- }
13441
-
13442
- .message {
13443
- p {
13444
- margin-left: auto;
13445
- color: var(--Color-Neutral-Dark-Shades-950, #26292E);
13446
- font-family: "Open Sans";
13447
- font-size: 0.875rem;
13448
- font-style: normal;
13449
- font-weight: 400;
13450
- line-height: 140%; /* 1.225rem */
13451
- }
13452
- }
13453
-
13454
- .bot_indicator {
13455
- padding: 0.625rem 0.5625rem;
13456
- border-radius: 0.5rem 0.5rem 0rem 0.5rem;
13457
- height: 2rem;
13458
- width: 2rem;
13459
- display: flex;
13460
- align-items: center;
13461
- justify-content: center;
13462
- background: var(
13463
- --color-gradients-003,
13464
- linear-gradient(135deg, #07f 0%, #9024f6 100%)
13465
- );
13466
-
13467
- p {
13468
- padding: 0;
13469
- color: var(--Color-Neutral-Dark-Shades-950, #26292E);
13470
- font-family: "Open Sans";
13471
- font-size: 0.875rem;
13472
- font-style: normal;
13473
- font-weight: 400;
13474
- line-height: 140%; /* 1.225rem */
13475
- }
13476
- }
13477
-
13478
- .message_chatbot {
13479
- display: flex;
13480
- flex-direction: column;
13481
- width: 100%;
13482
- gap: 0.25rem;
13483
- }
13484
-
13485
- .user_text {
13486
- color: var(--Color-Neutral-Dark-Shades-950, #26292e);
13487
- font-family: 'Open Sans';
13488
- font-size: 0.875rem;
13489
- font-style: normal;
13490
- font-weight: 400;
13491
- line-height: 1.225rem;
13492
- margin: 0;
13493
- }
13494
-
13495
- .not_user_text_message {
13496
- display: flex;
13497
- padding: 1rem;
13498
- flex-direction: column;
13499
- align-items: flex-end;
13500
- width: fit-content;
13501
- max-width: 85%;
13502
- gap: 0.5rem;
13503
- white-space: break-spaces;
13504
- border-radius: 0rem 0.5rem 0.5rem 0.5rem;
13505
- border: 1px solid #d5d5d6;
13506
- background: #fafafa;
13507
-
13508
- .not_user_text {
13509
- color: var(--Color-Neutral-Dark-Shades-950, #26292e);
13510
- font-family: 'Open Sans';
13511
- font-size: 0.875rem;
13512
- font-style: normal;
13513
- font-weight: 400;
13514
- line-height: 1.225rem;
13515
- margin: 0;
13516
- }
13517
-
13518
- .blue {
13519
- color: #004799;
13520
- }
13521
- }
13522
-
13523
- .user_indicator {
13524
- padding: 0.625rem 0.5625rem;
13525
- border-radius: 0.5rem 0.5rem 0.5rem 0rem;
13526
- height: 2.75rem;
13527
- width: 2.75rem;
13528
- display: flex;
13529
- align-items: center;
13530
- justify-content: center;
13531
- background: var(
13532
- --color-gradients-003,
13533
- linear-gradient(135deg, #07f 0%, #9024f6 100%)
13534
- );
13535
- }
13536
-
13537
- .title_text {
13538
- padding: 0;
13539
- color: #fff;
13540
- font-family: "Open Sans";
13541
- font-size: 0.875rem;
13542
- font-style: normal;
13543
- font-weight: 600;
13544
- line-height: 140%; /* 1.225rem */}
13545
-
13546
- .message_time {
13547
- padding: 0;
13548
- font-family: "Open Sans";
13549
- font-size: 0.75rem;
13550
- font-style: normal;
13551
- font-weight: 400;
13552
- line-height: 140%; /* 1.225rem */
13553
- color: #64666A;
13554
- }
13555
- `;
13556
- pipWindow.document.head.appendChild(styleSheet);
13557
- const isInterviewer = false;
13558
- const messagesElements = messages.map(message => {
13559
- if (message && message.type === 'normal') {
13560
- const initials = message.from.name.split(' ').map(n => n[0]).join('');
13561
- const messageTime = new Date(message.createdAt).toLocaleTimeString();
13562
- if (message.from.identity === 'interviewee' && isInterviewer || message.from.identity === 'interviewer' && !isInterviewer) {
13563
- return `
13564
- <div class="user_message_container">
13565
- <div class="bot_indicator">
13566
- <div class="title_text">${initials}</div>
13567
- </div>
13568
- <div class="message_chatbot">
13569
- <div class="not_user_text_message">
13570
- <div class="not_user_text">${replaceURLs(message.body) ?? ''}</div>
13571
- </div>
13572
- <div class="message_time">${messageTime}</div>
13573
- </div>
13574
- </div>`;
13575
- } else if (message.from.identity === 'interviewee' && !isInterviewer || message.from.identity === 'interviewer' && isInterviewer) {
13576
- return `
13577
- <div class="user_message_container">
13578
- <div class="message_chatbot">
13579
- <div class="user_text_message">
13580
- <div class="user_text">${replaceURLs(message.body) ?? ''}</div>
13581
- </div>
13582
- <div class="message_time_left">${messageTime}</div>
13583
- </div>
13584
- <div class="user_indicator">
13585
- <div class="title_text">${initials}</div>
13586
- </div>
13587
- </div>`;
13588
- }
13589
- }
13590
- return '';
13591
- }).join('');
13592
- const taskElements = currentTask ? `<div class="${currentTask.type === 'scenario' ? 'taskScenario' : 'taskNormal'}">
13593
- <p class="name">${currentTask.type} ${currentTask.index ?? ''}</p>
13594
- <p class="description">${(() => {
13595
- const parsed = JSON.parse(currentTask.body);
13596
- return parsed ? parsed.description : '';
13597
- })()}</p>
13598
- </div>` : '';
13599
- const scenarioElements = currentScenario ? `<div class="taskScenario">
13600
- <p class="name">${currentScenario.type} ${currentScenario.index ?? ''}</p>
13601
- <p class="description">${(() => {
13602
- const parsed = JSON.parse(currentScenario.body);
13603
- return parsed ? parsed.name : '';
13604
- })()}</p>
13605
- <button class="buttonScenario" onclick="window.open('${(() => {
13606
- const parsed = JSON.parse(currentScenario.body);
13607
- return parsed ? parsed.url.includes('https://') ? parsed.url : `https://${parsed.url}` : '';
13608
- })()}', '_blank')"><p class="buttonText">${(() => {
13609
- const parsed = JSON.parse(currentScenario.body);
13610
- return parsed ? parsed.url : '';
13611
- })()}</p></button>
13612
- </div>` : '';
13613
- root.innerHTML = `
13614
- <div class="pipContainer">
13615
- ${!isMinimized ? `<h2 class="taskTitle">${tabOpen === 'tasks' ? 'Tasks' : 'Chat'}</h2>` : ''}
13616
- ${!isMinimized ? `<div class='banneryellow'>
13617
- <p class="pbanneryellow">${contentFunc('keepThisWindowOpen')}</p>
13618
- </div>` : ''}
13619
- ${tabOpen === 'tasks' && !isMinimized ? `
13620
- <div class="tasksContainer">
13621
- ${scenarioElements}
13622
- ${taskElements}
13623
- </div>
13624
- ` : !isMinimized ? `<div class="messagesContainer">
13625
- ${messagesElements}
13626
- </div>` : ''}
13627
- <div class="footer">
13628
- <button id="minimize-btn"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none">
13629
- <path fill-rule="evenodd" clip-rule="evenodd" d="M22.8025 1.23081C22.8623 1.29451 22.9085 1.36632 22.9411 1.44255C22.979 1.53085 23 1.62812 23 1.73029V7.89212C23 8.29544 22.673 8.62241 22.2697 8.62241C21.8664 8.62241 21.5394 8.29544 21.5394 7.89212V3.49336L9.09316 15.9396C8.80796 16.2248 8.34557 16.2248 8.06037 15.9396C7.77517 15.6544 7.77517 15.192 8.06037 14.9068L20.5066 2.46058H16.1079C15.7046 2.46058 15.3776 2.13362 15.3776 1.73029C15.3776 1.32696 15.7046 1 16.1079 1H22.2697C22.4632 1 22.6392 1.07526 22.7698 1.19811C22.7811 1.20866 22.7919 1.21957 22.8025 1.23081ZM3.09959 5.10794C2.54274 5.10794 2.0087 5.32914 1.61495 5.72289C1.22121 6.11664 1 6.65068 1 7.20752V20.9005C1 21.4573 1.22121 21.9913 1.61495 22.3851C2.0087 22.7788 2.54274 23 3.09959 23H16.7925C17.3494 23 17.8834 22.7788 18.2772 22.3851C18.6709 21.9913 18.8921 21.4573 18.8921 20.9005V12.6847C18.8921 12.2814 18.5652 11.9544 18.1618 11.9544C17.7585 11.9544 17.4315 12.2814 17.4315 12.6847V20.9005C17.4315 21.0699 17.3642 21.2325 17.2444 21.3523C17.1245 21.4721 16.962 21.5395 16.7925 21.5395H3.09959C2.93011 21.5395 2.76758 21.4721 2.64774 21.3523C2.5279 21.2325 2.46058 21.0699 2.46058 20.9005V7.20752C2.46058 7.03805 2.5279 6.87551 2.64774 6.75568C2.76758 6.63584 2.93011 6.56852 3.09959 6.56852H11.3154C11.7187 6.56852 12.0456 6.24155 12.0456 5.83823C12.0456 5.4349 11.7187 5.10794 11.3154 5.10794H3.09959Z" fill="white"/>
13630
- </svg></button>
13631
- <button id="tasks-btn" class="${tabOpen === 'tasks' ? 'selectedTabTask' : 'notSelectedTabTask'}">${tabOpen === 'tasks' ? selectedFlagIcon : flagIcon} My tasks</button>
13632
- <button id="chat-btn" class="${tabOpen === 'chat' ? 'selectedTabMessage' : 'notSelectedTabMessage'}">${tabOpen !== 'chat' ? selectedChatIcon : messageIcon}</button>
13633
- </div>
13634
- </div>
13635
- `;
13636
- const tasksBtn = pipWindow.document.getElementById('tasks-btn');
13637
- const chatBtn = pipWindow.document.getElementById('chat-btn');
13638
- const minimizeBtn = pipWindow.document.getElementById('minimize-btn');
13639
- if (minimizeBtn) {
13640
- minimizeBtn.onclick = handleMinimize;
13641
- }
13642
- if (tasksBtn && chatBtn) {
13643
- tasksBtn.onclick = () => {
13644
- tasksBtn.className = 'selectedTab';
13645
- chatBtn.className = 'notSelectedTab';
13646
- setTabOpen('tasks');
13647
- };
13648
- chatBtn.onclick = () => {
13649
- chatBtn.className = 'selectedTab';
13650
- tasksBtn.className = 'notSelectedTab';
13651
- setTabOpen('chat');
13652
- };
13653
- }
13654
- }
13655
- };
13656
- const openPiP = async url => {
13657
- try {
13658
- // Vérifier si PiP est disponible
13659
- if (!document.pictureInPictureEnabled) {
13660
- console.warn("Picture-in-Picture n'est pas disponible");
13661
- // Fallback : ouvrir simplement dans un nouvel onglet
13662
- window.open(url, '_blank');
13663
- return;
13664
- }
13665
- if (tasks.length > 0) {
13666
- const onlyTasks = tasks.filter(task => task.type === 'task');
13667
- const onlyScenarios = tasks.filter(task => task.type === 'scenario');
13668
- const lastTask = onlyTasks[onlyTasks.length - 1];
13669
- const lastScenario = onlyScenarios[onlyScenarios.length - 1];
13670
- setTabOpen('tasks');
13671
- setCurrentTask(lastTask && tasks.length > 0 ? tasks[tasks.length - 1]._id === lastTask._id ? lastTask : null : null);
13672
- setCurrentScenario(lastScenario);
13673
- }
13674
- // Ouvrir d'abord la fenêtre PiP puisque nous avons l'interaction utilisateur
13675
- const pipWindow = await window.documentPictureInPicture.requestWindow({
13676
- width: 400,
13677
- height: 800
13678
- });
13679
- pipWindowRef.current = pipWindow;
13680
- renderTasksInPiP(pipWindow);
13681
- } catch (error) {
13682
- console.error("Erreur lors de l'ouverture du PiP :", error);
13683
- // Fallback en cas d'erreur : ouvrir simplement dans un nouvel onglet
13684
- window.open(url, '_blank');
13685
- }
13686
- };
13687
- React.useEffect(() => {
13688
- if (pipWindowRef.current) {
13689
- renderTasksInPiP(pipWindowRef.current);
13690
- }
13691
- }, [tasks, tabOpen]); // Re-render chaque fois que tasks change
13692
- React.useEffect(() => {
13693
- if (tabOpen !== 'chat' && messages.length > 0) {
13694
- setTabOpen('chat');
13695
- } else {
13696
- setTabOpen('tasks');
13697
- }
13698
- }, [tasks, messages]);
13699
- // Define last message / task read
13700
- React.useEffect(() => {
13701
- if (tabOpen === 'chat') {
13702
- if (messages.length > 0) {
13703
- setLastMessageRead(messages[messages.length - 1]);
13704
- }
13705
- } else if (tabOpen === 'tasks') {
13706
- if (tasks.length > 0) {
13707
- setLastTaskRead(tasks[tasks.length - 1]);
13708
- }
13709
- }
13710
- }, [tabOpen, messages, tasks]);
13711
- React.useEffect(() => {
13712
- if (messages.length > 0 && lastMessageRead && messages[messages.length - 1]._id !== lastMessageRead._id) {
13713
- setTabOpen('chat');
13714
- }
13715
- }, [messages, lastMessageRead]);
13716
- React.useEffect(() => {
13717
- if (tasks[tasks.length - 1] && lastTaskRead && tasks[tasks.length - 1]._id !== lastTaskRead._id) {
13718
- const onlyTasks = tasks.filter(task => task.type === 'task');
13719
- const onlyScenarios = tasks.filter(task => task.type === 'scenario');
13720
- const lastTask = onlyTasks[onlyTasks.length - 1];
13721
- const lastScenario = onlyScenarios[onlyScenarios.length - 1];
13722
- setTabOpen('tasks');
13723
- setCurrentTask(tasks[tasks.length - 1]._id === lastTask._id ? lastTask : null);
13724
- setCurrentScenario(lastScenario);
13725
- }
13726
- }, [tasks, lastTaskRead]);
13727
- React.useEffect(() => {
13728
- if (pipWindowRef.current) {
13729
- renderTasksInPiP(pipWindowRef.current);
13730
- }
13731
- }, [currentTask, currentScenario, isMinimized]);
13732
- return /*#__PURE__*/React__default.createElement(Button, {
13733
- text: buttonText,
13734
- iconRight: buttonIcon ?? /*#__PURE__*/React__default.createElement(SendIcon, null),
13735
- disabled: disabled,
13736
- onClick: () => {
13737
- if (url) {
13738
- openPiP(url);
13739
- }
13740
- }
13741
- });
13742
- };
13743
-
13744
13027
  const Scenario = ({
13745
13028
  title,
13746
13029
  scenarioName,
@@ -13756,7 +13039,7 @@ const Scenario = ({
13756
13039
  contentFunc,
13757
13040
  ...props
13758
13041
  }) => {
13759
- const isPipAvailable = ('documentPictureInPicture' in window);
13042
+ // const isPipAvailable = 'documentPictureInPicture' in window;
13760
13043
  return /*#__PURE__*/React__default.createElement("div", Object.assign({
13761
13044
  className: styles$t.start_interview_container
13762
13045
  }, props), /*#__PURE__*/React__default.createElement(Text, {
@@ -13770,22 +13053,14 @@ const Scenario = ({
13770
13053
  text: description,
13771
13054
  size: "sm",
13772
13055
  className: styles$t.description
13773
- }), !isObserver && buttonIcon && buttonText && !isPipAvailable ? /*#__PURE__*/React__default.createElement(Button, {
13056
+ }), buttonText && /*#__PURE__*/React__default.createElement(Button, {
13774
13057
  text: buttonText,
13775
13058
  iconRight: buttonIcon ?? /*#__PURE__*/React__default.createElement(SendIcon, null),
13776
13059
  disabled: disabled,
13777
13060
  onClick: () => {
13778
13061
  window.open(url.includes('https://') ? url : `https://${url}`, '_blank');
13779
13062
  }
13780
- }) : !isObserver && buttonIcon && buttonText && isPipAvailable ? /*#__PURE__*/React__default.createElement(PipModerated, {
13781
- tasks: tasks,
13782
- messages: messages,
13783
- contentFunc: contentFunc,
13784
- buttonText: buttonText,
13785
- buttonIcon: buttonIcon,
13786
- url: url,
13787
- disabled: disabled
13788
- }) : null);
13063
+ }));
13789
13064
  };
13790
13065
 
13791
13066
  var css_248z$u = ".SusExplanation-module_sus_explanation__R3wVh{align-items:flex-start;background:var(--Color-Extended-Green-50,#f7fcf7);border:1px solid var(--Color-Extended-Green-200,#d5edd8);border-radius:.5rem;display:flex;flex-direction:column;gap:.5rem;max-width:100%;padding:.75rem}";
@@ -15810,8 +15085,8 @@ const PopoverBeta = ({
15810
15085
  });
15811
15086
  };
15812
15087
 
15813
- var css_248z$H = ".PricingCard-module_pricingCard__fROTO{background-color:#fff;border-radius:.5rem;box-shadow:0 12px 12px 0 rgba(0,0,0,.05);position:relative;width:18rem}.PricingCard-module_pricingCard__fROTO.PricingCard-module_dark__SzVpk{background:linear-gradient(180deg,#4b4e52,#26292e),linear-gradient(0deg,#00040a,#00040a)}.PricingCard-module_pricingCard__fROTO.PricingCard-module_highlighted__ImvM8{border:1px solid #7ad1f8;border-radius:0 0 .5rem .5rem;border-top:none}.PricingCard-module_pricingCard__fROTO.PricingCard-module_highlighted__ImvM8 .PricingCard-module_highlightMessage__bFwAe{align-items:center;background:var(--Dgrads-Dgrad-2,linear-gradient(111deg,#c6ffb1 4.83%,#87f8f8 52.64%,#7ad1f8 98.5%));border:1px solid #7ad1f8;border-bottom:none;border-radius:.5rem .5rem 0 0;box-sizing:border-box;display:flex;height:2.5rem;justify-content:center;left:-1px;position:absolute;top:-2.5rem;width:calc(100% + 2px)}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0{display:flex;flex-direction:column;gap:1rem;padding:1rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt{border-bottom:1px solid #d5d5d6;display:flex;flex-direction:column;height:11rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_title__OeE35{text-align:center}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_price__hO86a{align-items:center;display:flex;justify-content:center}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_price__hO86a .PricingCard-module_amount__ifS46{align-items:center;display:flex;gap:.5rem;justify-content:center}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_price__hO86a .PricingCard-module_amount__ifS46 h2{width:-moz-fit-content;width:fit-content}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_billedAnnually__dNaz2{align-items:center;display:flex;flex-direction:column}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_pricing__QcG-M{display:flex;flex-direction:column;margin-top:auto}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_pricing__QcG-M .PricingCard-module_lineThrough__0qlii{text-decoration:line-through}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_pricing__QcG-M .PricingCard-module_interviews__rdAad{align-items:center;display:flex;gap:.5rem;margin-bottom:1rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o{display:flex;flex-direction:column;gap:.5rem;height:12rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o .PricingCard-module_featuresList__-5Lq4{display:flex;flex-direction:column;gap:.15rem;list-style:none;margin:0;padding:0}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o .PricingCard-module_featuresList__-5Lq4 .PricingCard-module_feature__G-g0H{align-items:center;display:flex;gap:.5rem;margin-bottom:.5rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o .PricingCard-module_featuresList__-5Lq4 .PricingCard-module_feature__G-g0H .PricingCard-module_icon__wdQd-{fill:#5cbb65}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o .PricingCard-module_featuresList__-5Lq4 .PricingCard-module_feature__G-g0H .PricingCard-module_tooltipButton__OMpP9{margin-left:auto}";
15814
- var styles$H = {"pricingCard":"PricingCard-module_pricingCard__fROTO","dark":"PricingCard-module_dark__SzVpk","highlighted":"PricingCard-module_highlighted__ImvM8","highlightMessage":"PricingCard-module_highlightMessage__bFwAe","mainContent":"PricingCard-module_mainContent__t0fc0","top":"PricingCard-module_top__iE1rt","title":"PricingCard-module_title__OeE35","price":"PricingCard-module_price__hO86a","amount":"PricingCard-module_amount__ifS46","billedAnnually":"PricingCard-module_billedAnnually__dNaz2","pricing":"PricingCard-module_pricing__QcG-M","lineThrough":"PricingCard-module_lineThrough__0qlii","interviews":"PricingCard-module_interviews__rdAad","features":"PricingCard-module_features__SvM6o","featuresList":"PricingCard-module_featuresList__-5Lq4","feature":"PricingCard-module_feature__G-g0H","icon":"PricingCard-module_icon__wdQd-","tooltipButton":"PricingCard-module_tooltipButton__OMpP9"};
15088
+ var css_248z$H = ".PricingCard-module_pricingCard__fROTO{background-color:#fff;border-radius:.5rem;box-shadow:0 12px 12px 0 rgba(0,0,0,.05);position:relative;width:18rem}.PricingCard-module_pricingCard__fROTO.PricingCard-module_dark__SzVpk{background:linear-gradient(180deg,#4b4e52,#26292e),linear-gradient(0deg,#00040a,#00040a)}.PricingCard-module_pricingCard__fROTO.PricingCard-module_highlighted__ImvM8{border:1px solid #7ad1f8;border-radius:0 0 .5rem .5rem;border-top:none}.PricingCard-module_pricingCard__fROTO.PricingCard-module_highlighted__ImvM8 .PricingCard-module_highlightMessage__bFwAe{align-items:center;background:var(--Dgrads-Dgrad-2,linear-gradient(111deg,#c6ffb1 4.83%,#87f8f8 52.64%,#7ad1f8 98.5%));border:1px solid #7ad1f8;border-bottom:none;border-radius:.5rem .5rem 0 0;box-sizing:border-box;display:flex;height:2.5rem;justify-content:center;left:-1px;position:absolute;top:-2.5rem;width:calc(100% + 2px)}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0{display:flex;flex-direction:column;gap:1rem;padding:1rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt{border-bottom:1px solid #d5d5d6;display:flex;flex-direction:column;height:11rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_title__OeE35{text-align:center}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_price__hO86a{align-items:center;display:flex;justify-content:center}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_price__hO86a .PricingCard-module_amount__ifS46{align-items:center;display:flex;gap:.5rem;justify-content:center}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_price__hO86a .PricingCard-module_amount__ifS46 h2{width:-moz-fit-content;width:fit-content}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_top__iE1rt .PricingCard-module_billedAnnually__dNaz2{align-items:center;display:flex;flex-direction:column}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_pricing__QcG-M{display:flex;flex-direction:column;margin-top:auto}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_pricing__QcG-M .PricingCard-module_lineThrough__0qlii{text-decoration:line-through}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_pricing__QcG-M .PricingCard-module_interviews__rdAad{align-items:center;display:flex;gap:.5rem;margin-bottom:1rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o{display:flex;flex-direction:column;gap:.5rem;height:12rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o .PricingCard-module_featuresList__-5Lq4{display:flex;flex-direction:column;gap:.15rem;list-style:none;margin:0;padding:0}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o .PricingCard-module_featuresList__-5Lq4 .PricingCard-module_feature__G-g0H{align-items:center;display:flex;gap:.5rem;margin-bottom:.5rem}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o .PricingCard-module_featuresList__-5Lq4 .PricingCard-module_feature__G-g0H .PricingCard-module_icon__wdQd-{fill:#5cbb65}.PricingCard-module_pricingCard__fROTO .PricingCard-module_mainContent__t0fc0 .PricingCard-module_features__SvM6o .PricingCard-module_featuresList__-5Lq4 .PricingCard-module_feature__G-g0H .PricingCard-module_tooltipButton__OMpP9{margin-left:auto}.PricingCard-module_pricingCard__fROTO .PricingCard-module_freeTrialDays__74BiI{margin:0 auto 1rem;text-align:center}";
15089
+ var styles$H = {"pricingCard":"PricingCard-module_pricingCard__fROTO","dark":"PricingCard-module_dark__SzVpk","highlighted":"PricingCard-module_highlighted__ImvM8","highlightMessage":"PricingCard-module_highlightMessage__bFwAe","mainContent":"PricingCard-module_mainContent__t0fc0","top":"PricingCard-module_top__iE1rt","title":"PricingCard-module_title__OeE35","price":"PricingCard-module_price__hO86a","amount":"PricingCard-module_amount__ifS46","billedAnnually":"PricingCard-module_billedAnnually__dNaz2","pricing":"PricingCard-module_pricing__QcG-M","lineThrough":"PricingCard-module_lineThrough__0qlii","interviews":"PricingCard-module_interviews__rdAad","features":"PricingCard-module_features__SvM6o","featuresList":"PricingCard-module_featuresList__-5Lq4","feature":"PricingCard-module_feature__G-g0H","icon":"PricingCard-module_icon__wdQd-","tooltipButton":"PricingCard-module_tooltipButton__OMpP9","freeTrialDays":"PricingCard-module_freeTrialDays__74BiI"};
15815
15090
  styleInject(css_248z$H);
15816
15091
 
15817
15092
  const PricingCard = ({
@@ -15941,7 +15216,12 @@ const PricingCard = ({
15941
15216
  className: styles$H.button,
15942
15217
  disabled: yourPlanText ? true : false,
15943
15218
  onClick: onClick
15944
- })));
15219
+ })), /*#__PURE__*/React__default.createElement(Text, {
15220
+ text: cmsContent.freeTrialDays,
15221
+ italic: true,
15222
+ size: "sm",
15223
+ className: styles$H.freeTrialDays
15224
+ }));
15945
15225
  };
15946
15226
 
15947
15227
  var css_248z$I = ".Radio-module_radioBtnWrapper__iOwkT{align-items:center;display:flex;flex-direction:row}.Radio-module_radioBtnWrapper__iOwkT .Radio-module_MuiRadio-root__kYP8v{height:16px;width:16px}";