import{commonjsGlobal as r}from"../../_virtual/_commonjsHelpers.mjs";import{__require as o}from"./windows.mjs";import{__require as n}from"./mode.mjs";var e,i;function t(){if(i)return e;var t;function c(r,o,n){if("function"==typeof o&&(n=o,o={}),!n){if("function"!=typeof Promise)throw new TypeError("callback not provided");return new Promise(function(n,e){c(r,o||{},function(r,o){r?e(r):n(o)})})}t(r,o||{},function(r,e){r&&("EACCES"===r.code||o&&o.ignoreErrors)&&(r=null,e=!1),n(r,e)})}return i=1,t="win32"===process.platform||r.TESTING_WINDOWS?o():n(),e=c,c.sync=function(r,o){try{return t.sync(r,o||{})}catch(r){if(o&&o.ignoreErrors||"EACCES"===r.code)return!1;throw r}},e}export{t as __require};