






        let API_BASEPATH_ONEFENCE = "https://api.onefence.co/cookiev2/log/accept";
        if (window.isLoaoOnefenceJS === undefined) {
            document.addEventListener("DOMContentLoaded", () => {
                let OA292739b6;
                const data_th={'tenant': 'f2bb8861-4aff-5468-bd85-4d8302c97f99/2c5e48cf-5996-50c6-a331-8a920e2653b2', 'org': 'f2bb8861-4aff-5468-bd85-4d8302c97f99/2c5e48cf-5996-50c6-a331-8a920e2653b2', 'info': {'ip_address': '167.114.118.210', 'location': 'CA', 'device_type': 'Desktop', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0'}, 'setting': {'default_lang': 'th', 'perf_primary_color': '#2ac3ed', 'color_mode': 'light', 'perf_popup_position': 'center', 'primary_color': '#2ac3ed', 'version': '0.2', 'perf_color_mode': 'light', 'perf_text_color': '#000000', 'text_link_color': '#3968f0', 'popup_position': 'bottom', 'background_color': '#fff', 'perf_text_link_color': '#3968f0', 'perf_style': 'style2', 'style': 'style1', 'brand_logo_url': 'https://file-management-public.s3.amazonaws.com/cookie-management/banner/Logo_No_Back-8830f2e0c6cb.png', 'perf_show_brand_logo': 'true', 'show_brand_logo': 'true', 'according_festival': 'true', 'text': {'cookie_policy_link': '', 'perf_cookie_policy_link': '', 'settings': 'ตั้งค่า', 'deny': 'ไม่ยอมรับทั้งหมด', 'save': 'ยอมรับเฉพาะที่เลือก', 'description': 'เราใช้คุกกี้เพื่อให้ท่านสามารถใช้เว็บไซต์ได้อย่างสะดวกสบายยิ่งขึ้น รวมถึงการเลือกคอนเทนต์ที่เหมาะสม การสนับสนุนความปลอดภัย และการวิเคราะห์การทำงานของเว็บไซต์เพื่อพัฒนาบริการของเรา ท่านสามารถเลือก "ตั้งค่า" เพื่อปรับแต่งการยินยอมการใช้คุกกี้ได้ หรือกดปุ่ม "ยอมรับทั้งหมด" เพื่ออนุญาตให้ใช้คุกกี้ทุกประเภท', 'title': 'พวกเราใช้คุกกี้', 'privacy_policy_link': '', 'perf_privacy_policy_link': '', 'accept': 'ยอมรับทั้งหมด', 'privacy_statement': 'นโยบายความเป็นส่วนตัว', 'modal_title': 'จัดการความเป็นส่วนตัว', 'policy_description2': 'หรือ คลิก "{privacy_statement}" หรือ "{cookie_statement}" เพื่อดูเพิ่มเติม', 'banner_accept': 'ยอมรับทั้งหมด', 'always_on': 'ใช้งานเสมอ', 'policy_description': 'หรือ คลิก "{privacy_statement}" เพื่อดูเพิ่มเติม', 'cookie_detail': 'รายละเอียดเพิ่มเติม', 'cookie_statement': 'นโยบายการใช้คุกกี้', 'perf_cookie_statement': 'ชื่อนโยบายคุกกี้', 'perf_cookie_policy': 'ใช่', 'cookie_policy': 'ไม่มี', 'perf_description': ''}, 'text_color': '#0c0c0c', 'opacity': 100.0, 'button_color': '#fff', 'lang': 'th', 'perf_background_color': '#fff', 'icon_logo': 'https://file-management-public.s3.amazonaws.com/cookie-management/banner/Logo_No_Back-43d6d7d4f23e.png', 'icon_position': 'bottom-left', 'perf_brand_logo_url': 'https://file-management-public.s3.amazonaws.com/cookie-management/banner/logo-000552945b27.jpeg', 'on_display': true, 'enable_deny': false, 'perf_button_color': '#fff', 'is_geo_location': true}, 'cookies': [{'Category': 'functional', 'Description': 'บันทึกการเลือกภาษา', 'Name': 'pll_language', 'Expiry': '12 months', 'source': 'unknow source', 'Domain_Label': 'www.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'Path', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'www.caat.or.th'}, {'Category': 'necessary', 'Description': 'ระบุผู้ใช้เพื่อรักษาตัวแปรบนเซสชั่น', 'Name': 'PHPSESSID', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'www.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'cf_clearance', 'Expiry': '12 months', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'necessary', 'Description': 'บันทึกสถานะความยินยอมของผู้ใช้เมื่อกด ยอมรับ หรือ ปฏิเสธ บนแบนเนอร์', 'Name': 'onefence-uuid', 'Expiry': '30 days', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': 'ID สำหรับการระบุตัวผู้ใช้', 'Name': '_ga', 'Expiry': '1 year', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': 'ID สำหรับการระบุตัวผู้ใช้ 24 ชั่วโมงหลังกิจกรรมล่าสุด', 'Name': '_gid', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': 'ใช้เพื่อตรวจสอบจำนวน Requests ของ  Google Analytics เมื่อใช้ Google Tag Manager', 'Name': '_gat', 'Expiry': '23 hours', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'functional', 'Description': 'ป้องกันการโจมตีแบบ Cross-Site Request Forgery', 'Name': 'XSRF-TOKEN', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'tracking-uasportal.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'trackingcaat_session', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'tracking-uasportal.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'ZFtDepgpFMwAG3oYdXI1T4wwWUc89XmOFK3jyI0Y', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'tracking-uasportal.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'EAP_LANGUAGE_SELECT', 'Expiry': '12 months', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'functional', 'Description': 'รักษาเซสชั่นที่ไม่ระบุตัวตนของผู้ใช้งานบนเซิร์ฟเวอร์', 'Name': 'JSESSIONID', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'am', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'marketing', 'Description': 'ติดตามการใช้บริการของ LinkedIn', 'Name': 'cookietest', 'Expiry': '23 hours', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'di', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'i18n_redirected', 'Expiry': '12 months', 'source': 'unknow source', 'Domain_Label': 'register-uasportal.caat.or.th'}, {'Category': 'functional', 'Description': 'รักษาเซสชั่นที่ไม่ระบุตัวตนของผู้ใช้งานบนเซิร์ฟเวอร์', 'Name': 'ASP.NET_SessionId', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'pwd.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'kboxid', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'dtm.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': '_alfTest', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'drms.caat.or.th'}, {'Category': 'functional', 'Description': 'รักษาเซสชั่นขอผู้ใช้โดย laravel_session', 'Name': 'laravel_session', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'cms.ais.caat.or.th'}, {'Category': 'analytics', 'Description': '-', 'Name': '_ga_2VJD44L1GX', 'Expiry': '1 year', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': '-', 'Name': '_gat_gtag_UA_84921254_2', 'Expiry': '23 hours', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': '-', 'Name': '_gat_gtag_UA_128741989_1', 'Expiry': '23 hours', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': '-', 'Name': '_ga_BT8ZDD7G9S', 'Expiry': '1 year', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}], 'category': [{'cetegory_label': 'คุกกี้ที่มีความจำเป็น', 'background': '#2AC3ED', 'cetegory_name': 'necessary', 'description': 'คุกกี้ประเภทที่มีความจำเป็นต้องใช้เพื่อให้การให้บริการหรือการทำงานของหน้าเว็บไซต์สามารถดำเนินการไปได้ (ฐานประโยชน์โดยชอบธรรม 24(5))', 'necessary': true}, {'cetegory_label': 'คุกกี้เพื่อการทำงานของเว็บไซต์', 'background': '#0C1862', 'cetegory_name': 'functional', 'description': 'คุกกี้ที่ทำให้เว็บไซต์สามารถจดจำผู้เข้ามาใช้บริการหรือเยี่ยมชมเว็บไซต์และค่าที่ผู้ใช้บริการเลือก โดยข้อมูลดังกล่าวจะถูกนำไปใช้ในการจัดเนื้อหาบนหน้าเว็บไซต์ให้เหมาะสมกับผู้เข้าชมเว็บไซต์แต่ละรายได้ (ฐานความยินยอมมาตรา 24)', 'necessary': false}, {'cetegory_label': 'คุกกี้เพื่อประสิทธิภาพ', 'background': '#A461D8', 'cetegory_name': 'analytics', 'description': 'คุกกี้ที่ช่วยให้บริษัท ทราบถึงการปฏิสัมพันธ์ของผู้ใช้งานในการใช้บริการเว็บไซต์ของบริษัท รวมถึงหน้าเพจหรือพื้นที่ใดของเว็บไซต์ที่ได้รับความนิยม ตลอดจนการวิเคราะห์ข้อมูลด้านอื่น ๆ บริษัทยังใช้ข้อมูลนี้เพื่อการปรับปรุงการทำงานของเว็บไซต์ และเพื่อเข้าใจพฤติกรรมของผู้ใช้งานมากขึ้น (ฐานความยินยอมมาตรา 24)', 'necessary': false}, {'cetegory_label': 'คุกกี้เพื่อการตลาด', 'background': '#FADB14', 'cetegory_name': 'marketing', 'description': 'คุกกี้ที่จะทำการติดตามกิจกรรมต่าง ๆ ที่ผู้บริโภคทำบนช่องทางออนไลน์ และช่วยในการส่งเสริมการขายโดยการปล่อยโฆษณาต่าง ๆ ไปยังผู้บริโภคได้อย่างสอดคล้องยังผู้บริโภคได้อย่างสอดคล้องกับพฤติกรรมของผู้บริโภคแต่ละรายให้มากยิ่งขึ้น (ฐานความยินยอมมาตรา 24)', 'necessary': false}, {'cetegory_label': 'คุกกี้ที่ยังไม่ได้จัดประเภท', 'background': '#EC145A', 'cetegory_name': 'unclassified', 'description': 'คุกกี้ที่ไม่สามารถระบุประเภทได้', 'necessary': false}], 'language': 'th', 'last_update': '2024-09-04T09:19:28Z', 'domainID': '86ddb046-df75-11ee-8ffc-eabade4c7f80'}
                const data_en={'tenant': 'f2bb8861-4aff-5468-bd85-4d8302c97f99/2c5e48cf-5996-50c6-a331-8a920e2653b2', 'org': 'f2bb8861-4aff-5468-bd85-4d8302c97f99/2c5e48cf-5996-50c6-a331-8a920e2653b2', 'info': {'ip_address': '167.114.118.210', 'location': 'CA', 'device_type': 'Desktop', 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; rv:60.0) Gecko/20100101 Firefox/60.0'}, 'setting': {'default_lang': 'en', 'perf_primary_color': '#2ac3ed', 'color_mode': 'light', 'perf_popup_position': 'center', 'primary_color': '#2ac3ed', 'version': '0.2', 'perf_color_mode': 'light', 'perf_text_color': '#000000', 'text_link_color': '#3968f0', 'popup_position': 'bottom', 'background_color': '#fff', 'perf_text_link_color': '#3968f0', 'perf_style': 'style2', 'style': 'style1', 'brand_logo_url': 'https://file-management-public.s3.amazonaws.com/cookie-management/banner/Logo_No_Back-8830f2e0c6cb.png', 'perf_show_brand_logo': 'true', 'show_brand_logo': 'true', 'according_festival': 'true', 'text': {'cookie_policy_link': '', 'perf_cookie_policy_link': '', 'settings': 'CUSTOMIZE ', 'deny': 'REJECT ALL', 'save': 'ALLOW SELECTED COOKIES', 'description': 'We use cookies to ensure you have a good experience browsing on our website. They help us show you more relevant contents, support your security, and analyze our performance. Because we are aware that your privacy is important, you can click “Customize” to manage your settings, or click “Accept All” to allow all cookies to be used on the website.', 'title': 'We use cookies', 'privacy_policy_link': '', 'perf_privacy_policy_link': '', 'accept': 'ALLOW ALL', 'privacy_statement': 'Privacy Policy', 'modal_title': 'Privacy Manager', 'policy_description2': 'Click {privacy_statement} or {cookie_statement} for more information', 'banner_accept': 'Accept All', 'always_on': 'Always Active', 'policy_description': 'Click {privacy_statement} for more information', 'cookie_detail': 'Cookie detail', 'cookie_statement': 'Cookie Policy', 'perf_cookie_statement': 'Cookie Name', 'perf_cookie_policy': 'Yes', 'cookie_policy': 'No', 'perf_description': ''}, 'text_color': '#0c0c0c', 'opacity': 100.0, 'button_color': '#fff', 'lang': 'th', 'perf_background_color': '#fff', 'icon_logo': 'https://file-management-public.s3.amazonaws.com/cookie-management/banner/Logo_No_Back-43d6d7d4f23e.png', 'icon_position': 'bottom-left', 'perf_brand_logo_url': 'https://file-management-public.s3.amazonaws.com/cookie-management/banner/logo-000552945b27.jpeg', 'on_display': true, 'enable_deny': false, 'perf_button_color': '#fff', 'is_geo_location': true}, 'cookies': [{'Category': 'functional', 'Description': 'Saves the chosen language.', 'Name': 'pll_language', 'Expiry': '12 months', 'source': 'unknow source', 'Domain_Label': 'www.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'Path', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'www.caat.or.th'}, {'Category': 'necessary', 'Description': 'Cookie generated by applications based on the PHP language. This is a general purpose identifier used to maintain user session variables. It is normally a random generated number, how it is used can be specific to the site, but a good example is maintaining a logged-in status for a user between pages.', 'Name': 'PHPSESSID', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'www.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'cf_clearance', 'Expiry': '12 months', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'necessary', 'Description': "This cookie is used to log the user's consent status when they click either Accept or Decline on the banner", 'Name': 'onefence-uuid', 'Expiry': '30 days', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': 'ID used to identify users', 'Name': '_ga', 'Expiry': '1 year', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': 'ID used to identify users for 24 hours after last activity', 'Name': '_gid', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': 'Used to monitor number of Google Analytics server requests when using Google Tag Manager', 'Name': '_gat', 'Expiry': '23 hours', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'functional', 'Description': 'This cookie is written to help with site security in preventing Cross-Site Request Forgery attacks.', 'Name': 'XSRF-TOKEN', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'tracking-uasportal.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'trackingcaat_session', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'tracking-uasportal.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'ZFtDepgpFMwAG3oYdXI1T4wwWUc89XmOFK3jyI0Y', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'tracking-uasportal.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'EAP_LANGUAGE_SELECT', 'Expiry': '12 months', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'functional', 'Description': 'JSESSIONID is a platform session cookie and is used by sites with JavaServer Pages (JSP). The cookie is used to maintain an anonymous user session by the server.', 'Name': 'JSESSIONID', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'am', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'marketing', 'Description': 'Used by LinkedIn to track the use of embedded services.', 'Name': 'cookietest', 'Expiry': '23 hours', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'functional', 'Description': 'Device identification for attack protection.', 'Name': 'di', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'service.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'i18n_redirected', 'Expiry': '12 months', 'source': 'unknow source', 'Domain_Label': 'register-uasportal.caat.or.th'}, {'Category': 'functional', 'Description': 'General purpose platform session cookie, used by sites written with Microsoft .NET based technologies. Usually used to maintain an anonymised user session by the server.', 'Name': 'ASP.NET_SessionId', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'pwd.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': 'kboxid', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'dtm.caat.or.th'}, {'Category': 'functional', 'Description': '-', 'Name': '_alfTest', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'drms.caat.or.th'}, {'Category': 'functional', 'Description': 'Internally laravel uses laravel_session to identify a session instance for a user', 'Name': 'laravel_session', 'Expiry': 'session', 'source': 'unknow source', 'Domain_Label': 'cms.ais.caat.or.th'}, {'Category': 'analytics', 'Description': '-', 'Name': '_ga_2VJD44L1GX', 'Expiry': '1 year', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': '-', 'Name': '_gat_gtag_UA_84921254_2', 'Expiry': '23 hours', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': '-', 'Name': '_gat_gtag_UA_128741989_1', 'Expiry': '23 hours', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}, {'Category': 'analytics', 'Description': '-', 'Name': '_ga_BT8ZDD7G9S', 'Expiry': '1 year', 'source': 'unknow source', 'Domain_Label': '.caat.or.th'}], 'category': [{'cetegory_label': 'Strictly Necessary Cookies', 'background': '#2AC3ED', 'cetegory_name': 'necessary', 'description': 'These cookies are required to ensure the website can work properly.  They cannot be disabled.', 'necessary': true}, {'cetegory_label': 'Functionality Cookies', 'background': '#0C1862', 'cetegory_name': 'functional', 'description': 'These cookies help the website to remenber your choices, including the language, your region, and log-in information.  They are used to improve your experience and provide you with convenience on the website.', 'necessary': false}, {'cetegory_label': 'Performance Cookies', 'background': '#A461D8', 'cetegory_name': 'analytics', 'description': 'These cookies collect information about how you use the website, such as which links you clicked on.  They are solely used to improve the performance of this website.', 'necessary': false}, {'cetegory_label': 'Marketing Cookies', 'background': '#FADB14', 'cetegory_name': 'marketing', 'description': 'These cookies track your activity to enable advertising personalization.  They help to deliver relevant advertising.', 'necessary': false}, {'cetegory_label': 'Unclassified Cookies', 'background': '#EC145A', 'cetegory_name': 'unclassified', 'description': 'These cookies cookies that have not been categorized into the above groups', 'necessary': false}], 'language': 'en', 'last_update': '2024-09-04T09:19:28Z', 'domainID': '86ddb046-df75-11ee-8ffc-eabade4c7f80'}
                if(window.location.href.includes('/en') || window.location.href.includes('/EN') || window.location.href.includes('=EN') || window.location.href.includes('=en')) {
                OA292739b6 = data_en;
                } else if(window.location.href.includes('/th') || window.location.href.includes('/TH') || window.location.href.includes('=TH') || window.location.href.includes('=th')) {
                OA292739b6 = data_th;
                } else {
                    function countThaiCharacters(text) {
                            const thaiPattern = /[ก-๚]/g;
                            const matches = text.match(thaiPattern);
                            return matches ? matches.length : 0;
                        }
                    function countECharacters(text) {
                            const englishPattern = /[A-Za-z]+/g;
                            const matches = text.match(englishPattern );
                            return matches ? matches.length : 0;
                        }
                    
                        const pageText = document.body.textContent || document.body.innerText;
                        if (countThaiCharacters(pageText) / pageText.length>0.05) {
                            OA292739b6 = data_th;
                        } else {
                            OA292739b6 = data_en;
                        }
                }
                    
                gdpfGetAllowedCookies(OA292739b6);
                var e = new gdprCookieNotice(OA292739b6);
                e.init();
                window.isLoaoOnefenceJS = true;
            })
        }