HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux WebLive 5.15.0-79-generic #86-Ubuntu SMP Mon Jul 10 16:07:21 UTC 2023 x86_64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wptoho/wp-content/themes/themify-ultra/themify/js/admin/modules/skin.js
let TF_Skin;((t,i,e,a)=>{"use strict";const o=new Map;TF_Skin={el:null,skinId:null,importModule:()=>t.loadJs(t.url+"js/admin/import/import",!!i.TF_Import),notificationModule:()=>t.loadJs(t.url+"js/admin/notification",!!i.TF_Notification),getIcon(t){const i="http://www.w3.org/2000/svg",e=a.createElementNS(i,"use"),o=a.createElementNS(i,"svg");return t="tf-"+t.trim().replace(" ","-"),o.setAttribute("class","tf_fa "+t),e.setAttributeNS(null,"href","#"+t),o.appendChild(e),o},getForm(t){const i=t.labels,e=t.plugins,o=a.createElement("div"),n=a.createElement("div"),s=a.createElement("a"),r=a.createElement("div"),l=a.createElement("p"),c=a.createElement("a"),_=a.createElement("i"),f=a.createDocumentFragment(),d=a.createDocumentFragment(),h=["builder_img"];if(o.className="required-addons themify-modal tf_scrollbar tf_opacity tf_hide",s.className="proceed-import button big-button themify_button",s.textContent=i.proceed_import,s.prepend(this.getIcon("fas-cog")),n.className="tf_import_wrap",r.className="tf_erase",l.className="note",l.textContent=i.note,c.className="close",c.href="#",_.className="tf_close",c.appendChild(_),Object.keys(e).length>0){let t=!0,o=a.createDocumentFragment();for(let n in e){let s,r=a.createElement("li"),l=a.createElement("a");if(e[n].page?(l.target="_blank",l.rel="noopener",l.href=e[n].page):l=a.createElement("span"),l.textContent=e[n].name,e[n].error||1===e[n].active)if(e[n].error){s=a.createElement("div"),r.className="tf_plugin_has_error",s.className="tf_plugin_error",s.innerHTML=e[n].error;let i=s.tfTag("a");for(let t=i.length-1;t>-1;--t)i[t].target="_blank",i[t].rel="noopener";t=!1}else s=a.createElement("span"),s.className="ti-check";else{s=a.createElement("a"),s.href="#",s.className="tf_install_plugin",s.dataset.type=e[n].install?"install":"activate",t=!1;let o=i.activate;e[n].install&&("buy"===e[n].install?(o=i.buy,s.href=e[n].page,s.target="_blank",s.rel="noopener",s.className="",s.dataset.type="buy"):o=i.install),s.innerHTML=o,s.dataset.plugin=n,s.dataset.name=e[n].name}r.appendChild(l),e[n].error||r.appendChild(a.createTextNode("( ")),r.appendChild(s),e[n].error||r.appendChild(a.createTextNode(" )")),o.appendChild(r)}if(!1===t){const t=a.createElement("p"),e=a.createElement("p"),n=a.createElement("ul");e.textContent=i.head,t.className="themify-import-warning",t.textContent=i.import_warning,n.appendChild(o),f.append(e,n,t)}}t.has_demo&&h.push("modify","erase");for(let t=h.length-1;t>-1;--t){let e=a.createElement("label"),o=a.createElement("input"),n=a.createElement("span");o.type="checkbox",o.id=e.htmlFor="tf_"+h[t]+"_demo","builder_img"!==h[t]&&(o.checked=!0),n.textContent=i[h[t]],e.appendChild(n),d.append(o,e)}return r.appendChild(d),n.append(s,r),f.append(n,l,c),o.appendChild(f),o},init(e){return new Promise((async(o,n)=>{try{const n=a.querySelector(".required-addons.themify-modal");if(e||(e={}),this.skinId=e.skin||"default",!n||n.dataset.skin!==e.skin){n?.remove(),this.el?.remove(),e.action="themify_required_plugins_modal",e.nonce=themify_js_vars.nonce;const o=await t.fetch(e);if(!o.success)throw o.data;this.el=this.getForm(o.data),themify_js_vars.labels=o.data.labels;let s=[],r=!1;this.el.tfOn("click",(async t=>{const e=t.target?t.target.closest(".proceed-import,.close,.tf_install_plugin"):null;if(e&&"_blank"!==e.target){t.preventDefault();const o=e.classList;if(!o.contains("disabled"))if(o.contains("proceed-import")){o.add("disabled");const e=!!this.el.querySelector("#tf_erase_demo:checked"),a=!!this.el.querySelector("#tf_modify_demo:checked"),n=!!this.el.querySelector("#tf_builder_img_demo:checked"),s=this.el.tfClass("tf_install_plugin");for(let t=s.length-1;t>-1;--t)s[t].classList.add("disabled");try{await this.import(e,a,n),await this.close(),i.location.reload()}catch(t){for(let t=s.length-1;t>-1;--t)s[t].classList.remove("disabled");o.remove("disabled")}}else if(o.contains("tf_install_plugin")){o.add("disabled");const t=a.createElement("span"),i=this.el.tfClass("proceed-import")[0].classList,n=async t=>{try{await this.installPlugins(t),t.tfClass("tf_loader")[0].className="ti-check"}catch(i){t.innerHTML=themify_js_vars.labels[t.dataset.type],t.classList.remove("disabled")}};if(i.add("disabled"),t.className="tf_loader",e.innerHTML="",e.appendChild(t),!0===r)return void s.push(e);r=!0,await n(e);for(let t=0;t<s.length;++t)await n(s[t]);s=[],r=!1,i.remove("disabled")}else this.close()}})),a.tfId("themify").appendChild(this.el)}this.show(),o(n?"open":"ajax")}catch(t){n(t)}}))},show(){return new Promise((t=>{this.el.classList.remove("tf_hide"),setTimeout((()=>{this.el.tfOn("transitionend",t,{passive:!0,once:!0}).classList.remove("tf_opacity")}),100)}))},close(){return new Promise((t=>{this.el.tfOn("transitionend",(i=>{this.el.remove(),t()}),{passive:!0,once:!0}).classList.add("tf_opacity")}))},installPlugins(e){return new Promise((async(a,o)=>{await this.notificationModule();const n=themify_js_vars,s=e.dataset.type,r=e.dataset.name,l=async()=>{const a=await t.fetch({action:"themify_activate_plugin",plugin:e.dataset.plugin,nonce:n.nonce});if(!a.success){let o=a.data;if(o.check_license||o.buy){o.check_license&&(await t.loadJs(t.url+"js/admin/modules/license",!!i.TF_License),await TF_License.init());const a=Error(o.errorMessage);a.code=o.buy?"buy":"check_license",o.buy&&(e.dataset.type="buy",e.target="_blank",e.rel="noopener",e.href=o.url),o=a}else o.errorMessage&&(o=o.errorMessage+":"+o.errorCode);throw o}a.data?.install_plugin_url&&await t.fetch(null,"text",{method:"GET"},a.data.install_plugin_url),await TF_Notification.showHide("done",n.labels.plugins[s+"_done"].replaceAll("%plugin%",r),1500),"install"===s&&(e.dataset.type="activate",await this.installPlugins(e))};await TF_Notification.show("info",n.labels.plugins[s].replaceAll("%plugin%",r));try{try{await l()}catch(e){if(e){if("check_license"===e.code||"buy"===e.code)throw e.message;if(e.install_updater){await(async()=>{await t.loadJs(t.url+"js/admin/modules/install-updater",!!i.TF_Install_Updater),await TF_Install_Updater(n.nonce)})();try{return await l(),void a()}catch(t){if("check_license"===t.code||"buy"===t.code)throw t.message}}}await new Promise(((t,i)=>{setTimeout((()=>{l().then(t).catch(i)}),1e3)}))}a()}catch(t){const i="string"==typeof t?t:"";await TF_Notification.showHide("error",n.labels.plugins[s+"_fail"].replaceAll("%plugin%",r).replaceAll("%error%",i),4e3),o(t)}}))},import(i,a,n){return new Promise((async(s,r)=>{const l=themify_js_vars;let c="https://themify.org/public-api/samples/"+l.theme+"/",_=this.skinId,f=l.theme+"-"+_;_&&(c+=_+"/"),c+="data.json";try{let r=o.get(c),_=[];_.push(r||t.fetch("",null,{credentials:"omit",method:"GET",mode:"cors"},c)),_.push(this.notificationModule(),this.importModule()),i&&_.push(t.trigger("themify_erase_content",a));const d=(await Promise.all(_))[0],h=l.import,m=parseInt(h.memory)||64,p={data:{},id:f,nonce:l.nonce,action:"themify_import_theme_data"},u=["themify_settings","widgets","homepage"],w=async i=>{try{if(!(await t.fetch(i)).success)throw"error"}catch(e){try{i.data=new Blob([JSON.stringify(i.data)],{type:"application/json"});if(!(await t.fetch(i)).success)throw"error"}catch(t){throw t}}};o.set(c,d),h.images_chunk=m>=255?6:m>=120?5:m>60?3:2,TF_Import.importImages(),(d.menu_locations||d.theme_mods||d.product_attribute)&&(await TF_Notification.show("info",h.menu),d.menu&&(p.data.menu=d.menu),d.menu_locations&&(p.data.menu_locations=d.menu_locations),d.theme_mods&&(p.data.theme_mods=d.theme_mods),d.product_filter&&(p.data.product_filter=d.product_filter),d.product_attribute&&(p.data.product_attribute=d.product_attribute),await w(p),delete p.data.menu,delete p.data.product_filter,delete p.data.menu_locations,delete p.data.product_attribute,delete p.data.theme_mods),n||(h.skip_builder=!0),d.terms&&(h.loading=h.terms,d.terms=TF_Import.sort(d.terms,"parent"),await TF_Import.init(d.terms,"themify_import_terms",l.nonce,h,f)),d.posts&&(h.loading=h.posts,d.posts=TF_Import.sort(d.posts,"post_parent"),await TF_Import.init(d.posts,"themify_import_posts",l.nonce,h,f)),d.menu_items&&(h.loading=h.menu_items,d.menu_items=TF_Import.sort(d.menu_items,"meta_input","_menu_item_menu_item_parent"),await TF_Import.init(d.menu_items,"themify_import_posts",l.nonce,h,f));for(let t=u.length-1;t>-1;--t)d[u[t]]!==e&&(p.data[u[t]]=d[u[t]]);Object.keys(p.data).length>0&&(await TF_Notification.show("info",h.theme),await w(p)),await TF_Notification.showHide("done",h.done,2e3),s()}catch(t){await this.notificationModule();const i="string"==typeof t?t:"";await TF_Notification.showHide("error",i,2e3),r(t)}}))}}})(Themify,window,void 0,document);