HEX
Server: LiteSpeed
System: Linux s166.bitcommand.com 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User: h340499 (1922)
PHP: 8.2.16
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/h340499/public_html/wp-content/plugins/learnpress/assets/js/admin/utils-admin.min.js
import*as Utils from"../utils.js";import TomSelect from"tom-select";import Api from"../api.js";const AdminUtilsFunctions={buildTomSelect(t,e,o,n,i){if(!t)return;const s={plugins:{remove_button:{title:"Remove this item"},dropdown_input:{}},onInitialize(){},onItemAdd(e){if(o){const s=Array.from(t.selectedOptions).map(t=>t.value);s.push(e),n.id_not_in=s.join(","),o("",n,i)}}};o&&(s.load=(e,s)=>{const c=Array.from(t.selectedOptions).map(t=>t.value);n.id_not_in=c.join(","),o(e,n,AdminUtilsFunctions.callBackTomSelectSearchAPI(s,i))});(e={...s,...e}).options;return new TomSelect(t,e)},callBackTomSelectSearchAPI:(t,e)=>({success:o=>{const n=e.success(o);t(n)}}),fetchCourses(t="",e={},o){const n=Api.admin.apiSearchCourses;e.search=t;const i={headers:{"Content-Type":"application/json","X-WP-Nonce":lpDataAdmin.nonce},method:"POST",body:JSON.stringify(e)};Utils.lpFetchAPI(n,i,o)},fetchUsers(t="",e={},o){const n=Api.admin.apiSearchUsers;e.search=t;const i={headers:{"Content-Type":"application/json","X-WP-Nonce":lpDataAdmin.nonce},method:"POST",body:JSON.stringify(e)};Utils.lpFetchAPI(n,i,o)}};export{Utils,AdminUtilsFunctions,Api};