var e=`xyxp_automation_delay_settings`;function t(){return{specFillMinMs:250,specFillMaxMs:700,mainImageUploadMinMs:300,mainImageUploadMaxMs:450,pddSkuClickMinMs:200,pddSkuClickMaxMs:400,xgjSpecFillMinMs:50,xgjSpecFillMaxMs:150}}function n(e,t){let n=typeof e==`number`?e:Number(e);return Number.isFinite(n)?Math.min(6e4,Math.max(0,Math.round(n))):t}function r(e){let r=t();if(!e)return r;let i=n(e.specFillMinMs,r.specFillMinMs),a=n(e.specFillMaxMs,r.specFillMaxMs);i>a&&([i,a]=[a,i]);let o=n(e.mainImageUploadMinMs,r.mainImageUploadMinMs),s=n(e.mainImageUploadMaxMs,r.mainImageUploadMaxMs);o>s&&([o,s]=[s,o]);let c=n(e.pddSkuClickMinMs,r.pddSkuClickMinMs),l=n(e.pddSkuClickMaxMs,r.pddSkuClickMaxMs);c>l&&([c,l]=[l,c]);let u=n(e.xgjSpecFillMinMs,r.xgjSpecFillMinMs),d=n(e.xgjSpecFillMaxMs,r.xgjSpecFillMaxMs);return u>d&&([u,d]=[d,u]),{specFillMinMs:i,specFillMaxMs:a,mainImageUploadMinMs:o,mainImageUploadMaxMs:s,pddSkuClickMinMs:c,pddSkuClickMaxMs:l,xgjSpecFillMinMs:u,xgjSpecFillMaxMs:d}}async function i(){return r((await chrome.storage.local.get(e))[e])}async function a(t){await chrome.storage.local.set({[e]:r(t)})}export{a,r as i,t as n,i as r,e as t};