define(["exports"],function(_exports){function supportsConnectionTypeDetection(){if("undefined"!=typeof navigator){var connection=navigator.connection;if(connection){var connectionType=connection.type;if(connectionType||void 0!==connectionType)return!0;connectionType=connection.effectiveType;if("slow-2g"===connectionType||"2g"===connectionType||"3g"===connectionType)return!0}}return!1}Object.defineProperty(_exports,"__esModule",{value:!0}),_exports.default=void 0;_exports.default={supportsConnectionTypeDetection:supportsConnectionTypeDetection,getDefaultQuality:function(networkType){switch(networkType){case"wan":return function(){if("undefined"!=typeof navigator){var connection=navigator.connection;if(connection){var downlink=connection.downlink;if(downlink&&0<downlink&&downlink<Number.POSITIVE_INFINITY)return downlink=downlink*1e6*.7,downlink=parseInt(downlink);if((downlink=connection.downlinkMax)&&0<downlink&&downlink<Number.POSITIVE_INFINITY)return downlink=downlink*1e6*.7,downlink=parseInt(downlink)}}return null}()||(supportsConnectionTypeDetection()?12e6:4000002);case"cellular":return 1000001;default:return 2e8}}}});