PageSourceSearch

https://moe.gov.ae/En/Documents/chatbotscript/livechat.js

js moe.gov.ae collected 2026-09-24 08:56:53 UTC 24,542 bytes, 683 lines download raw bytes

1var _urlParams = new URLSearchParams(window.location.search);
2
3var isArabicLang = window._spPageContextInfo ? window._spPageContextInfo.currentLanguage === 1025 ? true : false : false;
4if (_urlParams.get('language') == 'ar') {
5  isArabicLang = true;
6}
7if (_urlParams.get('language') == 'ar') {
8  isArabicLang = true;
9}
10function initNiceChat() {
11  (async function (i, s, o, r, g, v, a, m) {
12    // Define a promise to handle the script loading
13    function loadScript(src) {
14      return new Promise((resolve, reject) => {
15        a = s.createElement(o);
16        m = s.getElementsByTagName(o)[0];
17        a.async = 1;
18        a.src = src;
19        a.onload = resolve; // Resolve the promise when the script is loaded
20        a.onerror = reject; // Reject the promise if there's an error loading the script
21        m.parentNode.insertBefore(a, m);
22      });
23    }
24
25    // Load the script asynchronously
26    g = v ? g + "?v=" + v : g;
27    i["BrandEmbassy"] = r;
28    i[r] =
29      i[r] ||
30      function () {
31        (i[r].q = i[r].q || []).push(arguments);
32      };
33    i[r].l = +new Date();
34
35    try {
36      await loadScript(g + "?" + Math.round(Date.now() / 1000 / 3600));
37      if (isArabicLang) {
38        // Arabic Chat
39        brandembassy('init', 1012, 'chat_068bd3b4-ab84-40ce-a6b8-9658e65a9143');
40        // Set Arabic Translation
41        brandembassy('setTranslations', arabicTranslation);
42        // Set Arabic Translation for [Email Address] 
43        brandembassy('setTranslation', 'Email Address', 'البريد الالكتروني');
44        // Set Arabic Translation for [Contact Number]
45        brandembassy('setTranslation', 'Contact Number', 'رقم التواصل');
46        brandembassy('setPositionX', 'left');
47            brandembassy('sendFirstMessageAutomatically', '/begin_conversation');
48
49      } else {
50        // English Chat
51        brandembassy("init", 1012, "chat_49579cea-2efd-411d-b531-5f31d688346d");
52        brandembassy('setPositionX', 'right');
53            brandembassy('sendFirstMessageAutomatically', '/begin_conversation');
54
55      }
56      handelingUserCookies(brandembassy)
57      // handelMobileAppParams  like [fullName, emailAddress, contactNumber]
58      handelMobileAppParams(brandembassy);
59      // Check If this is a mobile app channel to [Hide Header, Hide Popups, Open Chat Window, Set Full Display]
60      handelMobileChannel(brandembassy);
61      // Set the Customer Name, Email, and Phone
62      brandembassy("setCustomCss", liveChatStyle(getColorTheme(), checkDarkMode()));
63
64      // set horizontal and vertical offset
65      brandembassy('setOffsetX', '30'); // default = 20
66      brandembassy('setOffsetY', '20'); // default = 20
67
68      handelStyleIcon();
69    } catch (error) {
70      // Error occurred while loading the script
71      console.error("Error loading BrandEmbassy script:", error);
72    }
73  })(
74    window,
75    document,
76    "script",
77    "brandembassy",
78    "https://livechat-static-de-ae1.nicecxone.com/4/chat.js"
79  );
80}
81
82//======================================================================
83// Live Chat Style
84//======================================================================
85const liveChatStyle = (primaryColor = "#99742d", isDark = false) => {
86  return `
87    :root {
88      --primary-color: ${primaryColor};
89      --light-color: ${isDark ? "#18181b" : "#fff"} ;
90      --body-bg: ${isDark ? "#18181b" : "#fff"};
91      --text-color: ${isDark ? "#fff" : "#333"};
92      --disabled-color: ${isDark ? "#303030" : "#e4e4e4c4"};
93      --chat-icon: "\\e006"
94    }
95
96    #be-app{
97        display: flex;
98        align-items: center;
99        justify-content: center;
100        width: 60px;
101    }
102
103    #be-messenger {
104      background-color: transparent !important;
105      
106    }
107
108    body:has(#be-messenger) {
109      background-color: transparent !important;
110    }
111
112    #be-messenger [data-selector="CUSTOMER_MESSAGE_BUBBLE"] {
113      background-color: var(--primary-color, #99742d) !important;
114      color: #fff !important;
115      border-radius: 0.5rem !important;
116    }
117
118    #be-messenger [data-selector="AGENT_MESSAGE_BUBBLE"] {
119      background-color: var(--light-color, #f5f5f5) !important;
120      color: var(--text-color, #333) !important;
121      border-radius: 0.5rem !important;
122    }
123
124    [data-selector="INPUT"] input {
125      border-radius: 0.5rem !important;
126    }
127
128    [data-selector="INPUT"] [class^="Input_Field__"] {
129      // border: 0 !important;
130    }
131
132    [data-selector="WINDOW"] * {
133      font-family: "Droid Arabic Kufi", "roboto", sans-serif !important;
134      ${isArabicLang ? "direction: rtl !important;" : ""}
135    }
136    [data-selector="INPUT"] [class^="FormField_Label__"] {
137      ${isArabicLang ? "text-align: right !important;" : ""}
138    }
139
140    [data-selector="QUICK_REPLIES"] button {
141      background-color: var(--primary-color, #99742d) !important;
142      padding: 0.5rem 1rem;
143      border-radius: 0.5rem;
144      height: 36px;
145    }
146
147    [data-selector="QUICK_REPLIES"] button:hover {
148      background-color: var(--primary-color, #99742d) !important;
149    }
150
151    #be-messenger .Widget_isOffline__adNnJ .Widget_Status__a9tYr {
152      background-color: #ff0000 !important;
153    }
154
155    #be-messenger [data-selector="PRIMARY_BUTTON"] {
156      padding-inline: 0rem !important;
157      background-color: transparent !important;
158    }
159
160    #be-messenger [data-selector="DELIMITER"] [class^="Transcript_Main"],
161    #be-messenger [data-selector="DELIMITER"] [class^="Delimiter_Label__"] {
162      background-color: var(--body-bg) !important;
163    }
164
165    #be-messenger [data-selector="PRIMARY_BUTTON"] [class^="Button_Button"] {
166      padding-inline: 0rem !important;
167      background-color: var(--primary-color, #99742d) !important;
168      color: #fff !important;
169      border-radius: 0.5rem !important;
170    }
171
172    #be-messenger [class^="EndSession_Footer__"] {
173      display: flex;
174      gap: 1rem;
175      flex-direction: column;
176    }
177
178    #be-messenger [class^="EndSession_Footer__"] [class^="EndSession_Button__"] {
179      padding: 0.5rem !important;
180      display: flex !important;
181      align-items: center;
182      justify-content: center;
183      gap: 0.5rem;
184      color: var(--text-color) !important;
185    }
186
187    #be-messenger [class^="EndSession_Footer__"] [class^="EndSession_Button__"] svg {
188      fill: var(--text-color) !important;
189    }
190
191    /* Form Fields */
192    [data-selector="PRECONTACT_SURVEY"] [class^="StartSession_Overflow__"] {
193      display: flex !important;
194      flex-direction: column !important;
195      gap: 1rem !important;
196    }
197
198    #be-messenger .Widget_Status__a9tYr {
199      background-color: #00ff00 !important;
200    }
201
202    #be-messenger .BrandLabel_BrandLabel__KxS\+Y {
203      display: none !important;
204    }
205
206    #be-messenger .ScrollbarsCustom-Content [data-selector="INPUT"] {
207      margin: 0 !important;
208    }
209
210    /* Chat Header */
211    #be-messenger [data-selector="HEADER"] {
212      background-color: var(--primary-color, #99742d) !important;
213      color: #fff !important;
214      border-radius: 0.5rem 0.5rem 0 0 !important;
215    }
216
217    #be-messenger [data-selector="HEADER"] button {
218      color: #fff !important;
219      background-color: transparent !important;
220    }
221
222    /* Button Chat */
223    #be-messenger [data-selector="WIDGET"] {
224      border: 1px solid var(--primary-color) !important;
225      background-color: var(--body-bg) !important;
226      width: 55px !important;
227      height: 55px !important;
228      text-decoration: none !important;
229      border-radius: 50% !important;
230      transition: all 0.25s ease-in-out;
231      display: flex;
232      flex-direction: column;
233      align-items: center;
234      justify-content: center;
235      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25) !important;
236      color: var(--primary-color) !important;
237      opacity: 1;
238      z-index: 998;
239      margin-bottom: 0 !important;
240      background-color: var(--body-bg) !important;
241      display: flex;
242      align-items: center;
243      justify-content: center;
244      margin: auto;
245    }
246
247    #be-messenger [data-selector="WIDGET"][class*="Widget_isOffline"] {
248      border: 2px solid #ff0000 !important;
249    }
250
251    #be-messenger [class^="Window_Body__"],
252    #be-messenger [class^="Window_Body__"]>div {
253      background-color: var(--body-bg) !important;
254    }
255
256    #be-messenger [class*="Widget_isOffline"] [class^="Widget_Icon__"] {
257      color: #ff0000 !important;
258      opacity: 1;
259    }
260    #be-messenger [class*="Widget_isOffline"] [class^="Widget_Icon__"] [class="be-icon-envelope"]:before{
261          content: var(--chat-icon) !important   
262    }
263
264    #be-messenger.be-messenger-minimized {
265        position: relative;
266        display: flex;
267        align-items: center;
268        justify-content: center;
269        width: 60px;
270        height: 60px;
271    }
272 #be-frame.be-frame-default {
273        width: 320px;
274        height: 465px;
275      }
276    /* Chat Window */
277    #be-messenger {
278      border-radius: 0.25rem !important;
279    }
280
281    #be-messenger [data-selector="WIDGET"]:hover {
282      box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.3);
283      background-color: var(--primary-color, #99742d) !important;
284      color: #fff !important;
285    }
286
287    #be-messenger [class^="Widget_Icon__"] {
288      margin: 0 !important;
289      font-size: 1.5rem !important;
290      transition: all 0.3s ease;
291    }
292
293    #be-messenger [data-selector="WIDGET"]:hover [class^="Widget_Icon__"] {
294      transform: rotate(10deg);
295    }
296
297    [data-selector="ACTIVITY_BAR"] [class^="WaitingQueueModal_"] {
298      background-color: var(--disabled-color) !important;
299    }
300
301    #be-messenger [class^="Widget_Status__"],
302    #be-messenger [class^="Widget_Text__"] {
303      display: none !important;
304    }
305
306    #be-messenger [data-selector="UPLOAD_ATTACHMENT_BUTTON"],
307    #be-messenger [class^="ReplyBox_ReplyBox__"],
308    #be-messenger [class^="SystemMessage_HistoryItemContent__"],
309    #be-messenger [class^="Input_Field__"],
310    #be-messenger select,
311    #be-messenger textarea,
312    #be-messenger input {
313      background-color: var(--body-bg) !important;
314      color: var(--text-color) !important;
315    }
316
317    #be-messenger [class^="StartSession_StartSession__"],
318    #be-messenger [class^="StartSession_Footer__"] {
319      background-color: var(--body-bg) !important;
320    }
321
322    #be-messenger [class^="ConnectionStatus_ConnectionStatus__"] .mui-vubbuv,
323    [class^="ConnectionStatus_ConnectionStatus"] {
324      background-color: var(--body-bg) !important;
325      color: var(--text-color) !important;
326    }
327
328    .be-messenger-minimized {
329      background-color: transparent !important;
330    }
331  `;
332};
333
334//======================================================================
335// Get the color theme from the URL
336//======================================================================
337const getColorTheme = () => {
338  var themeColor = $("body").attr("data-color");
339  // themeColor
340  if (_urlParams.get("themeColor")) {
341    themeColor = _urlParams.get("themeColor").toLowerCase();
342    // remove hash if exists from the color
343    themeColor = themeColor.replace("#", "");
344  }
345
346  const colorsMap = {
347    red: "#d83731",
348    green: "#3f8e50",
349    blue: "#00abeb",
350    primary: "#99742d",
351  };
352
353  switch (themeColor) {
354    case "gold-theme":
355      return colorsMap.primary;
356    case "gold":
357      return colorsMap.primary;
358    case "red-theme":
359      return colorsMap.red;
360    case "red":
361      return colorsMap.red;
362    case "green-theme":
363      return colorsMap.green;
364    case "green":
365      return colorsMap.green;
366    case "blue-theme":
367      return colorsMap.blue;
368    case "blue":
369      return colorsMap.blue;
370    case "99742d":
371      return colorsMap.primary;
372    case "d83731":
373      return colorsMap.red;
374    case "3f8e50":
375      return colorsMap.green;
376    case "00abeb":
377      return colorsMap.blue;
378    default:
379      return colorsMap.primary;
380  }
381};
382
383//======================================================================
384// Check if the dark mode is enabled
385//======================================================================
386const checkDarkMode = () => {
387  const isDarkMode = document.body.classList.contains("dark-mode") ? true : false;
388  // brightness param dark/light
389  const isBrightnessDark = _urlParams.get("brightness") == "dark" ? true : false;
390
391  const isDarkEnable = localStorage.getItem("dark-mode") == "true"  || localStorage.getItem("darkMode") == "true" ? true : false;
392
393
394  return isDarkMode || isBrightnessDark || isDarkEnable;
395};
396
397//======================================================================
398// Set Arabic Translation for the chat window
399//======================================================================
400const arabicTranslation = {
401  allAgentsForQueueAreBusy: 'جميع الوكلاء المخصصون مشغولون حاليًا. هناك {queue, plural, one {شخص واحد} other {أشخاص}} {queue, number} قبلك في الطابور.',
402  beginButton: 'ابدأ الدردشة!',
403  cancel: 'إلغاء',
404  caseNumber: 'رقم الطلب #{caseNumber}',
405  change: 'تغيير',
406  chattedWith: 'لقد أجريت للتو محادثة مع',
407  commonErrorText: 'حدث خطأ غير متوقع. الرجاء المحاولة مرة أخرى لاحقًا.',
408  done: 'تم',
409  dragAndDropDropzone: 'اسحب وأفلت الملفات هنا لإرسالها',
410  dragAndDropDropzoneRejected: 'تعذر تحميل الملف :(',
411  EmailLabel: 'البريد الإلكتروني',
412  endChat: 'إنهاء الدردشة',
413  endChatTitle: 'هل أنت متأكد أنك تريد إنهاء هذه المحادثة؟',
414  endGame: 'إنهاء اللعبة',
415  ending: 'جارٍ إنهاء الدردشة...',
416  fileSendingFailed: 'فشل إرسال الملف',
417  getTranscriptDescription: 'إرسال نسخة من هذه المحادثة إلى العنوان البريد الإلكتروني التالي:',
418  getTranscriptLink: 'احصل على نسخة المحادثة',
419  invalidToken: 'رمز غير صالح',
420  ipAddressBlocked: 'تم حظر عنوان الـ IP',
421  loading: 'جارٍ التحميل ...',
422  loadPreviousButton: 'تحميل المحادثات السابقة',
423  messageLabel: 'رسالة',
424  networkErrorText: 'كان هناك خطأ في الشبكة. الرجاء المحاولة مرة أخرى.',
425  newCase: 'طلب جديدة',
426  noAgentOnlineForQueue: 'لا يوجد وكيل متاح في الوقت الحالي.',
427  offline: 'غير متصل',
428  offlineFormDesc: 'نحن غير متاحين في الوقت الحالي',
429  offlineFormSuccessMsgHead: 'شكرًا لك!',
430  offlineFormSuccessMsgSub: 'تم إرسال بريدك الإلكتروني بنجاح. سنعود إليك قريبًا.',
431  online: 'متصل',
432  onlineFormText: 'لبدء الدردشة، يرجى إخبارنا باسمك. سيبدأ أحد وكلائنا في مساعدتك على الفور.',
433  pleaseSelect: 'يرجى الاختيار...',
434  poweredBy: 'مشغل بواسطة',
435  preparingSession: 'جارٍ تحضير الجلسة...',
436  replyBoxPlaceholder: 'اكتب هنا، واضغط ENTER للإرسال',
437  retry: 'أعد المحاولة',
438  sendFileTextSize: 'الرجاء رفع ملفات أصغر من {filesize}',
439  sendFileTextSupportedFormat: 'تنسيقات مدعومة.',
440  sendFileTextSupportedFormatDesc: 'صور، فيديوهات، {fileFormats}',
441  sendMessageButton: 'إرسال رسالة',
442  sendNewEmail: 'إرسال بريد إلكتروني جديد',
443  sendTranscript: 'إرسال النسخة',
444  snakeWaiting: 'أنت {queue} في .',
445  startChatInPopup: 'اسألنا!',
446  startNewChat: 'ابدأ دردشة جديدة',
447  statusReconnecting: 'يحاول الاتصال…',
448  surveySuccesfullySent: 'شكرًا على ملاحظاتك!',
449  systemChattingWith: 'أنت الآن تدردش مع {name}',
450  topic: 'الموضوع',
451  transciptSentFailed: 'فشل الإرسال.',
452  transciptSuccesfullySent: 'تم إرسال النسخة بنجاح!',
453  tryAgainButton: 'حاول مرة أخرى',
454  unexpectedError: 'خطأ غير متوقع.',
455  validationInvalidEmail: 'عنوان البريد الإلكتروني غير صالح',
456  validationMandatory: 'هذا الحقل إلزامي',
457  validationShorterName: 'الرجاء استخدام اسم أقصر',
458  validationShortMessage: 'رسالتك قصيرة جدًا',
459  waiting: 'انتظار...',
460  waitingDescription: 'سيتحدث معك أحد وكلائنا قريبًا.',
461  waitingFooter: 'اضغط على <spacebar> لتقصير وقت الانتظار.',
462  waitingForAgent: 'في انتظار الوكيل...',
463  waitingInQueue: 'في انتظار الوكيل. أنت {queue} في الطابور.',
464  yourNameLabel: 'اسمك',
465   turnOffAudioNotification:'إيقاف الإشعار الصوتي',
466      turnOnAudioNotification:'تشغيل الإشعار الصوتي',
467      chattedWith:'قمت بالدردشة مع {name}',
468      chattedWithAgent:'قمت بالدردشة مع',
469      backToConversations:'رجوع إلى المحادثة',
470      agentHasJoinedTheChat:'{agentName} قام بالانضمام للمحادثة ',
471      youAreBeingTransferred:'تم تحويل محادثتك، الرجاء الانتظار.',
472      agentHasLeftTheChat:"{agentName} قام بالخروج من المحادثة"
473};
474
475//======================================================================
476// Get the value of a cookie by its name from the document
477//======================================================================
478// 1) Get Cookies
479function getCookie(cookieName) {
480  const cookies = document.cookie.split(";");
481
482  for (let i = 0; i < cookies.length; i++) {
483    const cookie = cookies[i].trim();
484
485    // Check if the cookie starts with the desired name
486    if (cookie.startsWith(cookieName + "=")) {
487      // Return the value of the cookie
488      return cookie.substring(cookieName.length + 1);
489    }
490  }
491
492  // Return null if the cookie is not found
493  return null;
494}
495
496// 2) Handeling User Cookies
497const handelingUserCookies = (brandembassy) => {
498  try {
499
500    const userInfoCookieValue = getCookie("userInfo");
501
502    // Check if the user info cookie exists
503    if (userInfoCookieValue) {
504      // Split the string into key-value pairs
505      const keyValuePairs = userInfoCookieValue.split("&");
506
507      // Initialize an object to store the extracted values
508      const extractedValues = {};
509
510      // Loop through key-value pairs and extract the values
511      keyValuePairs.forEach((pair) => {
512        const [key, value] = pair.split("=");
513        extractedValues[key] = value;
514      });
515
516      // Access the extracted values
517      const userEmail = extractedValues["UserEmail"];
518      const userPhone = extractedValues["UserPhone"];
519      const userFullName = extractedValues["UserFullName"];
520
521      brandembassy("setCustomerName", userFullName);
522      brandembassy("setCustomField", "emailaddress", userEmail);
523      brandembassy("setCustomField", "contactnumber", userPhone);
524    } else {
525      // brandembassy("autoStartSession");
526    }
527  } catch (e) {
528    console.log('error in handelingUserCookies', e);
529  }
530}
531
532//======================================================================
533// Set the user information in the chat window
534//======================================================================
535const handelMobileAppParams = (brandembassy) => {
536  try {
537
538    if (_urlParams.has("fullName") || _urlParams.has("emailAddress") || _urlParams.has("contactNumber")) {
539      // Get the user name
540      const _userEmail = _urlParams.get("emailAddress") || "";
541      // Get the user email
542      const _userFullName = _urlParams.get("fullName") || "";
543      // Get the user phone
544      const _userPhone = _urlParams.get("contactNumber") || "";
545      if (_userFullName) {
546        brandembassy("setCustomerName", _userFullName);
547      }
548
549      if (_userEmail) {
550        brandembassy("setCustomField", "emailaddress", _userEmail);
551      }
552
553      if (_userPhone) {
554        brandembassy("setCustomField", "contactnumber", _userPhone);
555      }
556
557      if (_userFullName && _userEmail) {
558        brandembassy("autoStartSession");
559        brandembassy("sendFirstMessageAutomatically", "/begin_conversation");
560      }
561      console.log(_userFullName, _userEmail, _userPhone);
562    } else if ((localStorage.getItem('userFullName') && localStorage.getItem('userFullName') != 'null') || (localStorage.getItem('userEmail') && localStorage.getItem('userEmail') != 'null') || (localStorage.getItem('userPhone') && localStorage.getItem('userPhone') != 'null')) {
563      // Get the user name
564      const _userEmail = localStorage.getItem('userEmail') || "";
565      // Get the user email
566      const _userFullName = localStorage.getItem('userFullName') || "";
567      // Get the user phone
568      const _userPhone = localStorage.getItem('userPhone') || "";
569      if (_userFullName) {
570        brandembassy("setCustomerName", _userFullName);
571      }
572
573      if (_userEmail) {
574        brandembassy("setCustomField", "emailaddress", _userEmail);
575      }
576
577      if (_userPhone) {
578        brandembassy("setCustomField", "contactnumber", _userPhone);
579      }
580
581      if (_userFullName && _userEmail) {
582        brandembassy("autoStartSession");
583        brandembassy("sendFirstMessageAutomatically", "/begin_conversation");
584      }
585      console.log(_userFullName, _userEmail, _userPhone);
586    } else {
587      console.log('No Params Found to Set User Info in Chat Window')
588    }
589  } catch (e) {
590    console.log('error in handelMobileAppParams', e);
591  }
592}
593
594//======================================================================
595// Check If this is a mobile app channel to [Hide Header, Hide Popups, Open Chat Window, Set Full Display]
596//======================================================================
597const handelMobileChannel = (brandembassy) => {
598  try {
599    if (_urlParams.get("channel") == "2" || (localStorage.getItem('sourceChannel') && localStorage.getItem('sourceChannel') == 'mobileWebView') && window.location.pathname.includes('Live-Chat.aspx')) {
600       brandembassy("setFullDisplay");
601      brandembassy("openChatWindow");
602      brandembassy("hidePopups");
603      brandembassy("hideHeader");
604      console.log('Mobile App Channel Detected')
605    }
606  } catch (e) {
607    console.log('error in handelMobileChannel', e);
608  }
609}
610
611const handelStyleIcon = () => {
612  // Create a <style> element
613  var styleElement = document.createElement('style');
614
615  // Define your CSS rules
616  var css = `
617      .ms-SPZone .loading-spinner,
618      /* .ms-webpart-zone .loading-spinner, */
619      .ms-core-form .loading-spinner {
620          display: none !important;
621      }
622
623      #be-frame.be-frame-minimized {
624         width: 60px !important;
625        padding-inline: 0 !important;
626        height: 60px !important;
627        bottom: 16px !important;
628      }
629       #be-frame {
630          }
631
632
633      @media (max-width: 768px) {
634        #be-frame {
635    left: 12px !important;
636     right: auto !important; 
637        }
638
639        //   .be-frame-minimized {
640        //   width: 100px !important;
641        //   }
642      }
643
644      .rtl #be-frame {
645            left: 30px !important;
646      }
647
648      .rtl .be-frame-minimized {
649          width: 140px !important;
650      }
651
652      .loading-spinner {
653          position: fixed;
654          top: 50%;
655          left: 50%;
656          transform: translate(-50%, -50%);
657          z-index: 99999999;
658          display: flex;
659          align-items: center;
660          justify-content: center;
661          background-color: var(--body-bg);
662          width: 100%;
663          height: 100%;
664      }
665
666      .chatbot-icon-btn {
667          visibility: hidden !important;
668          max-height: 20px !important;
669      }
670  `;
671
672  // Set the style content
673  styleElement.innerHTML = css;
674
675  // Append the <style> element to the <head>
676  document.head.appendChild(styleElement);
677
678}
679
680initNiceChat()
681window.liveChatStyle = liveChatStyle;
682window.getColorTheme = getColorTheme;
683window.checkDarkMode = checkDarkMode;

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.