Path : /home/vishqocm/aeromaxlogistics.com/wp-content/plugins/salt-shaker/assets/build/
File Upload :
Current File : //home/vishqocm//aeromaxlogistics.com/wp-content/plugins/salt-shaker/assets/build/admin.js

(()=>{"use strict";const e=window.wp.element,s=window.wp.i18n,a=window.wp.components,t=window.ReactJSXRuntime,r=function({isConfigWritable:r}){const[l,n]=(0,e.useState)(!0),[i,c]=(0,e.useState)({}),[o,d]=(0,e.useState)(!1);return(0,e.useEffect)((()=>{r?jQuery.ajax({url:saltShakerData.ajaxUrl,type:"POST",data:{action:"salt_shaker_get_settings",nonce:saltShakerData.nonce},success:function(e){e.success&&c(e.data.currentSalts),n(!1)},error:function(){n(!1)}}):n(!1)}),[r]),l?(0,t.jsx)(a.Spinner,{}):(0,t.jsxs)("div",{className:"salt-shaker-current-salts "+(o?"is-open":""),children:[(0,t.jsxs)("div",{className:"header",onClick:()=>d(!o),children:[(0,t.jsx)("h3",{children:(0,s.__)("Current Salt Keys:","salt-shaker")}),(0,t.jsxs)("div",{className:"toggle-section",children:[(0,t.jsx)("span",{className:"toggle-text",children:o?(0,s.__)("Click to hide","salt-shaker"):(0,s.__)("Click to view","salt-shaker")}),(0,t.jsx)(a.Icon,{icon:o?"arrow-up-alt2":"arrow-down-alt2"})]})]}),(0,t.jsx)("div",{className:"content",children:r?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"description",children:(0,s.__)("The following table shows the current set of the salt keys in the configuration file.","salt-shaker")}),(0,t.jsxs)("table",{className:"wp-list-table widefat fixed striped",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{children:[(0,t.jsx)("th",{children:(0,s.__)("Name","salt-shaker")}),(0,t.jsx)("th",{children:(0,s.__)("Value","salt-shaker")})]})}),(0,t.jsx)("tbody",{children:Object.entries(i).map((([e,a])=>(0,t.jsxs)("tr",{children:[(0,t.jsx)("td",{children:e}),(0,t.jsx)("td",{className:"salt-value",children:a||(0,s.__)("Not set","salt-shaker")})]},e)))})]})]}):(0,t.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"salt-shaker-notice",children:(0,s.__)("Salt Shaker cannot access your wp-config.php file. Please check file permissions or contact your hosting provider.","salt-shaker")})})]})},l=function({isConfigWritable:r}){const[l,n]=(0,e.useState)(!0),[i,c]=(0,e.useState)(!1),[o,d]=(0,e.useState)(null),[h,u]=(0,e.useState)({autoUpdateEnabled:!1,updateInterval:"weekly",nextScheduledDate:null});return(0,e.useEffect)((()=>{jQuery.ajax({url:saltShakerData.ajaxUrl,type:"POST",data:{action:"salt_shaker_get_settings",nonce:saltShakerData.nonce},success:function(e){e.success&&u({autoUpdateEnabled:e.data.autoUpdateEnabled,updateInterval:e.data.updateInterval,nextScheduledDate:e.data.nextScheduledDate||null}),n(!1)},error:function(){n(!1)}})}),[]),l?(0,t.jsx)(a.Spinner,{}):(0,t.jsxs)("div",{className:"salt-shaker-scheduled-change",children:[(0,t.jsx)("h3",{children:(0,s.__)("Scheduled Salt Keys Change:","salt-shaker")}),!r&&(0,t.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"salt-shaker-notice",children:(0,s.__)("Salt Shaker cannot modify your wp-config.php file. Please check file permissions or contact your hosting provider.","salt-shaker")}),o&&(0,t.jsx)(a.Notice,{status:o.type,onRemove:()=>d(null),isDismissible:!0,children:o.content}),(0,t.jsxs)("div",{className:"settings-container",children:[(0,t.jsx)("div",{className:"setting-row",children:(0,t.jsx)(a.CheckboxControl,{label:(0,s.__)("Enable automatic salt key updates","salt-shaker"),checked:h.autoUpdateEnabled,onChange:e=>u({...h,autoUpdateEnabled:e}),disabled:!r})}),h.autoUpdateEnabled&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"setting-row",children:(0,t.jsx)(a.SelectControl,{label:(0,s.__)("Update Interval","salt-shaker"),value:h.updateInterval,options:[{label:(0,s.__)("Daily","salt-shaker"),value:"daily"},{label:(0,s.__)("Weekly","salt-shaker"),value:"weekly"},{label:(0,s.__)("Monthly","salt-shaker"),value:"monthly"},{label:(0,s.__)("Quarterly","salt-shaker"),value:"quarterly"},{label:(0,s.__)("Biannually","salt-shaker"),value:"biannually"}],onChange:e=>u({...h,updateInterval:e}),disabled:!r})}),h.nextScheduledDate&&(0,t.jsx)("div",{className:"next-scheduled-update",children:(0,t.jsxs)("p",{children:[(0,s.__)("The salt keys will be automatically changed on","salt-shaker")," ",(0,t.jsx)("strong",{children:h.nextScheduledDate})]})}),(0,t.jsxs)("div",{className:"setting-row premium-feature",children:[(0,t.jsxs)("div",{className:"premium-feature-header",children:[(0,t.jsx)("h4",{children:(0,s.__)("Specific Day & Time","salt-shaker")}),(0,t.jsx)("div",{className:"premium-badge",children:(0,t.jsx)("span",{className:"premium-text",children:(0,s.__)("Premium","salt-shaker")})})]}),(0,t.jsxs)("div",{className:"premium-feature-content",children:[(0,t.jsx)("div",{className:"premium-feature-row",children:(0,t.jsx)(a.SelectControl,{label:(0,s.__)("Day","salt-shaker"),value:"",options:[{label:(0,s.__)("Select a day","salt-shaker"),value:""}],disabled:!0})}),(0,t.jsx)("div",{className:"premium-feature-row",children:(0,t.jsx)(a.SelectControl,{label:(0,s.__)("Time","salt-shaker"),value:"",options:[{label:(0,s.__)("Select a time","salt-shaker"),value:""}],disabled:!0})}),(0,t.jsx)("h4",{children:(0,s.__)("Additional Features","salt-shaker")}),(0,t.jsxs)("div",{className:"premium-feature-item",children:[(0,t.jsx)(a.CheckboxControl,{label:(0,s.__)("Remind me to update the keys manually","salt-shaker"),checked:!1,onChange:()=>{},disabled:!0}),(0,t.jsx)("div",{className:"premium-badge",children:(0,t.jsx)("span",{className:"premium-text",children:(0,s.__)("Premium","salt-shaker")})})]}),(0,t.jsxs)("div",{className:"premium-feature-item",children:[(0,t.jsx)(a.CheckboxControl,{label:(0,s.__)("Notify me when an automatic update takes place","salt-shaker"),checked:!1,onChange:()=>{},disabled:!0}),(0,t.jsx)("div",{className:"premium-badge",children:(0,t.jsx)("span",{className:"premium-text",children:(0,s.__)("Premium","salt-shaker")})})]})]})]}),(0,t.jsx)("div",{className:"premium-message",children:(0,t.jsxs)("p",{children:[(0,s.__)("Upgrade to Premium for specific scheduling, reminders, and notifications.","salt-shaker")," ",(0,t.jsx)("a",{href:"#salt-shaker-pro-features",children:(0,s.__)("Upgrade Now","salt-shaker")})]})})]}),(0,t.jsx)("div",{className:"setting-row",children:(0,t.jsx)(a.Button,{isPrimary:!0,onClick:()=>{c(!0),jQuery.ajax({url:saltShakerData.ajaxUrl,type:"POST",data:{action:"salt_shaker_save_settings",nonce:saltShakerData.nonce,autoUpdateEnabled:h.autoUpdateEnabled,updateInterval:h.updateInterval},success:function(e){e.success?(d({type:"success",content:e.data.message||(0,s.__)("Settings saved successfully","salt-shaker")}),setTimeout((()=>{window.location.reload()}),1500)):(d({type:"error",content:e.data}),c(!1))},error:function(e,a,t){d({type:"error",content:t||(0,s.__)("An error occurred while saving settings.","salt-shaker")}),c(!1)}})},disabled:i||!r,children:i?(0,t.jsx)(a.Spinner,{}):(0,s.__)("Save Settings","salt-shaker")})})]})]})},n=function({isConfigWritable:r}){const[l,n]=(0,e.useState)(!1),[i,c]=(0,e.useState)(null),[o,d]=(0,e.useState)(!1),h=()=>{d(!1)};return(0,t.jsxs)("div",{className:"salt-shaker-immediate-change",children:[(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(a.CardHeader,{children:(0,t.jsx)("h3",{children:(0,s.__)("Manual Salt Keys Change","salt-shaker")})}),(0,t.jsx)(a.CardBody,{children:(0,t.jsxs)("div",{className:"immediate-change-container",children:[(0,t.jsxs)("div",{className:"immediate-change-description",children:[(0,t.jsx)("p",{children:(0,s.__)("You can manually change your WordPress salt keys at any time. This will log out all users (including you) and require everyone to log in again.","salt-shaker")}),(0,t.jsx)("p",{children:(0,s.__)("This is useful if you suspect unauthorized access to your site or want to force all users to re-authenticate.","salt-shaker")})]}),!r&&(0,t.jsx)(a.Notice,{status:"error",isDismissible:!1,className:"salt-shaker-notice",children:(0,s.__)("Salt Shaker cannot modify your wp-config.php file. Please check file permissions or contact your hosting provider.","salt-shaker")}),i&&(0,t.jsx)(a.Notice,{status:i.type,isDismissible:!1,className:"salt-shaker-notice",children:i.content}),(0,t.jsx)(a.Flex,{className:"immediate-change-action",justify:"flex-start",children:(0,t.jsx)(a.FlexItem,{children:(0,t.jsx)(a.Button,{variant:"primary",onClick:()=>{d(!0)},disabled:l||!r,className:"change-salts-button",children:l?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(a.Spinner,{}),(0,s.__)("Changing Salt Keys...","salt-shaker")]}):(0,s.__)("Change Salt Keys Now","salt-shaker")})})})]})})]}),o&&(0,t.jsx)(a.Modal,{title:(0,s.__)("Confirm Salt Key Change","salt-shaker"),onRequestClose:h,className:"salt-shaker-confirm-modal",children:(0,t.jsxs)("div",{className:"modal-content",children:[(0,t.jsx)("p",{children:(0,s.__)("Are you sure you want to change your WordPress salt keys?","salt-shaker")}),(0,t.jsx)("p",{className:"modal-info",children:(0,s.__)("This will log out all users (including you) and require everyone to log in again.","salt-shaker")}),(0,t.jsxs)("div",{className:"modal-actions",children:[(0,t.jsx)(a.Button,{variant:"secondary",onClick:h,children:(0,s.__)("Cancel","salt-shaker")}),(0,t.jsx)(a.Button,{variant:"primary",onClick:()=>{h(),n(!0),jQuery.ajax({url:saltShakerData.ajaxUrl,type:"POST",data:{action:"salt_shaker_change_salts",nonce:saltShakerData.nonce},success:function(e){c({type:e.success?"success":"error",content:e.success?(0,s.__)("Salt keys have been updated. You will be redirected to login...","salt-shaker"):e.data}),e.success&&setTimeout((()=>{window.location.href=saltShakerData.loginUrl+(saltShakerData.loginUrl.includes("?")?"&":"?")+"redirect_to="+encodeURIComponent(saltShakerData.adminUrl)}),3e3),n(!1)},error:function(e,a,t){c({type:"error",content:t||(0,s.__)("An error occurred while changing salt keys.","salt-shaker")}),n(!1)}})},disabled:!r,children:(0,s.__)("Yes, Change Salt Keys","salt-shaker")})]})]})})]})},i=function(){const e=[{icon:"shield",title:(0,s.__)("Premium 24/7 Support","salt-shaker"),description:(0,s.__)("Get expert help anytime with our dedicated support team.","salt-shaker")},{icon:"clock",title:(0,s.__)("Smart Scheduling","salt-shaker"),description:(0,s.__)("Choose the perfect time for updates - when your users are least active. No more unexpected logouts!","salt-shaker")},{icon:"email",title:(0,s.__)("Instant Notifications","salt-shaker"),description:(0,s.__)("Get immediate email alerts when salt keys are updated. Stay informed and in control.","salt-shaker")},{icon:"admin-users",title:(0,s.__)("Custom Email Alerts","salt-shaker"),description:(0,s.__)("Send notifications to your preferred email address. Perfect for team management.","salt-shaker")},{icon:"bell",title:(0,s.__)("Smart Reminders","salt-shaker"),description:(0,s.__)("Never miss an update with intelligent reminders when it's time to rotate your keys.","salt-shaker")}];return(0,t.jsx)("div",{className:"salt-shaker-pro-features",children:(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(a.CardHeader,{children:(0,t.jsxs)("div",{className:"salt-shaker-pro-header",children:[(0,t.jsx)("h2",{children:(0,s.__)("Unlock Premium Features","salt-shaker")}),(0,t.jsx)("span",{className:"salt-shaker-pro-badge",children:(0,s.__)("PRO","salt-shaker")})]})}),(0,t.jsx)(a.CardBody,{children:(0,t.jsx)("div",{className:"salt-shaker-features-grid",children:e.map(((e,s)=>(0,t.jsxs)("div",{className:"salt-shaker-feature-item "+(e.highlight?"feature-highlight":""),children:[(0,t.jsx)("div",{className:"feature-icon",children:(0,t.jsx)(a.Icon,{icon:e.icon})}),(0,t.jsxs)("div",{className:"feature-content",children:[(0,t.jsx)("h3",{children:e.title}),(0,t.jsx)("p",{children:e.description})]})]},s)))})}),(0,t.jsx)(a.CardFooter,{children:(0,t.jsxs)("div",{className:"salt-shaker-pro-cta",id:"salt-shaker-pro-features",children:[(0,t.jsxs)("div",{className:"salt-shaker-pro-offer",children:[(0,t.jsx)("span",{className:"offer-badge",children:(0,s.__)("LIMITED TIME OFFER","salt-shaker")}),(0,t.jsxs)("p",{className:"salt-shaker-pro-discount",children:[(0,s.__)("Get 50% off Salt Shaker PRO!","salt-shaker"),(0,t.jsx)("br",{}),(0,t.jsxs)("span",{className:"pricing-info",children:[(0,t.jsxs)("span",{className:"original-price",children:["$",(0,s.__)("9.99","salt-shaker")]}),(0,t.jsxs)("span",{className:"discounted-price",children:["$",(0,s.__)("4.99","salt-shaker")]}),(0,t.jsxs)("span",{className:"period",children:["/",(0,s.__)("year","salt-shaker")]})]}),(0,t.jsx)("br",{}),(0,t.jsx)("span",{className:"coupon-code",children:"SALTSHAKERPRO"})]})]}),(0,t.jsx)(a.Button,{isPrimary:!0,href:"/wp-admin/tools.php?page=salt_shaker-pricing",className:"upgrade-button",children:(0,s.__)("Upgrade Now","salt-shaker")})]})})]})})};function c(){const[c,o]=(0,e.useState)(!0);return(0,e.useEffect)((()=>{fetch(saltShakerData.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({action:"salt_shaker_get_settings",nonce:saltShakerData.nonce})}).then((e=>e.json())).then((e=>{e.success&&o(e.data.isConfigWritable)})).catch((e=>{console.error("Error fetching settings:",e),o(!1)}))}),[]),(0,t.jsx)("div",{className:"salt-shaker-admin",children:(0,t.jsxs)("div",{className:"salt-shaker-grid",children:[(0,t.jsx)("div",{className:"salt-shaker-main",children:(0,t.jsxs)(a.Card,{children:[(0,t.jsx)(a.CardHeader,{children:(0,t.jsx)("h2",{children:(0,s.__)("Salt Shaker Settings","salt-shaker")})}),(0,t.jsxs)(a.CardBody,{children:[(0,t.jsx)("p",{dangerouslySetInnerHTML:{__html:(0,s.__)("WordPress salt keys or security keys are codes that help protect important information on your website. They make it harder for hackers to access your website by making passwords more complex. <br /> You don't need to remember these codes, Salt Shaker plugin takes care of generating the codes directly from WordPress API.","salt-shaker")},className:"description"}),(0,t.jsx)(r,{isConfigWritable:c}),(0,t.jsx)(l,{isConfigWritable:c}),(0,t.jsx)(n,{isConfigWritable:c}),(0,t.jsxs)("p",{className:"rate-plugin",children:[(0,s.__)("Do you find this plugin useful? Please","salt-shaker")," ",(0,t.jsx)("a",{href:"https://wordpress.org/support/plugin/salt-shaker/reviews/#new-post",target:"_blank",rel:"noopener noreferrer",children:(0,s.__)("Rate it","salt-shaker")})," ",(0,s.__)("on WordPress.org. BIG Thanks in advance!","salt-shaker")]})]})]})}),(0,t.jsx)("div",{className:"salt-shaker-sidebar",children:(0,t.jsx)(i,{})})]})})}window.addEventListener("DOMContentLoaded",(()=>{const s=document.getElementById("salt-shaker-settings");if(s)try{(0,e.createRoot)(s).render((0,t.jsx)(e.StrictMode,{children:(0,t.jsx)(c,{})}))}catch(e){console.error("Failed to render Salt Shaker admin:",e)}else console.error("Could not find salt-shaker-settings container element")}))})();