5ec396b3aee339328a6cb28cfc2d8030.json 12.5 KB
{"ast":null,"code":"import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\"; // MIT License from https://github.com/kaimallea/isMobile\n\nvar applePhone = /iPhone/i;\nvar appleIpod = /iPod/i;\nvar appleTablet = /iPad/i;\nvar androidPhone = /\\bAndroid(?:.+)Mobile\\b/i; // Match 'Android' AND 'Mobile'\n\nvar androidTablet = /Android/i;\nvar amazonPhone = /\\bAndroid(?:.+)SD4930UR\\b/i;\nvar amazonTablet = /\\bAndroid(?:.+)(?:KF[A-Z]{2,4})\\b/i;\nvar windowsPhone = /Windows Phone/i;\nvar windowsTablet = /\\bWindows(?:.+)ARM\\b/i; // Match 'Windows' AND 'ARM'\n\nvar otherBlackberry = /BlackBerry/i;\nvar otherBlackberry10 = /BB10/i;\nvar otherOpera = /Opera Mini/i;\nvar otherChrome = /\\b(CriOS|Chrome)(?:.+)Mobile/i;\nvar otherFirefox = /Mobile(?:.+)Firefox\\b/i; // Match 'Mobile' AND 'Firefox'\n\nfunction match(regex, userAgent) {\n  return regex.test(userAgent);\n}\n\nfunction isMobile(userAgent) {\n  var ua = userAgent || (typeof navigator !== 'undefined' ? navigator.userAgent : ''); // Facebook mobile app's integrated browser adds a bunch of strings that\n  // match everything. Strip it out if it exists.\n\n  var tmp = ua.split('[FBAN');\n\n  if (typeof tmp[1] !== 'undefined') {\n    var _tmp = tmp;\n\n    var _tmp2 = _slicedToArray(_tmp, 1);\n\n    ua = _tmp2[0];\n  } // Twitter mobile app's integrated browser on iPad adds a \"Twitter for\n  // iPhone\" string. Same probably happens on other tablet platforms.\n  // This will confuse detection so strip it out if it exists.\n\n\n  tmp = ua.split('Twitter');\n\n  if (typeof tmp[1] !== 'undefined') {\n    var _tmp3 = tmp;\n\n    var _tmp4 = _slicedToArray(_tmp3, 1);\n\n    ua = _tmp4[0];\n  }\n\n  var result = {\n    apple: {\n      phone: match(applePhone, ua) && !match(windowsPhone, ua),\n      ipod: match(appleIpod, ua),\n      tablet: !match(applePhone, ua) && match(appleTablet, ua) && !match(windowsPhone, ua),\n      device: (match(applePhone, ua) || match(appleIpod, ua) || match(appleTablet, ua)) && !match(windowsPhone, ua)\n    },\n    amazon: {\n      phone: match(amazonPhone, ua),\n      tablet: !match(amazonPhone, ua) && match(amazonTablet, ua),\n      device: match(amazonPhone, ua) || match(amazonTablet, ua)\n    },\n    android: {\n      phone: !match(windowsPhone, ua) && match(amazonPhone, ua) || !match(windowsPhone, ua) && match(androidPhone, ua),\n      tablet: !match(windowsPhone, ua) && !match(amazonPhone, ua) && !match(androidPhone, ua) && (match(amazonTablet, ua) || match(androidTablet, ua)),\n      device: !match(windowsPhone, ua) && (match(amazonPhone, ua) || match(amazonTablet, ua) || match(androidPhone, ua) || match(androidTablet, ua)) || match(/\\bokhttp\\b/i, ua)\n    },\n    windows: {\n      phone: match(windowsPhone, ua),\n      tablet: match(windowsTablet, ua),\n      device: match(windowsPhone, ua) || match(windowsTablet, ua)\n    },\n    other: {\n      blackberry: match(otherBlackberry, ua),\n      blackberry10: match(otherBlackberry10, ua),\n      opera: match(otherOpera, ua),\n      firefox: match(otherFirefox, ua),\n      chrome: match(otherChrome, ua),\n      device: match(otherBlackberry, ua) || match(otherBlackberry10, ua) || match(otherOpera, ua) || match(otherFirefox, ua) || match(otherChrome, ua)\n    },\n    // Additional\n    any: null,\n    phone: null,\n    tablet: null\n  };\n  result.any = result.apple.device || result.android.device || result.windows.device || result.other.device; // excludes 'other' devices and ipods, targeting touchscreen phones\n\n  result.phone = result.apple.phone || result.android.phone || result.windows.phone;\n  result.tablet = result.apple.tablet || result.android.tablet || result.windows.tablet;\n  return result;\n}\n\nvar defaultResult = _objectSpread(_objectSpread({}, isMobile()), {}, {\n  isMobile: isMobile\n});\n\nexport default defaultResult;","map":{"version":3,"sources":["C:/Users/kkwan_000/Desktop/git/2017110269/minsung/node_modules/rc-menu/es/utils/isMobile.js"],"names":["_objectSpread","_slicedToArray","applePhone","appleIpod","appleTablet","androidPhone","androidTablet","amazonPhone","amazonTablet","windowsPhone","windowsTablet","otherBlackberry","otherBlackberry10","otherOpera","otherChrome","otherFirefox","match","regex","userAgent","test","isMobile","ua","navigator","tmp","split","_tmp","_tmp2","_tmp3","_tmp4","result","apple","phone","ipod","tablet","device","amazon","android","windows","other","blackberry","blackberry10","opera","firefox","chrome","any","defaultResult"],"mappings":"AAAA,OAAOA,aAAP,MAA0B,0CAA1B;AACA,OAAOC,cAAP,MAA2B,0CAA3B,C,CACA;;AACA,IAAIC,UAAU,GAAG,SAAjB;AACA,IAAIC,SAAS,GAAG,OAAhB;AACA,IAAIC,WAAW,GAAG,OAAlB;AACA,IAAIC,YAAY,GAAG,0BAAnB,C,CAA+C;;AAE/C,IAAIC,aAAa,GAAG,UAApB;AACA,IAAIC,WAAW,GAAG,4BAAlB;AACA,IAAIC,YAAY,GAAG,oCAAnB;AACA,IAAIC,YAAY,GAAG,gBAAnB;AACA,IAAIC,aAAa,GAAG,uBAApB,C,CAA6C;;AAE7C,IAAIC,eAAe,GAAG,aAAtB;AACA,IAAIC,iBAAiB,GAAG,OAAxB;AACA,IAAIC,UAAU,GAAG,aAAjB;AACA,IAAIC,WAAW,GAAG,+BAAlB;AACA,IAAIC,YAAY,GAAG,wBAAnB,C,CAA6C;;AAE7C,SAASC,KAAT,CAAeC,KAAf,EAAsBC,SAAtB,EAAiC;AAC/B,SAAOD,KAAK,CAACE,IAAN,CAAWD,SAAX,CAAP;AACD;;AAED,SAASE,QAAT,CAAkBF,SAAlB,EAA6B;AAC3B,MAAIG,EAAE,GAAGH,SAAS,KAAK,OAAOI,SAAP,KAAqB,WAArB,GAAmCA,SAAS,CAACJ,SAA7C,GAAyD,EAA9D,CAAlB,CAD2B,CAC0D;AACrF;;AAEA,MAAIK,GAAG,GAAGF,EAAE,CAACG,KAAH,CAAS,OAAT,CAAV;;AAEA,MAAI,OAAOD,GAAG,CAAC,CAAD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,MAAM,CAACI,MAAP,GAAgBJ,MAAM,CAACC,KAAP,CAAaG,MAAb,IAAuBJ,MAAM,CAACO,OAAP,CAAeH,MAAtC,IAAgDJ,MAAM,CAACQ,OAAP,CAAeJ,MAA/E;AACA,SAAOJ,MAAP;AACD;;AAED,IAAIgB,aAAa,GAAG7C,aAAa,CAACA,aAAa,CAAC,EAAD,EAAKoB,QAAQ,EAAb,CAAd,EAAgC,EAAhC,EAAoC;AACnEA,EAAAA,QAAQ,EAAEA;AADyD,CAApC,CAAjC;;AAIA,eAAeyB,aAAf","sourcesContent":["import _objectSpread from \"@babel/runtime/helpers/esm/objectSpread2\";\nimport _slicedToArray from \"@babel/runtime/helpers/esm/slicedToArray\";\n// MIT License from https://github.com/kaimallea/isMobile\nvar applePhone = /iPhone/i;\nvar appleIpod = /iPod/i;\nvar appleTablet = /iPad/i;\nvar androidPhone = /\\bAndroid(?:.+)Mobile\\b/i; // Match 'Android' AND 'Mobile'\n\nvar androidTablet = /Android/i;\nvar amazonPhone = /\\bAndroid(?:.+)SD4930UR\\b/i;\nvar amazonTablet = /\\bAndroid(?:.+)(?:KF[A-Z]{2,4})\\b/i;\nvar windowsPhone = /Windows Phone/i;\nvar windowsTablet = /\\bWindows(?:.+)ARM\\b/i; // Match 'Windows' AND 'ARM'\n\nvar otherBlackberry = /BlackBerry/i;\nvar otherBlackberry10 = /BB10/i;\nvar otherOpera = /Opera Mini/i;\nvar otherChrome = /\\b(CriOS|Chrome)(?:.+)Mobile/i;\nvar otherFirefox = /Mobile(?:.+)Firefox\\b/i; // Match 'Mobile' AND 'Firefox'\n\nfunction match(regex, userAgent) {\n  return regex.test(userAgent);\n}\n\nfunction isMobile(userAgent) {\n  var ua = userAgent || (typeof navigator !== 'undefined' ? navigator.userAgent : ''); // Facebook mobile app's integrated browser adds a bunch of strings that\n  // match everything. Strip it out if it exists.\n\n  var tmp = ua.split('[FBAN');\n\n  if (typeof tmp[1] !== 'undefined') {\n    var _tmp = tmp;\n\n    var _tmp2 = _slicedToArray(_tmp, 1);\n\n    ua = _tmp2[0];\n  } // Twitter mobile app's integrated browser on iPad adds a \"Twitter for\n  // iPhone\" string. Same probably happens on other tablet platforms.\n  // This will confuse detection so strip it out if it exists.\n\n\n  tmp = ua.split('Twitter');\n\n  if (typeof tmp[1] !== 'undefined') {\n    var _tmp3 = tmp;\n\n    var _tmp4 = _slicedToArray(_tmp3, 1);\n\n    ua = _tmp4[0];\n  }\n\n  var result = {\n    apple: {\n      phone: match(applePhone, ua) && !match(windowsPhone, ua),\n      ipod: match(appleIpod, ua),\n      tablet: !match(applePhone, ua) && match(appleTablet, ua) && !match(windowsPhone, ua),\n      device: (match(applePhone, ua) || match(appleIpod, ua) || match(appleTablet, ua)) && !match(windowsPhone, ua)\n    },\n    amazon: {\n      phone: match(amazonPhone, ua),\n      tablet: !match(amazonPhone, ua) && match(amazonTablet, ua),\n      device: match(amazonPhone, ua) || match(amazonTablet, ua)\n    },\n    android: {\n      phone: !match(windowsPhone, ua) && match(amazonPhone, ua) || !match(windowsPhone, ua) && match(androidPhone, ua),\n      tablet: !match(windowsPhone, ua) && !match(amazonPhone, ua) && !match(androidPhone, ua) && (match(amazonTablet, ua) || match(androidTablet, ua)),\n      device: !match(windowsPhone, ua) && (match(amazonPhone, ua) || match(amazonTablet, ua) || match(androidPhone, ua) || match(androidTablet, ua)) || match(/\\bokhttp\\b/i, ua)\n    },\n    windows: {\n      phone: match(windowsPhone, ua),\n      tablet: match(windowsTablet, ua),\n      device: match(windowsPhone, ua) || match(windowsTablet, ua)\n    },\n    other: {\n      blackberry: match(otherBlackberry, ua),\n      blackberry10: match(otherBlackberry10, ua),\n      opera: match(otherOpera, ua),\n      firefox: match(otherFirefox, ua),\n      chrome: match(otherChrome, ua),\n      device: match(otherBlackberry, ua) || match(otherBlackberry10, ua) || match(otherOpera, ua) || match(otherFirefox, ua) || match(otherChrome, ua)\n    },\n    // Additional\n    any: null,\n    phone: null,\n    tablet: null\n  };\n  result.any = result.apple.device || result.android.device || result.windows.device || result.other.device; // excludes 'other' devices and ipods, targeting touchscreen phones\n\n  result.phone = result.apple.phone || result.android.phone || result.windows.phone;\n  result.tablet = result.apple.tablet || result.android.tablet || result.windows.tablet;\n  return result;\n}\n\nvar defaultResult = _objectSpread(_objectSpread({}, isMobile()), {}, {\n  isMobile: isMobile\n});\n\nexport default defaultResult;"]},"metadata":{},"sourceType":"module"}