{"ast":null,"code":"const XMLHttpRequest = require(\"../../contrib/xmlhttprequest-ssl/XMLHttpRequest\");\n\nconst XHR = require(\"./polling-xhr\");\n\nconst JSONP = require(\"./polling-jsonp\");\n\nconst websocket = require(\"./websocket\");\n\nexports.polling = polling;\nexports.websocket = websocket;\n/**\n * Polling transport polymorphic constructor.\n * Decides on xhr vs jsonp based on feature detection.\n *\n * @api private\n */\n\nfunction polling(opts) {\n  let xhr;\n  let xd = false;\n  let xs = false;\n  const jsonp = false !== opts.jsonp;\n\n  if (typeof location !== \"undefined\") {\n    const isSSL = \"https:\" === location.protocol;\n    let port = location.port; // some user agents have empty `location.port`\n\n    if (!port) {\n      port = isSSL ? 443 : 80;\n    }\n\n    xd = opts.hostname !== location.hostname || port !== opts.port;\n    xs = opts.secure !== isSSL;\n  }\n\n  opts.xdomain = xd;\n  opts.xscheme = xs;\n  xhr = new XMLHttpRequest(opts);\n\n  if (\"open\" in xhr && !opts.forceJSONP) {\n    return new XHR(opts);\n  } else {\n    if (!jsonp) throw new Error(\"JSONP disabled\");\n    return new JSONP(opts);\n  }\n}","map":{"version":3,"sources":["C:/laragon/www/itokin/DriverOPCDA/frontend/node_modules/engine.io-client/lib/transports/index.js"],"names":["XMLHttpRequest","require","XHR","JSONP","websocket","exports","polling","opts","xhr","xd","xs","jsonp","location","isSSL","protocol","port","hostname","secure","xdomain","xscheme","forceJSONP","Error"],"mappings":"AAAA,MAAMA,cAAc,GAAGC,OAAO,CAAC,iDAAD,CAA9B;;AACA,MAAMC,GAAG,GAAGD,OAAO,CAAC,eAAD,CAAnB;;AACA,MAAME,KAAK,GAAGF,OAAO,CAAC,iBAAD,CAArB;;AACA,MAAMG,SAAS,GAAGH,OAAO,CAAC,aAAD,CAAzB;;AAEAI,OAAO,CAACC,OAAR,GAAkBA,OAAlB;AACAD,OAAO,CAACD,SAAR,GAAoBA,SAApB;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASE,OAAT,CAAiBC,IAAjB,EAAuB;AACrB,MAAIC,GAAJ;AACA,MAAIC,EAAE,GAAG,KAAT;AACA,MAAIC,EAAE,GAAG,KAAT;AACA,QAAMC,KAAK,GAAG,UAAUJ,IAAI,CAACI,KAA7B;;AAEA,MAAI,OAAOC,QAAP,KAAoB,WAAxB,EAAqC;AACnC,UAAMC,KAAK,GAAG,aAAaD,QAAQ,CAACE,QAApC;AACA,QAAIC,IAAI,GAAGH,QAAQ,CAACG,IAApB,CAFmC,CAInC;;AACA,QAAI,CAACA,IAAL,EAAW;AACTA,MAAAA,IAAI,GAAGF,KAAK,GAAG,GAAH,GAAS,EAArB;AACD;;AAEDJ,IAAAA,EAAE,GAAGF,IAAI,CAACS,QAAL,KAAkBJ,QAAQ,CAACI,QAA3B,IAAuCD,IAAI,KAAKR,IAAI,CAACQ,IAA1D;AACAL,IAAAA,EAAE,GAAGH,IAAI,CAACU,MAAL,KAAgBJ,KAArB;AACD;;AAEDN,EAAAA,IAAI,CAACW,OAAL,GAAeT,EAAf;AACAF,EAAAA,IAAI,CAACY,OAAL,GAAeT,EAAf;AACAF,EAAAA,GAAG,GAAG,IAAIR,cAAJ,CAAmBO,IAAnB,CAAN;;AAEA,MAAI,UAAUC,GAAV,IAAiB,CAACD,IAAI,CAACa,UAA3B,EAAuC;AACrC,WAAO,IAAIlB,GAAJ,CAAQK,IAAR,CAAP;AACD,GAFD,MAEO;AACL,QAAI,CAACI,KAAL,EAAY,MAAM,IAAIU,KAAJ,CAAU,gBAAV,CAAN;AACZ,WAAO,IAAIlB,KAAJ,CAAUI,IAAV,CAAP;AACD;AACF","sourcesContent":["const XMLHttpRequest = require(\"../../contrib/xmlhttprequest-ssl/XMLHttpRequest\");\nconst XHR = require(\"./polling-xhr\");\nconst JSONP = require(\"./polling-jsonp\");\nconst websocket = require(\"./websocket\");\n\nexports.polling = polling;\nexports.websocket = websocket;\n\n/**\n * Polling transport polymorphic constructor.\n * Decides on xhr vs jsonp based on feature detection.\n *\n * @api private\n */\n\nfunction polling(opts) {\n  let xhr;\n  let xd = false;\n  let xs = false;\n  const jsonp = false !== opts.jsonp;\n\n  if (typeof location !== \"undefined\") {\n    const isSSL = \"https:\" === location.protocol;\n    let port = location.port;\n\n    // some user agents have empty `location.port`\n    if (!port) {\n      port = isSSL ? 443 : 80;\n    }\n\n    xd = opts.hostname !== location.hostname || port !== opts.port;\n    xs = opts.secure !== isSSL;\n  }\n\n  opts.xdomain = xd;\n  opts.xscheme = xs;\n  xhr = new XMLHttpRequest(opts);\n\n  if (\"open\" in xhr && !opts.forceJSONP) {\n    return new XHR(opts);\n  } else {\n    if (!jsonp) throw new Error(\"JSONP disabled\");\n    return new JSONP(opts);\n  }\n}\n"]},"metadata":{},"sourceType":"script"}