2018-07-23 15:12:18 +02:00
( function webpackUniversalModuleDefinition ( root , factory ) {
if ( typeof exports === 'object' && typeof module === 'object' )
2019-03-13 06:06:43 +01:00
module . exports = factory ( require ( "lbry-redux" ) ) ;
2018-07-23 15:12:18 +02:00
else if ( typeof define === 'function' && define . amd )
2019-03-13 06:06:43 +01:00
define ( [ "lbry-redux" ] , factory ) ;
2018-07-23 15:12:18 +02:00
else {
2019-03-13 06:06:43 +01:00
var a = typeof exports === 'object' ? factory ( require ( "lbry-redux" ) ) : factory ( root [ "lbry-redux" ] ) ;
2018-07-23 15:12:18 +02:00
for ( var i in a ) ( typeof exports === 'object' ? exports : root ) [ i ] = a [ i ] ;
}
2020-01-10 04:28:46 +01:00
} ) ( window , function ( _ _WEBPACK _EXTERNAL _MODULE _ _5 _ _ ) {
2018-07-23 15:12:18 +02:00
return /******/ ( function ( modules ) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = { } ;
/******/
/******/ // The require function
/******/ function _ _webpack _require _ _ ( moduleId ) {
/******/
/******/ // Check if module is in cache
/******/ if ( installedModules [ moduleId ] ) {
/******/ return installedModules [ moduleId ] . exports ;
/******/ }
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules [ moduleId ] = {
/******/ i : moduleId ,
/******/ l : false ,
/******/ exports : { }
/******/ } ;
/******/
/******/ // Execute the module function
/******/ modules [ moduleId ] . call ( module . exports , module , module . exports , _ _webpack _require _ _ ) ;
/******/
/******/ // Flag the module as loaded
/******/ module . l = true ;
/******/
/******/ // Return the exports of the module
/******/ return module . exports ;
/******/ }
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/ _ _webpack _require _ _ . m = modules ;
/******/
/******/ // expose the module cache
/******/ _ _webpack _require _ _ . c = installedModules ;
/******/
/******/ // define getter function for harmony exports
/******/ _ _webpack _require _ _ . d = function ( exports , name , getter ) {
/******/ if ( ! _ _webpack _require _ _ . o ( exports , name ) ) {
/******/ Object . defineProperty ( exports , name , { enumerable : true , get : getter } ) ;
/******/ }
/******/ } ;
/******/
/******/ // define __esModule on exports
/******/ _ _webpack _require _ _ . r = function ( exports ) {
/******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
/******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
/******/ }
/******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
/******/ } ;
/******/
/******/ // create a fake namespace object
/******/ // mode & 1: value is a module id, require it
/******/ // mode & 2: merge all properties of value into the ns
/******/ // mode & 4: return value when already ns object
/******/ // mode & 8|1: behave like require
/******/ _ _webpack _require _ _ . t = function ( value , mode ) {
/******/ if ( mode & 1 ) value = _ _webpack _require _ _ ( value ) ;
/******/ if ( mode & 8 ) return value ;
/******/ if ( ( mode & 4 ) && typeof value === 'object' && value && value . _ _esModule ) return value ;
/******/ var ns = Object . create ( null ) ;
/******/ _ _webpack _require _ _ . r ( ns ) ;
/******/ Object . defineProperty ( ns , 'default' , { enumerable : true , value : value } ) ;
/******/ if ( mode & 2 && typeof value != 'string' ) for ( var key in value ) _ _webpack _require _ _ . d ( ns , key , function ( key ) { return value [ key ] ; } . bind ( null , key ) ) ;
/******/ return ns ;
/******/ } ;
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/ _ _webpack _require _ _ . n = function ( module ) {
/******/ var getter = module && module . _ _esModule ?
/******/ function getDefault ( ) { return module [ 'default' ] ; } :
/******/ function getModuleExports ( ) { return module ; } ;
/******/ _ _webpack _require _ _ . d ( getter , 'a' , getter ) ;
/******/ return getter ;
/******/ } ;
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/ _ _webpack _require _ _ . o = function ( object , property ) { return Object . prototype . hasOwnProperty . call ( object , property ) ; } ;
/******/
/******/ // __webpack_public_path__
/******/ _ _webpack _require _ _ . p = "" ;
/******/
/******/
/******/ // Load entry module and return exports
/******/ return _ _webpack _require _ _ ( _ _webpack _require _ _ . s = 0 ) ;
/******/ } )
/************************************************************************/
/******/ ( [
/* 0 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-07-23 15:12:18 +02:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
/* harmony reexport (module object) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "LBRYINC_ACTIONS" , function ( ) { return constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony import */ var constants _youtube _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 2 ) ;
/* harmony reexport (module object) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "YOUTUBE_STATUSES" , function ( ) { return constants _youtube _ _WEBPACK _IMPORTED _MODULE _1 _ _ ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var constants _errors _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 3 ) ;
/* harmony reexport (module object) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ERRORS" , function ( ) { return constants _errors _ _WEBPACK _IMPORTED _MODULE _2 _ _ ; } ) ;
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 4 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "Lbryio" , function ( ) { return lbryio _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "default" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var rewards _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( 9 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "rewards" , function ( ) { return rewards _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "default" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _subscriptions _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( 10 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "subscriptionsReducer" , function ( ) { return redux _reducers _subscriptions _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _middleware _sync _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( 13 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "userStateSyncMiddleware" , function ( ) { return redux _middleware _sync _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "userStateSyncMiddleware" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var util _transifex _upload _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( 17 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doTransifexUpload" , function ( ) { return util _transifex _upload _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "doTransifexUpload" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _auth _ _WEBPACK _IMPORTED _MODULE _8 _ _ = _ _webpack _require _ _ ( 23 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doGenerateAuthToken" , function ( ) { return redux _actions _auth _ _WEBPACK _IMPORTED _MODULE _8 _ _ [ "doGenerateAuthToken" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _9 _ _ = _ _webpack _require _ _ ( 24 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doRewardList" , function ( ) { return redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "doRewardList" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClaimRewardType" , function ( ) { return redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "doClaimRewardType" ] ; } ) ;
2019-02-15 10:02:34 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClaimEligiblePurchaseRewards" , function ( ) { return redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "doClaimEligiblePurchaseRewards" ] ; } ) ;
2019-02-15 10:02:34 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClaimRewardClearError" , function ( ) { return redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "doClaimRewardClearError" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchRewardedContent" , function ( ) { return redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _9 _ _ [ "doFetchRewardedContent" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ = _ _webpack _require _ _ ( 28 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doChannelSubscribe" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doChannelSubscribe" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doChannelUnsubscribe" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doChannelUnsubscribe" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doChannelSubscriptionEnableNotifications" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doChannelSubscriptionEnableNotifications" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doChannelSubscriptionDisableNotifications" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doChannelSubscriptionDisableNotifications" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckSubscription" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doCheckSubscription" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckSubscriptions" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doCheckSubscriptions" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckSubscriptionsInit" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doCheckSubscriptionsInit" ] ; } ) ;
2019-03-14 19:39:39 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCompleteFirstRun" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doCompleteFirstRun" ] ; } ) ;
2019-03-14 19:39:39 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchMySubscriptions" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doFetchMySubscriptions" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchRecommendedSubscriptions" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doFetchRecommendedSubscriptions" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doRemoveUnreadSubscription" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doRemoveUnreadSubscription" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doRemoveUnreadSubscriptions" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doRemoveUnreadSubscriptions" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSetViewMode" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doSetViewMode" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doShowSuggestedSubs" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doShowSuggestedSubs" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUpdateUnreadSubscriptions" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "doUpdateUnreadSubscriptions" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "setSubscriptionLatest" , function ( ) { return redux _actions _subscriptions _ _WEBPACK _IMPORTED _MODULE _10 _ _ [ "setSubscriptionLatest" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ = _ _webpack _require _ _ ( 27 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchInviteStatus" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doFetchInviteStatus" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doInstallNew" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doInstallNew" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-03-19 08:55:45 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doInstallNewWithParams" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doInstallNewWithParams" ] ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doAuthenticate" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doAuthenticate" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserFetch" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserFetch" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-04-13 15:40:25 +02:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserSignIn" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserSignIn" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserSignUp" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserSignUp" ] ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserEmailNew" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserEmailNew" ] ; } ) ;
2019-03-14 19:39:39 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserCheckEmailVerified" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserCheckEmailVerified" ] ; } ) ;
2019-03-14 19:39:39 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserEmailToVerify" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserEmailToVerify" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserEmailVerifyFailure" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserEmailVerifyFailure" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserEmailVerify" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserEmailVerify" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPhoneNew" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserPhoneNew" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPhoneReset" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserPhoneReset" ] ; } ) ;
2019-02-15 10:02:34 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPhoneVerifyFailure" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserPhoneVerifyFailure" ] ; } ) ;
2019-02-15 10:02:34 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPhoneVerify" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserPhoneVerify" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchAccessToken" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doFetchAccessToken" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserResendVerificationEmail" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserResendVerificationEmail" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserIdentityVerify" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserIdentityVerify" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserInviteNew" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserInviteNew" ] ; } ) ;
2019-09-16 21:10:48 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClaimYoutubeChannels" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doClaimYoutubeChannels" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckYoutubeTransfer" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doCheckYoutubeTransfer" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserSetReferrer" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserSetReferrer" ] ; } ) ;
2020-01-08 22:58:07 +01:00
2020-01-16 23:52:53 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserSetReferrerReset" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserSetReferrerReset" ] ; } ) ;
2020-04-13 15:40:25 +02:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPasswordReset" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserPasswordReset" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPasswordSet" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserPasswordSet" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserCheckIfEmailExists" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doUserCheckIfEmailExists" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClearEmailEntry" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doClearEmailEntry" ] ; } ) ;
2020-04-13 19:43:15 +02:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClearPasswordEntry" , function ( ) { return redux _actions _user _ _WEBPACK _IMPORTED _MODULE _11 _ _ [ "doClearPasswordEntry" ] ; } ) ;
2020-04-13 15:40:25 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _cost _info _ _WEBPACK _IMPORTED _MODULE _12 _ _ = _ _webpack _require _ _ ( 30 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchCostInfoForUri" , function ( ) { return redux _actions _cost _info _ _WEBPACK _IMPORTED _MODULE _12 _ _ [ "doFetchCostInfoForUri" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _blacklist _ _WEBPACK _IMPORTED _MODULE _13 _ _ = _ _webpack _require _ _ ( 31 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doBlackListedOutpointsSubscribe" , function ( ) { return redux _actions _blacklist _ _WEBPACK _IMPORTED _MODULE _13 _ _ [ "doBlackListedOutpointsSubscribe" ] ; } ) ;
2019-03-11 03:02:17 +01:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _filtered _ _WEBPACK _IMPORTED _MODULE _14 _ _ = _ _webpack _require _ _ ( 32 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFilteredOutpointsSubscribe" , function ( ) { return redux _actions _filtered _ _WEBPACK _IMPORTED _MODULE _14 _ _ [ "doFilteredOutpointsSubscribe" ] ; } ) ;
2019-05-27 15:57:31 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _homepage _ _WEBPACK _IMPORTED _MODULE _15 _ _ = _ _webpack _require _ _ ( 33 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchFeaturedUris" , function ( ) { return redux _actions _homepage _ _WEBPACK _IMPORTED _MODULE _15 _ _ [ "doFetchFeaturedUris" ] ; } ) ;
2019-03-14 19:39:39 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchTrendingUris" , function ( ) { return redux _actions _homepage _ _WEBPACK _IMPORTED _MODULE _15 _ _ [ "doFetchTrendingUris" ] ; } ) ;
2019-09-25 04:30:53 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _stats _ _WEBPACK _IMPORTED _MODULE _16 _ _ = _ _webpack _require _ _ ( 34 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchViewCount" , function ( ) { return redux _actions _stats _ _WEBPACK _IMPORTED _MODULE _16 _ _ [ "doFetchViewCount" ] ; } ) ;
2019-03-14 19:39:39 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchSubCount" , function ( ) { return redux _actions _stats _ _WEBPACK _IMPORTED _MODULE _16 _ _ [ "doFetchSubCount" ] ; } ) ;
2019-05-10 16:45:56 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _sync _ _WEBPACK _IMPORTED _MODULE _17 _ _ = _ _webpack _require _ _ ( 35 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckSync" , function ( ) { return redux _actions _sync _ _WEBPACK _IMPORTED _MODULE _17 _ _ [ "doCheckSync" ] ; } ) ;
2019-05-27 15:57:31 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doGetSync" , function ( ) { return redux _actions _sync _ _WEBPACK _IMPORTED _MODULE _17 _ _ [ "doGetSync" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSetSync" , function ( ) { return redux _actions _sync _ _WEBPACK _IMPORTED _MODULE _17 _ _ [ "doSetSync" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSetDefaultAccount" , function ( ) { return redux _actions _sync _ _WEBPACK _IMPORTED _MODULE _17 _ _ [ "doSetDefaultAccount" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSyncApply" , function ( ) { return redux _actions _sync _ _WEBPACK _IMPORTED _MODULE _17 _ _ [ "doSyncApply" ] ; } ) ;
2019-10-02 22:22:51 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doResetSync" , function ( ) { return redux _actions _sync _ _WEBPACK _IMPORTED _MODULE _17 _ _ [ "doResetSync" ] ; } ) ;
2019-10-17 06:00:43 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSyncEncryptAndDecrypt" , function ( ) { return redux _actions _sync _ _WEBPACK _IMPORTED _MODULE _17 _ _ [ "doSyncEncryptAndDecrypt" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _lbrytv _ _WEBPACK _IMPORTED _MODULE _18 _ _ = _ _webpack _require _ _ ( 36 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUpdateUploadProgress" , function ( ) { return redux _actions _lbrytv _ _WEBPACK _IMPORTED _MODULE _18 _ _ [ "doUpdateUploadProgress" ] ; } ) ;
2018-08-24 12:35:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _auth _ _WEBPACK _IMPORTED _MODULE _19 _ _ = _ _webpack _require _ _ ( 37 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "authReducer" , function ( ) { return redux _reducers _auth _ _WEBPACK _IMPORTED _MODULE _19 _ _ [ "authReducer" ] ; } ) ;
2018-08-24 12:35:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _rewards _ _WEBPACK _IMPORTED _MODULE _20 _ _ = _ _webpack _require _ _ ( 38 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "rewardsReducer" , function ( ) { return redux _reducers _rewards _ _WEBPACK _IMPORTED _MODULE _20 _ _ [ "rewardsReducer" ] ; } ) ;
2019-02-15 10:02:34 +01:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _user _ _WEBPACK _IMPORTED _MODULE _21 _ _ = _ _webpack _require _ _ ( 39 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "userReducer" , function ( ) { return redux _reducers _user _ _WEBPACK _IMPORTED _MODULE _21 _ _ [ "userReducer" ] ; } ) ;
2019-02-15 10:02:34 +01:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _cost _info _ _WEBPACK _IMPORTED _MODULE _22 _ _ = _ _webpack _require _ _ ( 40 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "costInfoReducer" , function ( ) { return redux _reducers _cost _info _ _WEBPACK _IMPORTED _MODULE _22 _ _ [ "costInfoReducer" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _blacklist _ _WEBPACK _IMPORTED _MODULE _23 _ _ = _ _webpack _require _ _ ( 41 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "blacklistReducer" , function ( ) { return redux _reducers _blacklist _ _WEBPACK _IMPORTED _MODULE _23 _ _ [ "blacklistReducer" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _filtered _ _WEBPACK _IMPORTED _MODULE _24 _ _ = _ _webpack _require _ _ ( 42 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "filteredReducer" , function ( ) { return redux _reducers _filtered _ _WEBPACK _IMPORTED _MODULE _24 _ _ [ "filteredReducer" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _homepage _ _WEBPACK _IMPORTED _MODULE _25 _ _ = _ _webpack _require _ _ ( 43 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "homepageReducer" , function ( ) { return redux _reducers _homepage _ _WEBPACK _IMPORTED _MODULE _25 _ _ [ "homepageReducer" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _stats _ _WEBPACK _IMPORTED _MODULE _26 _ _ = _ _webpack _require _ _ ( 44 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "statsReducer" , function ( ) { return redux _reducers _stats _ _WEBPACK _IMPORTED _MODULE _26 _ _ [ "statsReducer" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _sync _ _WEBPACK _IMPORTED _MODULE _27 _ _ = _ _webpack _require _ _ ( 45 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "syncReducer" , function ( ) { return redux _reducers _sync _ _WEBPACK _IMPORTED _MODULE _27 _ _ [ "syncReducer" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _reducers _lbrytv _ _WEBPACK _IMPORTED _MODULE _28 _ _ = _ _webpack _require _ _ ( 46 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "lbrytvReducer" , function ( ) { return redux _reducers _lbrytv _ _WEBPACK _IMPORTED _MODULE _28 _ _ [ "lbrytvReducer" ] ; } ) ;
2019-02-15 10:02:34 +01:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _auth _ _WEBPACK _IMPORTED _MODULE _29 _ _ = _ _webpack _require _ _ ( 47 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectAuthToken" , function ( ) { return redux _selectors _auth _ _WEBPACK _IMPORTED _MODULE _29 _ _ [ "selectAuthToken" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIsAuthenticating" , function ( ) { return redux _selectors _auth _ _WEBPACK _IMPORTED _MODULE _29 _ _ [ "selectIsAuthenticating" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ = _ _webpack _require _ _ ( 25 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectClaimRewardError" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "makeSelectClaimRewardError" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectIsRewardClaimPending" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "makeSelectIsRewardClaimPending" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectRewardAmountByType" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "makeSelectRewardAmountByType" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectRewardByType" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "makeSelectRewardByType" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-03-26 19:50:21 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectRewardByClaimCode" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "makeSelectRewardByClaimCode" ] ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnclaimedRewardsByType" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectUnclaimedRewardsByType" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimedRewardsById" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectClaimedRewardsById" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimedRewards" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectClaimedRewards" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimedRewardsByTransactionId" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectClaimedRewardsByTransactionId" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnclaimedRewards" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectUnclaimedRewards" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFetchingRewards" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectFetchingRewards" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnclaimedRewardValue" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectUnclaimedRewardValue" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimsPendingByType" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectClaimsPendingByType" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimErrorsByType" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectClaimErrorsByType" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectRewardContentClaimIds" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectRewardContentClaimIds" ] ; } ) ;
2019-03-14 19:39:39 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectReferralReward" , function ( ) { return redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _30 _ _ [ "selectReferralReward" ] ; } ) ;
2018-07-23 16:12:22 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ = _ _webpack _require _ _ ( 14 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectIsNew" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "makeSelectIsNew" ] ; } ) ;
2018-12-04 17:08:20 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectIsSubscribed" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "makeSelectIsSubscribed" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectUnreadByChannel" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "makeSelectUnreadByChannel" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEnabledChannelNotifications" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectEnabledChannelNotifications" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSubscriptions" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectSubscriptions" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIsFetchingSubscriptions" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectIsFetchingSubscriptions" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectViewMode" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectViewMode" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSuggested" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectSuggested" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIsFetchingSuggested" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectIsFetchingSuggested" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSuggestedChannels" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectSuggestedChannels" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFirstRunCompleted" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectFirstRunCompleted" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectShowSuggestedSubs" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectShowSuggestedSubs" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSubscriptionsBeingFetched" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectSubscriptionsBeingFetched" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnreadByChannel" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectUnreadByChannel" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnreadAmount" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectUnreadAmount" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnreadSubscriptions" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectUnreadSubscriptions" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSubscriptionClaims" , function ( ) { return redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _31 _ _ [ "selectSubscriptionClaims" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ = _ _webpack _require _ _ ( 26 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectAuthenticationIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectAuthenticationIsPending" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserIsPending" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUser" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUser" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserEmail" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserEmail" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserPhone" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserPhone" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserCountryCode" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserCountryCode" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailToVerify" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectEmailToVerify" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneToVerify" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPhoneToVerify" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserIsRewardApproved" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserIsRewardApproved" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailNewIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectEmailNewIsPending" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailNewErrorMessage" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectEmailNewErrorMessage" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneNewErrorMessage" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPhoneNewErrorMessage" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneNewIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPhoneNewIsPending" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailVerifyIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectEmailVerifyIsPending" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailVerifyErrorMessage" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectEmailVerifyErrorMessage" ] ; } ) ;
2019-10-25 20:53:13 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailAlreadyExists" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectEmailAlreadyExists" ] ; } ) ;
2019-10-25 20:53:13 +02:00
2020-04-13 15:40:25 +02:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailDoesNotExist" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectEmailDoesNotExist" ] ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectResendingVerificationEmail" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectResendingVerificationEmail" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneVerifyErrorMessage" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPhoneVerifyErrorMessage" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneVerifyIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPhoneVerifyIsPending" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIdentityVerifyIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectIdentityVerifyIsPending" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIdentityVerifyErrorMessage" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectIdentityVerifyErrorMessage" ] ; } ) ;
2019-02-17 09:13:34 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserIsVerificationCandidate" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserIsVerificationCandidate" ] ; } ) ;
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectAccessToken" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectAccessToken" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteStatusIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserInviteStatusIsPending" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInvitesRemaining" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserInvitesRemaining" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInvitees" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserInvitees" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteStatusFailed" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserInviteStatusFailed" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteNewIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserInviteNewIsPending" ] ; } ) ;
2019-09-13 02:57:10 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteNewErrorMessage" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserInviteNewErrorMessage" ] ; } ) ;
2019-09-17 23:01:10 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteReferralLink" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserInviteReferralLink" ] ; } ) ;
2019-09-17 23:01:10 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteReferralCode" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserInviteReferralCode" ] ; } ) ;
2020-01-08 22:58:07 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserVerifiedEmail" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectUserVerifiedEmail" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectYoutubeChannels" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectYoutubeChannels" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectYouTubeImportPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectYouTubeImportPending" ] ; } ) ;
2019-04-18 10:02:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectYouTubeImportError" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectYouTubeImportError" ] ; } ) ;
2019-04-18 10:02:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectYouTubeImportVideosComplete" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectYouTubeImportVideosComplete" ] ; } ) ;
2019-04-18 10:02:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSetReferrerPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectSetReferrerPending" ] ; } ) ;
2020-01-08 22:58:07 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSetReferrerError" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectSetReferrerError" ] ; } ) ;
2020-01-08 22:58:07 +01:00
2020-04-13 15:40:25 +02:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordResetIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPasswordResetIsPending" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordResetSuccess" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPasswordResetSuccess" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordResetError" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPasswordResetError" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordSetIsPending" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPasswordSetIsPending" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordSetSuccess" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPasswordSetSuccess" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordSetError" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPasswordSetError" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordExists" , function ( ) { return redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _32 _ _ [ "selectPasswordExists" ] ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _cost _info _ _WEBPACK _IMPORTED _MODULE _33 _ _ = _ _webpack _require _ _ ( 48 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectFetchingCostInfoForUri" , function ( ) { return redux _selectors _cost _info _ _WEBPACK _IMPORTED _MODULE _33 _ _ [ "makeSelectFetchingCostInfoForUri" ] ; } ) ;
2019-04-18 10:02:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectCostInfoForUri" , function ( ) { return redux _selectors _cost _info _ _WEBPACK _IMPORTED _MODULE _33 _ _ [ "makeSelectCostInfoForUri" ] ; } ) ;
2019-04-18 10:02:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectAllCostInfoByUri" , function ( ) { return redux _selectors _cost _info _ _WEBPACK _IMPORTED _MODULE _33 _ _ [ "selectAllCostInfoByUri" ] ; } ) ;
2019-05-27 15:57:31 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFetchingCostInfo" , function ( ) { return redux _selectors _cost _info _ _WEBPACK _IMPORTED _MODULE _33 _ _ [ "selectFetchingCostInfo" ] ; } ) ;
2019-04-18 10:02:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _blacklist _ _WEBPACK _IMPORTED _MODULE _34 _ _ = _ _webpack _require _ _ ( 49 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectBlackListedOutpoints" , function ( ) { return redux _selectors _blacklist _ _WEBPACK _IMPORTED _MODULE _34 _ _ [ "selectBlackListedOutpoints" ] ; } ) ;
2019-04-18 10:02:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _filtered _ _WEBPACK _IMPORTED _MODULE _35 _ _ = _ _webpack _require _ _ ( 50 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFilteredOutpoints" , function ( ) { return redux _selectors _filtered _ _WEBPACK _IMPORTED _MODULE _35 _ _ [ "selectFilteredOutpoints" ] ; } ) ;
2019-05-27 15:57:31 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _homepage _ _WEBPACK _IMPORTED _MODULE _36 _ _ = _ _webpack _require _ _ ( 51 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFeaturedUris" , function ( ) { return redux _selectors _homepage _ _WEBPACK _IMPORTED _MODULE _36 _ _ [ "selectFeaturedUris" ] ; } ) ;
2019-09-25 04:30:53 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFetchingFeaturedUris" , function ( ) { return redux _selectors _homepage _ _WEBPACK _IMPORTED _MODULE _36 _ _ [ "selectFetchingFeaturedUris" ] ; } ) ;
2019-04-18 10:02:11 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectTrendingUris" , function ( ) { return redux _selectors _homepage _ _WEBPACK _IMPORTED _MODULE _36 _ _ [ "selectTrendingUris" ] ; } ) ;
2019-05-27 15:57:31 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFetchingTrendingUris" , function ( ) { return redux _selectors _homepage _ _WEBPACK _IMPORTED _MODULE _36 _ _ [ "selectFetchingTrendingUris" ] ; } ) ;
2019-07-09 16:20:01 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _stats _ _WEBPACK _IMPORTED _MODULE _37 _ _ = _ _webpack _require _ _ ( 52 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectViewCountForUri" , function ( ) { return redux _selectors _stats _ _WEBPACK _IMPORTED _MODULE _37 _ _ [ "makeSelectViewCountForUri" ] ; } ) ;
2019-07-09 16:20:01 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectSubCountForUri" , function ( ) { return redux _selectors _stats _ _WEBPACK _IMPORTED _MODULE _37 _ _ [ "makeSelectSubCountForUri" ] ; } ) ;
2019-07-09 16:20:01 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ = _ _webpack _require _ _ ( 53 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectHasSyncedWallet" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectHasSyncedWallet" ] ; } ) ;
2019-08-16 03:33:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncData" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectSyncData" ] ; } ) ;
2019-04-03 23:34:07 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncHash" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectSyncHash" ] ; } ) ;
2019-10-02 06:15:24 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSetSyncErrorMessage" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectSetSyncErrorMessage" ] ; } ) ;
2019-10-02 06:15:24 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectGetSyncErrorMessage" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectGetSyncErrorMessage" ] ; } ) ;
2019-10-02 06:15:24 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectGetSyncIsPending" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectGetSyncIsPending" ] ; } ) ;
2019-10-02 06:15:24 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSetSyncIsPending" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectSetSyncIsPending" ] ; } ) ;
2019-10-22 21:21:42 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncApplyIsPending" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectSyncApplyIsPending" ] ; } ) ;
2019-10-22 21:21:42 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectHashChanged" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectHashChanged" ] ; } ) ;
2019-10-22 21:21:42 +02:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncApplyErrorMessage" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectSyncApplyErrorMessage" ] ; } ) ;
2019-10-29 20:14:41 +01:00
2020-01-10 04:28:46 +01:00
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncApplyPasswordError" , function ( ) { return redux _selectors _sync _ _WEBPACK _IMPORTED _MODULE _38 _ _ [ "selectSyncApplyPasswordError" ] ; } ) ;
2019-10-22 21:21:42 +02:00
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _lbrytv _ _WEBPACK _IMPORTED _MODULE _39 _ _ = _ _webpack _require _ _ ( 54 ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectCurrentUploads" , function ( ) { return redux _selectors _lbrytv _ _WEBPACK _IMPORTED _MODULE _39 _ _ [ "selectCurrentUploads" ] ; } ) ;
/* harmony reexport (safe) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUploadCount" , function ( ) { return redux _selectors _lbrytv _ _WEBPACK _IMPORTED _MODULE _39 _ _ [ "selectUploadCount" ] ; } ) ;
2019-12-05 13:13:10 +01:00
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
// middleware
2019-04-03 23:34:07 +02:00
// constants
// Lbryio and rewards
2019-12-05 13:13:10 +01:00
// utils
2019-04-03 23:34:07 +02:00
// actions
2019-04-18 10:02:11 +02:00
2019-07-09 16:20:01 +02:00
2019-10-22 21:21:42 +02:00
2019-04-03 23:34:07 +02:00
// reducers
2019-04-18 10:02:11 +02:00
2019-07-09 16:20:01 +02:00
2019-10-22 21:21:42 +02:00
2019-04-03 23:34:07 +02:00
// selectors
2019-04-18 10:02:11 +02:00
2019-07-09 16:20:01 +02:00
2019-10-22 21:21:42 +02:00
2019-04-03 23:34:07 +02:00
/***/ } ) ,
/* 1 */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "GENERATE_AUTH_TOKEN_FAILURE" , function ( ) { return GENERATE _AUTH _TOKEN _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "GENERATE_AUTH_TOKEN_STARTED" , function ( ) { return GENERATE _AUTH _TOKEN _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "GENERATE_AUTH_TOKEN_SUCCESS" , function ( ) { return GENERATE _AUTH _TOKEN _SUCCESS ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "AUTHENTICATION_STARTED" , function ( ) { return AUTHENTICATION _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "AUTHENTICATION_SUCCESS" , function ( ) { return AUTHENTICATION _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "AUTHENTICATION_FAILURE" , function ( ) { return AUTHENTICATION _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_DECLINE" , function ( ) { return USER _EMAIL _DECLINE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_NEW_STARTED" , function ( ) { return USER _EMAIL _NEW _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_NEW_SUCCESS" , function ( ) { return USER _EMAIL _NEW _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_NEW_EXISTS" , function ( ) { return USER _EMAIL _NEW _EXISTS ; } ) ;
2020-04-13 15:40:25 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_NEW_DOES_NOT_EXIST" , function ( ) { return USER _EMAIL _NEW _DOES _NOT _EXIST ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_NEW_FAILURE" , function ( ) { return USER _EMAIL _NEW _FAILURE ; } ) ;
2020-04-13 15:40:25 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_NEW_CLEAR_ENTRY" , function ( ) { return USER _EMAIL _NEW _CLEAR _ENTRY ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_VERIFY_SET" , function ( ) { return USER _EMAIL _VERIFY _SET ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_VERIFY_STARTED" , function ( ) { return USER _EMAIL _VERIFY _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_VERIFY_SUCCESS" , function ( ) { return USER _EMAIL _VERIFY _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_VERIFY_FAILURE" , function ( ) { return USER _EMAIL _VERIFY _FAILURE ; } ) ;
2019-10-25 20:53:13 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_VERIFY_RETRY_STARTED" , function ( ) { return USER _EMAIL _VERIFY _RETRY _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_VERIFY_RETRY_FAILURE" , function ( ) { return USER _EMAIL _VERIFY _RETRY _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_EMAIL_VERIFY_RETRY_SUCCESS" , function ( ) { return USER _EMAIL _VERIFY _RETRY _SUCCESS ; } ) ;
2020-04-13 15:40:25 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PASSWORD_EXISTS" , function ( ) { return USER _PASSWORD _EXISTS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PASSWORD_RESET_STARTED" , function ( ) { return USER _PASSWORD _RESET _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PASSWORD_RESET_SUCCESS" , function ( ) { return USER _PASSWORD _RESET _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PASSWORD_RESET_FAILURE" , function ( ) { return USER _PASSWORD _RESET _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PASSWORD_SET_STARTED" , function ( ) { return USER _PASSWORD _SET _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PASSWORD_SET_SUCCESS" , function ( ) { return USER _PASSWORD _SET _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PASSWORD_SET_FAILURE" , function ( ) { return USER _PASSWORD _SET _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PASSWORD_SET_CLEAR" , function ( ) { return USER _PASSWORD _SET _CLEAR ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PHONE_RESET" , function ( ) { return USER _PHONE _RESET ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PHONE_NEW_STARTED" , function ( ) { return USER _PHONE _NEW _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PHONE_NEW_SUCCESS" , function ( ) { return USER _PHONE _NEW _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PHONE_NEW_FAILURE" , function ( ) { return USER _PHONE _NEW _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PHONE_VERIFY_STARTED" , function ( ) { return USER _PHONE _VERIFY _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PHONE_VERIFY_SUCCESS" , function ( ) { return USER _PHONE _VERIFY _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_PHONE_VERIFY_FAILURE" , function ( ) { return USER _PHONE _VERIFY _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_IDENTITY_VERIFY_STARTED" , function ( ) { return USER _IDENTITY _VERIFY _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_IDENTITY_VERIFY_SUCCESS" , function ( ) { return USER _IDENTITY _VERIFY _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_IDENTITY_VERIFY_FAILURE" , function ( ) { return USER _IDENTITY _VERIFY _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_FETCH_STARTED" , function ( ) { return USER _FETCH _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_FETCH_SUCCESS" , function ( ) { return USER _FETCH _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_FETCH_FAILURE" , function ( ) { return USER _FETCH _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_INVITE_STATUS_FETCH_STARTED" , function ( ) { return USER _INVITE _STATUS _FETCH _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_INVITE_STATUS_FETCH_SUCCESS" , function ( ) { return USER _INVITE _STATUS _FETCH _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_INVITE_STATUS_FETCH_FAILURE" , function ( ) { return USER _INVITE _STATUS _FETCH _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_INVITE_NEW_STARTED" , function ( ) { return USER _INVITE _NEW _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_INVITE_NEW_SUCCESS" , function ( ) { return USER _INVITE _NEW _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_INVITE_NEW_FAILURE" , function ( ) { return USER _INVITE _NEW _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_ACCESS_TOKEN_SUCCESS" , function ( ) { return FETCH _ACCESS _TOKEN _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_YOUTUBE_IMPORT_STARTED" , function ( ) { return USER _YOUTUBE _IMPORT _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_YOUTUBE_IMPORT_FAILURE" , function ( ) { return USER _YOUTUBE _IMPORT _FAILURE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_YOUTUBE_IMPORT_SUCCESS" , function ( ) { return USER _YOUTUBE _IMPORT _SUCCESS ; } ) ;
2020-01-08 22:58:07 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_SET_REFERRER_STARTED" , function ( ) { return USER _SET _REFERRER _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_SET_REFERRER_SUCCESS" , function ( ) { return USER _SET _REFERRER _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_SET_REFERRER_FAILURE" , function ( ) { return USER _SET _REFERRER _FAILURE ; } ) ;
2020-01-16 23:52:53 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "USER_SET_REFERRER_RESET" , function ( ) { return USER _SET _REFERRER _RESET ; } ) ;
2019-04-03 23:34:07 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_FEATURED_CONTENT_STARTED" , function ( ) { return FETCH _FEATURED _CONTENT _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_FEATURED_CONTENT_COMPLETED" , function ( ) { return FETCH _FEATURED _CONTENT _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_TRENDING_CONTENT_STARTED" , function ( ) { return FETCH _TRENDING _CONTENT _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_TRENDING_CONTENT_COMPLETED" , function ( ) { return FETCH _TRENDING _CONTENT _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "RESOLVE_URIS_STARTED" , function ( ) { return RESOLVE _URIS _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "RESOLVE_URIS_COMPLETED" , function ( ) { return RESOLVE _URIS _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_CHANNEL_CLAIMS_STARTED" , function ( ) { return FETCH _CHANNEL _CLAIMS _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_CHANNEL_CLAIMS_COMPLETED" , function ( ) { return FETCH _CHANNEL _CLAIMS _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_CHANNEL_CLAIM_COUNT_STARTED" , function ( ) { return FETCH _CHANNEL _CLAIM _COUNT _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_CHANNEL_CLAIM_COUNT_COMPLETED" , function ( ) { return FETCH _CHANNEL _CLAIM _COUNT _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_CLAIM_LIST_MINE_STARTED" , function ( ) { return FETCH _CLAIM _LIST _MINE _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_CLAIM_LIST_MINE_COMPLETED" , function ( ) { return FETCH _CLAIM _LIST _MINE _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ABANDON_CLAIM_STARTED" , function ( ) { return ABANDON _CLAIM _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ABANDON_CLAIM_SUCCEEDED" , function ( ) { return ABANDON _CLAIM _SUCCEEDED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_CHANNEL_LIST_STARTED" , function ( ) { return FETCH _CHANNEL _LIST _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_CHANNEL_LIST_COMPLETED" , function ( ) { return FETCH _CHANNEL _LIST _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CREATE_CHANNEL_STARTED" , function ( ) { return CREATE _CHANNEL _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CREATE_CHANNEL_COMPLETED" , function ( ) { return CREATE _CHANNEL _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PUBLISH_STARTED" , function ( ) { return PUBLISH _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PUBLISH_COMPLETED" , function ( ) { return PUBLISH _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PUBLISH_FAILED" , function ( ) { return PUBLISH _FAILED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SET_PLAYING_URI" , function ( ) { return SET _PLAYING _URI ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SET_CONTENT_POSITION" , function ( ) { return SET _CONTENT _POSITION ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SET_CONTENT_LAST_VIEWED" , function ( ) { return SET _CONTENT _LAST _VIEWED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CLEAR_CONTENT_HISTORY_URI" , function ( ) { return CLEAR _CONTENT _HISTORY _URI ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CLEAR_CONTENT_HISTORY_ALL" , function ( ) { return CLEAR _CONTENT _HISTORY _ALL ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CHANNEL_SUBSCRIBE" , function ( ) { return CHANNEL _SUBSCRIBE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CHANNEL_UNSUBSCRIBE" , function ( ) { return CHANNEL _UNSUBSCRIBE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CHANNEL_SUBSCRIPTION_ENABLE_NOTIFICATIONS" , function ( ) { return CHANNEL _SUBSCRIPTION _ENABLE _NOTIFICATIONS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CHANNEL_SUBSCRIPTION_DISABLE_NOTIFICATIONS" , function ( ) { return CHANNEL _SUBSCRIPTION _DISABLE _NOTIFICATIONS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "HAS_FETCHED_SUBSCRIPTIONS" , function ( ) { return HAS _FETCHED _SUBSCRIPTIONS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SET_SUBSCRIPTION_LATEST" , function ( ) { return SET _SUBSCRIPTION _LATEST ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "UPDATE_SUBSCRIPTION_UNREADS" , function ( ) { return UPDATE _SUBSCRIPTION _UNREADS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "REMOVE_SUBSCRIPTION_UNREADS" , function ( ) { return REMOVE _SUBSCRIPTION _UNREADS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CHECK_SUBSCRIPTION_STARTED" , function ( ) { return CHECK _SUBSCRIPTION _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CHECK_SUBSCRIPTION_COMPLETED" , function ( ) { return CHECK _SUBSCRIPTION _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CHECK_SUBSCRIPTIONS_SUBSCRIBE" , function ( ) { return CHECK _SUBSCRIPTIONS _SUBSCRIBE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_SUBSCRIPTIONS_START" , function ( ) { return FETCH _SUBSCRIPTIONS _START ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_SUBSCRIPTIONS_FAIL" , function ( ) { return FETCH _SUBSCRIPTIONS _FAIL ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_SUBSCRIPTIONS_SUCCESS" , function ( ) { return FETCH _SUBSCRIPTIONS _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SET_VIEW_MODE" , function ( ) { return SET _VIEW _MODE ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "GET_SUGGESTED_SUBSCRIPTIONS_START" , function ( ) { return GET _SUGGESTED _SUBSCRIPTIONS _START ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "GET_SUGGESTED_SUBSCRIPTIONS_SUCCESS" , function ( ) { return GET _SUGGESTED _SUBSCRIPTIONS _SUCCESS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "GET_SUGGESTED_SUBSCRIPTIONS_FAIL" , function ( ) { return GET _SUGGESTED _SUBSCRIPTIONS _FAIL ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SUBSCRIPTION_FIRST_RUN_COMPLETED" , function ( ) { return SUBSCRIPTION _FIRST _RUN _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "VIEW_SUGGESTED_SUBSCRIPTIONS" , function ( ) { return VIEW _SUGGESTED _SUBSCRIPTIONS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_BLACK_LISTED_CONTENT_STARTED" , function ( ) { return FETCH _BLACK _LISTED _CONTENT _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_BLACK_LISTED_CONTENT_COMPLETED" , function ( ) { return FETCH _BLACK _LISTED _CONTENT _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_BLACK_LISTED_CONTENT_FAILED" , function ( ) { return FETCH _BLACK _LISTED _CONTENT _FAILED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "BLACK_LISTED_CONTENT_SUBSCRIBE" , function ( ) { return BLACK _LISTED _CONTENT _SUBSCRIBE ; } ) ;
2019-07-09 16:20:01 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_FILTERED_CONTENT_STARTED" , function ( ) { return FETCH _FILTERED _CONTENT _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_FILTERED_CONTENT_COMPLETED" , function ( ) { return FETCH _FILTERED _CONTENT _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_FILTERED_CONTENT_FAILED" , function ( ) { return FETCH _FILTERED _CONTENT _FAILED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FILTERED_CONTENT_SUBSCRIBE" , function ( ) { return FILTERED _CONTENT _SUBSCRIBE ; } ) ;
2019-04-03 23:34:07 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_COST_INFO_STARTED" , function ( ) { return FETCH _COST _INFO _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_COST_INFO_COMPLETED" , function ( ) { return FETCH _COST _INFO _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_VIEW_COUNT_STARTED" , function ( ) { return FETCH _VIEW _COUNT _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_VIEW_COUNT_FAILED" , function ( ) { return FETCH _VIEW _COUNT _FAILED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_VIEW_COUNT_COMPLETED" , function ( ) { return FETCH _VIEW _COUNT _COMPLETED ; } ) ;
2019-09-25 04:30:53 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_SUB_COUNT_STARTED" , function ( ) { return FETCH _SUB _COUNT _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_SUB_COUNT_FAILED" , function ( ) { return FETCH _SUB _COUNT _FAILED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "FETCH_SUB_COUNT_COMPLETED" , function ( ) { return FETCH _SUB _COUNT _COMPLETED ; } ) ;
2019-04-18 10:02:11 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "GET_SYNC_STARTED" , function ( ) { return GET _SYNC _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "GET_SYNC_COMPLETED" , function ( ) { return GET _SYNC _COMPLETED ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "GET_SYNC_FAILED" , function ( ) { return GET _SYNC _FAILED ; } ) ;
2019-04-18 10:02:11 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SET_SYNC_STARTED" , function ( ) { return SET _SYNC _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SET_SYNC_FAILED" , function ( ) { return SET _SYNC _FAILED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SET_SYNC_COMPLETED" , function ( ) { return SET _SYNC _COMPLETED ; } ) ;
2019-05-10 16:45:56 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SET_DEFAULT_ACCOUNT" , function ( ) { return SET _DEFAULT _ACCOUNT ; } ) ;
2019-05-27 15:57:31 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SYNC_APPLY_STARTED" , function ( ) { return SYNC _APPLY _STARTED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SYNC_APPLY_COMPLETED" , function ( ) { return SYNC _APPLY _COMPLETED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SYNC_APPLY_FAILED" , function ( ) { return SYNC _APPLY _FAILED ; } ) ;
2019-10-29 20:14:41 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SYNC_APPLY_BAD_PASSWORD" , function ( ) { return SYNC _APPLY _BAD _PASSWORD ; } ) ;
2019-10-02 22:22:51 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SYNC_RESET" , function ( ) { return SYNC _RESET ; } ) ;
2019-10-22 21:21:42 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "UPDATE_UPLOAD_PROGRESS" , function ( ) { return UPDATE _UPLOAD _PROGRESS ; } ) ;
2019-10-02 06:15:24 +02:00
// User
2019-04-03 23:34:07 +02:00
var GENERATE _AUTH _TOKEN _FAILURE = 'GENERATE_AUTH_TOKEN_FAILURE' ;
var GENERATE _AUTH _TOKEN _STARTED = 'GENERATE_AUTH_TOKEN_STARTED' ;
2019-10-02 06:15:24 +02:00
var GENERATE _AUTH _TOKEN _SUCCESS = 'GENERATE_AUTH_TOKEN_SUCCESS' ;
var AUTHENTICATION _STARTED = 'AUTHENTICATION_STARTED' ;
var AUTHENTICATION _SUCCESS = 'AUTHENTICATION_SUCCESS' ;
var AUTHENTICATION _FAILURE = 'AUTHENTICATION_FAILURE' ;
var USER _EMAIL _DECLINE = 'USER_EMAIL_DECLINE' ;
var USER _EMAIL _NEW _STARTED = 'USER_EMAIL_NEW_STARTED' ;
var USER _EMAIL _NEW _SUCCESS = 'USER_EMAIL_NEW_SUCCESS' ;
var USER _EMAIL _NEW _EXISTS = 'USER_EMAIL_NEW_EXISTS' ;
2020-04-13 15:40:25 +02:00
var USER _EMAIL _NEW _DOES _NOT _EXIST = 'USER_EMAIL_NEW_DOES_NOT_EXIST' ;
2019-10-02 06:15:24 +02:00
var USER _EMAIL _NEW _FAILURE = 'USER_EMAIL_NEW_FAILURE' ;
2020-04-13 15:40:25 +02:00
var USER _EMAIL _NEW _CLEAR _ENTRY = 'USER_EMAIL_NEW_CLEAR_ENTRY' ;
2019-10-02 06:15:24 +02:00
var USER _EMAIL _VERIFY _SET = 'USER_EMAIL_VERIFY_SET' ;
var USER _EMAIL _VERIFY _STARTED = 'USER_EMAIL_VERIFY_STARTED' ;
var USER _EMAIL _VERIFY _SUCCESS = 'USER_EMAIL_VERIFY_SUCCESS' ;
var USER _EMAIL _VERIFY _FAILURE = 'USER_EMAIL_VERIFY_FAILURE' ;
2019-10-25 20:53:13 +02:00
var USER _EMAIL _VERIFY _RETRY _STARTED = 'USER_EMAIL_VERIFY_RETRY_STARTED' ;
var USER _EMAIL _VERIFY _RETRY _FAILURE = 'USER_EMAIL_VERIFY_RETRY_FAILURE' ;
var USER _EMAIL _VERIFY _RETRY _SUCCESS = 'USER_EMAIL_VERIFY_RETRY_SUCCESS' ;
2020-04-13 15:40:25 +02:00
var USER _PASSWORD _EXISTS = 'USER_PASSWORD_EXISTS' ;
var USER _PASSWORD _RESET _STARTED = 'USER_PASSWORD_RESET_STARTED' ;
var USER _PASSWORD _RESET _SUCCESS = 'USER_PASSWORD_RESET_SUCCESS' ;
var USER _PASSWORD _RESET _FAILURE = 'USER_PASSWORD_RESET_FAILURE' ;
var USER _PASSWORD _SET _STARTED = 'USER_PASSWORD_SET_STARTED' ;
var USER _PASSWORD _SET _SUCCESS = 'USER_PASSWORD_SET_SUCCESS' ;
var USER _PASSWORD _SET _FAILURE = 'USER_PASSWORD_SET_FAILURE' ;
var USER _PASSWORD _SET _CLEAR = 'USER_PASSWORD_SET_CLEAR' ;
2019-10-02 06:15:24 +02:00
var USER _PHONE _RESET = 'USER_PHONE_RESET' ;
var USER _PHONE _NEW _STARTED = 'USER_PHONE_NEW_STARTED' ;
var USER _PHONE _NEW _SUCCESS = 'USER_PHONE_NEW_SUCCESS' ;
var USER _PHONE _NEW _FAILURE = 'USER_PHONE_NEW_FAILURE' ;
var USER _PHONE _VERIFY _STARTED = 'USER_PHONE_VERIFY_STARTED' ;
var USER _PHONE _VERIFY _SUCCESS = 'USER_PHONE_VERIFY_SUCCESS' ;
var USER _PHONE _VERIFY _FAILURE = 'USER_PHONE_VERIFY_FAILURE' ;
var USER _IDENTITY _VERIFY _STARTED = 'USER_IDENTITY_VERIFY_STARTED' ;
var USER _IDENTITY _VERIFY _SUCCESS = 'USER_IDENTITY_VERIFY_SUCCESS' ;
var USER _IDENTITY _VERIFY _FAILURE = 'USER_IDENTITY_VERIFY_FAILURE' ;
var USER _FETCH _STARTED = 'USER_FETCH_STARTED' ;
var USER _FETCH _SUCCESS = 'USER_FETCH_SUCCESS' ;
var USER _FETCH _FAILURE = 'USER_FETCH_FAILURE' ;
var USER _INVITE _STATUS _FETCH _STARTED = 'USER_INVITE_STATUS_FETCH_STARTED' ;
var USER _INVITE _STATUS _FETCH _SUCCESS = 'USER_INVITE_STATUS_FETCH_SUCCESS' ;
var USER _INVITE _STATUS _FETCH _FAILURE = 'USER_INVITE_STATUS_FETCH_FAILURE' ;
var USER _INVITE _NEW _STARTED = 'USER_INVITE_NEW_STARTED' ;
var USER _INVITE _NEW _SUCCESS = 'USER_INVITE_NEW_SUCCESS' ;
var USER _INVITE _NEW _FAILURE = 'USER_INVITE_NEW_FAILURE' ;
var FETCH _ACCESS _TOKEN _SUCCESS = 'FETCH_ACCESS_TOKEN_SUCCESS' ;
var USER _YOUTUBE _IMPORT _STARTED = 'USER_YOUTUBE_IMPORT_STARTED' ;
var USER _YOUTUBE _IMPORT _FAILURE = 'USER_YOUTUBE_IMPORT_FAILURE' ;
2020-01-08 22:58:07 +01:00
var USER _YOUTUBE _IMPORT _SUCCESS = 'USER_YOUTUBE_IMPORT_SUCCESS' ;
var USER _SET _REFERRER _STARTED = 'USER_SET_REFERRER_STARTED' ;
var USER _SET _REFERRER _SUCCESS = 'USER_SET_REFERRER_SUCCESS' ;
2020-01-16 23:52:53 +01:00
var USER _SET _REFERRER _FAILURE = 'USER_SET_REFERRER_FAILURE' ;
var USER _SET _REFERRER _RESET = 'USER_SET_REFERRER_RESET' ; // Claims
2019-04-03 23:34:07 +02:00
var FETCH _FEATURED _CONTENT _STARTED = 'FETCH_FEATURED_CONTENT_STARTED' ;
var FETCH _FEATURED _CONTENT _COMPLETED = 'FETCH_FEATURED_CONTENT_COMPLETED' ;
var FETCH _TRENDING _CONTENT _STARTED = 'FETCH_TRENDING_CONTENT_STARTED' ;
var FETCH _TRENDING _CONTENT _COMPLETED = 'FETCH_TRENDING_CONTENT_COMPLETED' ;
var RESOLVE _URIS _STARTED = 'RESOLVE_URIS_STARTED' ;
var RESOLVE _URIS _COMPLETED = 'RESOLVE_URIS_COMPLETED' ;
var FETCH _CHANNEL _CLAIMS _STARTED = 'FETCH_CHANNEL_CLAIMS_STARTED' ;
var FETCH _CHANNEL _CLAIMS _COMPLETED = 'FETCH_CHANNEL_CLAIMS_COMPLETED' ;
var FETCH _CHANNEL _CLAIM _COUNT _STARTED = 'FETCH_CHANNEL_CLAIM_COUNT_STARTED' ;
var FETCH _CHANNEL _CLAIM _COUNT _COMPLETED = 'FETCH_CHANNEL_CLAIM_COUNT_COMPLETED' ;
var FETCH _CLAIM _LIST _MINE _STARTED = 'FETCH_CLAIM_LIST_MINE_STARTED' ;
var FETCH _CLAIM _LIST _MINE _COMPLETED = 'FETCH_CLAIM_LIST_MINE_COMPLETED' ;
var ABANDON _CLAIM _STARTED = 'ABANDON_CLAIM_STARTED' ;
var ABANDON _CLAIM _SUCCEEDED = 'ABANDON_CLAIM_SUCCEEDED' ;
var FETCH _CHANNEL _LIST _STARTED = 'FETCH_CHANNEL_LIST_STARTED' ;
var FETCH _CHANNEL _LIST _COMPLETED = 'FETCH_CHANNEL_LIST_COMPLETED' ;
var CREATE _CHANNEL _STARTED = 'CREATE_CHANNEL_STARTED' ;
var CREATE _CHANNEL _COMPLETED = 'CREATE_CHANNEL_COMPLETED' ;
var PUBLISH _STARTED = 'PUBLISH_STARTED' ;
var PUBLISH _COMPLETED = 'PUBLISH_COMPLETED' ;
var PUBLISH _FAILED = 'PUBLISH_FAILED' ;
var SET _PLAYING _URI = 'SET_PLAYING_URI' ;
var SET _CONTENT _POSITION = 'SET_CONTENT_POSITION' ;
var SET _CONTENT _LAST _VIEWED = 'SET_CONTENT_LAST_VIEWED' ;
var CLEAR _CONTENT _HISTORY _URI = 'CLEAR_CONTENT_HISTORY_URI' ;
var CLEAR _CONTENT _HISTORY _ALL = 'CLEAR_CONTENT_HISTORY_ALL' ; // Subscriptions
var CHANNEL _SUBSCRIBE = 'CHANNEL_SUBSCRIBE' ;
var CHANNEL _UNSUBSCRIBE = 'CHANNEL_UNSUBSCRIBE' ;
var CHANNEL _SUBSCRIPTION _ENABLE _NOTIFICATIONS = 'CHANNEL_SUBSCRIPTION_ENABLE_NOTIFICATIONS' ;
var CHANNEL _SUBSCRIPTION _DISABLE _NOTIFICATIONS = 'CHANNEL_SUBSCRIPTION_DISABLE_NOTIFICATIONS' ;
var HAS _FETCHED _SUBSCRIPTIONS = 'HAS_FETCHED_SUBSCRIPTIONS' ;
var SET _SUBSCRIPTION _LATEST = 'SET_SUBSCRIPTION_LATEST' ;
var UPDATE _SUBSCRIPTION _UNREADS = 'UPDATE_SUBSCRIPTION_UNREADS' ;
var REMOVE _SUBSCRIPTION _UNREADS = 'REMOVE_SUBSCRIPTION_UNREADS' ;
var CHECK _SUBSCRIPTION _STARTED = 'CHECK_SUBSCRIPTION_STARTED' ;
var CHECK _SUBSCRIPTION _COMPLETED = 'CHECK_SUBSCRIPTION_COMPLETED' ;
var CHECK _SUBSCRIPTIONS _SUBSCRIBE = 'CHECK_SUBSCRIPTIONS_SUBSCRIBE' ;
var FETCH _SUBSCRIPTIONS _START = 'FETCH_SUBSCRIPTIONS_START' ;
var FETCH _SUBSCRIPTIONS _FAIL = 'FETCH_SUBSCRIPTIONS_FAIL' ;
var FETCH _SUBSCRIPTIONS _SUCCESS = 'FETCH_SUBSCRIPTIONS_SUCCESS' ;
var SET _VIEW _MODE = 'SET_VIEW_MODE' ;
var GET _SUGGESTED _SUBSCRIPTIONS _START = 'GET_SUGGESTED_SUBSCRIPTIONS_START' ;
var GET _SUGGESTED _SUBSCRIPTIONS _SUCCESS = 'GET_SUGGESTED_SUBSCRIPTIONS_SUCCESS' ;
var GET _SUGGESTED _SUBSCRIPTIONS _FAIL = 'GET_SUGGESTED_SUBSCRIPTIONS_FAIL' ;
var SUBSCRIPTION _FIRST _RUN _COMPLETED = 'SUBSCRIPTION_FIRST_RUN_COMPLETED' ;
var VIEW _SUGGESTED _SUBSCRIPTIONS = 'VIEW_SUGGESTED_SUBSCRIPTIONS' ; // Blacklist
var FETCH _BLACK _LISTED _CONTENT _STARTED = 'FETCH_BLACK_LISTED_CONTENT_STARTED' ;
var FETCH _BLACK _LISTED _CONTENT _COMPLETED = 'FETCH_BLACK_LISTED_CONTENT_COMPLETED' ;
var FETCH _BLACK _LISTED _CONTENT _FAILED = 'FETCH_BLACK_LISTED_CONTENT_FAILED' ;
2019-07-09 16:20:01 +02:00
var BLACK _LISTED _CONTENT _SUBSCRIBE = 'BLACK_LISTED_CONTENT_SUBSCRIBE' ; // Filtered list
var FETCH _FILTERED _CONTENT _STARTED = 'FETCH_FILTERED_CONTENT_STARTED' ;
var FETCH _FILTERED _CONTENT _COMPLETED = 'FETCH_FILTERED_CONTENT_COMPLETED' ;
var FETCH _FILTERED _CONTENT _FAILED = 'FETCH_FILTERED_CONTENT_FAILED' ;
var FILTERED _CONTENT _SUBSCRIBE = 'FILTERED_CONTENT_SUBSCRIBE' ; // Cost Info
2019-04-03 23:34:07 +02:00
var FETCH _COST _INFO _STARTED = 'FETCH_COST_INFO_STARTED' ;
2019-09-25 04:30:53 +02:00
var FETCH _COST _INFO _COMPLETED = 'FETCH_COST_INFO_COMPLETED' ; // Stats
2019-04-03 23:34:07 +02:00
var FETCH _VIEW _COUNT _STARTED = 'FETCH_VIEW_COUNT_STARTED' ;
var FETCH _VIEW _COUNT _FAILED = 'FETCH_VIEW_COUNT_FAILED' ;
2019-09-25 04:30:53 +02:00
var FETCH _VIEW _COUNT _COMPLETED = 'FETCH_VIEW_COUNT_COMPLETED' ;
var FETCH _SUB _COUNT _STARTED = 'FETCH_SUB_COUNT_STARTED' ;
var FETCH _SUB _COUNT _FAILED = 'FETCH_SUB_COUNT_FAILED' ;
var FETCH _SUB _COUNT _COMPLETED = 'FETCH_SUB_COUNT_COMPLETED' ; // Cross-device Sync
2019-04-18 10:02:11 +02:00
var GET _SYNC _STARTED = 'GET_SYNC_STARTED' ;
var GET _SYNC _COMPLETED = 'GET_SYNC_COMPLETED' ;
2019-10-02 06:15:24 +02:00
var GET _SYNC _FAILED = 'GET_SYNC_FAILED' ;
2019-04-18 10:02:11 +02:00
var SET _SYNC _STARTED = 'SET_SYNC_STARTED' ;
var SET _SYNC _FAILED = 'SET_SYNC_FAILED' ;
var SET _SYNC _COMPLETED = 'SET_SYNC_COMPLETED' ;
2019-05-10 16:45:56 +02:00
var SET _DEFAULT _ACCOUNT = 'SET_DEFAULT_ACCOUNT' ;
2019-05-27 15:57:31 +02:00
var SYNC _APPLY _STARTED = 'SYNC_APPLY_STARTED' ;
var SYNC _APPLY _COMPLETED = 'SYNC_APPLY_COMPLETED' ;
var SYNC _APPLY _FAILED = 'SYNC_APPLY_FAILED' ;
2019-10-29 20:14:41 +01:00
var SYNC _APPLY _BAD _PASSWORD = 'SYNC_APPLY_BAD_PASSWORD' ;
2019-10-22 21:21:42 +02:00
var SYNC _RESET = 'SYNC_RESET' ; // Lbry.tv
var UPDATE _UPLOAD _PROGRESS = 'UPDATE_UPLOAD_PROGRESS' ;
2019-04-03 23:34:07 +02:00
/***/ } ) ,
/* 2 */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-10-02 06:15:24 +02:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "NOT_TRANSFERRED" , function ( ) { return NOT _TRANSFERRED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PENDING_TRANSFER" , function ( ) { return PENDING _TRANSFER ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "COMPLETED_TRANSFER" , function ( ) { return COMPLETED _TRANSFER ; } ) ;
var NOT _TRANSFERRED = 'not_transferred' ;
var PENDING _TRANSFER = 'pending_transfer' ;
var COMPLETED _TRANSFER = 'completed_transfer' ;
/***/ } ) ,
/* 3 */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2020-01-10 04:28:46 +01:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "ALREADY_CLAIMED" , function ( ) { return ALREADY _CLAIMED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "REFERRER_NOT_FOUND" , function ( ) { return REFERRER _NOT _FOUND ; } ) ;
var ALREADY _CLAIMED = 'once the invite reward has been claimed the referrer cannot be changed' ;
var REFERRER _NOT _FOUND = 'A lbry.tv account could not be found for the referrer you provided.' ;
/***/ } ) ,
/* 4 */
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-04-03 23:34:07 +02:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var querystring _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 6 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var querystring _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( querystring _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
2019-09-16 22:12:43 +02:00
function _typeof ( obj ) { if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
2019-04-03 23:34:07 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2018-07-23 15:12:18 +02:00
2019-02-17 09:13:34 +01:00
2018-07-23 15:12:18 +02:00
var Lbryio = {
enabled : true ,
2019-02-20 17:14:42 +01:00
authenticationPromise : null ,
2019-03-11 03:02:17 +01:00
exchangePromise : null ,
exchangeLastFetched : null ,
2019-03-21 18:22:27 +01:00
CONNECTION _STRING : 'https://api.lbry.com/'
2018-07-23 15:12:18 +02:00
} ;
2019-04-03 23:34:07 +02:00
var EXCHANGE _RATE _TIMEOUT = 20 * 60 * 1000 ; // We can't use env's because they aren't passed into node_modules
2018-07-23 15:12:18 +02:00
2018-12-04 17:08:20 +01:00
Lbryio . setLocalApi = function ( endpoint ) {
2019-02-20 17:14:42 +01:00
Lbryio . CONNECTION _STRING = endpoint . replace ( /\/*$/ , '/' ) ; // exactly one slash at the end;
2018-12-04 17:08:20 +01:00
} ;
2018-07-23 15:12:18 +02:00
Lbryio . call = function ( resource , action ) {
var params = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : { } ;
var method = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : 'get' ;
if ( ! Lbryio . enabled ) {
return Promise . reject ( new Error ( _ _ ( 'LBRY internal API is disabled' ) ) ) ;
}
if ( ! ( method === 'get' || method === 'post' ) ) {
return Promise . reject ( new Error ( _ _ ( 'Invalid method' ) ) ) ;
}
function checkAndParse ( response ) {
if ( response . status >= 200 && response . status < 300 ) {
return response . json ( ) ;
}
2019-04-03 23:34:07 +02:00
2018-07-23 15:12:18 +02:00
return response . json ( ) . then ( function ( json ) {
2019-04-03 23:34:07 +02:00
var error ;
2018-07-23 15:12:18 +02:00
if ( json . error ) {
error = new Error ( json . error ) ;
} else {
error = new Error ( 'Unknown API error signature' ) ;
}
2019-04-03 23:34:07 +02:00
2018-07-23 15:12:18 +02:00
error . response = response ; // This is primarily a hack used in actions/user.js
2019-04-03 23:34:07 +02:00
2018-07-23 15:12:18 +02:00
return Promise . reject ( error ) ;
} ) ;
}
function makeRequest ( url , options ) {
return fetch ( url , options ) . then ( checkAndParse ) ;
}
return Lbryio . getAuthToken ( ) . then ( function ( token ) {
2019-04-03 23:34:07 +02:00
var fullParams = _objectSpread ( {
auth _token : token
} , params ) ;
2018-07-23 15:12:18 +02:00
2019-09-16 22:12:43 +02:00
Object . keys ( fullParams ) . forEach ( function ( key ) {
var value = fullParams [ key ] ;
if ( _typeof ( value ) === 'object' ) {
fullParams [ key ] = JSON . stringify ( value ) ;
}
} ) ;
2019-04-03 23:34:07 +02:00
var qs = querystring _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default . a . stringify ( fullParams ) ;
var url = "" . concat ( Lbryio . CONNECTION _STRING ) . concat ( resource , "/" ) . concat ( action , "?" ) . concat ( qs ) ;
2018-07-23 15:12:18 +02:00
var options = {
method : 'GET'
} ;
if ( method === 'post' ) {
options = {
method : 'POST' ,
headers : {
'Content-Type' : 'application/x-www-form-urlencoded'
} ,
body : qs
} ;
2019-04-03 23:34:07 +02:00
url = "" . concat ( Lbryio . CONNECTION _STRING ) . concat ( resource , "/" ) . concat ( action ) ;
2018-07-23 15:12:18 +02:00
}
return makeRequest ( url , options ) . then ( function ( response ) {
return response . data ;
} ) ;
} ) ;
} ;
Lbryio . authToken = null ;
Lbryio . getAuthToken = function ( ) {
return new Promise ( function ( resolve ) {
if ( Lbryio . authToken ) {
resolve ( Lbryio . authToken ) ;
2018-09-18 23:56:12 +02:00
} else if ( Lbryio . overrides . getAuthToken ) {
Lbryio . overrides . getAuthToken ( ) . then ( function ( token ) {
resolve ( token ) ;
} ) ;
2020-04-08 18:17:40 +02:00
} else if ( typeof window !== 'undefined' ) {
2018-07-23 16:12:22 +02:00
var _window = window ,
store = _window . store ;
2018-07-23 15:12:18 +02:00
if ( store ) {
var state = store . getState ( ) ;
var token = state . auth ? state . auth . authToken : null ;
Lbryio . authToken = token ;
resolve ( token ) ;
}
2020-04-08 18:17:40 +02:00
resolve ( null ) ;
} else {
2018-07-23 15:12:18 +02:00
resolve ( null ) ;
}
} ) ;
} ;
Lbryio . getCurrentUser = function ( ) {
return Lbryio . call ( 'user' , 'me' ) ;
} ;
Lbryio . authenticate = function ( ) {
if ( ! Lbryio . enabled ) {
return new Promise ( function ( resolve ) {
resolve ( {
id : 1 ,
language : 'en' ,
primary _email : 'disabled@lbry.io' ,
has _verified _email : true ,
is _identity _verified : true ,
is _reward _approved : false
} ) ;
} ) ;
}
if ( Lbryio . authenticationPromise === null ) {
Lbryio . authenticationPromise = new Promise ( function ( resolve , reject ) {
Lbryio . getAuthToken ( ) . then ( function ( token ) {
if ( ! token || token . length > 60 ) {
2019-02-05 07:11:17 +01:00
return false ;
2019-04-03 23:34:07 +02:00
} // check that token works
2018-07-23 15:12:18 +02:00
2019-02-04 04:48:42 +01:00
return Lbryio . getCurrentUser ( ) . then ( function ( user ) {
return user ;
2019-04-03 23:34:07 +02:00
} ) [ "catch" ] ( function ( ) {
2018-07-23 15:12:18 +02:00
return false ;
} ) ;
2019-02-04 04:48:42 +01:00
} ) . then ( function ( user ) {
if ( user ) {
return user ;
2018-07-23 15:12:18 +02:00
}
2019-04-03 23:34:07 +02:00
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "Lbry" ] . status ( ) . then ( function ( status ) {
2018-09-18 23:56:12 +02:00
if ( Lbryio . overrides . setAuthToken ) {
return Lbryio . overrides . setAuthToken ( status ) ;
2019-04-03 23:34:07 +02:00
} // simply call the logic to create a new user, and obtain the auth token
2018-09-18 23:56:12 +02:00
2019-02-20 15:03:14 +01:00
return new Promise ( function ( res , rej ) {
2019-02-17 09:13:34 +01:00
Lbryio . call ( 'user' , 'new' , {
auth _token : '' ,
language : 'en' ,
app _id : status . installation _id
} , 'post' ) . then ( function ( response ) {
if ( ! response . auth _token ) {
throw new Error ( 'auth_token was not set in the response' ) ;
}
var _window2 = window ,
store = _window2 . store ;
if ( store ) {
store . dispatch ( {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GENERATE_AUTH_TOKEN_SUCCESS" ] ,
data : {
authToken : response . auth _token
}
2019-02-17 09:13:34 +01:00
} ) ;
}
Lbryio . authToken = response . auth _token ;
2019-02-20 15:03:14 +01:00
res ( response ) ;
2019-04-18 10:02:11 +02:00
} ) [ "catch" ] ( function ( error ) {
return rej ( error ) ;
2019-02-17 09:13:34 +01:00
} ) ;
} ) ;
2018-07-23 15:12:18 +02:00
} ) ;
2019-02-04 04:48:42 +01:00
} ) . then ( function ( user ) {
if ( ! user ) {
return Lbryio . getCurrentUser ( ) ;
}
2019-04-03 23:34:07 +02:00
2019-02-04 04:48:42 +01:00
return user ;
} ) . then ( resolve , reject ) ;
2018-07-23 15:12:18 +02:00
} ) ;
}
return Lbryio . authenticationPromise ;
} ;
Lbryio . getStripeToken = function ( ) {
2019-02-20 17:14:42 +01:00
return Lbryio . CONNECTION _STRING . startsWith ( 'http://localhost:' ) ? 'pk_test_NoL1JWL7i1ipfhVId5KfDZgo' : 'pk_live_e8M4dRNnCCbmpZzduEUZBgJO' ;
2018-07-23 15:12:18 +02:00
} ;
2019-03-11 03:02:17 +01:00
Lbryio . getExchangeRates = function ( ) {
if ( ! Lbryio . exchangeLastFetched || Date . now ( ) - Lbryio . exchangeLastFetched > EXCHANGE _RATE _TIMEOUT ) {
Lbryio . exchangePromise = new Promise ( function ( resolve , reject ) {
Lbryio . call ( 'lbc' , 'exchange_rate' , { } , 'get' , true ) . then ( function ( _ref ) {
var LBC _USD = _ref . lbc _usd ,
LBC _BTC = _ref . lbc _btc ,
BTC _USD = _ref . btc _usd ;
2019-04-03 23:34:07 +02:00
var rates = {
LBC _USD : LBC _USD ,
LBC _BTC : LBC _BTC ,
BTC _USD : BTC _USD
} ;
2019-03-11 03:02:17 +01:00
resolve ( rates ) ;
2019-04-03 23:34:07 +02:00
} ) [ "catch" ] ( reject ) ;
2019-03-11 03:02:17 +01:00
} ) ;
Lbryio . exchangeLastFetched = Date . now ( ) ;
}
2019-04-03 23:34:07 +02:00
return Lbryio . exchangePromise ;
} ; // Allow overriding lbryio methods
2018-09-18 23:56:12 +02:00
// The desktop app will need to use it for getAuthToken because we use electron's ipcRenderer
2019-04-03 23:34:07 +02:00
2018-09-18 23:56:12 +02:00
Lbryio . overrides = { } ;
2019-04-03 23:34:07 +02:00
2018-09-18 23:56:12 +02:00
Lbryio . setOverride = function ( methodName , newMethod ) {
Lbryio . overrides [ methodName ] = newMethod ;
} ;
2019-04-03 23:34:07 +02:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( Lbryio ) ;
2018-07-23 15:12:18 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 5 */
2019-03-13 06:06:43 +01:00
/***/ ( function ( module , exports ) {
2018-07-23 15:12:18 +02:00
2020-01-10 04:28:46 +01:00
module . exports = _ _WEBPACK _EXTERNAL _MODULE _ _5 _ _ ;
2018-07-23 15:12:18 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 6 */
2018-07-23 15:12:18 +02:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
2020-01-10 04:28:46 +01:00
exports . decode = exports . parse = _ _webpack _require _ _ ( 7 ) ;
exports . encode = exports . stringify = _ _webpack _require _ _ ( 8 ) ;
2018-07-23 15:12:18 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 7 */
2018-07-23 15:12:18 +02:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
// If obj.hasOwnProperty has been overridden, then calling
// obj.hasOwnProperty(prop) will break.
// See: https://github.com/joyent/node/issues/1707
function hasOwnProperty ( obj , prop ) {
return Object . prototype . hasOwnProperty . call ( obj , prop ) ;
}
module . exports = function ( qs , sep , eq , options ) {
sep = sep || '&' ;
eq = eq || '=' ;
var obj = { } ;
if ( typeof qs !== 'string' || qs . length === 0 ) {
return obj ;
}
var regexp = /\+/g ;
qs = qs . split ( sep ) ;
var maxKeys = 1000 ;
if ( options && typeof options . maxKeys === 'number' ) {
maxKeys = options . maxKeys ;
}
var len = qs . length ;
// maxKeys <= 0 means that we should not limit keys count
if ( maxKeys > 0 && len > maxKeys ) {
len = maxKeys ;
}
for ( var i = 0 ; i < len ; ++ i ) {
var x = qs [ i ] . replace ( regexp , '%20' ) ,
idx = x . indexOf ( eq ) ,
kstr , vstr , k , v ;
if ( idx >= 0 ) {
kstr = x . substr ( 0 , idx ) ;
vstr = x . substr ( idx + 1 ) ;
} else {
kstr = x ;
vstr = '' ;
}
k = decodeURIComponent ( kstr ) ;
v = decodeURIComponent ( vstr ) ;
if ( ! hasOwnProperty ( obj , k ) ) {
obj [ k ] = v ;
} else if ( isArray ( obj [ k ] ) ) {
obj [ k ] . push ( v ) ;
} else {
obj [ k ] = [ obj [ k ] , v ] ;
}
}
return obj ;
} ;
var isArray = Array . isArray || function ( xs ) {
return Object . prototype . toString . call ( xs ) === '[object Array]' ;
} ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 8 */
2018-07-23 15:12:18 +02:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
// Copyright Joyent, Inc. and other Node contributors.
//
// Permission is hereby granted, free of charge, to any person obtaining a
// copy of this software and associated documentation files (the
// "Software"), to deal in the Software without restriction, including
// without limitation the rights to use, copy, modify, merge, publish,
// distribute, sublicense, and/or sell copies of the Software, and to permit
// persons to whom the Software is furnished to do so, subject to the
// following conditions:
//
// The above copyright notice and this permission notice shall be included
// in all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
// USE OR OTHER DEALINGS IN THE SOFTWARE.
var stringifyPrimitive = function ( v ) {
switch ( typeof v ) {
case 'string' :
return v ;
case 'boolean' :
return v ? 'true' : 'false' ;
case 'number' :
return isFinite ( v ) ? v : '' ;
default :
return '' ;
}
} ;
module . exports = function ( obj , sep , eq , name ) {
sep = sep || '&' ;
eq = eq || '=' ;
if ( obj === null ) {
obj = undefined ;
}
if ( typeof obj === 'object' ) {
return map ( objectKeys ( obj ) , function ( k ) {
var ks = encodeURIComponent ( stringifyPrimitive ( k ) ) + eq ;
if ( isArray ( obj [ k ] ) ) {
return map ( obj [ k ] , function ( v ) {
return ks + encodeURIComponent ( stringifyPrimitive ( v ) ) ;
} ) . join ( sep ) ;
} else {
return ks + encodeURIComponent ( stringifyPrimitive ( obj [ k ] ) ) ;
}
} ) . join ( sep ) ;
}
if ( ! name ) return '' ;
return encodeURIComponent ( stringifyPrimitive ( name ) ) + eq +
encodeURIComponent ( stringifyPrimitive ( obj ) ) ;
} ;
var isArray = Array . isArray || function ( xs ) {
return Object . prototype . toString . call ( xs ) === '[object Array]' ;
} ;
function map ( xs , f ) {
if ( xs . map ) return xs . map ( f ) ;
var res = [ ] ;
for ( var i = 0 ; i < xs . length ; i ++ ) {
res . push ( f ( xs [ i ] , i ) ) ;
}
return res ;
}
var objectKeys = Object . keys || function ( obj ) {
var res = [ ] ;
for ( var key in obj ) {
if ( Object . prototype . hasOwnProperty . call ( obj , key ) ) res . push ( key ) ;
}
return res ;
} ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 9 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-07-23 15:12:18 +02:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 4 ) ;
2019-04-03 23:34:07 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
var rewards = { } ;
rewards . TYPE _NEW _DEVELOPER = 'new_developer' ;
rewards . TYPE _NEW _USER = 'new_user' ;
2019-09-16 22:12:43 +02:00
rewards . TYPE _CONFIRM _EMAIL = 'email_provided' ;
2019-04-03 23:34:07 +02:00
rewards . TYPE _FIRST _CHANNEL = 'new_channel' ;
rewards . TYPE _FIRST _STREAM = 'first_stream' ;
rewards . TYPE _MANY _DOWNLOADS = 'many_downloads' ;
rewards . TYPE _FIRST _PUBLISH = 'first_publish' ;
2020-01-18 21:56:35 +01:00
rewards . TYPE _REFERRAL = 'referrer' ;
2020-01-08 22:58:07 +01:00
rewards . TYPE _REFEREE = 'referee' ;
2019-04-03 23:34:07 +02:00
rewards . TYPE _REWARD _CODE = 'reward_code' ;
rewards . TYPE _SUBSCRIPTION = 'subscription' ;
rewards . YOUTUBE _CREATOR = 'youtube_creator' ;
2019-09-04 17:48:31 +02:00
rewards . TYPE _DAILY _VIEW = 'daily_view' ;
2020-03-20 16:59:10 +01:00
rewards . TYPE _NEW _ANDROID = 'new_android' ;
2020-05-20 17:01:36 +02:00
rewards . TYPE _PAID _CONTENT = 'paid_content' ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
rewards . claimReward = function ( type , rewardParams ) {
function requestReward ( resolve , reject , params ) {
if ( ! lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . enabled ) {
reject ( new Error ( _ _ ( 'Rewards are not enabled.' ) ) ) ;
return ;
}
2018-07-23 15:12:18 +02:00
2020-01-03 20:20:14 +01:00
lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . call ( 'reward' , 'claim' , params , 'post' ) . then ( function ( reward ) {
2019-04-03 23:34:07 +02:00
var message = reward . reward _notification || "You have claimed a " . concat ( reward . reward _amount , " LBC reward." ) ; // Display global notice
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
var action = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "doToast" ] ) ( {
message : message ,
linkText : _ _ ( 'Show All' ) ,
linkTarget : '/rewards'
} ) ;
window . store . dispatch ( action ) ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
if ( rewards . callbacks . claimRewardSuccess ) {
rewards . callbacks . claimRewardSuccess ( ) ;
}
2019-02-01 18:19:45 +01:00
2019-04-03 23:34:07 +02:00
resolve ( reward ) ;
} , reject ) ;
}
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
return new Promise ( function ( resolve , reject ) {
lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Lbry" ] . address _unused ( ) . then ( function ( address ) {
var params = _objectSpread ( {
reward _type : type ,
wallet _address : address
} , rewardParams ) ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
switch ( type ) {
case rewards . TYPE _FIRST _CHANNEL :
2019-11-12 18:42:04 +01:00
lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Lbry" ] . channel _list ( {
page : 1 ,
page _size : 10
} ) . then ( function ( claims ) {
var claim = claims . items && claims . items . find ( function ( foundClaim ) {
2019-04-03 23:34:07 +02:00
return foundClaim . name . length && foundClaim . name [ 0 ] === '@' && foundClaim . txid . length && foundClaim . type === 'claim' ;
} ) ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
if ( claim ) {
params . transaction _id = claim . txid ;
requestReward ( resolve , reject , params ) ;
} else {
reject ( new Error ( _ _ ( 'Please create a channel identity first.' ) ) ) ;
}
} ) [ "catch" ] ( reject ) ;
break ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
case rewards . TYPE _FIRST _PUBLISH :
2019-11-12 18:42:04 +01:00
lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Lbry" ] . stream _list ( {
page : 1 ,
page _size : 10
} ) . then ( function ( claims ) {
var claim = claims . items && claims . items . find ( function ( foundClaim ) {
2019-04-03 23:34:07 +02:00
return foundClaim . name . length && foundClaim . name [ 0 ] !== '@' && foundClaim . txid . length && foundClaim . type === 'claim' ;
} ) ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
if ( claim ) {
params . transaction _id = claim . txid ;
requestReward ( resolve , reject , params ) ;
} else {
reject ( claims . length ? new Error ( _ _ ( 'Please publish something and wait for confirmation by the network to claim this reward.' ) ) : new Error ( _ _ ( 'Please publish something to claim this reward.' ) ) ) ;
}
} ) [ "catch" ] ( reject ) ;
break ;
2018-10-02 02:38:16 +02:00
2019-04-03 23:34:07 +02:00
case rewards . TYPE _FIRST _STREAM :
case rewards . TYPE _NEW _USER :
default :
requestReward ( resolve , reject , params ) ;
}
2018-07-23 15:12:18 +02:00
} ) ;
2019-04-03 23:34:07 +02:00
} ) ;
} ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
rewards . callbacks = {
// Set any callbacks that require code not found in this project
claimRewardSuccess : null ,
claimFirstRewardSuccess : null ,
rewardApprovalRequired : null
} ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
rewards . setCallback = function ( name , method ) {
rewards . callbacks [ name ] = method ;
} ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( rewards ) ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 10 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-01-17 17:44:45 +01:00
2019-04-03 23:34:07 +02:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-09-23 10:35:27 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var constants _subscriptions _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 11 ) ;
/* harmony import */ var util _redux _utils _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 12 ) ;
2019-04-03 23:34:07 +02:00
var _handleActions ;
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-09-23 10:35:27 +02:00
2019-04-03 23:34:07 +02:00
var defaultState = {
enabledChannelNotifications : [ ] ,
subscriptions : [ ] ,
2019-09-30 18:24:24 +02:00
latest : { } ,
2019-04-03 23:34:07 +02:00
unread : { } ,
suggested : { } ,
loading : false ,
2019-09-23 10:35:27 +02:00
viewMode : constants _subscriptions _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "VIEW_ALL" ] ,
2019-04-03 23:34:07 +02:00
loadingSuggested : false ,
firstRunCompleted : false ,
showSuggestedSubs : false
} ;
2019-09-23 10:35:27 +02:00
/* harmony default export */ _ _webpack _exports _ _ [ "default" ] = ( Object ( util _redux _utils _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "handleActions" ] ) ( ( _handleActions = { } , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "CHANNEL_SUBSCRIBE" ] , function ( state , action ) {
2019-04-03 23:34:07 +02:00
var newSubscription = action . data ;
var newSubscriptions = state . subscriptions . slice ( ) ;
2020-01-10 04:28:46 +01:00
if ( ! newSubscriptions . some ( function ( sub ) {
return sub . uri === newSubscription . uri ;
} ) ) {
newSubscriptions . unshift ( newSubscription ) ;
}
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
subscriptions : newSubscriptions
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "CHANNEL_UNSUBSCRIBE" ] , function ( state , action ) {
var subscriptionToRemove = action . data ;
var newSubscriptions = state . subscriptions . slice ( ) . filter ( function ( subscription ) {
return subscription . channelName !== subscriptionToRemove . channelName ;
} ) ; // Check if we need to remove it from the 'unread' state
var unread = state . unread ;
if ( unread [ subscriptionToRemove . uri ] ) {
delete unread [ subscriptionToRemove . uri ] ;
}
return _objectSpread ( { } , state , {
unread : _objectSpread ( { } , unread ) ,
subscriptions : newSubscriptions
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SET_SUBSCRIPTION_LATEST" ] , function ( state , action ) {
2019-09-30 18:24:24 +02:00
var _action$data = action . data ,
subscription = _action$data . subscription ,
uri = _action$data . uri ;
var newLatest = Object . assign ( { } , state . latest ) ;
newLatest [ subscription . uri ] = uri ;
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
2019-09-30 18:24:24 +02:00
latest : newLatest
2019-04-03 23:34:07 +02:00
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "UPDATE_SUBSCRIPTION_UNREADS" ] , function ( state , action ) {
2019-09-30 18:24:24 +02:00
var _action$data2 = action . data ,
channel = _action$data2 . channel ,
uris = _action$data2 . uris ,
type = _action$data2 . type ;
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
unread : _objectSpread ( { } , state . unread , _defineProperty ( { } , channel , {
uris : uris ,
type : type
} ) )
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "REMOVE_SUBSCRIPTION_UNREADS" ] , function ( state , action ) {
2019-09-30 18:24:24 +02:00
var _action$data3 = action . data ,
channel = _action$data3 . channel ,
uris = _action$data3 . uris ; // If no channel is passed in, remove all unreads
2019-04-03 23:34:07 +02:00
var newUnread ;
if ( channel ) {
newUnread = _objectSpread ( { } , state . unread ) ;
if ( ! uris ) {
delete newUnread [ channel ] ;
} else {
newUnread [ channel ] . uris = uris ;
}
} else {
newUnread = { } ;
}
return _objectSpread ( { } , state , {
unread : _objectSpread ( { } , newUnread )
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "CHANNEL_SUBSCRIPTION_ENABLE_NOTIFICATIONS" ] , function ( state , action ) {
var channelName = action . data ;
var newEnabledChannelNotifications = state . enabledChannelNotifications . slice ( ) ;
if ( channelName && channelName . trim ( ) . length > 0 && newEnabledChannelNotifications . indexOf ( channelName ) === - 1 ) {
newEnabledChannelNotifications . push ( channelName ) ;
}
return _objectSpread ( { } , state , {
enabledChannelNotifications : newEnabledChannelNotifications
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "CHANNEL_SUBSCRIPTION_DISABLE_NOTIFICATIONS" ] , function ( state , action ) {
var channelName = action . data ;
var newEnabledChannelNotifications = state . enabledChannelNotifications . slice ( ) ;
var index = newEnabledChannelNotifications . indexOf ( channelName ) ;
if ( index > - 1 ) {
newEnabledChannelNotifications . splice ( index , 1 ) ;
}
return _objectSpread ( { } , state , {
enabledChannelNotifications : newEnabledChannelNotifications
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_SUBSCRIPTIONS_START" ] , function ( state ) {
return _objectSpread ( { } , state , {
loading : true
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_SUBSCRIPTIONS_FAIL" ] , function ( state ) {
return _objectSpread ( { } , state , {
loading : false
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_SUBSCRIPTIONS_SUCCESS" ] , function ( state , action ) {
return _objectSpread ( { } , state , {
loading : false ,
subscriptions : action . data
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SET_VIEW_MODE" ] , function ( state , action ) {
return _objectSpread ( { } , state , {
viewMode : action . data
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SUGGESTED_SUBSCRIPTIONS_START" ] , function ( state ) {
return _objectSpread ( { } , state , {
loadingSuggested : true
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SUGGESTED_SUBSCRIPTIONS_SUCCESS" ] , function ( state , action ) {
return _objectSpread ( { } , state , {
suggested : action . data ,
loadingSuggested : false
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SUGGESTED_SUBSCRIPTIONS_FAIL" ] , function ( state ) {
return _objectSpread ( { } , state , {
loadingSuggested : false
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SUBSCRIPTION_FIRST_RUN_COMPLETED" ] , function ( state ) {
return _objectSpread ( { } , state , {
firstRunCompleted : true
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "VIEW_SUGGESTED_SUBSCRIPTIONS" ] , function ( state ) {
return _objectSpread ( { } , state , {
showSuggestedSubs : true
} ) ;
2019-09-23 10:35:27 +02:00
} ) , _defineProperty ( _handleActions , lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . USER _STATE _POPULATE , function ( state , action ) {
var subscriptions = action . data . subscriptions ;
var newSubscriptions ;
if ( ! subscriptions ) {
newSubscriptions = state . subscriptions ;
} else {
var parsedSubscriptions = subscriptions . map ( function ( uri ) {
var _parseURI = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "parseURI" ] ) ( uri ) ,
channelName = _parseURI . channelName ;
return {
uri : uri ,
channelName : "@" . concat ( channelName )
} ;
} ) ;
if ( ! state . subscriptions || ! state . subscriptions . length ) {
newSubscriptions = parsedSubscriptions ;
} else {
var map = { } ;
newSubscriptions = parsedSubscriptions . concat ( state . subscriptions ) . filter ( function ( sub ) {
return map [ sub . uri ] ? false : map [ sub . uri ] = true ;
} , { } ) ;
}
}
return _objectSpread ( { } , state , {
subscriptions : newSubscriptions
} ) ;
2019-04-03 23:34:07 +02:00
} ) , _handleActions ) , defaultState ) ) ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 11 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "VIEW_ALL" , function ( ) { return VIEW _ALL ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "VIEW_LATEST_FIRST" , function ( ) { return VIEW _LATEST _FIRST ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "DOWNLOADING" , function ( ) { return DOWNLOADING ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "DOWNLOADED" , function ( ) { return DOWNLOADED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "NOTIFY_ONLY" , function ( ) { return NOTIFY _ONLY ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SUGGESTED_TOP_BID" , function ( ) { return SUGGESTED _TOP _BID ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SUGGESTED_TOP_SUBSCRIBED" , function ( ) { return SUGGESTED _TOP _SUBSCRIBED ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "SUGGESTED_FEATURED" , function ( ) { return SUGGESTED _FEATURED ; } ) ;
var VIEW _ALL = 'view_all' ;
var VIEW _LATEST _FIRST = 'view_latest_first' ; // Types for unreads
var DOWNLOADING = 'DOWNLOADING' ;
var DOWNLOADED = 'DOWNLOADED' ;
var NOTIFY _ONLY = 'NOTIFY_ONLY;' ; // Suggested types
var SUGGESTED _TOP _BID = 'top_bid' ;
var SUGGESTED _TOP _SUBSCRIBED = 'top_subscribed' ;
var SUGGESTED _FEATURED = 'featured' ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 12 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "handleActions" , function ( ) { return handleActions ; } ) ;
// util for creating reducers
// based off of redux-actions
// https://redux-actions.js.org/docs/api/handleAction.html#handleactions
// eslint-disable-next-line import/prefer-default-export
var handleActions = function handleActions ( actionMap , defaultState ) {
return function ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : defaultState ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
var handler = actionMap [ action . type ] ;
if ( handler ) {
var newState = handler ( state , action ) ;
return Object . assign ( { } , state , newState ) ;
} // just return the original state if no handler
// returning a copy here breaks redux-persist
return state ;
} ;
} ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 13 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2019-09-16 22:12:43 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "userStateSyncMiddleware" , function ( ) { return userStateSyncMiddleware ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-09-16 22:12:43 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 4 ) ;
2019-09-16 22:12:43 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 14 ) ;
2019-09-16 22:12:43 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
var persistShape = {
version : '0' ,
shared : { }
} ;
function userStateSyncMiddleware ( ) {
return function ( _ref ) {
var getState = _ref . getState ;
return function ( next ) {
return function ( action ) {
if ( action . type === constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "CHANNEL_SUBSCRIBE" ] || action . type === constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "CHANNEL_UNSUBSCRIBE" ] || action . type === lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ACTIONS" ] . TOGGLE _TAG _FOLLOW ) {
var newShape = _objectSpread ( { } , persistShape ) ;
var state = getState ( ) ;
var subscriptions = Object ( redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "selectSubscriptions" ] ) ( state ) . map ( function ( _ref2 ) {
var uri = _ref2 . uri ;
return uri ;
} ) ;
var tags = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "selectFollowedTags" ] ) ( state ) ;
newShape . shared . subscriptions = subscriptions ;
newShape . shared . tags = tags ;
var uri = action . data . uri ;
if ( action . type === constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "CHANNEL_SUBSCRIBE" ] ) {
var newSubscriptions = subscriptions . slice ( ) ;
newSubscriptions . push ( uri ) ;
newShape . shared . subscriptions = newSubscriptions ;
} else if ( action . type === constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "CHANNEL_UNSUBSCRIBE" ] ) {
var _newSubscriptions = subscriptions . slice ( ) ;
_newSubscriptions = _newSubscriptions . filter ( function ( subscribedUri ) {
return subscribedUri !== uri ;
} ) ;
newShape . shared . subscriptions = _newSubscriptions ;
} else {
var toggledTag = action . data . name ;
var followedTags = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "selectFollowedTags" ] ) ( state ) . map ( function ( _ref3 ) {
var name = _ref3 . name ;
return name ;
} ) ;
var isFollowing = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "makeSelectIsFollowingTag" ] ) ( toggledTag ) ( state ) ;
var newTags = followedTags . slice ( ) ;
if ( isFollowing ) {
newTags = newTags . filter ( function ( followedTag ) {
return followedTag . name !== toggledTag ;
} ) ;
} else {
newTags . push ( toggledTag ) ;
}
newShape . shared . tags = newTags ;
2019-04-03 23:34:07 +02:00
}
2019-09-16 22:12:43 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . call ( 'user_settings' , 'set' , {
settings : newShape
} ) ;
}
return next ( action ) ;
} ;
} ;
2019-04-03 23:34:07 +02:00
} ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 14 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2019-09-16 22:12:43 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSubscriptions" , function ( ) { return selectSubscriptions ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIsFetchingSubscriptions" , function ( ) { return selectIsFetchingSubscriptions ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectViewMode" , function ( ) { return selectViewMode ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSuggested" , function ( ) { return selectSuggested ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIsFetchingSuggested" , function ( ) { return selectIsFetchingSuggested ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSuggestedChannels" , function ( ) { return selectSuggestedChannels ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFirstRunCompleted" , function ( ) { return selectFirstRunCompleted ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectShowSuggestedSubs" , function ( ) { return selectShowSuggestedSubs ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSubscriptionsBeingFetched" , function ( ) { return selectSubscriptionsBeingFetched ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnreadByChannel" , function ( ) { return selectUnreadByChannel ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnreadAmount" , function ( ) { return selectUnreadAmount ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnreadSubscriptions" , function ( ) { return selectUnreadSubscriptions ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectUnreadByChannel" , function ( ) { return makeSelectUnreadByChannel ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSubscriptionClaims" , function ( ) { return selectSubscriptionClaims ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectIsSubscribed" , function ( ) { return makeSelectIsSubscribed ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectIsNew" , function ( ) { return makeSelectIsNew ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEnabledChannelNotifications" , function ( ) { return selectEnabledChannelNotifications ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var constants _subscriptions _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 11 ) ;
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-09-16 22:12:43 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-09-16 22:12:43 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var util _swap _json _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 16 ) ;
2019-09-16 22:12:43 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
// Returns the entire subscriptions state
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
var selectState = function selectState ( state ) {
return state . subscriptions || { } ;
} ; // Returns the list of channel uris a user is subscribed to
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
var selectSubscriptions = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . subscriptions ;
} ) ; // Fetching list of users subscriptions
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
var selectIsFetchingSubscriptions = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . loading ;
} ) ; // The current view mode on the subscriptions page
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
var selectViewMode = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . viewMode ;
} ) ; // Suggested subscriptions from internal apis
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
var selectSuggested = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . suggested ;
} ) ;
var selectIsFetchingSuggested = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . loadingSuggested ;
} ) ;
var selectSuggestedChannels = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectSubscriptions , selectSuggested , function ( userSubscriptions , suggested ) {
if ( ! suggested ) {
return null ;
} // Swap the key/value because we will use the uri for everything, this just makes it easier
// suggested is returned from the api with the form:
// {
// featured: { "Channel label": uri, ... },
// top_subscribed: { "@channel": uri, ... }
// top_bid: { "@channel": uri, ... }
// }
// To properly compare the suggested subscriptions from our current subscribed channels
// We only care about the uri, not the label
// We also only care about top_subscribed and featured
// top_bid could just be porn or a channel with no content
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
var topSubscribedSuggestions = Object ( util _swap _json _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "swapKeyAndValue" ] ) ( suggested [ constants _subscriptions _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SUGGESTED_TOP_SUBSCRIBED" ] ] ) ;
var featuredSuggestions = Object ( util _swap _json _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "swapKeyAndValue" ] ) ( suggested [ constants _subscriptions _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SUGGESTED_FEATURED" ] ] ) ; // Make sure there are no duplicates
// If a uri isn't already in the suggested object, add it
2018-10-04 15:08:28 +02:00
2019-09-16 22:12:43 +02:00
var suggestedChannels = _objectSpread ( { } , topSubscribedSuggestions ) ;
2018-07-23 15:12:18 +02:00
2019-09-16 22:12:43 +02:00
Object . keys ( featuredSuggestions ) . forEach ( function ( uri ) {
if ( ! suggestedChannels [ uri ] ) {
var channelLabel = featuredSuggestions [ uri ] ;
suggestedChannels [ uri ] = channelLabel ;
}
} ) ;
userSubscriptions . forEach ( function ( _ref ) {
var uri = _ref . uri ;
// Note to passer bys:
// Maybe we should just remove the `lbry://` prefix from subscription uris
// Most places don't store them like that
var subscribedUri = uri . slice ( 'lbry://' . length ) ;
2019-01-17 07:22:39 +01:00
2019-09-16 22:12:43 +02:00
if ( suggestedChannels [ subscribedUri ] ) {
delete suggestedChannels [ subscribedUri ] ;
}
} ) ;
return Object . keys ( suggestedChannels ) . map ( function ( uri ) {
return {
uri : uri ,
label : suggestedChannels [ uri ]
2018-07-23 15:12:18 +02:00
} ;
2019-09-16 22:12:43 +02:00
} ) . slice ( 0 , 5 ) ;
} ) ;
var selectFirstRunCompleted = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . firstRunCompleted ;
} ) ;
var selectShowSuggestedSubs = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . showSuggestedSubs ;
} ) ; // Fetching any claims that are a part of a users subscriptions
2018-07-23 15:12:18 +02:00
2019-09-16 22:12:43 +02:00
var selectSubscriptionsBeingFetched = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectSubscriptions , lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectAllFetchingChannelClaims" ] , function ( subscriptions , fetchingChannelClaims ) {
var fetchingSubscriptionMap = { } ;
subscriptions . forEach ( function ( sub ) {
var isFetching = fetchingChannelClaims && fetchingChannelClaims [ sub . uri ] ;
2018-07-23 15:12:18 +02:00
2019-09-16 22:12:43 +02:00
if ( isFetching ) {
fetchingSubscriptionMap [ sub . uri ] = true ;
2018-07-23 15:12:18 +02:00
}
2019-09-16 22:12:43 +02:00
} ) ;
return fetchingSubscriptionMap ;
} ) ;
var selectUnreadByChannel = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . unread ;
} ) ; // Returns the current total of unread subscriptions
var selectUnreadAmount = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectUnreadByChannel , function ( unreadByChannel ) {
var unreadChannels = Object . keys ( unreadByChannel ) ;
var badges = 0 ;
if ( ! unreadChannels . length ) {
return badges ;
}
unreadChannels . forEach ( function ( channel ) {
badges += unreadByChannel [ channel ] . uris . length ;
} ) ;
return badges ;
} ) ; // Returns the uris with channels as an array with the channel with the newest content first
// If you just want the `unread` state, use selectUnread
var selectUnreadSubscriptions = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectUnreadAmount , selectUnreadByChannel , lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectClaimsByUri" ] , function ( unreadAmount , unreadByChannel , claimsByUri ) {
// determine which channel has the newest content
var unreadList = [ ] ;
if ( ! unreadAmount ) {
return unreadList ;
}
var channelUriList = Object . keys ( unreadByChannel ) ; // There is only one channel with unread notifications
if ( unreadAmount === 1 ) {
channelUriList . forEach ( function ( channel ) {
var unreadChannel = {
channel : channel ,
uris : unreadByChannel [ channel ] . uris
} ;
unreadList . push ( unreadChannel ) ;
} ) ;
return unreadList ;
}
channelUriList . sort ( function ( channel1 , channel2 ) {
var latestUriFromChannel1 = unreadByChannel [ channel1 ] . uris [ 0 ] ;
var latestClaimFromChannel1 = claimsByUri [ latestUriFromChannel1 ] || { } ;
var latestUriFromChannel2 = unreadByChannel [ channel2 ] . uris [ 0 ] ;
var latestClaimFromChannel2 = claimsByUri [ latestUriFromChannel2 ] || { } ;
var latestHeightFromChannel1 = latestClaimFromChannel1 . height || 0 ;
var latestHeightFromChannel2 = latestClaimFromChannel2 . height || 0 ;
if ( latestHeightFromChannel1 !== latestHeightFromChannel2 ) {
return latestHeightFromChannel2 - latestHeightFromChannel1 ;
}
return 0 ;
} ) . forEach ( function ( channel ) {
var unreadSubscription = unreadByChannel [ channel ] ;
var unreadChannel = {
channel : channel ,
uris : unreadSubscription . uris
} ;
unreadList . push ( unreadChannel ) ;
} ) ;
return unreadList ;
} ) ; // Returns all unread subscriptions for a uri passed in
var makeSelectUnreadByChannel = function makeSelectUnreadByChannel ( uri ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectUnreadByChannel , function ( unread ) {
return unread [ uri ] ;
} ) ;
} ; // Returns the first page of claims for every channel a user is subscribed to
var selectSubscriptionClaims = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectAllClaimsByChannel" ] , lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectClaimsById" ] , selectSubscriptions , selectUnreadByChannel , function ( channelIds , allClaims , savedSubscriptions , unreadByChannel ) {
// no claims loaded yet
if ( ! Object . keys ( channelIds ) . length ) {
return [ ] ;
}
var fetchedSubscriptions = [ ] ;
savedSubscriptions . forEach ( function ( subscription ) {
var channelClaims = [ ] ; // if subscribed channel has content
if ( channelIds [ subscription . uri ] && channelIds [ subscription . uri ] [ '1' ] ) {
// This will need to be more robust, we will want to be able to load more than the first page
// Strip out any ids that will be shown as notifications
var pageOneChannelIds = channelIds [ subscription . uri ] [ '1' ] ; // we have the channel ids and the corresponding claims
// loop over the list of ids and grab the claim
pageOneChannelIds . forEach ( function ( id ) {
var grabbedClaim = allClaims [ id ] ;
2019-12-05 13:13:10 +01:00
if ( unreadByChannel [ subscription . uri ] && unreadByChannel [ subscription . uri ] . uris . some ( function ( uri ) {
return uri . includes ( id ) ;
} ) ) {
grabbedClaim . isNew = true ;
}
channelClaims = channelClaims . concat ( [ grabbedClaim ] ) ;
} ) ;
}
fetchedSubscriptions = fetchedSubscriptions . concat ( channelClaims ) ;
} ) ;
return fetchedSubscriptions ;
} ) ; // Returns true if a user is subscribed to the channel associated with the uri passed in
// Accepts content or channel uris
var makeSelectIsSubscribed = function makeSelectIsSubscribed ( uri ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectSubscriptions , Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "makeSelectChannelForClaimUri" ] ) ( uri , true ) , function ( subscriptions , channelUri ) {
if ( channelUri ) {
return subscriptions . some ( function ( sub ) {
return sub . uri === channelUri ;
} ) ;
} // If we couldn't get a channel uri from the claim uri, the uri passed in might be a channel already
var _parseURI = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "parseURI" ] ) ( uri ) ,
isChannel = _parseURI . isChannel ;
if ( isChannel ) {
var uriWithPrefix = uri . startsWith ( 'lbry://' ) ? uri : "lbry://" . concat ( uri ) ;
return subscriptions . some ( function ( sub ) {
return sub . uri === uriWithPrefix ;
} ) ;
}
return false ;
} ) ;
} ;
var makeSelectIsNew = function makeSelectIsNew ( uri ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( makeSelectIsSubscribed ( uri ) , Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "makeSelectChannelForClaimUri" ] ) ( uri ) , selectUnreadByChannel , function ( isSubscribed , channel , unreadByChannel ) {
if ( ! isSubscribed ) {
return false ;
}
var unreadForChannel = unreadByChannel [ "lbry://" . concat ( channel ) ] ;
if ( unreadForChannel ) {
return unreadForChannel . uris . includes ( uri ) ;
}
return false ; // If they are subscribed, check to see if this uri is in the list of unreads
} ) ;
} ;
var selectEnabledChannelNotifications = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . enabledChannelNotifications ;
} ) ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 15 */
2019-12-05 13:13:10 +01:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
exports . _ _esModule = true ;
exports . defaultMemoize = defaultMemoize ;
exports . createSelectorCreator = createSelectorCreator ;
exports . createStructuredSelector = createStructuredSelector ;
function defaultEqualityCheck ( a , b ) {
return a === b ;
}
function areArgumentsShallowlyEqual ( equalityCheck , prev , next ) {
if ( prev === null || next === null || prev . length !== next . length ) {
return false ;
}
// Do this in a for loop (and not a `forEach` or an `every`) so we can determine equality as fast as possible.
var length = prev . length ;
for ( var i = 0 ; i < length ; i ++ ) {
if ( ! equalityCheck ( prev [ i ] , next [ i ] ) ) {
return false ;
}
}
return true ;
}
function defaultMemoize ( func ) {
var equalityCheck = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : defaultEqualityCheck ;
var lastArgs = null ;
var lastResult = null ;
// we reference arguments instead of spreading them for performance reasons
return function ( ) {
if ( ! areArgumentsShallowlyEqual ( equalityCheck , lastArgs , arguments ) ) {
// apply arguments instead of spreading for performance.
lastResult = func . apply ( null , arguments ) ;
}
lastArgs = arguments ;
return lastResult ;
} ;
}
function getDependencies ( funcs ) {
var dependencies = Array . isArray ( funcs [ 0 ] ) ? funcs [ 0 ] : funcs ;
if ( ! dependencies . every ( function ( dep ) {
return typeof dep === 'function' ;
} ) ) {
var dependencyTypes = dependencies . map ( function ( dep ) {
return typeof dep ;
} ) . join ( ', ' ) ;
throw new Error ( 'Selector creators expect all input-selectors to be functions, ' + ( 'instead received the following types: [' + dependencyTypes + ']' ) ) ;
}
return dependencies ;
}
function createSelectorCreator ( memoize ) {
for ( var _len = arguments . length , memoizeOptions = Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) {
memoizeOptions [ _key - 1 ] = arguments [ _key ] ;
}
return function ( ) {
for ( var _len2 = arguments . length , funcs = Array ( _len2 ) , _key2 = 0 ; _key2 < _len2 ; _key2 ++ ) {
funcs [ _key2 ] = arguments [ _key2 ] ;
}
var recomputations = 0 ;
var resultFunc = funcs . pop ( ) ;
var dependencies = getDependencies ( funcs ) ;
var memoizedResultFunc = memoize . apply ( undefined , [ function ( ) {
recomputations ++ ;
// apply arguments instead of spreading for performance.
return resultFunc . apply ( null , arguments ) ;
} ] . concat ( memoizeOptions ) ) ;
// If a selector is called with the exact same arguments we don't need to traverse our dependencies again.
var selector = defaultMemoize ( function ( ) {
var params = [ ] ;
var length = dependencies . length ;
for ( var i = 0 ; i < length ; i ++ ) {
// apply arguments instead of spreading and mutate a local list of params for performance.
params . push ( dependencies [ i ] . apply ( null , arguments ) ) ;
}
// apply arguments instead of spreading for performance.
return memoizedResultFunc . apply ( null , params ) ;
} ) ;
selector . resultFunc = resultFunc ;
selector . recomputations = function ( ) {
return recomputations ;
} ;
selector . resetRecomputations = function ( ) {
return recomputations = 0 ;
} ;
return selector ;
} ;
}
var createSelector = exports . createSelector = createSelectorCreator ( defaultMemoize ) ;
function createStructuredSelector ( selectors ) {
var selectorCreator = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : createSelector ;
if ( typeof selectors !== 'object' ) {
throw new Error ( 'createStructuredSelector expects first argument to be an object ' + ( 'where each property is a selector, instead received a ' + typeof selectors ) ) ;
}
var objectKeys = Object . keys ( selectors ) ;
return selectorCreator ( objectKeys . map ( function ( key ) {
return selectors [ key ] ;
} ) , function ( ) {
for ( var _len3 = arguments . length , values = Array ( _len3 ) , _key3 = 0 ; _key3 < _len3 ; _key3 ++ ) {
values [ _key3 ] = arguments [ _key3 ] ;
}
return values . reduce ( function ( composition , value , index ) {
composition [ objectKeys [ index ] ] = value ;
return composition ;
} , { } ) ;
} ) ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 16 */
2019-12-05 13:13:10 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "swapKeyAndValue" , function ( ) { return swapKeyAndValue ; } ) ;
function swapKeyAndValue ( dict ) {
var ret = { } ; // eslint-disable-next-line no-restricted-syntax
for ( var key in dict ) {
if ( dict . hasOwnProperty ( key ) ) {
ret [ dict [ key ] ] = key ;
}
}
return ret ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 17 */
2019-12-05 13:13:10 +01:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* WEBPACK VAR INJECTION */ ( function ( Buffer ) { /* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doTransifexUpload" , function ( ) { return doTransifexUpload ; } ) ;
var apiBaseUrl = 'https://www.transifex.com/api/2/project' ;
var resource = 'app-strings' ;
function doTransifexUpload ( contents , project , token , success , fail ) {
var url = "" . concat ( apiBaseUrl , "/" ) . concat ( project , "/resources/" ) ;
var updateUrl = "" . concat ( apiBaseUrl , "/" ) . concat ( project , "/resource/" ) . concat ( resource , "/content/" ) ;
var headers = {
Authorization : "Basic " . concat ( Buffer . from ( "api:" . concat ( token ) ) . toString ( 'base64' ) ) ,
'Content-Type' : 'application/json'
} ;
var req = {
accept _translations : true ,
i18n _type : 'KEYVALUEJSON' ,
name : resource ,
slug : resource ,
content : contents
} ;
function handleResponse ( text ) {
var json ;
try {
// transifex api returns Python dicts for some reason.
// Any way to get the api to return valid JSON?
json = JSON . parse ( text ) ;
} catch ( e ) { // ignore
}
if ( success ) {
success ( json || text ) ;
}
}
function handleError ( err ) {
if ( fail ) {
fail ( err . message ? err . message : 'Could not upload strings resource to Transifex' ) ;
}
} // check if the resource exists
fetch ( updateUrl , {
headers : headers
} ) . then ( function ( response ) {
return response . json ( ) ;
} ) . then ( function ( ) {
// perform an update
fetch ( updateUrl , {
method : 'PUT' ,
headers : headers ,
body : JSON . stringify ( {
content : contents
} )
} ) . then ( function ( response ) {
if ( response . status !== 200 && response . status !== 201 ) {
throw new Error ( 'failed to update transifex' ) ;
}
return response . text ( ) ;
} ) . then ( handleResponse ) [ "catch" ] ( handleError ) ;
} ) [ "catch" ] ( function ( ) {
// resource doesn't exist, create a fresh resource
fetch ( url , {
method : 'POST' ,
headers : headers ,
body : JSON . stringify ( req )
} ) . then ( function ( response ) {
if ( response . status !== 200 && response . status !== 201 ) {
throw new Error ( 'failed to upload to transifex' ) ;
}
return response . text ( ) ;
} ) . then ( handleResponse ) [ "catch" ] ( handleError ) ;
} ) ;
}
2020-01-10 04:28:46 +01:00
/* WEBPACK VAR INJECTION */ } . call ( this , _ _webpack _require _ _ ( 18 ) . Buffer ) )
2019-12-05 13:13:10 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 18 */
2019-12-05 13:13:10 +01:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
/* WEBPACK VAR INJECTION */ ( function ( global ) { / * !
* The buffer module from node . js , for the browser .
*
* @ author Feross Aboukhadijeh < feross @ feross . org > < http : //feross.org>
* @ license MIT
* /
/* eslint-disable no-proto */
2020-01-10 04:28:46 +01:00
var base64 = _ _webpack _require _ _ ( 20 )
var ieee754 = _ _webpack _require _ _ ( 21 )
var isArray = _ _webpack _require _ _ ( 22 )
2019-12-05 13:13:10 +01:00
exports . Buffer = Buffer
exports . SlowBuffer = SlowBuffer
exports . INSPECT _MAX _BYTES = 50
/ * *
* If ` Buffer.TYPED_ARRAY_SUPPORT ` :
* === true Use Uint8Array implementation ( fastest )
* === false Use Object implementation ( most compatible , even IE6 )
*
* Browsers that support typed arrays are IE 10 + , Firefox 4 + , Chrome 7 + , Safari 5.1 + ,
* Opera 11.6 + , iOS 4.2 + .
*
* Due to various browser bugs , sometimes the Object implementation will be used even
* when the browser supports typed arrays .
*
* Note :
*
* - Firefox 4 - 29 lacks support for adding new properties to ` Uint8Array ` instances ,
* See : https : //bugzilla.mozilla.org/show_bug.cgi?id=695438.
*
* - Chrome 9 - 10 is missing the ` TypedArray.prototype.subarray ` function .
*
* - IE10 has a broken ` TypedArray.prototype.subarray ` function which returns arrays of
* incorrect length in some situations .
* We detect these buggy browsers and set ` Buffer.TYPED_ARRAY_SUPPORT ` to ` false ` so they
* get the Object implementation , which is slower but behaves correctly .
* /
Buffer . TYPED _ARRAY _SUPPORT = global . TYPED _ARRAY _SUPPORT !== undefined
? global . TYPED _ARRAY _SUPPORT
: typedArraySupport ( )
/ *
* Export kMaxLength after typed array support is determined .
* /
exports . kMaxLength = kMaxLength ( )
function typedArraySupport ( ) {
try {
var arr = new Uint8Array ( 1 )
arr . _ _proto _ _ = { _ _proto _ _ : Uint8Array . prototype , foo : function ( ) { return 42 } }
return arr . foo ( ) === 42 && // typed array instances can be augmented
typeof arr . subarray === 'function' && // chrome 9-10 lack `subarray`
arr . subarray ( 1 , 1 ) . byteLength === 0 // ie10 has broken `subarray`
} catch ( e ) {
return false
}
}
function kMaxLength ( ) {
return Buffer . TYPED _ARRAY _SUPPORT
? 0x7fffffff
: 0x3fffffff
}
function createBuffer ( that , length ) {
if ( kMaxLength ( ) < length ) {
throw new RangeError ( 'Invalid typed array length' )
}
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
// Return an augmented `Uint8Array` instance, for best performance
that = new Uint8Array ( length )
that . _ _proto _ _ = Buffer . prototype
} else {
// Fallback: Return an object instance of the Buffer class
if ( that === null ) {
that = new Buffer ( length )
}
that . length = length
}
return that
}
/ * *
* The Buffer constructor returns instances of ` Uint8Array ` that have their
* prototype changed to ` Buffer.prototype ` . Furthermore , ` Buffer ` is a subclass of
* ` Uint8Array ` , so the returned instances will have all the node ` Buffer ` methods
* and the ` Uint8Array ` methods . Square bracket notation works as expected -- it
* returns a single octet .
*
* The ` Uint8Array ` prototype remains unmodified .
* /
function Buffer ( arg , encodingOrOffset , length ) {
if ( ! Buffer . TYPED _ARRAY _SUPPORT && ! ( this instanceof Buffer ) ) {
return new Buffer ( arg , encodingOrOffset , length )
}
// Common case.
if ( typeof arg === 'number' ) {
if ( typeof encodingOrOffset === 'string' ) {
throw new Error (
'If encoding is specified then the first argument must be a string'
)
}
return allocUnsafe ( this , arg )
}
return from ( this , arg , encodingOrOffset , length )
}
Buffer . poolSize = 8192 // not used by this implementation
// TODO: Legacy, not needed anymore. Remove in next major version.
Buffer . _augment = function ( arr ) {
arr . _ _proto _ _ = Buffer . prototype
return arr
}
function from ( that , value , encodingOrOffset , length ) {
if ( typeof value === 'number' ) {
throw new TypeError ( '"value" argument must not be a number' )
}
if ( typeof ArrayBuffer !== 'undefined' && value instanceof ArrayBuffer ) {
return fromArrayBuffer ( that , value , encodingOrOffset , length )
}
if ( typeof value === 'string' ) {
return fromString ( that , value , encodingOrOffset )
}
return fromObject ( that , value )
}
/ * *
* Functionally equivalent to Buffer ( arg , encoding ) but throws a TypeError
* if value is a number .
* Buffer . from ( str [ , encoding ] )
* Buffer . from ( array )
* Buffer . from ( buffer )
* Buffer . from ( arrayBuffer [ , byteOffset [ , length ] ] )
* * /
Buffer . from = function ( value , encodingOrOffset , length ) {
return from ( null , value , encodingOrOffset , length )
}
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
Buffer . prototype . _ _proto _ _ = Uint8Array . prototype
Buffer . _ _proto _ _ = Uint8Array
if ( typeof Symbol !== 'undefined' && Symbol . species &&
Buffer [ Symbol . species ] === Buffer ) {
// Fix subarray() in ES2016. See: https://github.com/feross/buffer/pull/97
Object . defineProperty ( Buffer , Symbol . species , {
value : null ,
configurable : true
} )
}
}
function assertSize ( size ) {
if ( typeof size !== 'number' ) {
throw new TypeError ( '"size" argument must be a number' )
} else if ( size < 0 ) {
throw new RangeError ( '"size" argument must not be negative' )
}
}
function alloc ( that , size , fill , encoding ) {
assertSize ( size )
if ( size <= 0 ) {
return createBuffer ( that , size )
}
if ( fill !== undefined ) {
// Only pay attention to encoding if it's a string. This
// prevents accidentally sending in a number that would
// be interpretted as a start offset.
return typeof encoding === 'string'
? createBuffer ( that , size ) . fill ( fill , encoding )
: createBuffer ( that , size ) . fill ( fill )
}
return createBuffer ( that , size )
}
/ * *
* Creates a new filled Buffer instance .
* alloc ( size [ , fill [ , encoding ] ] )
* * /
Buffer . alloc = function ( size , fill , encoding ) {
return alloc ( null , size , fill , encoding )
}
function allocUnsafe ( that , size ) {
assertSize ( size )
that = createBuffer ( that , size < 0 ? 0 : checked ( size ) | 0 )
if ( ! Buffer . TYPED _ARRAY _SUPPORT ) {
for ( var i = 0 ; i < size ; ++ i ) {
that [ i ] = 0
}
}
return that
}
/ * *
* Equivalent to Buffer ( num ) , by default creates a non - zero - filled Buffer instance .
* * /
Buffer . allocUnsafe = function ( size ) {
return allocUnsafe ( null , size )
}
/ * *
* Equivalent to SlowBuffer ( num ) , by default creates a non - zero - filled Buffer instance .
* /
Buffer . allocUnsafeSlow = function ( size ) {
return allocUnsafe ( null , size )
}
function fromString ( that , string , encoding ) {
if ( typeof encoding !== 'string' || encoding === '' ) {
encoding = 'utf8'
}
if ( ! Buffer . isEncoding ( encoding ) ) {
throw new TypeError ( '"encoding" must be a valid string encoding' )
}
var length = byteLength ( string , encoding ) | 0
that = createBuffer ( that , length )
var actual = that . write ( string , encoding )
if ( actual !== length ) {
// Writing a hex string, for example, that contains invalid characters will
// cause everything after the first invalid character to be ignored. (e.g.
// 'abxxcd' will be treated as 'ab')
that = that . slice ( 0 , actual )
}
return that
}
function fromArrayLike ( that , array ) {
var length = array . length < 0 ? 0 : checked ( array . length ) | 0
that = createBuffer ( that , length )
for ( var i = 0 ; i < length ; i += 1 ) {
that [ i ] = array [ i ] & 255
}
return that
}
function fromArrayBuffer ( that , array , byteOffset , length ) {
array . byteLength // this throws if `array` is not a valid ArrayBuffer
if ( byteOffset < 0 || array . byteLength < byteOffset ) {
throw new RangeError ( '\'offset\' is out of bounds' )
}
if ( array . byteLength < byteOffset + ( length || 0 ) ) {
throw new RangeError ( '\'length\' is out of bounds' )
}
if ( byteOffset === undefined && length === undefined ) {
array = new Uint8Array ( array )
} else if ( length === undefined ) {
array = new Uint8Array ( array , byteOffset )
} else {
array = new Uint8Array ( array , byteOffset , length )
}
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
// Return an augmented `Uint8Array` instance, for best performance
that = array
that . _ _proto _ _ = Buffer . prototype
} else {
// Fallback: Return an object instance of the Buffer class
that = fromArrayLike ( that , array )
}
return that
}
function fromObject ( that , obj ) {
if ( Buffer . isBuffer ( obj ) ) {
var len = checked ( obj . length ) | 0
that = createBuffer ( that , len )
if ( that . length === 0 ) {
return that
}
obj . copy ( that , 0 , 0 , len )
return that
}
if ( obj ) {
if ( ( typeof ArrayBuffer !== 'undefined' &&
obj . buffer instanceof ArrayBuffer ) || 'length' in obj ) {
if ( typeof obj . length !== 'number' || isnan ( obj . length ) ) {
return createBuffer ( that , 0 )
}
return fromArrayLike ( that , obj )
}
if ( obj . type === 'Buffer' && isArray ( obj . data ) ) {
return fromArrayLike ( that , obj . data )
}
}
throw new TypeError ( 'First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.' )
}
function checked ( length ) {
// Note: cannot use `length < kMaxLength()` here because that fails when
// length is NaN (which is otherwise coerced to zero.)
if ( length >= kMaxLength ( ) ) {
throw new RangeError ( 'Attempt to allocate Buffer larger than maximum ' +
'size: 0x' + kMaxLength ( ) . toString ( 16 ) + ' bytes' )
}
return length | 0
}
function SlowBuffer ( length ) {
if ( + length != length ) { // eslint-disable-line eqeqeq
length = 0
}
return Buffer . alloc ( + length )
}
Buffer . isBuffer = function isBuffer ( b ) {
return ! ! ( b != null && b . _isBuffer )
}
Buffer . compare = function compare ( a , b ) {
if ( ! Buffer . isBuffer ( a ) || ! Buffer . isBuffer ( b ) ) {
throw new TypeError ( 'Arguments must be Buffers' )
}
if ( a === b ) return 0
var x = a . length
var y = b . length
for ( var i = 0 , len = Math . min ( x , y ) ; i < len ; ++ i ) {
if ( a [ i ] !== b [ i ] ) {
x = a [ i ]
y = b [ i ]
break
}
}
if ( x < y ) return - 1
if ( y < x ) return 1
return 0
}
Buffer . isEncoding = function isEncoding ( encoding ) {
switch ( String ( encoding ) . toLowerCase ( ) ) {
case 'hex' :
case 'utf8' :
case 'utf-8' :
case 'ascii' :
case 'latin1' :
case 'binary' :
case 'base64' :
case 'ucs2' :
case 'ucs-2' :
case 'utf16le' :
case 'utf-16le' :
return true
default :
return false
}
}
Buffer . concat = function concat ( list , length ) {
if ( ! isArray ( list ) ) {
throw new TypeError ( '"list" argument must be an Array of Buffers' )
}
if ( list . length === 0 ) {
return Buffer . alloc ( 0 )
}
var i
if ( length === undefined ) {
length = 0
for ( i = 0 ; i < list . length ; ++ i ) {
length += list [ i ] . length
}
}
var buffer = Buffer . allocUnsafe ( length )
var pos = 0
for ( i = 0 ; i < list . length ; ++ i ) {
var buf = list [ i ]
if ( ! Buffer . isBuffer ( buf ) ) {
throw new TypeError ( '"list" argument must be an Array of Buffers' )
}
buf . copy ( buffer , pos )
pos += buf . length
}
return buffer
}
function byteLength ( string , encoding ) {
if ( Buffer . isBuffer ( string ) ) {
return string . length
}
if ( typeof ArrayBuffer !== 'undefined' && typeof ArrayBuffer . isView === 'function' &&
( ArrayBuffer . isView ( string ) || string instanceof ArrayBuffer ) ) {
return string . byteLength
}
if ( typeof string !== 'string' ) {
string = '' + string
}
var len = string . length
if ( len === 0 ) return 0
// Use a for loop to avoid recursion
var loweredCase = false
for ( ; ; ) {
switch ( encoding ) {
case 'ascii' :
case 'latin1' :
case 'binary' :
return len
case 'utf8' :
case 'utf-8' :
case undefined :
return utf8ToBytes ( string ) . length
case 'ucs2' :
case 'ucs-2' :
case 'utf16le' :
case 'utf-16le' :
return len * 2
case 'hex' :
return len >>> 1
case 'base64' :
return base64ToBytes ( string ) . length
default :
if ( loweredCase ) return utf8ToBytes ( string ) . length // assume utf8
encoding = ( '' + encoding ) . toLowerCase ( )
loweredCase = true
}
}
}
Buffer . byteLength = byteLength
function slowToString ( encoding , start , end ) {
var loweredCase = false
// No need to verify that "this.length <= MAX_UINT32" since it's a read-only
// property of a typed array.
// This behaves neither like String nor Uint8Array in that we set start/end
// to their upper/lower bounds if the value passed is out of range.
// undefined is handled specially as per ECMA-262 6th Edition,
// Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization.
if ( start === undefined || start < 0 ) {
start = 0
}
// Return early if start > this.length. Done here to prevent potential uint32
// coercion fail below.
if ( start > this . length ) {
return ''
}
if ( end === undefined || end > this . length ) {
end = this . length
}
if ( end <= 0 ) {
return ''
}
// Force coersion to uint32. This will also coerce falsey/NaN values to 0.
end >>>= 0
start >>>= 0
if ( end <= start ) {
return ''
}
if ( ! encoding ) encoding = 'utf8'
while ( true ) {
switch ( encoding ) {
case 'hex' :
return hexSlice ( this , start , end )
case 'utf8' :
case 'utf-8' :
return utf8Slice ( this , start , end )
case 'ascii' :
return asciiSlice ( this , start , end )
case 'latin1' :
case 'binary' :
return latin1Slice ( this , start , end )
case 'base64' :
return base64Slice ( this , start , end )
case 'ucs2' :
case 'ucs-2' :
case 'utf16le' :
case 'utf-16le' :
return utf16leSlice ( this , start , end )
default :
if ( loweredCase ) throw new TypeError ( 'Unknown encoding: ' + encoding )
encoding = ( encoding + '' ) . toLowerCase ( )
loweredCase = true
}
}
}
// The property is used by `Buffer.isBuffer` and `is-buffer` (in Safari 5-7) to detect
// Buffer instances.
Buffer . prototype . _isBuffer = true
function swap ( b , n , m ) {
var i = b [ n ]
b [ n ] = b [ m ]
b [ m ] = i
}
Buffer . prototype . swap16 = function swap16 ( ) {
var len = this . length
if ( len % 2 !== 0 ) {
throw new RangeError ( 'Buffer size must be a multiple of 16-bits' )
}
for ( var i = 0 ; i < len ; i += 2 ) {
swap ( this , i , i + 1 )
}
return this
}
Buffer . prototype . swap32 = function swap32 ( ) {
var len = this . length
if ( len % 4 !== 0 ) {
throw new RangeError ( 'Buffer size must be a multiple of 32-bits' )
}
for ( var i = 0 ; i < len ; i += 4 ) {
swap ( this , i , i + 3 )
swap ( this , i + 1 , i + 2 )
}
return this
}
Buffer . prototype . swap64 = function swap64 ( ) {
var len = this . length
if ( len % 8 !== 0 ) {
throw new RangeError ( 'Buffer size must be a multiple of 64-bits' )
}
for ( var i = 0 ; i < len ; i += 8 ) {
swap ( this , i , i + 7 )
swap ( this , i + 1 , i + 6 )
swap ( this , i + 2 , i + 5 )
swap ( this , i + 3 , i + 4 )
}
return this
}
Buffer . prototype . toString = function toString ( ) {
var length = this . length | 0
if ( length === 0 ) return ''
if ( arguments . length === 0 ) return utf8Slice ( this , 0 , length )
return slowToString . apply ( this , arguments )
}
Buffer . prototype . equals = function equals ( b ) {
if ( ! Buffer . isBuffer ( b ) ) throw new TypeError ( 'Argument must be a Buffer' )
if ( this === b ) return true
return Buffer . compare ( this , b ) === 0
}
Buffer . prototype . inspect = function inspect ( ) {
var str = ''
var max = exports . INSPECT _MAX _BYTES
if ( this . length > 0 ) {
str = this . toString ( 'hex' , 0 , max ) . match ( /.{2}/g ) . join ( ' ' )
if ( this . length > max ) str += ' ... '
}
return '<Buffer ' + str + '>'
}
Buffer . prototype . compare = function compare ( target , start , end , thisStart , thisEnd ) {
if ( ! Buffer . isBuffer ( target ) ) {
throw new TypeError ( 'Argument must be a Buffer' )
}
if ( start === undefined ) {
start = 0
}
if ( end === undefined ) {
end = target ? target . length : 0
}
if ( thisStart === undefined ) {
thisStart = 0
}
if ( thisEnd === undefined ) {
thisEnd = this . length
}
if ( start < 0 || end > target . length || thisStart < 0 || thisEnd > this . length ) {
throw new RangeError ( 'out of range index' )
}
if ( thisStart >= thisEnd && start >= end ) {
return 0
}
if ( thisStart >= thisEnd ) {
return - 1
}
if ( start >= end ) {
return 1
}
start >>>= 0
end >>>= 0
thisStart >>>= 0
thisEnd >>>= 0
if ( this === target ) return 0
var x = thisEnd - thisStart
var y = end - start
var len = Math . min ( x , y )
var thisCopy = this . slice ( thisStart , thisEnd )
var targetCopy = target . slice ( start , end )
for ( var i = 0 ; i < len ; ++ i ) {
if ( thisCopy [ i ] !== targetCopy [ i ] ) {
x = thisCopy [ i ]
y = targetCopy [ i ]
break
}
}
if ( x < y ) return - 1
if ( y < x ) return 1
return 0
}
// Finds either the first index of `val` in `buffer` at offset >= `byteOffset`,
// OR the last index of `val` in `buffer` at offset <= `byteOffset`.
//
// Arguments:
// - buffer - a Buffer to search
// - val - a string, Buffer, or number
// - byteOffset - an index into `buffer`; will be clamped to an int32
// - encoding - an optional encoding, relevant is val is a string
// - dir - true for indexOf, false for lastIndexOf
function bidirectionalIndexOf ( buffer , val , byteOffset , encoding , dir ) {
// Empty buffer means no match
if ( buffer . length === 0 ) return - 1
// Normalize byteOffset
if ( typeof byteOffset === 'string' ) {
encoding = byteOffset
byteOffset = 0
} else if ( byteOffset > 0x7fffffff ) {
byteOffset = 0x7fffffff
} else if ( byteOffset < - 0x80000000 ) {
byteOffset = - 0x80000000
}
byteOffset = + byteOffset // Coerce to Number.
if ( isNaN ( byteOffset ) ) {
// byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer
byteOffset = dir ? 0 : ( buffer . length - 1 )
}
// Normalize byteOffset: negative offsets start from the end of the buffer
if ( byteOffset < 0 ) byteOffset = buffer . length + byteOffset
if ( byteOffset >= buffer . length ) {
if ( dir ) return - 1
else byteOffset = buffer . length - 1
} else if ( byteOffset < 0 ) {
if ( dir ) byteOffset = 0
else return - 1
}
// Normalize val
if ( typeof val === 'string' ) {
val = Buffer . from ( val , encoding )
}
// Finally, search either indexOf (if dir is true) or lastIndexOf
if ( Buffer . isBuffer ( val ) ) {
// Special case: looking for empty string/buffer always fails
if ( val . length === 0 ) {
return - 1
}
return arrayIndexOf ( buffer , val , byteOffset , encoding , dir )
} else if ( typeof val === 'number' ) {
val = val & 0xFF // Search for a byte value [0-255]
if ( Buffer . TYPED _ARRAY _SUPPORT &&
typeof Uint8Array . prototype . indexOf === 'function' ) {
if ( dir ) {
return Uint8Array . prototype . indexOf . call ( buffer , val , byteOffset )
} else {
return Uint8Array . prototype . lastIndexOf . call ( buffer , val , byteOffset )
}
}
return arrayIndexOf ( buffer , [ val ] , byteOffset , encoding , dir )
}
throw new TypeError ( 'val must be string, number or Buffer' )
}
function arrayIndexOf ( arr , val , byteOffset , encoding , dir ) {
var indexSize = 1
var arrLength = arr . length
var valLength = val . length
if ( encoding !== undefined ) {
encoding = String ( encoding ) . toLowerCase ( )
if ( encoding === 'ucs2' || encoding === 'ucs-2' ||
encoding === 'utf16le' || encoding === 'utf-16le' ) {
if ( arr . length < 2 || val . length < 2 ) {
return - 1
}
indexSize = 2
arrLength /= 2
valLength /= 2
byteOffset /= 2
}
}
function read ( buf , i ) {
if ( indexSize === 1 ) {
return buf [ i ]
} else {
return buf . readUInt16BE ( i * indexSize )
}
}
var i
if ( dir ) {
var foundIndex = - 1
for ( i = byteOffset ; i < arrLength ; i ++ ) {
if ( read ( arr , i ) === read ( val , foundIndex === - 1 ? 0 : i - foundIndex ) ) {
if ( foundIndex === - 1 ) foundIndex = i
if ( i - foundIndex + 1 === valLength ) return foundIndex * indexSize
} else {
if ( foundIndex !== - 1 ) i -= i - foundIndex
foundIndex = - 1
}
}
} else {
if ( byteOffset + valLength > arrLength ) byteOffset = arrLength - valLength
for ( i = byteOffset ; i >= 0 ; i -- ) {
var found = true
for ( var j = 0 ; j < valLength ; j ++ ) {
if ( read ( arr , i + j ) !== read ( val , j ) ) {
found = false
break
}
}
if ( found ) return i
}
}
return - 1
}
Buffer . prototype . includes = function includes ( val , byteOffset , encoding ) {
return this . indexOf ( val , byteOffset , encoding ) !== - 1
}
Buffer . prototype . indexOf = function indexOf ( val , byteOffset , encoding ) {
return bidirectionalIndexOf ( this , val , byteOffset , encoding , true )
}
Buffer . prototype . lastIndexOf = function lastIndexOf ( val , byteOffset , encoding ) {
return bidirectionalIndexOf ( this , val , byteOffset , encoding , false )
}
function hexWrite ( buf , string , offset , length ) {
offset = Number ( offset ) || 0
var remaining = buf . length - offset
if ( ! length ) {
length = remaining
} else {
length = Number ( length )
if ( length > remaining ) {
length = remaining
}
}
// must be an even number of digits
var strLen = string . length
if ( strLen % 2 !== 0 ) throw new TypeError ( 'Invalid hex string' )
if ( length > strLen / 2 ) {
length = strLen / 2
}
for ( var i = 0 ; i < length ; ++ i ) {
var parsed = parseInt ( string . substr ( i * 2 , 2 ) , 16 )
if ( isNaN ( parsed ) ) return i
buf [ offset + i ] = parsed
}
return i
}
function utf8Write ( buf , string , offset , length ) {
return blitBuffer ( utf8ToBytes ( string , buf . length - offset ) , buf , offset , length )
}
function asciiWrite ( buf , string , offset , length ) {
return blitBuffer ( asciiToBytes ( string ) , buf , offset , length )
}
function latin1Write ( buf , string , offset , length ) {
return asciiWrite ( buf , string , offset , length )
}
function base64Write ( buf , string , offset , length ) {
return blitBuffer ( base64ToBytes ( string ) , buf , offset , length )
}
function ucs2Write ( buf , string , offset , length ) {
return blitBuffer ( utf16leToBytes ( string , buf . length - offset ) , buf , offset , length )
}
Buffer . prototype . write = function write ( string , offset , length , encoding ) {
// Buffer#write(string)
if ( offset === undefined ) {
encoding = 'utf8'
length = this . length
offset = 0
// Buffer#write(string, encoding)
} else if ( length === undefined && typeof offset === 'string' ) {
encoding = offset
length = this . length
offset = 0
// Buffer#write(string, offset[, length][, encoding])
} else if ( isFinite ( offset ) ) {
offset = offset | 0
if ( isFinite ( length ) ) {
length = length | 0
if ( encoding === undefined ) encoding = 'utf8'
} else {
encoding = length
length = undefined
}
// legacy write(string, encoding, offset, length) - remove in v0.13
} else {
throw new Error (
'Buffer.write(string, encoding, offset[, length]) is no longer supported'
)
}
var remaining = this . length - offset
if ( length === undefined || length > remaining ) length = remaining
if ( ( string . length > 0 && ( length < 0 || offset < 0 ) ) || offset > this . length ) {
throw new RangeError ( 'Attempt to write outside buffer bounds' )
}
if ( ! encoding ) encoding = 'utf8'
var loweredCase = false
for ( ; ; ) {
switch ( encoding ) {
case 'hex' :
return hexWrite ( this , string , offset , length )
case 'utf8' :
case 'utf-8' :
return utf8Write ( this , string , offset , length )
case 'ascii' :
return asciiWrite ( this , string , offset , length )
case 'latin1' :
case 'binary' :
return latin1Write ( this , string , offset , length )
case 'base64' :
// Warning: maxLength not taken into account in base64Write
return base64Write ( this , string , offset , length )
case 'ucs2' :
case 'ucs-2' :
case 'utf16le' :
case 'utf-16le' :
return ucs2Write ( this , string , offset , length )
default :
if ( loweredCase ) throw new TypeError ( 'Unknown encoding: ' + encoding )
encoding = ( '' + encoding ) . toLowerCase ( )
loweredCase = true
}
}
}
Buffer . prototype . toJSON = function toJSON ( ) {
return {
type : 'Buffer' ,
data : Array . prototype . slice . call ( this . _arr || this , 0 )
}
}
function base64Slice ( buf , start , end ) {
if ( start === 0 && end === buf . length ) {
return base64 . fromByteArray ( buf )
} else {
return base64 . fromByteArray ( buf . slice ( start , end ) )
}
}
function utf8Slice ( buf , start , end ) {
end = Math . min ( buf . length , end )
var res = [ ]
var i = start
while ( i < end ) {
var firstByte = buf [ i ]
var codePoint = null
var bytesPerSequence = ( firstByte > 0xEF ) ? 4
: ( firstByte > 0xDF ) ? 3
: ( firstByte > 0xBF ) ? 2
: 1
if ( i + bytesPerSequence <= end ) {
var secondByte , thirdByte , fourthByte , tempCodePoint
switch ( bytesPerSequence ) {
case 1 :
if ( firstByte < 0x80 ) {
codePoint = firstByte
}
break
case 2 :
secondByte = buf [ i + 1 ]
if ( ( secondByte & 0xC0 ) === 0x80 ) {
tempCodePoint = ( firstByte & 0x1F ) << 0x6 | ( secondByte & 0x3F )
if ( tempCodePoint > 0x7F ) {
codePoint = tempCodePoint
}
}
break
case 3 :
secondByte = buf [ i + 1 ]
thirdByte = buf [ i + 2 ]
if ( ( secondByte & 0xC0 ) === 0x80 && ( thirdByte & 0xC0 ) === 0x80 ) {
tempCodePoint = ( firstByte & 0xF ) << 0xC | ( secondByte & 0x3F ) << 0x6 | ( thirdByte & 0x3F )
if ( tempCodePoint > 0x7FF && ( tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF ) ) {
codePoint = tempCodePoint
}
}
break
case 4 :
secondByte = buf [ i + 1 ]
thirdByte = buf [ i + 2 ]
fourthByte = buf [ i + 3 ]
if ( ( secondByte & 0xC0 ) === 0x80 && ( thirdByte & 0xC0 ) === 0x80 && ( fourthByte & 0xC0 ) === 0x80 ) {
tempCodePoint = ( firstByte & 0xF ) << 0x12 | ( secondByte & 0x3F ) << 0xC | ( thirdByte & 0x3F ) << 0x6 | ( fourthByte & 0x3F )
if ( tempCodePoint > 0xFFFF && tempCodePoint < 0x110000 ) {
codePoint = tempCodePoint
}
}
}
}
if ( codePoint === null ) {
// we did not generate a valid codePoint so insert a
// replacement char (U+FFFD) and advance only 1 byte
codePoint = 0xFFFD
bytesPerSequence = 1
} else if ( codePoint > 0xFFFF ) {
// encode to utf16 (surrogate pair dance)
codePoint -= 0x10000
res . push ( codePoint >>> 10 & 0x3FF | 0xD800 )
codePoint = 0xDC00 | codePoint & 0x3FF
}
res . push ( codePoint )
i += bytesPerSequence
}
return decodeCodePointsArray ( res )
}
// Based on http://stackoverflow.com/a/22747272/680742, the browser with
// the lowest limit is Chrome, with 0x10000 args.
// We go 1 magnitude less, for safety
var MAX _ARGUMENTS _LENGTH = 0x1000
function decodeCodePointsArray ( codePoints ) {
var len = codePoints . length
if ( len <= MAX _ARGUMENTS _LENGTH ) {
return String . fromCharCode . apply ( String , codePoints ) // avoid extra slice()
}
// Decode in chunks to avoid "call stack size exceeded".
var res = ''
var i = 0
while ( i < len ) {
res += String . fromCharCode . apply (
String ,
codePoints . slice ( i , i += MAX _ARGUMENTS _LENGTH )
)
}
return res
}
function asciiSlice ( buf , start , end ) {
var ret = ''
end = Math . min ( buf . length , end )
for ( var i = start ; i < end ; ++ i ) {
ret += String . fromCharCode ( buf [ i ] & 0x7F )
}
return ret
}
function latin1Slice ( buf , start , end ) {
var ret = ''
end = Math . min ( buf . length , end )
for ( var i = start ; i < end ; ++ i ) {
ret += String . fromCharCode ( buf [ i ] )
}
return ret
}
function hexSlice ( buf , start , end ) {
var len = buf . length
if ( ! start || start < 0 ) start = 0
if ( ! end || end < 0 || end > len ) end = len
var out = ''
for ( var i = start ; i < end ; ++ i ) {
out += toHex ( buf [ i ] )
}
return out
}
function utf16leSlice ( buf , start , end ) {
var bytes = buf . slice ( start , end )
var res = ''
for ( var i = 0 ; i < bytes . length ; i += 2 ) {
res += String . fromCharCode ( bytes [ i ] + bytes [ i + 1 ] * 256 )
}
return res
}
Buffer . prototype . slice = function slice ( start , end ) {
var len = this . length
start = ~ ~ start
end = end === undefined ? len : ~ ~ end
if ( start < 0 ) {
start += len
if ( start < 0 ) start = 0
} else if ( start > len ) {
start = len
}
if ( end < 0 ) {
end += len
if ( end < 0 ) end = 0
} else if ( end > len ) {
end = len
}
if ( end < start ) end = start
var newBuf
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
newBuf = this . subarray ( start , end )
newBuf . _ _proto _ _ = Buffer . prototype
} else {
var sliceLen = end - start
newBuf = new Buffer ( sliceLen , undefined )
for ( var i = 0 ; i < sliceLen ; ++ i ) {
newBuf [ i ] = this [ i + start ]
}
}
return newBuf
}
/ *
* Need to make sure that buffer isn ' t trying to write out of bounds .
* /
function checkOffset ( offset , ext , length ) {
if ( ( offset % 1 ) !== 0 || offset < 0 ) throw new RangeError ( 'offset is not uint' )
if ( offset + ext > length ) throw new RangeError ( 'Trying to access beyond buffer length' )
}
Buffer . prototype . readUIntLE = function readUIntLE ( offset , byteLength , noAssert ) {
offset = offset | 0
byteLength = byteLength | 0
if ( ! noAssert ) checkOffset ( offset , byteLength , this . length )
var val = this [ offset ]
var mul = 1
var i = 0
while ( ++ i < byteLength && ( mul *= 0x100 ) ) {
val += this [ offset + i ] * mul
}
return val
}
Buffer . prototype . readUIntBE = function readUIntBE ( offset , byteLength , noAssert ) {
offset = offset | 0
byteLength = byteLength | 0
if ( ! noAssert ) {
checkOffset ( offset , byteLength , this . length )
}
var val = this [ offset + -- byteLength ]
var mul = 1
while ( byteLength > 0 && ( mul *= 0x100 ) ) {
val += this [ offset + -- byteLength ] * mul
}
return val
}
Buffer . prototype . readUInt8 = function readUInt8 ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 1 , this . length )
return this [ offset ]
}
Buffer . prototype . readUInt16LE = function readUInt16LE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 2 , this . length )
return this [ offset ] | ( this [ offset + 1 ] << 8 )
}
Buffer . prototype . readUInt16BE = function readUInt16BE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 2 , this . length )
return ( this [ offset ] << 8 ) | this [ offset + 1 ]
}
Buffer . prototype . readUInt32LE = function readUInt32LE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 4 , this . length )
return ( ( this [ offset ] ) |
( this [ offset + 1 ] << 8 ) |
( this [ offset + 2 ] << 16 ) ) +
( this [ offset + 3 ] * 0x1000000 )
}
Buffer . prototype . readUInt32BE = function readUInt32BE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 4 , this . length )
return ( this [ offset ] * 0x1000000 ) +
( ( this [ offset + 1 ] << 16 ) |
( this [ offset + 2 ] << 8 ) |
this [ offset + 3 ] )
}
Buffer . prototype . readIntLE = function readIntLE ( offset , byteLength , noAssert ) {
offset = offset | 0
byteLength = byteLength | 0
if ( ! noAssert ) checkOffset ( offset , byteLength , this . length )
var val = this [ offset ]
var mul = 1
var i = 0
while ( ++ i < byteLength && ( mul *= 0x100 ) ) {
val += this [ offset + i ] * mul
}
mul *= 0x80
if ( val >= mul ) val -= Math . pow ( 2 , 8 * byteLength )
return val
}
Buffer . prototype . readIntBE = function readIntBE ( offset , byteLength , noAssert ) {
offset = offset | 0
byteLength = byteLength | 0
if ( ! noAssert ) checkOffset ( offset , byteLength , this . length )
var i = byteLength
var mul = 1
var val = this [ offset + -- i ]
while ( i > 0 && ( mul *= 0x100 ) ) {
val += this [ offset + -- i ] * mul
}
mul *= 0x80
if ( val >= mul ) val -= Math . pow ( 2 , 8 * byteLength )
return val
}
Buffer . prototype . readInt8 = function readInt8 ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 1 , this . length )
if ( ! ( this [ offset ] & 0x80 ) ) return ( this [ offset ] )
return ( ( 0xff - this [ offset ] + 1 ) * - 1 )
}
Buffer . prototype . readInt16LE = function readInt16LE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 2 , this . length )
var val = this [ offset ] | ( this [ offset + 1 ] << 8 )
return ( val & 0x8000 ) ? val | 0xFFFF0000 : val
}
Buffer . prototype . readInt16BE = function readInt16BE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 2 , this . length )
var val = this [ offset + 1 ] | ( this [ offset ] << 8 )
return ( val & 0x8000 ) ? val | 0xFFFF0000 : val
}
Buffer . prototype . readInt32LE = function readInt32LE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 4 , this . length )
return ( this [ offset ] ) |
( this [ offset + 1 ] << 8 ) |
( this [ offset + 2 ] << 16 ) |
( this [ offset + 3 ] << 24 )
}
Buffer . prototype . readInt32BE = function readInt32BE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 4 , this . length )
return ( this [ offset ] << 24 ) |
( this [ offset + 1 ] << 16 ) |
( this [ offset + 2 ] << 8 ) |
( this [ offset + 3 ] )
}
Buffer . prototype . readFloatLE = function readFloatLE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 4 , this . length )
return ieee754 . read ( this , offset , true , 23 , 4 )
}
Buffer . prototype . readFloatBE = function readFloatBE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 4 , this . length )
return ieee754 . read ( this , offset , false , 23 , 4 )
}
Buffer . prototype . readDoubleLE = function readDoubleLE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 8 , this . length )
return ieee754 . read ( this , offset , true , 52 , 8 )
}
Buffer . prototype . readDoubleBE = function readDoubleBE ( offset , noAssert ) {
if ( ! noAssert ) checkOffset ( offset , 8 , this . length )
return ieee754 . read ( this , offset , false , 52 , 8 )
}
function checkInt ( buf , value , offset , ext , max , min ) {
if ( ! Buffer . isBuffer ( buf ) ) throw new TypeError ( '"buffer" argument must be a Buffer instance' )
if ( value > max || value < min ) throw new RangeError ( '"value" argument is out of bounds' )
if ( offset + ext > buf . length ) throw new RangeError ( 'Index out of range' )
}
Buffer . prototype . writeUIntLE = function writeUIntLE ( value , offset , byteLength , noAssert ) {
value = + value
offset = offset | 0
byteLength = byteLength | 0
if ( ! noAssert ) {
var maxBytes = Math . pow ( 2 , 8 * byteLength ) - 1
checkInt ( this , value , offset , byteLength , maxBytes , 0 )
}
var mul = 1
var i = 0
this [ offset ] = value & 0xFF
while ( ++ i < byteLength && ( mul *= 0x100 ) ) {
this [ offset + i ] = ( value / mul ) & 0xFF
}
return offset + byteLength
}
Buffer . prototype . writeUIntBE = function writeUIntBE ( value , offset , byteLength , noAssert ) {
value = + value
offset = offset | 0
byteLength = byteLength | 0
if ( ! noAssert ) {
var maxBytes = Math . pow ( 2 , 8 * byteLength ) - 1
checkInt ( this , value , offset , byteLength , maxBytes , 0 )
}
var i = byteLength - 1
var mul = 1
this [ offset + i ] = value & 0xFF
while ( -- i >= 0 && ( mul *= 0x100 ) ) {
this [ offset + i ] = ( value / mul ) & 0xFF
}
return offset + byteLength
}
Buffer . prototype . writeUInt8 = function writeUInt8 ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 1 , 0xff , 0 )
if ( ! Buffer . TYPED _ARRAY _SUPPORT ) value = Math . floor ( value )
this [ offset ] = ( value & 0xff )
return offset + 1
}
function objectWriteUInt16 ( buf , value , offset , littleEndian ) {
if ( value < 0 ) value = 0xffff + value + 1
for ( var i = 0 , j = Math . min ( buf . length - offset , 2 ) ; i < j ; ++ i ) {
buf [ offset + i ] = ( value & ( 0xff << ( 8 * ( littleEndian ? i : 1 - i ) ) ) ) >>>
( littleEndian ? i : 1 - i ) * 8
}
}
Buffer . prototype . writeUInt16LE = function writeUInt16LE ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 2 , 0xffff , 0 )
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
this [ offset ] = ( value & 0xff )
this [ offset + 1 ] = ( value >>> 8 )
} else {
objectWriteUInt16 ( this , value , offset , true )
}
return offset + 2
}
Buffer . prototype . writeUInt16BE = function writeUInt16BE ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 2 , 0xffff , 0 )
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
this [ offset ] = ( value >>> 8 )
this [ offset + 1 ] = ( value & 0xff )
} else {
objectWriteUInt16 ( this , value , offset , false )
}
return offset + 2
}
function objectWriteUInt32 ( buf , value , offset , littleEndian ) {
if ( value < 0 ) value = 0xffffffff + value + 1
for ( var i = 0 , j = Math . min ( buf . length - offset , 4 ) ; i < j ; ++ i ) {
buf [ offset + i ] = ( value >>> ( littleEndian ? i : 3 - i ) * 8 ) & 0xff
}
}
Buffer . prototype . writeUInt32LE = function writeUInt32LE ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 4 , 0xffffffff , 0 )
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
this [ offset + 3 ] = ( value >>> 24 )
this [ offset + 2 ] = ( value >>> 16 )
this [ offset + 1 ] = ( value >>> 8 )
this [ offset ] = ( value & 0xff )
} else {
objectWriteUInt32 ( this , value , offset , true )
}
return offset + 4
}
Buffer . prototype . writeUInt32BE = function writeUInt32BE ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 4 , 0xffffffff , 0 )
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
this [ offset ] = ( value >>> 24 )
this [ offset + 1 ] = ( value >>> 16 )
this [ offset + 2 ] = ( value >>> 8 )
this [ offset + 3 ] = ( value & 0xff )
} else {
objectWriteUInt32 ( this , value , offset , false )
}
return offset + 4
}
Buffer . prototype . writeIntLE = function writeIntLE ( value , offset , byteLength , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) {
var limit = Math . pow ( 2 , 8 * byteLength - 1 )
checkInt ( this , value , offset , byteLength , limit - 1 , - limit )
}
var i = 0
var mul = 1
var sub = 0
this [ offset ] = value & 0xFF
while ( ++ i < byteLength && ( mul *= 0x100 ) ) {
if ( value < 0 && sub === 0 && this [ offset + i - 1 ] !== 0 ) {
sub = 1
}
this [ offset + i ] = ( ( value / mul ) >> 0 ) - sub & 0xFF
}
return offset + byteLength
}
Buffer . prototype . writeIntBE = function writeIntBE ( value , offset , byteLength , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) {
var limit = Math . pow ( 2 , 8 * byteLength - 1 )
checkInt ( this , value , offset , byteLength , limit - 1 , - limit )
}
var i = byteLength - 1
var mul = 1
var sub = 0
this [ offset + i ] = value & 0xFF
while ( -- i >= 0 && ( mul *= 0x100 ) ) {
if ( value < 0 && sub === 0 && this [ offset + i + 1 ] !== 0 ) {
sub = 1
}
this [ offset + i ] = ( ( value / mul ) >> 0 ) - sub & 0xFF
}
return offset + byteLength
}
Buffer . prototype . writeInt8 = function writeInt8 ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 1 , 0x7f , - 0x80 )
if ( ! Buffer . TYPED _ARRAY _SUPPORT ) value = Math . floor ( value )
if ( value < 0 ) value = 0xff + value + 1
this [ offset ] = ( value & 0xff )
return offset + 1
}
Buffer . prototype . writeInt16LE = function writeInt16LE ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 2 , 0x7fff , - 0x8000 )
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
this [ offset ] = ( value & 0xff )
this [ offset + 1 ] = ( value >>> 8 )
} else {
objectWriteUInt16 ( this , value , offset , true )
}
return offset + 2
}
Buffer . prototype . writeInt16BE = function writeInt16BE ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 2 , 0x7fff , - 0x8000 )
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
this [ offset ] = ( value >>> 8 )
this [ offset + 1 ] = ( value & 0xff )
} else {
objectWriteUInt16 ( this , value , offset , false )
}
return offset + 2
}
Buffer . prototype . writeInt32LE = function writeInt32LE ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 4 , 0x7fffffff , - 0x80000000 )
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
this [ offset ] = ( value & 0xff )
this [ offset + 1 ] = ( value >>> 8 )
this [ offset + 2 ] = ( value >>> 16 )
this [ offset + 3 ] = ( value >>> 24 )
} else {
objectWriteUInt32 ( this , value , offset , true )
}
return offset + 4
}
Buffer . prototype . writeInt32BE = function writeInt32BE ( value , offset , noAssert ) {
value = + value
offset = offset | 0
if ( ! noAssert ) checkInt ( this , value , offset , 4 , 0x7fffffff , - 0x80000000 )
if ( value < 0 ) value = 0xffffffff + value + 1
if ( Buffer . TYPED _ARRAY _SUPPORT ) {
this [ offset ] = ( value >>> 24 )
this [ offset + 1 ] = ( value >>> 16 )
this [ offset + 2 ] = ( value >>> 8 )
this [ offset + 3 ] = ( value & 0xff )
} else {
objectWriteUInt32 ( this , value , offset , false )
}
return offset + 4
}
function checkIEEE754 ( buf , value , offset , ext , max , min ) {
if ( offset + ext > buf . length ) throw new RangeError ( 'Index out of range' )
if ( offset < 0 ) throw new RangeError ( 'Index out of range' )
}
function writeFloat ( buf , value , offset , littleEndian , noAssert ) {
if ( ! noAssert ) {
checkIEEE754 ( buf , value , offset , 4 , 3.4028234663852886 e + 38 , - 3.4028234663852886 e + 38 )
}
ieee754 . write ( buf , value , offset , littleEndian , 23 , 4 )
return offset + 4
}
Buffer . prototype . writeFloatLE = function writeFloatLE ( value , offset , noAssert ) {
return writeFloat ( this , value , offset , true , noAssert )
}
Buffer . prototype . writeFloatBE = function writeFloatBE ( value , offset , noAssert ) {
return writeFloat ( this , value , offset , false , noAssert )
}
function writeDouble ( buf , value , offset , littleEndian , noAssert ) {
if ( ! noAssert ) {
checkIEEE754 ( buf , value , offset , 8 , 1.7976931348623157 E + 308 , - 1.7976931348623157 E + 308 )
}
ieee754 . write ( buf , value , offset , littleEndian , 52 , 8 )
return offset + 8
}
Buffer . prototype . writeDoubleLE = function writeDoubleLE ( value , offset , noAssert ) {
return writeDouble ( this , value , offset , true , noAssert )
}
Buffer . prototype . writeDoubleBE = function writeDoubleBE ( value , offset , noAssert ) {
return writeDouble ( this , value , offset , false , noAssert )
}
// copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length)
Buffer . prototype . copy = function copy ( target , targetStart , start , end ) {
if ( ! start ) start = 0
if ( ! end && end !== 0 ) end = this . length
if ( targetStart >= target . length ) targetStart = target . length
if ( ! targetStart ) targetStart = 0
if ( end > 0 && end < start ) end = start
// Copy 0 bytes; we're done
if ( end === start ) return 0
if ( target . length === 0 || this . length === 0 ) return 0
// Fatal error conditions
if ( targetStart < 0 ) {
throw new RangeError ( 'targetStart out of bounds' )
}
if ( start < 0 || start >= this . length ) throw new RangeError ( 'sourceStart out of bounds' )
if ( end < 0 ) throw new RangeError ( 'sourceEnd out of bounds' )
// Are we oob?
if ( end > this . length ) end = this . length
if ( target . length - targetStart < end - start ) {
end = target . length - targetStart + start
}
var len = end - start
var i
if ( this === target && start < targetStart && targetStart < end ) {
// descending copy from end
for ( i = len - 1 ; i >= 0 ; -- i ) {
target [ i + targetStart ] = this [ i + start ]
}
} else if ( len < 1000 || ! Buffer . TYPED _ARRAY _SUPPORT ) {
// ascending copy from start
for ( i = 0 ; i < len ; ++ i ) {
target [ i + targetStart ] = this [ i + start ]
}
} else {
Uint8Array . prototype . set . call (
target ,
this . subarray ( start , start + len ) ,
targetStart
)
}
return len
}
// Usage:
// buffer.fill(number[, offset[, end]])
// buffer.fill(buffer[, offset[, end]])
// buffer.fill(string[, offset[, end]][, encoding])
Buffer . prototype . fill = function fill ( val , start , end , encoding ) {
// Handle string cases:
if ( typeof val === 'string' ) {
if ( typeof start === 'string' ) {
encoding = start
start = 0
end = this . length
} else if ( typeof end === 'string' ) {
encoding = end
end = this . length
}
if ( val . length === 1 ) {
var code = val . charCodeAt ( 0 )
if ( code < 256 ) {
val = code
}
}
if ( encoding !== undefined && typeof encoding !== 'string' ) {
throw new TypeError ( 'encoding must be a string' )
}
if ( typeof encoding === 'string' && ! Buffer . isEncoding ( encoding ) ) {
throw new TypeError ( 'Unknown encoding: ' + encoding )
}
} else if ( typeof val === 'number' ) {
val = val & 255
}
// Invalid ranges are not set to a default, so can range check early.
if ( start < 0 || this . length < start || this . length < end ) {
throw new RangeError ( 'Out of range index' )
}
if ( end <= start ) {
return this
}
start = start >>> 0
end = end === undefined ? this . length : end >>> 0
if ( ! val ) val = 0
var i
if ( typeof val === 'number' ) {
for ( i = start ; i < end ; ++ i ) {
this [ i ] = val
}
} else {
var bytes = Buffer . isBuffer ( val )
? val
: utf8ToBytes ( new Buffer ( val , encoding ) . toString ( ) )
var len = bytes . length
for ( i = 0 ; i < end - start ; ++ i ) {
this [ i + start ] = bytes [ i % len ]
}
}
return this
}
// HELPER FUNCTIONS
// ================
var INVALID _BASE64 _RE = /[^+\/0-9A-Za-z-_]/g
function base64clean ( str ) {
// Node strips out invalid characters like \n and \t from the string, base64-js does not
str = stringtrim ( str ) . replace ( INVALID _BASE64 _RE , '' )
// Node converts strings with length < 2 to ''
if ( str . length < 2 ) return ''
// Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
while ( str . length % 4 !== 0 ) {
str = str + '='
}
return str
}
function stringtrim ( str ) {
if ( str . trim ) return str . trim ( )
return str . replace ( /^\s+|\s+$/g , '' )
}
function toHex ( n ) {
if ( n < 16 ) return '0' + n . toString ( 16 )
return n . toString ( 16 )
}
function utf8ToBytes ( string , units ) {
units = units || Infinity
var codePoint
var length = string . length
var leadSurrogate = null
var bytes = [ ]
for ( var i = 0 ; i < length ; ++ i ) {
codePoint = string . charCodeAt ( i )
// is surrogate component
if ( codePoint > 0xD7FF && codePoint < 0xE000 ) {
// last char was a lead
if ( ! leadSurrogate ) {
// no lead yet
if ( codePoint > 0xDBFF ) {
// unexpected trail
if ( ( units -= 3 ) > - 1 ) bytes . push ( 0xEF , 0xBF , 0xBD )
continue
} else if ( i + 1 === length ) {
// unpaired lead
if ( ( units -= 3 ) > - 1 ) bytes . push ( 0xEF , 0xBF , 0xBD )
continue
}
// valid lead
leadSurrogate = codePoint
continue
}
// 2 leads in a row
if ( codePoint < 0xDC00 ) {
if ( ( units -= 3 ) > - 1 ) bytes . push ( 0xEF , 0xBF , 0xBD )
leadSurrogate = codePoint
continue
}
// valid surrogate pair
codePoint = ( leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00 ) + 0x10000
} else if ( leadSurrogate ) {
// valid bmp char, but last char was a lead
if ( ( units -= 3 ) > - 1 ) bytes . push ( 0xEF , 0xBF , 0xBD )
}
leadSurrogate = null
// encode utf8
if ( codePoint < 0x80 ) {
if ( ( units -= 1 ) < 0 ) break
bytes . push ( codePoint )
} else if ( codePoint < 0x800 ) {
if ( ( units -= 2 ) < 0 ) break
bytes . push (
codePoint >> 0x6 | 0xC0 ,
codePoint & 0x3F | 0x80
)
} else if ( codePoint < 0x10000 ) {
if ( ( units -= 3 ) < 0 ) break
bytes . push (
codePoint >> 0xC | 0xE0 ,
codePoint >> 0x6 & 0x3F | 0x80 ,
codePoint & 0x3F | 0x80
)
} else if ( codePoint < 0x110000 ) {
if ( ( units -= 4 ) < 0 ) break
bytes . push (
codePoint >> 0x12 | 0xF0 ,
codePoint >> 0xC & 0x3F | 0x80 ,
codePoint >> 0x6 & 0x3F | 0x80 ,
codePoint & 0x3F | 0x80
)
} else {
throw new Error ( 'Invalid code point' )
}
}
return bytes
}
function asciiToBytes ( str ) {
var byteArray = [ ]
for ( var i = 0 ; i < str . length ; ++ i ) {
// Node's code seems to be doing this and not & 0x7F..
byteArray . push ( str . charCodeAt ( i ) & 0xFF )
}
return byteArray
}
function utf16leToBytes ( str , units ) {
var c , hi , lo
var byteArray = [ ]
for ( var i = 0 ; i < str . length ; ++ i ) {
if ( ( units -= 2 ) < 0 ) break
c = str . charCodeAt ( i )
hi = c >> 8
lo = c % 256
byteArray . push ( lo )
byteArray . push ( hi )
}
return byteArray
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
function base64ToBytes ( str ) {
return base64 . toByteArray ( base64clean ( str ) )
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
function blitBuffer ( src , dst , offset , length ) {
for ( var i = 0 ; i < length ; ++ i ) {
if ( ( i + offset >= dst . length ) || ( i >= src . length ) ) break
dst [ i + offset ] = src [ i ]
}
return i
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
function isnan ( val ) {
return val !== val // eslint-disable-line no-self-compare
}
2019-09-16 22:12:43 +02:00
2020-01-10 04:28:46 +01:00
/* WEBPACK VAR INJECTION */ } . call ( this , _ _webpack _require _ _ ( 19 ) ) )
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 19 */
2019-12-05 13:13:10 +01:00
/***/ ( function ( module , exports ) {
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
var g ;
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
// This works in non-strict mode
g = ( function ( ) {
return this ;
} ) ( ) ;
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
try {
// This works if eval is allowed (see CSP)
g = g || new Function ( "return this" ) ( ) ;
} catch ( e ) {
// This works if the window reference is available
if ( typeof window === "object" ) g = window ;
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module . exports = g ;
2019-09-16 22:12:43 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 20 */
2019-09-16 22:12:43 +02:00
/***/ ( function ( module , exports , _ _webpack _require _ _ ) {
"use strict" ;
2019-12-05 13:13:10 +01:00
exports . byteLength = byteLength
exports . toByteArray = toByteArray
exports . fromByteArray = fromByteArray
var lookup = [ ]
var revLookup = [ ]
var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array
var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'
for ( var i = 0 , len = code . length ; i < len ; ++ i ) {
lookup [ i ] = code [ i ]
revLookup [ code . charCodeAt ( i ) ] = i
2019-09-16 22:12:43 +02:00
}
2019-12-05 13:13:10 +01:00
// Support decoding URL-safe base64 strings, as Node.js does.
// See: https://en.wikipedia.org/wiki/Base64#URL_applications
revLookup [ '-' . charCodeAt ( 0 ) ] = 62
revLookup [ '_' . charCodeAt ( 0 ) ] = 63
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
function getLens ( b64 ) {
var len = b64 . length
if ( len % 4 > 0 ) {
throw new Error ( 'Invalid string. Length must be a multiple of 4' )
2019-09-16 22:12:43 +02:00
}
2019-12-05 13:13:10 +01:00
// Trim off extra bytes after placeholder bytes are found
// See: https://github.com/beatgammit/base64-js/issues/42
var validLen = b64 . indexOf ( '=' )
if ( validLen === - 1 ) validLen = len
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
var placeHoldersLen = validLen === len
? 0
: 4 - ( validLen % 4 )
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
return [ validLen , placeHoldersLen ]
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
// base64 is 4/3 + up to two characters of the original data
function byteLength ( b64 ) {
var lens = getLens ( b64 )
var validLen = lens [ 0 ]
var placeHoldersLen = lens [ 1 ]
return ( ( validLen + placeHoldersLen ) * 3 / 4 ) - placeHoldersLen
2019-09-16 22:12:43 +02:00
}
2019-12-05 13:13:10 +01:00
function _byteLength ( b64 , validLen , placeHoldersLen ) {
return ( ( validLen + placeHoldersLen ) * 3 / 4 ) - placeHoldersLen
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
function toByteArray ( b64 ) {
var tmp
var lens = getLens ( b64 )
var validLen = lens [ 0 ]
var placeHoldersLen = lens [ 1 ]
var arr = new Arr ( _byteLength ( b64 , validLen , placeHoldersLen ) )
var curByte = 0
// if there are placeholders, only get up to the last complete 4 chars
var len = placeHoldersLen > 0
? validLen - 4
: validLen
for ( var i = 0 ; i < len ; i += 4 ) {
tmp =
( revLookup [ b64 . charCodeAt ( i ) ] << 18 ) |
( revLookup [ b64 . charCodeAt ( i + 1 ) ] << 12 ) |
( revLookup [ b64 . charCodeAt ( i + 2 ) ] << 6 ) |
revLookup [ b64 . charCodeAt ( i + 3 ) ]
arr [ curByte ++ ] = ( tmp >> 16 ) & 0xFF
arr [ curByte ++ ] = ( tmp >> 8 ) & 0xFF
arr [ curByte ++ ] = tmp & 0xFF
2019-09-16 22:12:43 +02:00
}
2019-12-05 13:13:10 +01:00
if ( placeHoldersLen === 2 ) {
tmp =
( revLookup [ b64 . charCodeAt ( i ) ] << 2 ) |
( revLookup [ b64 . charCodeAt ( i + 1 ) ] >> 4 )
arr [ curByte ++ ] = tmp & 0xFF
2019-09-16 22:12:43 +02:00
}
2019-12-05 13:13:10 +01:00
if ( placeHoldersLen === 1 ) {
tmp =
( revLookup [ b64 . charCodeAt ( i ) ] << 10 ) |
( revLookup [ b64 . charCodeAt ( i + 1 ) ] << 4 ) |
( revLookup [ b64 . charCodeAt ( i + 2 ) ] >> 2 )
arr [ curByte ++ ] = ( tmp >> 8 ) & 0xFF
arr [ curByte ++ ] = tmp & 0xFF
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
return arr
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
function tripletToBase64 ( num ) {
return lookup [ num >> 18 & 0x3F ] +
lookup [ num >> 12 & 0x3F ] +
lookup [ num >> 6 & 0x3F ] +
lookup [ num & 0x3F ]
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
function encodeChunk ( uint8 , start , end ) {
var tmp
var output = [ ]
for ( var i = start ; i < end ; i += 3 ) {
tmp =
( ( uint8 [ i ] << 16 ) & 0xFF0000 ) +
( ( uint8 [ i + 1 ] << 8 ) & 0xFF00 ) +
( uint8 [ i + 2 ] & 0xFF )
output . push ( tripletToBase64 ( tmp ) )
}
return output . join ( '' )
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
function fromByteArray ( uint8 ) {
var tmp
var len = uint8 . length
var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes
var parts = [ ]
var maxChunkLength = 16383 // must be multiple of 3
// go through the array every three bytes, we'll deal with trailing stuff later
for ( var i = 0 , len2 = len - extraBytes ; i < len2 ; i += maxChunkLength ) {
parts . push ( encodeChunk (
uint8 , i , ( i + maxChunkLength ) > len2 ? len2 : ( i + maxChunkLength )
) )
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
// pad the end with zeros, but make sure to not forget the extra bytes
if ( extraBytes === 1 ) {
tmp = uint8 [ len - 1 ]
parts . push (
lookup [ tmp >> 2 ] +
lookup [ ( tmp << 4 ) & 0x3F ] +
'=='
)
} else if ( extraBytes === 2 ) {
tmp = ( uint8 [ len - 2 ] << 8 ) + uint8 [ len - 1 ]
parts . push (
lookup [ tmp >> 10 ] +
lookup [ ( tmp >> 4 ) & 0x3F ] +
lookup [ ( tmp << 2 ) & 0x3F ] +
'='
)
}
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
return parts . join ( '' )
2019-09-16 22:12:43 +02:00
}
2019-12-05 13:13:10 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 21 */
2019-12-05 13:13:10 +01:00
/***/ ( function ( module , exports ) {
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
exports . read = function ( buffer , offset , isLE , mLen , nBytes ) {
var e , m
var eLen = ( nBytes * 8 ) - mLen - 1
var eMax = ( 1 << eLen ) - 1
var eBias = eMax >> 1
var nBits = - 7
var i = isLE ? ( nBytes - 1 ) : 0
var d = isLE ? - 1 : 1
var s = buffer [ offset + i ]
i += d
e = s & ( ( 1 << ( - nBits ) ) - 1 )
s >>= ( - nBits )
nBits += eLen
for ( ; nBits > 0 ; e = ( e * 256 ) + buffer [ offset + i ] , i += d , nBits -= 8 ) { }
m = e & ( ( 1 << ( - nBits ) ) - 1 )
e >>= ( - nBits )
nBits += mLen
for ( ; nBits > 0 ; m = ( m * 256 ) + buffer [ offset + i ] , i += d , nBits -= 8 ) { }
if ( e === 0 ) {
e = 1 - eBias
} else if ( e === eMax ) {
return m ? NaN : ( ( s ? - 1 : 1 ) * Infinity )
} else {
m = m + Math . pow ( 2 , mLen )
e = e - eBias
2019-09-16 22:12:43 +02:00
}
2019-12-05 13:13:10 +01:00
return ( s ? - 1 : 1 ) * m * Math . pow ( 2 , e - mLen )
}
exports . write = function ( buffer , value , offset , isLE , mLen , nBytes ) {
var e , m , c
var eLen = ( nBytes * 8 ) - mLen - 1
var eMax = ( 1 << eLen ) - 1
var eBias = eMax >> 1
var rt = ( mLen === 23 ? Math . pow ( 2 , - 24 ) - Math . pow ( 2 , - 77 ) : 0 )
var i = isLE ? 0 : ( nBytes - 1 )
var d = isLE ? 1 : - 1
var s = value < 0 || ( value === 0 && 1 / value < 0 ) ? 1 : 0
value = Math . abs ( value )
if ( isNaN ( value ) || value === Infinity ) {
m = isNaN ( value ) ? 1 : 0
e = eMax
} else {
e = Math . floor ( Math . log ( value ) / Math . LN2 )
if ( value * ( c = Math . pow ( 2 , - e ) ) < 1 ) {
e --
c *= 2
}
if ( e + eBias >= 1 ) {
value += rt / c
} else {
value += rt * Math . pow ( 2 , 1 - eBias )
}
if ( value * c >= 2 ) {
e ++
c /= 2
2019-09-16 22:12:43 +02:00
}
2019-12-05 13:13:10 +01:00
if ( e + eBias >= eMax ) {
m = 0
e = eMax
} else if ( e + eBias >= 1 ) {
m = ( ( value * c ) - 1 ) * Math . pow ( 2 , mLen )
e = e + eBias
} else {
m = value * Math . pow ( 2 , eBias - 1 ) * Math . pow ( 2 , mLen )
e = 0
}
}
for ( ; mLen >= 8 ; buffer [ offset + i ] = m & 0xff , i += d , m /= 256 , mLen -= 8 ) { }
e = ( e << mLen ) | m
eLen += mLen
for ( ; eLen > 0 ; buffer [ offset + i ] = e & 0xff , i += d , e /= 256 , eLen -= 8 ) { }
buffer [ offset + i - d ] |= s * 128
2019-09-16 22:12:43 +02:00
}
2019-12-05 13:13:10 +01:00
2019-09-16 22:12:43 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 22 */
2019-12-05 13:13:10 +01:00
/***/ ( function ( module , exports ) {
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
var toString = { } . toString ;
2019-09-16 22:12:43 +02:00
2019-12-05 13:13:10 +01:00
module . exports = Array . isArray || function ( arr ) {
return toString . call ( arr ) == '[object Array]' ;
} ;
2019-09-16 22:12:43 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 23 */
2019-09-16 22:12:43 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doGenerateAuthToken" , function ( ) { return doGenerateAuthToken ; } ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 4 ) ;
2019-09-16 22:12:43 +02:00
function doGenerateAuthToken ( installationId ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GENERATE_AUTH_TOKEN_STARTED" ]
} ) ;
lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . call ( 'user' , 'new' , {
auth _token : '' ,
language : 'en' ,
app _id : installationId
} , 'post' ) . then ( function ( response ) {
if ( ! response . auth _token ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GENERATE_AUTH_TOKEN_FAILURE" ]
} ) ;
} else {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GENERATE_AUTH_TOKEN_SUCCESS" ] ,
data : {
authToken : response . auth _token
}
} ) ;
}
} ) [ "catch" ] ( function ( ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GENERATE_AUTH_TOKEN_FAILURE" ]
} ) ;
} ) ;
} ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 24 */
2019-09-16 22:12:43 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doRewardList" , function ( ) { return doRewardList ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClaimRewardType" , function ( ) { return doClaimRewardType ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClaimEligiblePurchaseRewards" , function ( ) { return doClaimEligiblePurchaseRewards ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClaimRewardClearError" , function ( ) { return doClaimRewardClearError ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchRewardedContent" , function ( ) { return doFetchRewardedContent ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 4 ) ;
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-09-16 22:12:43 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 25 ) ;
/* harmony import */ var redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 26 ) ;
/* harmony import */ var redux _actions _user _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( 27 ) ;
/* harmony import */ var rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( 9 ) ;
2019-09-16 22:12:43 +02:00
function doRewardList ( ) {
return function ( dispatch ) {
dispatch ( {
type : lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . FETCH _REWARDS _STARTED
} ) ;
lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] . call ( 'reward' , 'list' , {
multiple _rewards _per _type : true
} ) . then ( function ( userRewards ) {
dispatch ( {
type : lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . FETCH _REWARDS _COMPLETED ,
data : {
userRewards : userRewards
}
} ) ;
} ) [ "catch" ] ( function ( ) {
dispatch ( {
type : lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . FETCH _REWARDS _COMPLETED ,
data : {
userRewards : [ ]
}
} ) ;
} ) ;
} ;
}
function doClaimRewardType ( rewardType ) {
var options = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : { } ;
return function ( dispatch , getState ) {
var state = getState ( ) ;
var userIsRewardApproved = Object ( redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "selectUserIsRewardApproved" ] ) ( state ) ;
var unclaimedRewards = Object ( redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectUnclaimedRewards" ] ) ( state ) ;
2020-03-20 16:59:10 +01:00
var reward = rewardType === rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _REWARD _CODE || rewardType === rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _NEW _ANDROID ? {
2019-09-16 22:12:43 +02:00
reward _type : rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _REWARD _CODE
} : unclaimedRewards . find ( function ( ur ) {
return ur . reward _type === rewardType ;
} ) ; // Try to claim the email reward right away, even if we haven't called reward_list yet
2020-05-20 17:52:59 +02:00
if ( rewardType !== rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _REWARD _CODE && rewardType !== rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _CONFIRM _EMAIL && rewardType !== rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _DAILY _VIEW && rewardType !== rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _NEW _ANDROID && rewardType !== rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _PAID _CONTENT ) {
2019-09-16 22:12:43 +02:00
if ( ! reward || reward . transaction _id ) {
// already claimed or doesn't exist, do nothing
return ;
}
}
2020-03-20 16:59:10 +01:00
if ( ! userIsRewardApproved && rewardType !== rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _CONFIRM _EMAIL && rewardType !== rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _REWARD _CODE && rewardType !== rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _NEW _ANDROID ) {
2019-09-16 22:12:43 +02:00
if ( ! options || ! options . failSilently && rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . callbacks . rewardApprovalRequested ) {
rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . callbacks . rewardApprovalRequested ( ) ;
}
return ;
} // Set `claim_code` so the api knows which reward to give if there are multiple of the same type
var params = options . params || { } ;
2020-03-27 21:47:55 +01:00
2020-05-20 17:52:59 +02:00
if ( ! params . claim _code && reward ) {
2020-03-27 21:47:55 +01:00
params . claim _code = reward . claim _code ;
}
2019-09-16 22:12:43 +02:00
dispatch ( {
type : lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . CLAIM _REWARD _STARTED ,
data : {
reward : reward
}
} ) ;
var success = function success ( successReward ) {
2019-10-03 19:14:17 +02:00
// Temporary timeout to ensure the sdk has the correct balance after claiming a reward
setTimeout ( function ( ) {
dispatch ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "doUpdateBalance" ] ) ( ) ) . then ( function ( ) {
dispatch ( {
type : lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . CLAIM _REWARD _SUCCESS ,
data : {
reward : successReward
}
} ) ;
2019-09-16 22:12:43 +02:00
2019-10-03 19:14:17 +02:00
if ( successReward . reward _type === rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _NEW _USER && rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . callbacks . claimFirstRewardSuccess ) {
rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . callbacks . claimFirstRewardSuccess ( ) ;
} else if ( successReward . reward _type === rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _REFERRAL ) {
dispatch ( Object ( redux _actions _user _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "doFetchInviteStatus" ] ) ( ) ) ;
}
2019-09-16 22:12:43 +02:00
2019-10-03 19:14:17 +02:00
dispatch ( doRewardList ( ) ) ;
2019-09-16 22:12:43 +02:00
2019-10-03 19:14:17 +02:00
if ( options . callback ) {
options . callback ( ) ;
}
} ) ;
2019-10-11 18:36:35 +02:00
} , 2000 ) ;
2019-09-16 22:12:43 +02:00
} ;
var failure = function failure ( error ) {
dispatch ( {
type : lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . CLAIM _REWARD _FAILURE ,
data : {
reward : reward ,
error : ! options || ! options . failSilently ? error : undefined
}
} ) ;
if ( options . notifyError ) {
dispatch ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "doToast" ] ) ( {
message : error . message ,
isError : true
} ) ) ;
}
if ( options . callback ) {
options . callback ( error ) ;
}
} ;
2019-10-02 22:22:51 +02:00
return rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . claimReward ( rewardType , params ) . then ( success , failure ) ;
2019-09-16 22:12:43 +02:00
} ;
}
function doClaimEligiblePurchaseRewards ( ) {
return function ( dispatch , getState ) {
var state = getState ( ) ;
var unclaimedRewards = Object ( redux _selectors _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectUnclaimedRewards" ] ) ( state ) ;
var userIsRewardApproved = Object ( redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "selectUserIsRewardApproved" ] ) ( state ) ;
if ( ! userIsRewardApproved || ! lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] . enabled ) {
return ;
}
if ( unclaimedRewards . find ( function ( ur ) {
return ur . reward _type === rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _FIRST _STREAM ;
} ) ) {
2019-04-03 23:34:07 +02:00
dispatch ( doClaimRewardType ( rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _FIRST _STREAM ) ) ;
2018-07-23 15:12:18 +02:00
} else {
2019-10-02 19:30:55 +02:00
[ rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _MANY _DOWNLOADS , rewards _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . TYPE _DAILY _VIEW ] . forEach ( function ( type ) {
2019-04-03 23:34:07 +02:00
dispatch ( doClaimRewardType ( type , {
failSilently : true
} ) ) ;
2018-07-23 15:12:18 +02:00
} ) ;
}
} ;
}
function doClaimRewardClearError ( reward ) {
return function ( dispatch ) {
dispatch ( {
2019-04-03 23:34:07 +02:00
type : lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . CLAIM _REWARD _CLEAR _ERROR ,
data : {
reward : reward
}
2018-07-23 15:12:18 +02:00
} ) ;
} ;
}
2018-09-04 06:15:53 +02:00
function doFetchRewardedContent ( ) {
return function ( dispatch ) {
var success = function success ( nameToClaimId ) {
dispatch ( {
2019-04-03 23:34:07 +02:00
type : lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . FETCH _REWARD _CONTENT _COMPLETED ,
2018-09-04 06:15:53 +02:00
data : {
claimIds : Object . values ( nameToClaimId ) ,
success : true
}
} ) ;
} ;
var failure = function failure ( ) {
dispatch ( {
2019-04-03 23:34:07 +02:00
type : lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "ACTIONS" ] . FETCH _REWARD _CONTENT _COMPLETED ,
2018-09-04 06:15:53 +02:00
data : {
claimIds : [ ] ,
success : false
}
} ) ;
} ;
2019-04-03 23:34:07 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] . call ( 'reward' , 'list_featured' ) . then ( success , failure ) ;
2018-09-04 06:15:53 +02:00
} ;
}
2018-07-23 15:12:18 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 25 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-07-23 15:12:18 +02:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnclaimedRewardsByType" , function ( ) { return selectUnclaimedRewardsByType ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimedRewardsById" , function ( ) { return selectClaimedRewardsById ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimedRewards" , function ( ) { return selectClaimedRewards ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimedRewardsByTransactionId" , function ( ) { return selectClaimedRewardsByTransactionId ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnclaimedRewards" , function ( ) { return selectUnclaimedRewards ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFetchingRewards" , function ( ) { return selectFetchingRewards ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUnclaimedRewardValue" , function ( ) { return selectUnclaimedRewardValue ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimsPendingByType" , function ( ) { return selectClaimsPendingByType ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectIsRewardClaimPending" , function ( ) { return makeSelectIsRewardClaimPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectClaimErrorsByType" , function ( ) { return selectClaimErrorsByType ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectClaimRewardError" , function ( ) { return makeSelectClaimRewardError ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectRewardByType" , function ( ) { return makeSelectRewardByType ; } ) ;
2020-03-26 19:50:21 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectRewardByClaimCode" , function ( ) { return makeSelectRewardByClaimCode ; } ) ;
2019-04-03 23:34:07 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectRewardAmountByType" , function ( ) { return makeSelectRewardAmountByType ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectRewardContentClaimIds" , function ( ) { return selectRewardContentClaimIds ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectReferralReward" , function ( ) { return selectReferralReward ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var rewards _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 9 ) ;
2018-07-23 15:12:18 +02:00
2019-02-04 04:21:44 +01:00
2018-07-23 15:12:18 +02:00
var selectState = function selectState ( state ) {
return state . rewards || { } ;
} ;
2019-04-03 23:34:07 +02:00
var selectUnclaimedRewardsByType = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . unclaimedRewardsByType ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectClaimedRewardsById = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . claimedRewardsById ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectClaimedRewards = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectClaimedRewardsById , function ( byId ) {
2018-07-23 15:12:18 +02:00
return Object . values ( byId ) || [ ] ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectClaimedRewardsByTransactionId = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectClaimedRewards , function ( rewards ) {
2018-07-23 15:12:18 +02:00
return rewards . reduce ( function ( mapParam , reward ) {
var map = mapParam ;
map [ reward . transaction _id ] = reward ;
return map ;
} , { } ) ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUnclaimedRewards = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . unclaimedRewards ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectFetchingRewards = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return ! ! state . fetching ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUnclaimedRewardValue = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUnclaimedRewards , function ( rewards ) {
2018-07-23 15:12:18 +02:00
return rewards . reduce ( function ( sum , reward ) {
return sum + reward . reward _amount ;
} , 0 ) ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectClaimsPendingByType = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . claimPendingByType ;
} ) ;
var selectIsClaimRewardPending = function selectIsClaimRewardPending ( state , props ) {
return selectClaimsPendingByType ( state , props ) [ props . reward _type ] ;
} ;
2019-04-03 23:34:07 +02:00
var makeSelectIsRewardClaimPending = function makeSelectIsRewardClaimPending ( ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectIsClaimRewardPending , function ( isClaiming ) {
2018-07-23 15:12:18 +02:00
return isClaiming ;
} ) ;
} ;
2019-04-03 23:34:07 +02:00
var selectClaimErrorsByType = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . claimErrorsByType ;
} ) ;
var selectClaimRewardError = function selectClaimRewardError ( state , props ) {
return selectClaimErrorsByType ( state , props ) [ props . reward _type ] ;
} ;
2019-04-03 23:34:07 +02:00
var makeSelectClaimRewardError = function makeSelectClaimRewardError ( ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectClaimRewardError , function ( errorMessage ) {
2018-07-23 15:12:18 +02:00
return errorMessage ;
} ) ;
} ;
var selectRewardByType = function selectRewardByType ( state , rewardType ) {
return selectUnclaimedRewards ( state ) . find ( function ( reward ) {
return reward . reward _type === rewardType ;
} ) ;
} ;
2019-04-03 23:34:07 +02:00
var makeSelectRewardByType = function makeSelectRewardByType ( ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectRewardByType , function ( reward ) {
2018-07-23 15:12:18 +02:00
return reward ;
} ) ;
} ;
2020-03-26 19:50:21 +01:00
var selectRewardByClaimCode = function selectRewardByClaimCode ( state , claimCode ) {
return selectUnclaimedRewards ( state ) . find ( function ( reward ) {
return reward . claim _code === claimCode ;
} ) ;
} ;
var makeSelectRewardByClaimCode = function makeSelectRewardByClaimCode ( ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectRewardByClaimCode , function ( reward ) {
return reward ;
} ) ;
} ;
2019-04-03 23:34:07 +02:00
var makeSelectRewardAmountByType = function makeSelectRewardAmountByType ( ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectRewardByType , function ( reward ) {
2019-09-16 22:12:43 +02:00
return reward ? reward . reward _amount : 0 ;
2018-07-23 15:12:18 +02:00
} ) ;
2019-09-16 22:12:43 +02:00
} ;
var selectRewardContentClaimIds = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . rewardedContentClaimIds ;
} ) ;
var selectReferralReward = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUnclaimedRewards , function ( unclaimedRewards ) {
return unclaimedRewards . filter ( function ( reward ) {
return reward . reward _type === rewards _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . TYPE _REFERRAL ;
} ) [ 0 ] ;
} ) ;
2018-07-23 15:12:18 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 26 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-07-23 15:12:18 +02:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectState" , function ( ) { return selectState ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectAuthenticationIsPending" , function ( ) { return selectAuthenticationIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserIsPending" , function ( ) { return selectUserIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUser" , function ( ) { return selectUser ; } ) ;
2019-10-25 20:53:13 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailAlreadyExists" , function ( ) { return selectEmailAlreadyExists ; } ) ;
2020-04-13 15:40:25 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailDoesNotExist" , function ( ) { return selectEmailDoesNotExist ; } ) ;
2019-10-25 20:53:13 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectResendingVerificationEmail" , function ( ) { return selectResendingVerificationEmail ; } ) ;
2019-04-03 23:34:07 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserEmail" , function ( ) { return selectUserEmail ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserPhone" , function ( ) { return selectUserPhone ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserCountryCode" , function ( ) { return selectUserCountryCode ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailToVerify" , function ( ) { return selectEmailToVerify ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneToVerify" , function ( ) { return selectPhoneToVerify ; } ) ;
2019-09-13 02:57:10 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectYoutubeChannels" , function ( ) { return selectYoutubeChannels ; } ) ;
2019-04-03 23:34:07 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserIsRewardApproved" , function ( ) { return selectUserIsRewardApproved ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailNewIsPending" , function ( ) { return selectEmailNewIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailNewErrorMessage" , function ( ) { return selectEmailNewErrorMessage ; } ) ;
2020-04-13 15:40:25 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordExists" , function ( ) { return selectPasswordExists ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordResetIsPending" , function ( ) { return selectPasswordResetIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordResetSuccess" , function ( ) { return selectPasswordResetSuccess ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordResetError" , function ( ) { return selectPasswordResetError ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordSetIsPending" , function ( ) { return selectPasswordSetIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordSetSuccess" , function ( ) { return selectPasswordSetSuccess ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPasswordSetError" , function ( ) { return selectPasswordSetError ; } ) ;
2019-04-03 23:34:07 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneNewErrorMessage" , function ( ) { return selectPhoneNewErrorMessage ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailVerifyIsPending" , function ( ) { return selectEmailVerifyIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectEmailVerifyErrorMessage" , function ( ) { return selectEmailVerifyErrorMessage ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneNewIsPending" , function ( ) { return selectPhoneNewIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneVerifyIsPending" , function ( ) { return selectPhoneVerifyIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectPhoneVerifyErrorMessage" , function ( ) { return selectPhoneVerifyErrorMessage ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIdentityVerifyIsPending" , function ( ) { return selectIdentityVerifyIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIdentityVerifyErrorMessage" , function ( ) { return selectIdentityVerifyErrorMessage ; } ) ;
2019-09-16 22:12:43 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserVerifiedEmail" , function ( ) { return selectUserVerifiedEmail ; } ) ;
2019-04-03 23:34:07 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserIsVerificationCandidate" , function ( ) { return selectUserIsVerificationCandidate ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectAccessToken" , function ( ) { return selectAccessToken ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteStatusIsPending" , function ( ) { return selectUserInviteStatusIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInvitesRemaining" , function ( ) { return selectUserInvitesRemaining ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInvitees" , function ( ) { return selectUserInvitees ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteStatusFailed" , function ( ) { return selectUserInviteStatusFailed ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteNewIsPending" , function ( ) { return selectUserInviteNewIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteNewErrorMessage" , function ( ) { return selectUserInviteNewErrorMessage ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteReferralLink" , function ( ) { return selectUserInviteReferralLink ; } ) ;
2020-01-08 22:58:07 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUserInviteReferralCode" , function ( ) { return selectUserInviteReferralCode ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectYouTubeImportPending" , function ( ) { return selectYouTubeImportPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectYouTubeImportError" , function ( ) { return selectYouTubeImportError ; } ) ;
2020-01-08 22:58:07 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSetReferrerPending" , function ( ) { return selectSetReferrerPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSetReferrerError" , function ( ) { return selectSetReferrerError ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectYouTubeImportVideosComplete" , function ( ) { return selectYouTubeImportVideosComplete ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-04-13 15:40:25 +02:00
function _typeof ( obj ) { if ( typeof Symbol === "function" && typeof Symbol . iterator === "symbol" ) { _typeof = function _typeof ( obj ) { return typeof obj ; } ; } else { _typeof = function _typeof ( obj ) { return obj && typeof Symbol === "function" && obj . constructor === Symbol && obj !== Symbol . prototype ? "symbol" : typeof obj ; } ; } return _typeof ( obj ) ; }
2018-07-23 15:12:18 +02:00
2019-04-03 23:34:07 +02:00
var selectState = function selectState ( state ) {
return state . user || { } ;
} ;
var selectAuthenticationIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . authenticationIsPending ;
2019-02-04 04:21:44 +01:00
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . userIsPending ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUser = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . user ;
} ) ;
2019-10-25 20:53:13 +02:00
var selectEmailAlreadyExists = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . emailAlreadyExists ;
} ) ;
2020-04-13 15:40:25 +02:00
var selectEmailDoesNotExist = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . emailDoesNotExist ;
} ) ;
2019-10-25 20:53:13 +02:00
var selectResendingVerificationEmail = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . resendingVerificationEmail ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserEmail = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUser , function ( user ) {
2020-04-20 22:45:21 +02:00
return user ? user . primary _email || user . latest _claimed _email : null ;
2018-07-23 15:12:18 +02:00
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserPhone = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUser , function ( user ) {
2018-07-23 15:12:18 +02:00
return user ? user . phone _number : null ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserCountryCode = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUser , function ( user ) {
2018-07-23 15:12:18 +02:00
return user ? user . country _code : null ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectEmailToVerify = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , selectUserEmail , function ( state , userEmail ) {
2018-07-23 15:12:18 +02:00
return state . emailToVerify || userEmail ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectPhoneToVerify = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , selectUserPhone , function ( state , userPhone ) {
2018-07-23 15:12:18 +02:00
return state . phoneToVerify || userPhone ;
} ) ;
2019-09-13 02:57:10 +02:00
var selectYoutubeChannels = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUser , function ( user ) {
return user ? user . youtube _channels : null ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserIsRewardApproved = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUser , function ( user ) {
2018-07-23 15:12:18 +02:00
return user && user . is _reward _approved ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectEmailNewIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . emailNewIsPending ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectEmailNewErrorMessage = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2020-04-13 15:40:25 +02:00
var error = state . emailNewErrorMessage ;
return _typeof ( error ) === 'object' && error !== null ? error . message : error ;
} ) ;
var selectPasswordExists = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . passwordExistsForUser ;
} ) ;
var selectPasswordResetIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . passwordResetPending ;
} ) ;
var selectPasswordResetSuccess = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . passwordResetSuccess ;
} ) ;
var selectPasswordResetError = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
var error = state . passwordResetError ;
return _typeof ( error ) === 'object' && error !== null ? error . message : error ;
} ) ;
var selectPasswordSetIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . passwordSetPending ;
} ) ;
var selectPasswordSetSuccess = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . passwordSetSuccess ;
} ) ;
var selectPasswordSetError = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
var error = state . passwordSetError ;
return _typeof ( error ) === 'object' && error !== null ? error . message : error ;
2018-07-23 15:12:18 +02:00
} ) ;
2019-04-03 23:34:07 +02:00
var selectPhoneNewErrorMessage = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . phoneNewErrorMessage ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectEmailVerifyIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . emailVerifyIsPending ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectEmailVerifyErrorMessage = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . emailVerifyErrorMessage ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectPhoneNewIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-08-31 21:51:00 +02:00
return state . phoneNewIsPending ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectPhoneVerifyIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-08-31 21:51:00 +02:00
return state . phoneVerifyIsPending ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectPhoneVerifyErrorMessage = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . phoneVerifyErrorMessage ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectIdentityVerifyIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . identityVerifyIsPending ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectIdentityVerifyErrorMessage = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . identityVerifyErrorMessage ;
} ) ;
2019-09-16 22:12:43 +02:00
var selectUserVerifiedEmail = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUser , function ( user ) {
return user && user . has _verified _email ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserIsVerificationCandidate = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUser , function ( user ) {
2018-07-23 15:12:18 +02:00
return user && ( ! user . has _verified _email || ! user . is _identity _verified ) ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectAccessToken = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . accessToken ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserInviteStatusIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . inviteStatusIsPending ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserInvitesRemaining = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . invitesRemaining ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserInvitees = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . invitees ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserInviteStatusFailed = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectUserInvitesRemaining , function ( ) {
2018-07-23 15:12:18 +02:00
return selectUserInvitesRemaining === null ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserInviteNewIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . inviteNewIsPending ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserInviteNewErrorMessage = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2018-07-23 15:12:18 +02:00
return state . inviteNewErrorMessage ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectUserInviteReferralLink = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-02-20 17:14:42 +01:00
return state . referralLink ;
} ) ;
2020-01-08 22:58:07 +01:00
var selectUserInviteReferralCode = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2020-01-10 04:28:46 +01:00
return state . referralCode ? state . referralCode [ 0 ] : '' ;
2020-01-08 22:58:07 +01:00
} ) ;
2019-10-02 06:15:24 +02:00
var selectYouTubeImportPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . youtubeChannelImportPending ;
} ) ;
var selectYouTubeImportError = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . youtubeChannelImportErrorMessage ;
2019-09-17 23:01:10 +02:00
} ) ;
2020-01-08 22:58:07 +01:00
var selectSetReferrerPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2020-01-10 04:44:03 +01:00
return state . referrerSetIsPending ;
2020-01-08 22:58:07 +01:00
} ) ;
var selectSetReferrerError = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2020-01-10 04:44:03 +01:00
return state . referrerSetError ;
2020-01-08 22:58:07 +01:00
} ) ;
2019-10-02 06:15:24 +02:00
var selectYouTubeImportVideosComplete = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
var total = state . youtubeChannelImportTotal ;
var complete = state . youtubeChannelImportComplete || 0 ;
if ( total ) {
return [ complete , total ] ;
}
2019-09-17 23:01:10 +02:00
} ) ;
2019-02-20 17:14:42 +01:00
2018-07-23 15:12:18 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 27 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2018-07-23 15:12:18 +02:00
2019-09-16 22:12:43 +02:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchInviteStatus" , function ( ) { return doFetchInviteStatus ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doInstallNew" , function ( ) { return doInstallNew ; } ) ;
2020-03-19 08:55:45 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doInstallNewWithParams" , function ( ) { return doInstallNewWithParams ; } ) ;
2019-09-16 22:12:43 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doAuthenticate" , function ( ) { return doAuthenticate ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserFetch" , function ( ) { return doUserFetch ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserCheckEmailVerified" , function ( ) { return doUserCheckEmailVerified ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPhoneReset" , function ( ) { return doUserPhoneReset ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPhoneNew" , function ( ) { return doUserPhoneNew ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPhoneVerifyFailure" , function ( ) { return doUserPhoneVerifyFailure ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPhoneVerify" , function ( ) { return doUserPhoneVerify ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserEmailToVerify" , function ( ) { return doUserEmailToVerify ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserEmailNew" , function ( ) { return doUserEmailNew ; } ) ;
2020-04-13 15:40:25 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserCheckIfEmailExists" , function ( ) { return doUserCheckIfEmailExists ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserSignIn" , function ( ) { return doUserSignIn ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserSignUp" , function ( ) { return doUserSignUp ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPasswordReset" , function ( ) { return doUserPasswordReset ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserPasswordSet" , function ( ) { return doUserPasswordSet ; } ) ;
2019-09-16 22:12:43 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserResendVerificationEmail" , function ( ) { return doUserResendVerificationEmail ; } ) ;
2020-04-13 15:40:25 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClearEmailEntry" , function ( ) { return doClearEmailEntry ; } ) ;
2020-04-13 19:43:15 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClearPasswordEntry" , function ( ) { return doClearPasswordEntry ; } ) ;
2019-09-16 22:12:43 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserEmailVerifyFailure" , function ( ) { return doUserEmailVerifyFailure ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserEmailVerify" , function ( ) { return doUserEmailVerify ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchAccessToken" , function ( ) { return doFetchAccessToken ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserIdentityVerify" , function ( ) { return doUserIdentityVerify ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserInviteNew" , function ( ) { return doUserInviteNew ; } ) ;
2020-01-16 23:52:53 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserSetReferrerReset" , function ( ) { return doUserSetReferrerReset ; } ) ;
2020-01-08 22:58:07 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUserSetReferrer" , function ( ) { return doUserSetReferrer ; } ) ;
2019-09-16 21:10:48 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doClaimYoutubeChannels" , function ( ) { return doClaimYoutubeChannels ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckYoutubeTransfer" , function ( ) { return doCheckYoutubeTransfer ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-09-16 22:12:43 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2019-10-02 06:15:24 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 24 ) ;
/* harmony import */ var redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 26 ) ;
/* harmony import */ var rewards _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( 9 ) ;
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( 4 ) ;
function asyncGeneratorStep ( gen , resolve , reject , _next , _throw , key , arg ) { try { var info = gen [ key ] ( arg ) ; var value = info . value ; } catch ( error ) { reject ( error ) ; return ; } if ( info . done ) { resolve ( value ) ; } else { Promise . resolve ( value ) . then ( _next , _throw ) ; } }
function _asyncToGenerator ( fn ) { return function ( ) { var self = this , args = arguments ; return new Promise ( function ( resolve , reject ) { var gen = fn . apply ( self , args ) ; function _next ( value ) { asyncGeneratorStep ( gen , resolve , reject , _next , _throw , "next" , value ) ; } function _throw ( err ) { asyncGeneratorStep ( gen , resolve , reject , _next , _throw , "throw" , err ) ; } _next ( undefined ) ; } ) ; } ; }
2020-04-13 15:40:25 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-09-16 22:12:43 +02:00
function _slicedToArray ( arr , i ) { return _arrayWithHoles ( arr ) || _iterableToArrayLimit ( arr , i ) || _nonIterableRest ( ) ; }
2018-08-17 20:10:52 +02:00
2019-09-16 22:12:43 +02:00
function _nonIterableRest ( ) { throw new TypeError ( "Invalid attempt to destructure non-iterable instance" ) ; }
2018-08-17 20:10:52 +02:00
2019-09-16 22:12:43 +02:00
function _iterableToArrayLimit ( arr , i ) { var _arr = [ ] ; var _n = true ; var _d = false ; var _e = undefined ; try { for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) { _arr . push ( _s . value ) ; if ( i && _arr . length === i ) break ; } } catch ( err ) { _d = true ; _e = err ; } finally { try { if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ; } finally { if ( _d ) throw _e ; } } return _arr ; }
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
function _arrayWithHoles ( arr ) { if ( Array . isArray ( arr ) ) return arr ; }
2019-10-02 06:15:24 +02:00
2019-09-16 22:12:43 +02:00
function doFetchInviteStatus ( ) {
2018-09-18 23:56:12 +02:00
return function ( dispatch ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_INVITE_STATUS_FETCH_STARTED" ]
2018-09-18 23:56:12 +02:00
} ) ;
2019-10-02 06:15:24 +02:00
Promise . all ( [ lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user' , 'invite_status' ) , lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user_referral_code' , 'list' ) ] ) . then ( function ( _ref ) {
2019-09-16 22:12:43 +02:00
var _ref2 = _slicedToArray ( _ref , 2 ) ,
status = _ref2 [ 0 ] ,
code = _ref2 [ 1 ] ;
2018-09-18 23:56:12 +02:00
2019-10-02 06:15:24 +02:00
dispatch ( Object ( redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "doRewardList" ] ) ( ) ) ;
2018-09-18 23:56:12 +02:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_INVITE_STATUS_FETCH_SUCCESS" ] ,
2019-04-03 23:34:07 +02:00
data : {
2019-09-16 22:12:43 +02:00
invitesRemaining : status . invites _remaining ? status . invites _remaining : 0 ,
invitees : status . invitees ,
2020-01-08 22:58:07 +01:00
referralLink : "" . concat ( lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . CONNECTION _STRING , "user/refer?r=" ) . concat ( code ) ,
referralCode : code
2019-04-03 23:34:07 +02:00
}
2018-09-18 23:56:12 +02:00
} ) ;
2019-09-16 22:12:43 +02:00
} ) [ "catch" ] ( function ( error ) {
2018-09-18 23:56:12 +02:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_INVITE_STATUS_FETCH_FAILURE" ] ,
2019-04-03 23:34:07 +02:00
data : {
error : error
}
2018-09-18 23:56:12 +02:00
} ) ;
2018-08-17 20:10:52 +02:00
} ) ;
} ;
}
2019-09-16 22:12:43 +02:00
function doInstallNew ( appVersion ) {
var os = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : null ;
2019-10-15 11:21:08 +02:00
var firebaseToken = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : null ;
2020-03-16 23:00:46 +01:00
var callbackForUsersWhoAreSharingData = arguments . length > 3 ? arguments [ 3 ] : undefined ;
2019-09-16 22:12:43 +02:00
var payload = {
app _version : appVersion
2018-08-17 20:10:52 +02:00
} ;
2019-10-15 11:21:08 +02:00
if ( firebaseToken ) {
payload . firebase _token = firebaseToken ;
}
2019-09-16 22:12:43 +02:00
lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Lbry" ] . status ( ) . then ( function ( status ) {
payload . app _id = status . installation _id ;
payload . node _id = status . lbry _id ;
lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Lbry" ] . version ( ) . then ( function ( version ) {
payload . daemon _version = version . lbrynet _version ;
payload . operating _system = os || version . os _system ;
payload . platform = version . platform ;
2019-10-02 06:15:24 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'install' , 'new' , payload ) ;
2020-03-12 17:19:42 +01:00
2020-03-16 23:00:46 +01:00
if ( callbackForUsersWhoAreSharingData ) {
callbackForUsersWhoAreSharingData ( status ) ;
2020-03-12 17:19:42 +01:00
}
2018-09-18 23:56:12 +02:00
} ) ;
2019-09-16 22:12:43 +02:00
} ) ;
2020-03-19 08:55:45 +01:00
}
function doInstallNewWithParams ( appVersion , installationId , nodeId , lbrynetVersion , os , platform ) {
var firebaseToken = arguments . length > 6 && arguments [ 6 ] !== undefined ? arguments [ 6 ] : null ;
2020-04-13 15:40:25 +02:00
return function ( ) {
2020-03-19 08:55:45 +01:00
var payload = {
app _version : appVersion
} ;
if ( firebaseToken ) {
payload . firebase _token = firebaseToken ;
}
payload . app _id = installationId ;
payload . node _id = nodeId ;
payload . daemon _version = lbrynetVersion ;
payload . operating _system = os ;
payload . platform = platform ;
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'install' , 'new' , payload ) ;
} ;
2019-09-16 22:12:43 +02:00
} // TODO: Call doInstallNew separately so we don't have to pass appVersion and os_system params?
function doAuthenticate ( appVersion ) {
var os = arguments . length > 1 && arguments [ 1 ] !== undefined ? arguments [ 1 ] : null ;
2019-10-15 11:21:08 +02:00
var firebaseToken = arguments . length > 2 && arguments [ 2 ] !== undefined ? arguments [ 2 ] : null ;
2020-02-24 18:02:43 +01:00
var shareUsageData = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : true ;
2020-03-16 23:00:46 +01:00
var callbackForUsersWhoAreSharingData = arguments . length > 4 ? arguments [ 4 ] : undefined ;
2020-03-19 08:55:45 +01:00
var callInstall = arguments . length > 5 && arguments [ 5 ] !== undefined ? arguments [ 5 ] : true ;
2018-09-18 23:56:12 +02:00
return function ( dispatch ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "AUTHENTICATION_STARTED" ]
2018-09-18 23:56:12 +02:00
} ) ;
2020-01-14 21:40:07 +01:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . authenticate ( ) . then ( function ( user ) {
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . getAuthToken ( ) . then ( function ( token ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "AUTHENTICATION_SUCCESS" ] ,
data : {
user : user ,
accessToken : token
}
} ) ;
2020-02-24 18:02:43 +01:00
if ( shareUsageData ) {
dispatch ( Object ( redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "doRewardList" ] ) ( ) ) ;
dispatch ( doFetchInviteStatus ( ) ) ;
2020-03-19 08:55:45 +01:00
if ( callInstall ) {
doInstallNew ( appVersion , os , firebaseToken , callbackForUsersWhoAreSharingData ) ;
}
2020-02-24 18:02:43 +01:00
}
2018-09-18 23:56:12 +02:00
} ) ;
2019-04-03 23:34:07 +02:00
} ) [ "catch" ] ( function ( error ) {
2018-09-18 23:56:12 +02:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "AUTHENTICATION_FAILURE" ] ,
2019-04-03 23:34:07 +02:00
data : {
error : error
}
2018-09-18 23:56:12 +02:00
} ) ;
} ) ;
} ;
2019-09-16 22:12:43 +02:00
}
function doUserFetch ( ) {
2019-04-03 23:34:07 +02:00
return function ( dispatch ) {
2020-04-13 15:40:25 +02:00
return new Promise ( function ( resolve , reject ) {
2019-09-16 22:12:43 +02:00
dispatch ( {
2020-04-13 15:40:25 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_FETCH_STARTED" ]
2019-09-16 22:12:43 +02:00
} ) ;
2020-04-13 15:40:25 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . getCurrentUser ( ) . then ( function ( user ) {
dispatch ( Object ( redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "doRewardList" ] ) ( ) ) ;
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_FETCH_SUCCESS" ] ,
data : {
user : user
}
} ) ;
resolve ( user ) ;
} ) [ "catch" ] ( function ( error ) {
reject ( error ) ;
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_FETCH_FAILURE" ] ,
data : {
error : error
}
} ) ;
2019-09-16 22:12:43 +02:00
} ) ;
2019-04-03 23:34:07 +02:00
} ) ;
} ;
2019-09-16 22:12:43 +02:00
}
function doUserCheckEmailVerified ( ) {
// This will happen in the background so we don't need loading booleans
2019-04-03 23:34:07 +02:00
return function ( dispatch ) {
2019-10-02 06:15:24 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . getCurrentUser ( ) . then ( function ( user ) {
2019-09-16 22:12:43 +02:00
if ( user . has _verified _email ) {
2019-10-02 06:15:24 +02:00
dispatch ( Object ( redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "doRewardList" ] ) ( ) ) ;
2019-09-16 22:12:43 +02:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_FETCH_SUCCESS" ] ,
2019-09-16 22:12:43 +02:00
data : {
user : user
}
} ) ;
2019-04-03 23:34:07 +02:00
}
} ) ;
} ;
2019-09-16 22:12:43 +02:00
}
function doUserPhoneReset ( ) {
return {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PHONE_RESET" ]
2019-09-16 22:12:43 +02:00
} ;
}
function doUserPhoneNew ( phone , countryCode ) {
return function ( dispatch ) {
2019-02-21 17:01:19 +01:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PHONE_NEW_STARTED" ] ,
2019-02-21 17:01:19 +01:00
data : {
2019-09-16 22:12:43 +02:00
phone : phone ,
country _code : countryCode
2019-02-21 17:01:19 +01:00
}
} ) ;
2019-09-16 22:12:43 +02:00
var success = function success ( ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PHONE_NEW_SUCCESS" ] ,
2019-04-03 23:34:07 +02:00
data : {
2019-09-16 22:12:43 +02:00
phone : phone
2019-04-03 23:34:07 +02:00
}
2019-02-21 17:01:19 +01:00
} ) ;
2019-09-16 22:12:43 +02:00
} ;
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
var failure = function failure ( error ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PHONE_NEW_FAILURE" ] ,
2019-09-16 22:12:43 +02:00
data : {
error : error
}
2019-02-21 17:01:19 +01:00
} ) ;
2019-09-16 22:12:43 +02:00
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user' , 'phone_number_new' , {
2019-09-16 22:12:43 +02:00
phone _number : phone ,
country _code : countryCode
} , 'post' ) . then ( success , failure ) ;
2019-02-21 17:01:19 +01:00
} ;
2019-09-16 22:12:43 +02:00
}
function doUserPhoneVerifyFailure ( error ) {
return {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PHONE_VERIFY_FAILURE" ] ,
2019-09-16 22:12:43 +02:00
data : {
error : error
}
2019-02-21 17:01:19 +01:00
} ;
2019-09-16 22:12:43 +02:00
}
function doUserPhoneVerify ( verificationCode ) {
2019-04-03 23:34:07 +02:00
return function ( dispatch , getState ) {
2019-10-02 06:15:24 +02:00
var phoneNumber = Object ( redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "selectPhoneToVerify" ] ) ( getState ( ) ) ;
var countryCode = Object ( redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "selectUserCountryCode" ] ) ( getState ( ) ) ;
2019-09-16 22:12:43 +02:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PHONE_VERIFY_STARTED" ] ,
2019-09-16 22:12:43 +02:00
code : verificationCode
2019-02-21 17:01:19 +01:00
} ) ;
2019-10-02 06:15:24 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user' , 'phone_number_confirm' , {
2019-09-16 22:12:43 +02:00
verification _code : verificationCode ,
phone _number : phoneNumber ,
country _code : countryCode
} , 'post' ) . then ( function ( user ) {
if ( user . is _identity _verified ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PHONE_VERIFY_SUCCESS" ] ,
2019-09-16 22:12:43 +02:00
data : {
user : user
2019-02-21 17:01:19 +01:00
}
} ) ;
2019-10-02 06:15:24 +02:00
dispatch ( Object ( redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "doClaimRewardType" ] ) ( rewards _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "default" ] . TYPE _NEW _USER ) ) ;
2019-09-16 22:12:43 +02:00
}
} ) [ "catch" ] ( function ( error ) {
return dispatch ( doUserPhoneVerifyFailure ( error ) ) ;
} ) ;
} ;
}
function doUserEmailToVerify ( email ) {
return function ( dispatch ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_VERIFY_SET" ] ,
2019-09-16 22:12:43 +02:00
data : {
email : email
}
} ) ;
} ;
}
function doUserEmailNew ( email ) {
return function ( dispatch ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_STARTED" ] ,
2019-09-16 22:12:43 +02:00
email : email
} ) ;
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
var success = function success ( ) {
2019-02-21 17:01:19 +01:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_SUCCESS" ] ,
2019-02-21 17:01:19 +01:00
data : {
2019-09-16 22:12:43 +02:00
email : email
2019-02-15 10:02:34 +01:00
}
2019-02-21 17:01:19 +01:00
} ) ;
2019-09-16 22:12:43 +02:00
dispatch ( doUserFetch ( ) ) ;
} ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var failure = function failure ( error ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_FAILURE" ] ,
2019-09-16 22:12:43 +02:00
data : {
error : error
}
2019-02-21 17:01:19 +01:00
} ) ;
2019-09-16 22:12:43 +02:00
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user_email' , 'new' , {
2019-09-16 22:12:43 +02:00
email : email ,
send _verification _email : true
} , 'post' ) [ "catch" ] ( function ( error ) {
if ( error . response && error . response . status === 409 ) {
2019-10-25 20:53:13 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_EXISTS" ]
} ) ;
2019-10-02 06:15:24 +02:00
return lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user_email' , 'resend_token' , {
2019-09-16 22:12:43 +02:00
email : email ,
only _if _expired : true
} , 'post' ) . then ( success , failure ) ;
}
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
throw error ;
} ) . then ( success , failure ) ;
} ;
}
2020-04-13 15:40:25 +02:00
function doUserCheckIfEmailExists ( email ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_STARTED" ] ,
email : email
} ) ;
2020-04-23 20:14:43 +02:00
var triggerEmailFlow = function triggerEmailFlow ( hasPassword ) {
2020-04-13 15:40:25 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_SUCCESS" ] ,
data : {
email : email
}
} ) ;
2020-04-13 19:43:15 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_EXISTS" ]
} ) ;
2020-04-13 15:40:25 +02:00
2020-04-23 20:14:43 +02:00
if ( hasPassword ) {
2020-04-13 15:40:25 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PASSWORD_EXISTS" ]
} ) ;
2020-04-16 16:52:52 +02:00
} else {
// If they don't have a password, they will need to use the email verification api
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user_email' , 'resend_token' , {
email : email ,
only _if _expired : true
} , 'post' ) ;
2020-04-13 15:40:25 +02:00
}
} ;
2020-04-23 20:14:43 +02:00
var success = function success ( response ) {
triggerEmailFlow ( response . has _password ) ;
} ;
2020-04-13 15:40:25 +02:00
var failure = function failure ( error ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_FAILURE" ] ,
data : {
error : error
}
} ) ;
} ;
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user' , 'exists' , {
email : email
} , 'post' ) [ "catch" ] ( function ( error ) {
if ( error . response && error . response . status === 404 ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_DOES_NOT_EXIST" ]
} ) ;
2020-04-23 20:14:43 +02:00
} else if ( error . response && error . response . status === 412 ) {
triggerEmailFlow ( false ) ;
2020-04-13 15:40:25 +02:00
}
throw error ;
} ) . then ( success , failure ) ;
} ;
}
function doUserSignIn ( email , password ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_STARTED" ] ,
email : email
} ) ;
var success = function success ( ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_SUCCESS" ] ,
data : {
email : email
}
} ) ;
dispatch ( doUserFetch ( ) ) ;
} ;
var failure = function failure ( error ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_FAILURE" ] ,
data : {
error : error
}
} ) ;
} ;
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user' , 'signin' , _objectSpread ( {
email : email
} , password ? {
password : password
} : { } ) , 'post' ) [ "catch" ] ( function ( error ) {
if ( error . response && error . response . status === 409 ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_EXISTS" ]
} ) ;
return lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user_email' , 'resend_token' , {
email : email ,
only _if _expired : true
} , 'post' ) . then ( success , failure ) ;
}
throw error ;
} ) . then ( success , failure ) ;
} ;
}
function doUserSignUp ( email , password ) {
return function ( dispatch ) {
2020-04-15 18:07:43 +02:00
return new Promise ( function ( resolve , reject ) {
2020-04-13 15:40:25 +02:00
dispatch ( {
2020-04-15 18:07:43 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_STARTED" ] ,
email : email
2020-04-13 15:40:25 +02:00
} ) ;
2020-04-15 18:07:43 +02:00
var success = function success ( ) {
2020-04-13 15:40:25 +02:00
dispatch ( {
2020-04-15 18:07:43 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_SUCCESS" ] ,
data : {
email : email
}
2020-04-13 15:40:25 +02:00
} ) ;
2020-04-15 18:07:43 +02:00
dispatch ( doUserFetch ( ) ) ;
resolve ( ) ;
} ;
2020-04-13 15:40:25 +02:00
2020-04-15 18:07:43 +02:00
var failure = function failure ( error ) {
if ( error . response && error . response . status === 409 ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_EXISTS" ]
} ) ;
2020-04-13 15:40:25 +02:00
}
2020-04-15 18:07:43 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_FAILURE" ] ,
data : {
error : error
}
} ) ;
reject ( error ) ;
} ;
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user' , 'signup' , _objectSpread ( {
email : email
} , password ? {
password : password
} : { } ) , 'post' ) . then ( success , failure ) ;
} ) ;
2020-04-13 15:40:25 +02:00
} ;
}
function doUserPasswordReset ( email ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PASSWORD_RESET_STARTED" ] ,
email : email
} ) ;
var success = function success ( ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PASSWORD_RESET_SUCCESS" ]
} ) ;
} ;
var failure = function failure ( error ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PASSWORD_RESET_FAILURE" ] ,
data : {
error : error
}
} ) ;
} ;
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user_password' , 'reset' , {
email : email
} , 'post' ) . then ( success , failure ) ;
} ;
}
function doUserPasswordSet ( newPassword , oldPassword , authToken ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PASSWORD_SET_STARTED" ]
} ) ;
var success = function success ( ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PASSWORD_SET_SUCCESS" ]
} ) ;
dispatch ( doUserFetch ( ) ) ;
} ;
var failure = function failure ( error ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PASSWORD_SET_FAILURE" ] ,
data : {
error : error
}
} ) ;
} ;
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user_password' , 'set' , _objectSpread ( {
new _password : newPassword
} , oldPassword ? {
old _password : oldPassword
} : { } , authToken ? {
auth _token : authToken
} : { } ) , 'post' ) . then ( success , failure ) ;
} ;
}
2019-09-16 22:12:43 +02:00
function doUserResendVerificationEmail ( email ) {
return function ( dispatch ) {
2019-02-21 17:01:19 +01:00
dispatch ( {
2019-10-25 20:53:13 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_VERIFY_RETRY_STARTED" ]
2019-02-21 17:01:19 +01:00
} ) ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var success = function success ( ) {
dispatch ( {
2019-10-25 20:53:13 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_VERIFY_RETRY_SUCCESS" ]
2019-09-16 22:12:43 +02:00
} ) ;
} ;
2019-02-21 17:01:19 +01:00
2019-09-16 22:12:43 +02:00
var failure = function failure ( error ) {
dispatch ( {
2019-10-25 20:53:13 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_VERIFY_RETRY_FAILURE" ] ,
2019-09-16 22:12:43 +02:00
data : {
error : error
}
2019-02-21 17:01:19 +01:00
} ) ;
2019-09-16 22:12:43 +02:00
} ;
2019-10-02 06:15:24 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user_email' , 'resend_token' , {
2019-09-16 22:12:43 +02:00
email : email
} , 'post' ) [ "catch" ] ( function ( error ) {
if ( error . response && error . response . status === 409 ) {
throw error ;
}
} ) . then ( success , failure ) ;
2019-02-21 17:01:19 +01:00
} ;
2019-09-16 22:12:43 +02:00
}
2020-04-13 15:40:25 +02:00
function doClearEmailEntry ( ) {
return {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_NEW_CLEAR_ENTRY" ]
} ;
}
2020-04-13 19:43:15 +02:00
function doClearPasswordEntry ( ) {
2020-04-13 15:40:25 +02:00
return {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_PASSWORD_SET_CLEAR" ]
} ;
}
2019-09-16 22:12:43 +02:00
function doUserEmailVerifyFailure ( error ) {
return {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_VERIFY_FAILURE" ] ,
2019-09-16 22:12:43 +02:00
data : {
error : error
}
2019-02-21 17:01:19 +01:00
} ;
2019-09-16 22:12:43 +02:00
}
function doUserEmailVerify ( verificationToken , recaptcha ) {
2019-04-03 23:34:07 +02:00
return function ( dispatch , getState ) {
2019-10-02 06:15:24 +02:00
var email = Object ( redux _selectors _user _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "selectEmailToVerify" ] ) ( getState ( ) ) ;
2019-04-03 23:34:07 +02:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_VERIFY_STARTED" ] ,
2019-09-16 22:12:43 +02:00
code : verificationToken ,
recaptcha : recaptcha
2019-04-03 23:34:07 +02:00
} ) ;
2019-10-02 06:15:24 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user_email' , 'confirm' , {
2019-09-16 22:12:43 +02:00
verification _token : verificationToken ,
email : email ,
recaptcha : recaptcha
} , 'post' ) . then ( function ( userEmail ) {
if ( userEmail . is _verified ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_EMAIL_VERIFY_SUCCESS" ] ,
2019-09-16 22:12:43 +02:00
data : {
email : email
2019-02-21 17:01:19 +01:00
}
} ) ;
2019-09-16 22:12:43 +02:00
dispatch ( doUserFetch ( ) ) ;
} else {
throw new Error ( 'Your email is still not verified.' ) ; // shouldn't happen
}
} ) [ "catch" ] ( function ( error ) {
return dispatch ( doUserEmailVerifyFailure ( error ) ) ;
2019-02-21 17:01:19 +01:00
} ) ;
} ;
2019-09-16 22:12:43 +02:00
}
function doFetchAccessToken ( ) {
return function ( dispatch ) {
var success = function success ( token ) {
return dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_ACCESS_TOKEN_SUCCESS" ] ,
2019-09-16 22:12:43 +02:00
data : {
token : token
}
} ) ;
} ;
2019-10-02 06:15:24 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . getAuthToken ( ) . then ( success ) ;
2019-09-16 22:12:43 +02:00
} ;
}
function doUserIdentityVerify ( stripeToken ) {
2019-04-03 23:34:07 +02:00
return function ( dispatch ) {
2019-02-21 17:01:19 +01:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_IDENTITY_VERIFY_STARTED" ] ,
2019-09-16 22:12:43 +02:00
token : stripeToken
} ) ;
2019-10-02 06:15:24 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user' , 'verify_identity' , {
2019-09-16 22:12:43 +02:00
stripe _token : stripeToken
} , 'post' ) . then ( function ( user ) {
if ( user . is _identity _verified ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_IDENTITY_VERIFY_SUCCESS" ] ,
2019-09-16 22:12:43 +02:00
data : {
user : user
}
} ) ;
2019-10-02 06:15:24 +02:00
dispatch ( Object ( redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "doClaimRewardType" ] ) ( rewards _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "default" ] . TYPE _NEW _USER ) ) ;
2019-09-16 22:12:43 +02:00
} else {
throw new Error ( 'Your identity is still not verified. This should not happen.' ) ; // shouldn't happen
2019-04-03 23:34:07 +02:00
}
2019-09-16 22:12:43 +02:00
} ) [ "catch" ] ( function ( error ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_IDENTITY_VERIFY_FAILURE" ] ,
2019-09-16 22:12:43 +02:00
data : {
error : error . toString ( )
}
} ) ;
2019-02-21 17:01:19 +01:00
} ) ;
} ;
2019-09-16 22:12:43 +02:00
}
function doUserInviteNew ( email ) {
2019-04-03 23:34:07 +02:00
return function ( dispatch ) {
2019-02-21 17:01:19 +01:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_INVITE_NEW_STARTED" ]
2019-02-21 17:01:19 +01:00
} ) ;
2020-01-08 22:58:07 +01:00
return lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user' , 'invite' , {
2019-09-16 22:12:43 +02:00
email : email
2020-01-08 22:58:07 +01:00
} , 'post' ) . then ( function ( success ) {
2019-09-16 22:12:43 +02:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_INVITE_NEW_SUCCESS" ] ,
2019-09-16 22:12:43 +02:00
data : {
email : email
}
2019-02-21 17:01:19 +01:00
} ) ;
2019-09-16 22:12:43 +02:00
dispatch ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "doToast" ] ) ( {
2019-10-26 22:56:01 +02:00
message : _ _ ( "Invite sent to " . concat ( email ) )
2019-09-16 22:12:43 +02:00
} ) ) ;
dispatch ( doFetchInviteStatus ( ) ) ;
2020-01-08 22:58:07 +01:00
return success ;
2019-04-03 23:34:07 +02:00
} ) [ "catch" ] ( function ( error ) {
2019-09-16 22:12:43 +02:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_INVITE_NEW_FAILURE" ] ,
2019-09-16 22:12:43 +02:00
data : {
error : error
}
2019-02-21 17:01:19 +01:00
} ) ;
} ) ;
} ;
2019-09-16 22:12:43 +02:00
}
2020-01-16 23:52:53 +01:00
function doUserSetReferrerReset ( ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_SET_REFERRER_RESET" ]
} ) ;
} ;
}
2020-01-08 22:58:07 +01:00
function doUserSetReferrer ( referrer , shouldClaim ) {
2020-01-10 04:28:46 +01:00
return (
/*#__PURE__*/
function ( ) {
var _ref3 = _asyncToGenerator (
/*#__PURE__*/
regeneratorRuntime . mark ( function _callee ( dispatch , getState ) {
2020-01-16 23:52:53 +01:00
var claim , referrerCode , _parseURI , isChannel , uri , response ;
2020-01-10 04:28:46 +01:00
return regeneratorRuntime . wrap ( function _callee$ ( _context ) {
while ( 1 ) {
switch ( _context . prev = _context . next ) {
case 0 :
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_SET_REFERRER_STARTED" ]
} ) ;
2020-01-16 23:52:53 +01:00
_parseURI = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "parseURI" ] ) ( referrer ) , isChannel = _parseURI . isChannel ;
2020-01-10 04:28:46 +01:00
2020-01-16 23:52:53 +01:00
if ( ! isChannel ) {
_context . next = 17 ;
2020-01-10 04:28:46 +01:00
break ;
}
uri = "lbry://" . concat ( referrer ) ;
claim = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "makeSelectClaimForUri" ] ) ( uri ) ( getState ( ) ) ;
if ( claim ) {
2020-01-16 23:52:53 +01:00
_context . next = 16 ;
2020-01-10 04:28:46 +01:00
break ;
}
2020-01-16 23:52:53 +01:00
_context . prev = 6 ;
_context . next = 9 ;
2020-01-10 04:28:46 +01:00
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Lbry" ] . resolve ( {
urls : [ uri ]
} ) ;
2020-01-08 22:58:07 +01:00
2020-01-16 23:52:53 +01:00
case 9 :
2020-01-10 04:28:46 +01:00
response = _context . sent ;
claim = response && response [ uri ] ;
2020-01-16 23:52:53 +01:00
_context . next = 16 ;
2020-01-10 04:28:46 +01:00
break ;
2020-01-16 23:52:53 +01:00
case 13 :
_context . prev = 13 ;
_context . t0 = _context [ "catch" ] ( 6 ) ;
2020-01-10 04:28:46 +01:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_SET_REFERRER_FAILURE" ] ,
data : {
error : _context . t0
}
} ) ;
2020-01-08 22:58:07 +01:00
2020-01-16 23:52:53 +01:00
case 16 :
referrerCode = claim && claim . permanent _url && claim . permanent _url . replace ( 'lbry://' , '' ) ;
2020-01-10 04:28:46 +01:00
case 17 :
2020-01-16 23:52:53 +01:00
if ( ! referrerCode ) {
referrerCode = referrer ;
}
2020-01-10 04:28:46 +01:00
_context . prev = 18 ;
_context . next = 21 ;
return lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'user' , 'referral' , {
referrer : referrerCode
} , 'post' ) ;
case 21 :
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_SET_REFERRER_SUCCESS" ]
} ) ;
if ( shouldClaim ) {
dispatch ( Object ( redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "doClaimRewardType" ] ) ( rewards _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "default" ] . TYPE _REFEREE ) ) ;
dispatch ( doUserFetch ( ) ) ;
} else {
dispatch ( doUserFetch ( ) ) ;
}
2020-01-10 23:56:47 +01:00
_context . next = 28 ;
2020-01-10 04:28:46 +01:00
break ;
2020-01-10 23:56:47 +01:00
case 25 :
_context . prev = 25 ;
2020-01-10 04:28:46 +01:00
_context . t1 = _context [ "catch" ] ( 18 ) ;
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_SET_REFERRER_FAILURE" ] ,
data : {
error : _context . t1
}
} ) ;
2020-01-10 23:56:47 +01:00
case 28 :
2020-01-10 04:28:46 +01:00
case "end" :
return _context . stop ( ) ;
}
}
2020-01-16 23:52:53 +01:00
} , _callee , null , [ [ 6 , 13 ] , [ 18 , 25 ] ] ) ;
2020-01-10 04:28:46 +01:00
} ) ) ;
return function ( _x , _x2 ) {
return _ref3 . apply ( this , arguments ) ;
} ;
} ( )
) ;
2020-01-08 22:58:07 +01:00
}
2019-09-16 21:10:48 +02:00
function doClaimYoutubeChannels ( ) {
return function ( dispatch ) {
2019-09-17 23:01:10 +02:00
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_YOUTUBE_IMPORT_STARTED" ]
2019-09-17 23:01:10 +02:00
} ) ;
2019-10-02 06:15:24 +02:00
var transferResponse ;
2019-11-05 00:32:32 +01:00
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Lbry" ] . address _list ( {
page : 1 ,
page _size : 99999
} ) . then ( function ( addressList ) {
return addressList . items . sort ( function ( a , b ) {
2019-09-23 15:07:43 +02:00
return a . used _times - b . used _times ;
} ) [ 0 ] ;
2019-09-17 23:01:10 +02:00
} ) . then ( function ( address ) {
2019-10-02 06:15:24 +02:00
return lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'yt' , 'transfer' , {
2019-09-17 23:01:10 +02:00
address : address . address ,
2019-09-23 15:07:43 +02:00
public _key : address . pubkey
2019-09-17 23:01:10 +02:00
} ) . then ( function ( response ) {
2019-10-02 06:15:24 +02:00
if ( response && response . length ) {
transferResponse = response ;
return Promise . all ( response . map ( function ( channelMeta ) {
2019-09-23 15:07:43 +02:00
if ( channelMeta && channelMeta . channel && channelMeta . channel . channel _certificate ) {
2019-09-17 23:01:10 +02:00
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "Lbry" ] . channel _import ( {
channel _data : channelMeta . channel . channel _certificate
} ) ;
}
2019-09-16 21:10:48 +02:00
2019-09-17 23:01:10 +02:00
return null ;
} ) ) . then ( function ( ) {
var actions = [ {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_YOUTUBE_IMPORT_SUCCESS" ] ,
data : transferResponse
2019-09-17 23:01:10 +02:00
} ] ;
actions . push ( doUserFetch ( ) ) ;
actions . push ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "doFetchChannelListMine" ] ) ( ) ) ;
dispatch ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "batchActions" ] . apply ( void 0 , actions ) ) ;
} ) ;
}
} ) ;
} ) [ "catch" ] ( function ( error ) {
dispatch ( {
2019-10-02 06:15:24 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_YOUTUBE_IMPORT_FAILURE" ] ,
data : String ( error )
} ) ;
} ) ;
} ;
}
function doCheckYoutubeTransfer ( ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_YOUTUBE_IMPORT_STARTED" ]
} ) ;
return lbryio _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "default" ] . call ( 'yt' , 'transfer' ) . then ( function ( response ) {
if ( response && response . length ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_YOUTUBE_IMPORT_SUCCESS" ] ,
data : response
} ) ;
} else {
throw new Error ( ) ;
}
} ) [ "catch" ] ( function ( error ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "USER_YOUTUBE_IMPORT_FAILURE" ] ,
2019-09-17 23:01:10 +02:00
data : String ( error )
} ) ;
2019-09-16 21:10:48 +02:00
} ) ;
} ;
}
2019-09-16 22:12:43 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 28 */
2019-09-16 22:12:43 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSetViewMode" , function ( ) { return doSetViewMode ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "setSubscriptionLatest" , function ( ) { return setSubscriptionLatest ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUpdateUnreadSubscriptions" , function ( ) { return doUpdateUnreadSubscriptions ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doRemoveUnreadSubscriptions" , function ( ) { return doRemoveUnreadSubscriptions ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doRemoveUnreadSubscription" , function ( ) { return doRemoveUnreadSubscription ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckSubscription" , function ( ) { return doCheckSubscription ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doChannelSubscribe" , function ( ) { return doChannelSubscribe ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doChannelUnsubscribe" , function ( ) { return doChannelUnsubscribe ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckSubscriptions" , function ( ) { return doCheckSubscriptions ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchMySubscriptions" , function ( ) { return doFetchMySubscriptions ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckSubscriptionsInit" , function ( ) { return doCheckSubscriptionsInit ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchRecommendedSubscriptions" , function ( ) { return doFetchRecommendedSubscriptions ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCompleteFirstRun" , function ( ) { return doCompleteFirstRun ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doShowSuggestedSubs" , function ( ) { return doShowSuggestedSubs ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doChannelSubscriptionEnableNotifications" , function ( ) { return doChannelSubscriptionEnableNotifications ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doChannelSubscriptionDisableNotifications" , function ( ) { return doChannelSubscriptionDisableNotifications ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var constants _claim _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 29 ) ;
/* harmony import */ var redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 24 ) ;
/* harmony import */ var redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 14 ) ;
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-09-16 22:12:43 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var constants _subscriptions _ _WEBPACK _IMPORTED _MODULE _5 _ _ = _ _webpack _require _ _ ( 11 ) ;
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _6 _ _ = _ _webpack _require _ _ ( 4 ) ;
/* harmony import */ var rewards _ _WEBPACK _IMPORTED _MODULE _7 _ _ = _ _webpack _require _ _ ( 9 ) ;
2019-09-16 22:12:43 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
var CHECK _SUBSCRIPTIONS _INTERVAL = 15 * 60 * 1000 ;
var SUBSCRIPTION _DOWNLOAD _LIMIT = 1 ;
var doSetViewMode = function doSetViewMode ( viewMode ) {
2019-04-03 23:34:07 +02:00
return function ( dispatch ) {
2019-02-21 17:01:19 +01:00
return dispatch ( {
2019-09-16 22:12:43 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "SET_VIEW_MODE" ] ,
data : viewMode
2019-02-21 17:01:19 +01:00
} ) ;
} ;
} ;
2019-09-16 22:12:43 +02:00
var setSubscriptionLatest = function setSubscriptionLatest ( subscription , uri ) {
2019-04-03 23:34:07 +02:00
return function ( dispatch ) {
2019-02-21 17:01:19 +01:00
return dispatch ( {
2019-09-16 22:12:43 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "SET_SUBSCRIPTION_LATEST" ] ,
data : {
subscription : subscription ,
uri : uri
}
2019-02-21 17:01:19 +01:00
} ) ;
} ;
2019-09-16 22:12:43 +02:00
} ; // Populate a channels unread subscriptions or update the type
var doUpdateUnreadSubscriptions = function doUpdateUnreadSubscriptions ( channelUri , uris , type ) {
return function ( dispatch , getState ) {
var state = getState ( ) ;
var unreadByChannel = Object ( redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectUnreadByChannel" ] ) ( state ) ;
var currentUnreadForChannel = unreadByChannel [ channelUri ] ;
var newUris = [ ] ;
var newType = null ;
if ( ! currentUnreadForChannel ) {
newUris = uris ;
newType = type ;
} else {
if ( uris ) {
// If a channel currently has no unread uris, just add them all
if ( ! currentUnreadForChannel . uris || ! currentUnreadForChannel . uris . length ) {
newUris = uris ;
} else {
// They already have unreads and now there are new ones
// Add the new ones to the beginning of the list
// Make sure there are no duplicates
var currentUnreadUris = currentUnreadForChannel . uris ;
newUris = uris . filter ( function ( uri ) {
return ! currentUnreadUris . includes ( uri ) ;
} ) . concat ( currentUnreadUris ) ;
}
} else {
newUris = currentUnreadForChannel . uris ;
}
newType = type || currentUnreadForChannel . type ;
}
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "UPDATE_SUBSCRIPTION_UNREADS" ] ,
data : {
channel : channelUri ,
uris : newUris ,
type : newType
}
2019-02-21 17:01:19 +01:00
} ) ;
} ;
2019-09-16 22:12:43 +02:00
} ; // Remove multiple files (or all) from a channels unread subscriptions
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var doRemoveUnreadSubscriptions = function doRemoveUnreadSubscriptions ( channelUri , readUris ) {
return function ( dispatch , getState ) {
var state = getState ( ) ;
var unreadByChannel = Object ( redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectUnreadByChannel" ] ) ( state ) ; // If no channel is passed in, remove all unread subscriptions from all channels
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
if ( ! channelUri ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "REMOVE_SUBSCRIPTION_UNREADS" ] ,
data : {
channel : null
}
} ) ;
}
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var currentChannelUnread = unreadByChannel [ channelUri ] ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
if ( ! currentChannelUnread || ! currentChannelUnread . uris ) {
// Channel passed in doesn't have any unreads
return null ;
} // For each uri passed in, remove it from the list of unread uris
// If no uris are passed in, remove them all
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var newUris ;
if ( readUris ) {
var urisToRemoveMap = readUris . reduce ( function ( acc , val ) {
return _objectSpread ( { } , acc , _defineProperty ( { } , val , true ) ) ;
} , { } ) ;
var filteredUris = currentChannelUnread . uris . filter ( function ( uri ) {
return ! urisToRemoveMap [ uri ] ;
} ) ;
newUris = filteredUris . length ? filteredUris : null ;
} else {
newUris = null ;
}
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "REMOVE_SUBSCRIPTION_UNREADS" ] ,
data : {
channel : channelUri ,
uris : newUris
}
} ) ;
} ;
} ; // Remove a single file from a channels unread subscriptions
var doRemoveUnreadSubscription = function doRemoveUnreadSubscription ( channelUri , readUri ) {
return function ( dispatch ) {
dispatch ( doRemoveUnreadSubscriptions ( channelUri , [ readUri ] ) ) ;
} ;
} ;
var doCheckSubscription = function doCheckSubscription ( subscriptionUri , shouldNotify ) {
return function ( dispatch , getState ) {
// no dispatching FETCH_CHANNEL_CLAIMS_STARTED; causes loading issues on <SubscriptionsPage>
var state = getState ( ) ;
var shouldAutoDownload = false ; // makeSelectClientSetting(SETTINGS.AUTO_DOWNLOAD)(state);
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var savedSubscription = state . subscriptions . subscriptions . find ( function ( sub ) {
return sub . uri === subscriptionUri ;
} ) ;
2019-09-30 18:24:24 +02:00
var subscriptionLatest = state . subscriptions . latest [ subscriptionUri ] ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
if ( ! savedSubscription ) {
throw Error ( "Trying to find new content for " . concat ( subscriptionUri , " but it doesn't exist in your subscriptions" ) ) ;
} // We may be duplicating calls here. Can this logic be baked into doFetchClaimsByChannel?
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
lbry _redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "Lbry" ] . claim _search ( {
channel : subscriptionUri ,
valid _channel _signature : true ,
order _by : [ 'release_time' ] ,
page : 1 ,
page _size : constants _claim _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "PAGE_SIZE" ]
} ) . then ( function ( claimListByChannel ) {
var claimsInChannel = claimListByChannel . items ; // may happen if subscribed to an abandoned channel or an empty channel
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
if ( ! claimsInChannel || ! claimsInChannel . length ) {
return ;
} // Determine if the latest subscription currently saved is actually the latest subscription
2019-04-03 23:34:07 +02:00
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var latestIndex = claimsInChannel . findIndex ( function ( claim ) {
2019-09-30 18:24:24 +02:00
return claim . permanent _url === subscriptionLatest ;
2019-09-16 22:12:43 +02:00
} ) ; // If latest is -1, it is a newly subscribed channel or there have been 10+ claims published since last viewed
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var latestIndexToNotify = latestIndex === - 1 ? 10 : latestIndex ; // If latest is 0, nothing has changed
// Do not download/notify about new content, it would download/notify 10 claims per channel
2019-02-15 10:02:34 +01:00
2019-09-30 18:24:24 +02:00
if ( latestIndex !== 0 && subscriptionLatest ) {
2019-09-16 22:12:43 +02:00
var downloadCount = 0 ;
var newUnread = [ ] ;
claimsInChannel . slice ( 0 , latestIndexToNotify ) . forEach ( function ( claim ) {
var uri = claim . permanent _url ;
var shouldDownload = shouldAutoDownload && Boolean ( downloadCount < SUBSCRIPTION _DOWNLOAD _LIMIT && ! claim . value . fee ) ; // Add the new content to the list of "un-read" subscriptions
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
if ( shouldNotify ) {
newUnread . push ( uri ) ;
}
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
if ( shouldDownload ) {
downloadCount += 1 ;
dispatch ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "doPurchaseUri" ] ) ( uri , {
cost : 0
} , true ) ) ;
}
} ) ;
dispatch ( doUpdateUnreadSubscriptions ( subscriptionUri , newUnread , downloadCount > 0 ? constants _subscriptions _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "DOWNLOADING" ] : constants _subscriptions _ _WEBPACK _IMPORTED _MODULE _5 _ _ [ "NOTIFY_ONLY" ] ) ) ;
} // Set the latest piece of content for a channel
// This allows the app to know if there has been new content since it was last set
2019-04-03 23:34:07 +02:00
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var latest = claimsInChannel [ 0 ] ;
dispatch ( setSubscriptionLatest ( {
channelName : latest . signing _channel . name ,
uri : latest . signing _channel . permanent _url
} , latest . permanent _url ) ) ; // calling FETCH_CHANNEL_CLAIMS_COMPLETED after not calling STARTED
// means it will delete a non-existant fetchingChannelClaims[uri]
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "FETCH_CHANNEL_CLAIMS_COMPLETED" ] ,
data : {
uri : subscriptionUri ,
claims : claimsInChannel || [ ] ,
page : 1
}
} ) ;
} ) ;
} ;
} ;
var doChannelSubscribe = function doChannelSubscribe ( subscription ) {
return function ( dispatch , getState ) {
var _getState = getState ( ) ,
daemonSettings = _getState . settings . daemonSettings ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var isSharingData = daemonSettings ? daemonSettings . share _usage _data : true ;
var subscriptionUri = subscription . uri ;
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
if ( ! subscriptionUri . startsWith ( 'lbry://' ) ) {
throw Error ( "Subscription uris must inclue the \"lbry://\" prefix.\nTried to subscribe to " . concat ( subscriptionUri ) ) ;
2019-02-21 17:01:19 +01:00
}
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "CHANNEL_SUBSCRIBE" ] ,
data : subscription
} ) ; // if the user isn't sharing data, keep the subscriptions entirely in the app
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
if ( isSharingData ) {
var _parseURI = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "parseURI" ] ) ( subscription . uri ) ,
channelClaimId = _parseURI . channelClaimId ; // They are sharing data, we can store their subscriptions in our internal database
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] . call ( 'subscription' , 'new' , {
channel _name : subscription . channelName ,
claim _id : channelClaimId
} ) ;
dispatch ( Object ( redux _actions _rewards _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "doClaimRewardType" ] ) ( rewards _ _WEBPACK _IMPORTED _MODULE _7 _ _ [ "default" ] . TYPE _SUBSCRIPTION , {
failSilently : true
} ) ) ;
}
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
dispatch ( doCheckSubscription ( subscription . uri , true ) ) ;
} ;
} ;
var doChannelUnsubscribe = function doChannelUnsubscribe ( subscription ) {
return function ( dispatch , getState ) {
var _getState2 = getState ( ) ,
daemonSettings = _getState2 . settings . daemonSettings ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var isSharingData = daemonSettings ? daemonSettings . share _usage _data : true ;
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "CHANNEL_UNSUBSCRIBE" ] ,
data : subscription
2019-02-21 17:01:19 +01:00
} ) ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
if ( isSharingData ) {
var _parseURI2 = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "parseURI" ] ) ( subscription . uri ) ,
channelClaimId = _parseURI2 . channelClaimId ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] . call ( 'subscription' , 'delete' , {
claim _id : channelClaimId
} ) ;
2019-02-21 17:01:19 +01:00
}
2019-09-16 22:12:43 +02:00
} ;
} ;
var doCheckSubscriptions = function doCheckSubscriptions ( ) {
return function ( dispatch , getState ) {
var state = getState ( ) ;
var subscriptions = Object ( redux _selectors _subscriptions _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectSubscriptions" ] ) ( state ) ;
subscriptions . forEach ( function ( sub ) {
dispatch ( doCheckSubscription ( sub . uri , true ) ) ;
} ) ;
} ;
} ;
var doFetchMySubscriptions = function doFetchMySubscriptions ( ) {
return function ( dispatch , getState ) {
var state = getState ( ) ;
var reduxSubscriptions = state . subscriptions . subscriptions ; // default to true if daemonSettings not found
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
var isSharingData = state . settings && state . settings . daemonSettings ? state . settings . daemonSettings . share _usage _data : true ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
if ( ! isSharingData && isSharingData !== undefined ) {
// They aren't sharing their data, subscriptions will be handled by persisted redux state
return ;
} // most of this logic comes from scenarios where the db isn't synced with redux
// this will happen if the user stops sharing data
2019-04-03 23:34:07 +02:00
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "FETCH_SUBSCRIPTIONS_START" ]
} ) ;
lbryio _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] . call ( 'subscription' , 'list' ) . then ( function ( dbSubscriptions ) {
var storedSubscriptions = dbSubscriptions || [ ] ; // User has no subscriptions in db or redux
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
if ( ! storedSubscriptions . length && ( ! reduxSubscriptions || ! reduxSubscriptions . length ) ) {
return [ ] ;
} // There is some mismatch between redux state and db state
// If something is in the db, but not in redux, add it to redux
// If something is in redux, but not in the db, add it to the db
2019-02-15 10:02:34 +01:00
2019-04-03 23:34:07 +02:00
2019-09-16 22:12:43 +02:00
if ( storedSubscriptions . length !== reduxSubscriptions . length ) {
var dbSubMap = { } ;
var reduxSubMap = { } ;
var subsNotInDB = [ ] ;
var subscriptionsToReturn = reduxSubscriptions . slice ( ) ;
storedSubscriptions . forEach ( function ( sub ) {
dbSubMap [ sub . claim _id ] = 1 ;
} ) ;
reduxSubscriptions . forEach ( function ( sub ) {
var _parseURI3 = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "parseURI" ] ) ( sub . uri ) ,
channelClaimId = _parseURI3 . channelClaimId ;
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
reduxSubMap [ channelClaimId ] = 1 ;
} ) ;
storedSubscriptions . forEach ( function ( sub ) {
if ( ! reduxSubMap [ sub . claim _id ] ) {
var uri = "lbry://" . concat ( sub . channel _name , "#" ) . concat ( sub . claim _id ) ;
subscriptionsToReturn . push ( {
uri : uri ,
channelName : sub . channel _name
} ) ;
}
} ) ;
return Promise . all ( subsNotInDB . map ( function ( payload ) {
return lbryio _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] . call ( 'subscription' , 'new' , payload ) ;
} ) ) . then ( function ( ) {
return subscriptionsToReturn ;
} ) [ "catch" ] ( function ( ) {
return ( // let it fail, we will try again when the navigate to the subscriptions page
subscriptionsToReturn
) ;
} ) ;
} // DB is already synced, just return the subscriptions in redux
2019-02-15 10:02:34 +01:00
2019-09-16 22:12:43 +02:00
return reduxSubscriptions ;
} ) . then ( function ( subscriptions ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "FETCH_SUBSCRIPTIONS_SUCCESS" ] ,
data : subscriptions
2019-02-21 17:01:19 +01:00
} ) ;
2019-09-16 22:12:43 +02:00
dispatch ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _3 _ _ [ "doResolveUris" ] ) ( subscriptions . map ( function ( _ref ) {
var uri = _ref . uri ;
return uri ;
} ) ) ) ;
dispatch ( doCheckSubscriptions ( ) ) ;
} ) [ "catch" ] ( function ( ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "FETCH_SUBSCRIPTIONS_FAIL" ]
} ) ;
} ) ;
} ;
2019-02-21 17:01:19 +01:00
} ;
2019-09-16 22:12:43 +02:00
var doCheckSubscriptionsInit = function doCheckSubscriptionsInit ( ) {
return function ( dispatch ) {
// doCheckSubscriptionsInit is called by doDaemonReady
// setTimeout below is a hack to ensure redux is hydrated when subscriptions are checked
// this will be replaced with <PersistGate> which reqiures a package upgrade
setTimeout ( function ( ) {
return dispatch ( doFetchMySubscriptions ( ) ) ;
} , 5000 ) ;
var checkSubscriptionsTimer = setInterval ( function ( ) {
return dispatch ( doCheckSubscriptions ( ) ) ;
} , CHECK _SUBSCRIPTIONS _INTERVAL ) ;
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "CHECK_SUBSCRIPTIONS_SUBSCRIBE" ] ,
data : {
checkSubscriptionsTimer : checkSubscriptionsTimer
}
} ) ;
setInterval ( function ( ) {
return dispatch ( doCheckSubscriptions ( ) ) ;
} , CHECK _SUBSCRIPTIONS _INTERVAL ) ;
} ;
} ;
var doFetchRecommendedSubscriptions = function doFetchRecommendedSubscriptions ( ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "GET_SUGGESTED_SUBSCRIPTIONS_START" ]
} ) ;
return lbryio _ _WEBPACK _IMPORTED _MODULE _6 _ _ [ "default" ] . call ( 'subscription' , 'suggest' ) . then ( function ( suggested ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "GET_SUGGESTED_SUBSCRIPTIONS_SUCCESS" ] ,
data : suggested
} ) ;
} ) [ "catch" ] ( function ( error ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "GET_SUGGESTED_SUBSCRIPTIONS_FAIL" ] ,
error : error
} ) ;
} ) ;
} ;
} ;
var doCompleteFirstRun = function doCompleteFirstRun ( ) {
return function ( dispatch ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "SUBSCRIPTION_FIRST_RUN_COMPLETED" ]
} ) ;
} ;
} ;
var doShowSuggestedSubs = function doShowSuggestedSubs ( ) {
return function ( dispatch ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "VIEW_SUGGESTED_SUBSCRIPTIONS" ]
} ) ;
} ;
} ;
var doChannelSubscriptionEnableNotifications = function doChannelSubscriptionEnableNotifications ( channelName ) {
return function ( dispatch ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "CHANNEL_SUBSCRIPTION_ENABLE_NOTIFICATIONS" ] ,
data : channelName
} ) ;
} ;
} ;
var doChannelSubscriptionDisableNotifications = function doChannelSubscriptionDisableNotifications ( channelName ) {
return function ( dispatch ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _4 _ _ [ "CHANNEL_SUBSCRIPTION_DISABLE_NOTIFICATIONS" ] ,
data : channelName
} ) ;
} ;
2019-02-21 17:01:19 +01:00
} ;
2019-02-15 10:02:34 +01:00
2019-02-21 17:01:19 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 29 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-02-21 17:01:19 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2019-09-16 22:12:43 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "MINIMUM_PUBLISH_BID" , function ( ) { return MINIMUM _PUBLISH _BID ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CHANNEL_ANONYMOUS" , function ( ) { return CHANNEL _ANONYMOUS ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "CHANNEL_NEW" , function ( ) { return CHANNEL _NEW ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "PAGE_SIZE" , function ( ) { return PAGE _SIZE ; } ) ;
var MINIMUM _PUBLISH _BID = 0.00000001 ;
var CHANNEL _ANONYMOUS = 'anonymous' ;
var CHANNEL _NEW = 'new' ;
var PAGE _SIZE = 20 ;
2019-02-15 10:02:34 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 30 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-13 06:06:43 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchCostInfoForUri" , function ( ) { return doFetchCostInfoForUri ; } ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 4 ) ;
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
2019-03-13 06:06:43 +01:00
2019-04-03 23:34:07 +02:00
// eslint-disable-next-line import/prefer-default-export
2019-03-13 06:06:43 +01:00
function doFetchCostInfoForUri ( uri ) {
return function ( dispatch , getState ) {
var state = getState ( ) ;
2019-04-03 23:34:07 +02:00
var claim = Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "selectClaimsByUri" ] ) ( state ) [ uri ] ;
2019-03-13 06:06:43 +01:00
if ( ! claim ) return ;
function resolve ( costInfo ) {
dispatch ( {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_COST_INFO_COMPLETED" ] ,
2019-03-13 06:06:43 +01:00
data : {
uri : uri ,
costInfo : costInfo
}
} ) ;
}
2019-04-22 23:24:03 +02:00
var fee = claim . value ? claim . value . fee : undefined ;
2019-03-13 06:06:43 +01:00
if ( fee === undefined ) {
2019-04-03 23:34:07 +02:00
resolve ( {
cost : 0 ,
includesData : true
} ) ;
2019-03-13 06:06:43 +01:00
} else if ( fee . currency === 'LBC' ) {
2019-04-03 23:34:07 +02:00
resolve ( {
cost : fee . amount ,
includesData : true
} ) ;
2019-03-13 06:06:43 +01:00
} else {
2019-04-03 23:34:07 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . getExchangeRates ( ) . then ( function ( _ref ) {
2019-03-13 06:06:43 +01:00
var LBC _USD = _ref . LBC _USD ;
2019-04-03 23:34:07 +02:00
resolve ( {
cost : fee . amount / LBC _USD ,
includesData : true
} ) ;
2019-03-13 06:06:43 +01:00
} ) ;
}
} ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 31 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-13 06:06:43 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchBlackListedOutpoints" , function ( ) { return doFetchBlackListedOutpoints ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doBlackListedOutpointsSubscribe" , function ( ) { return doBlackListedOutpointsSubscribe ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 4 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 1 ) ;
function _slicedToArray ( arr , i ) { return _arrayWithHoles ( arr ) || _iterableToArrayLimit ( arr , i ) || _nonIterableRest ( ) ; }
2019-03-13 06:06:43 +01:00
2019-04-03 23:34:07 +02:00
function _nonIterableRest ( ) { throw new TypeError ( "Invalid attempt to destructure non-iterable instance" ) ; }
2019-03-13 06:06:43 +01:00
2019-04-03 23:34:07 +02:00
function _iterableToArrayLimit ( arr , i ) { var _arr = [ ] ; var _n = true ; var _d = false ; var _e = undefined ; try { for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) { _arr . push ( _s . value ) ; if ( i && _arr . length === i ) break ; } } catch ( err ) { _d = true ; _e = err ; } finally { try { if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ; } finally { if ( _d ) throw _e ; } } return _arr ; }
2019-03-13 06:06:43 +01:00
2019-04-03 23:34:07 +02:00
function _arrayWithHoles ( arr ) { if ( Array . isArray ( arr ) ) return arr ; }
2019-03-13 06:06:43 +01:00
var CHECK _BLACK _LISTED _CONTENT _INTERVAL = 60 * 60 * 1000 ;
function doFetchBlackListedOutpoints ( ) {
return function ( dispatch ) {
dispatch ( {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_BLACK_LISTED_CONTENT_STARTED" ]
2019-03-13 06:06:43 +01:00
} ) ;
var success = function success ( _ref ) {
var outpoints = _ref . outpoints ;
2020-01-03 20:06:35 +01:00
var splitOutpoints = [ ] ;
if ( outpoints ) {
outpoints . forEach ( function ( outpoint , index ) {
var _outpoint$split = outpoint . split ( ':' ) ,
_outpoint$split2 = _slicedToArray ( _outpoint$split , 2 ) ,
txid = _outpoint$split2 [ 0 ] ,
nout = _outpoint$split2 [ 1 ] ;
splitOutpoints [ index ] = {
txid : txid ,
nout : Number . parseInt ( nout , 10 )
} ;
} ) ;
}
2019-03-13 06:06:43 +01:00
dispatch ( {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_BLACK_LISTED_CONTENT_COMPLETED" ] ,
2019-03-13 06:06:43 +01:00
data : {
2020-01-03 20:06:35 +01:00
outpoints : splitOutpoints ,
2019-03-13 06:06:43 +01:00
success : true
}
} ) ;
} ;
var failure = function failure ( _ref2 ) {
var error = _ref2 . error ;
dispatch ( {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_BLACK_LISTED_CONTENT_FAILED" ] ,
2019-03-13 06:06:43 +01:00
data : {
error : error ,
success : false
}
} ) ;
} ;
2019-04-03 23:34:07 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] . call ( 'file' , 'list_blocked' ) . then ( success , failure ) ;
2019-03-13 06:06:43 +01:00
} ;
}
function doBlackListedOutpointsSubscribe ( ) {
return function ( dispatch ) {
dispatch ( doFetchBlackListedOutpoints ( ) ) ;
setInterval ( function ( ) {
return dispatch ( doFetchBlackListedOutpoints ( ) ) ;
} , CHECK _BLACK _LISTED _CONTENT _INTERVAL ) ;
} ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 32 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-13 06:06:43 +01:00
2019-07-09 16:20:01 +02:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchFilteredOutpoints" , function ( ) { return doFetchFilteredOutpoints ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFilteredOutpointsSubscribe" , function ( ) { return doFilteredOutpointsSubscribe ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 4 ) ;
2019-07-09 16:20:01 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 1 ) ;
function _slicedToArray ( arr , i ) { return _arrayWithHoles ( arr ) || _iterableToArrayLimit ( arr , i ) || _nonIterableRest ( ) ; }
function _nonIterableRest ( ) { throw new TypeError ( "Invalid attempt to destructure non-iterable instance" ) ; }
function _iterableToArrayLimit ( arr , i ) { var _arr = [ ] ; var _n = true ; var _d = false ; var _e = undefined ; try { for ( var _i = arr [ Symbol . iterator ] ( ) , _s ; ! ( _n = ( _s = _i . next ( ) ) . done ) ; _n = true ) { _arr . push ( _s . value ) ; if ( i && _arr . length === i ) break ; } } catch ( err ) { _d = true ; _e = err ; } finally { try { if ( ! _n && _i [ "return" ] != null ) _i [ "return" ] ( ) ; } finally { if ( _d ) throw _e ; } } return _arr ; }
function _arrayWithHoles ( arr ) { if ( Array . isArray ( arr ) ) return arr ; }
var CHECK _FILTERED _CONTENT _INTERVAL = 60 * 60 * 1000 ;
function doFetchFilteredOutpoints ( ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_FILTERED_CONTENT_STARTED" ]
} ) ;
var success = function success ( _ref ) {
var outpoints = _ref . outpoints ;
2020-01-03 20:06:35 +01:00
var formattedOutpoints = [ ] ;
if ( outpoints ) {
formattedOutpoints = outpoints . map ( function ( outpoint ) {
var _outpoint$split = outpoint . split ( ':' ) ,
_outpoint$split2 = _slicedToArray ( _outpoint$split , 2 ) ,
txid = _outpoint$split2 [ 0 ] ,
nout = _outpoint$split2 [ 1 ] ;
return {
txid : txid ,
nout : Number . parseInt ( nout , 10 )
} ;
} ) ;
}
2019-07-09 16:20:01 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_FILTERED_CONTENT_COMPLETED" ] ,
data : {
2019-07-11 02:44:15 +02:00
outpoints : formattedOutpoints
2019-07-09 16:20:01 +02:00
}
} ) ;
} ;
var failure = function failure ( _ref2 ) {
var error = _ref2 . error ;
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_FILTERED_CONTENT_FAILED" ] ,
data : {
2019-07-11 02:44:15 +02:00
error : error
2019-07-09 16:20:01 +02:00
}
} ) ;
} ;
lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] . call ( 'file' , 'list_filtered' ) . then ( success , failure ) ;
} ;
}
function doFilteredOutpointsSubscribe ( ) {
return function ( dispatch ) {
dispatch ( doFetchFilteredOutpoints ( ) ) ;
setInterval ( function ( ) {
return dispatch ( doFetchFilteredOutpoints ( ) ) ;
} , CHECK _FILTERED _CONTENT _INTERVAL ) ;
} ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 33 */
2019-07-09 16:20:01 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-13 06:06:43 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchFeaturedUris" , function ( ) { return doFetchFeaturedUris ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchTrendingUris" , function ( ) { return doFetchTrendingUris ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 4 ) ;
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 1 ) ;
function _toConsumableArray ( arr ) { return _arrayWithoutHoles ( arr ) || _iterableToArray ( arr ) || _nonIterableSpread ( ) ; }
2019-03-13 06:06:43 +01:00
2019-04-03 23:34:07 +02:00
function _nonIterableSpread ( ) { throw new TypeError ( "Invalid attempt to spread non-iterable instance" ) ; }
2019-03-13 06:06:43 +01:00
2019-04-03 23:34:07 +02:00
function _iterableToArray ( iter ) { if ( Symbol . iterator in Object ( iter ) || Object . prototype . toString . call ( iter ) === "[object Arguments]" ) return Array . from ( iter ) ; }
2019-03-13 06:06:43 +01:00
2019-04-03 23:34:07 +02:00
function _arrayWithoutHoles ( arr ) { if ( Array . isArray ( arr ) ) { for ( var i = 0 , arr2 = new Array ( arr . length ) ; i < arr . length ; i ++ ) { arr2 [ i ] = arr [ i ] ; } return arr2 ; } }
2019-03-13 06:06:43 +01:00
function doFetchFeaturedUris ( ) {
var offloadResolve = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : false ;
return function ( dispatch ) {
dispatch ( {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FETCH_FEATURED_CONTENT_STARTED" ]
2019-03-13 06:06:43 +01:00
} ) ;
var success = function success ( _ref ) {
var Uris = _ref . Uris ;
var urisToResolve = [ ] ;
Object . keys ( Uris ) . forEach ( function ( category ) {
urisToResolve = [ ] . concat ( _toConsumableArray ( urisToResolve ) , _toConsumableArray ( Uris [ category ] ) ) ;
} ) ;
var actions = [ {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FETCH_FEATURED_CONTENT_COMPLETED" ] ,
2019-03-13 06:06:43 +01:00
data : {
uris : Uris ,
success : true
}
} ] ;
2019-04-03 23:34:07 +02:00
2019-03-13 06:06:43 +01:00
if ( urisToResolve . length && ! offloadResolve ) {
2019-04-03 23:34:07 +02:00
actions . push ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "doResolveUris" ] ) ( urisToResolve ) ) ;
2019-03-13 06:06:43 +01:00
}
2019-04-03 23:34:07 +02:00
dispatch ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "batchActions" ] . apply ( void 0 , actions ) ) ;
2019-03-13 06:06:43 +01:00
} ;
var failure = function failure ( ) {
dispatch ( {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FETCH_FEATURED_CONTENT_COMPLETED" ] ,
2019-03-13 06:06:43 +01:00
data : {
uris : { }
}
} ) ;
} ;
2019-04-03 23:34:07 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] . call ( 'file' , 'list_homepage' ) . then ( success , failure ) ;
2019-03-13 06:06:43 +01:00
} ;
}
function doFetchTrendingUris ( ) {
return function ( dispatch ) {
dispatch ( {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FETCH_TRENDING_CONTENT_STARTED" ]
2019-03-13 06:06:43 +01:00
} ) ;
var success = function success ( data ) {
var urisToResolve = data . map ( function ( uri ) {
return uri . url ;
} ) ;
2019-04-03 23:34:07 +02:00
var actions = [ Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "doResolveUris" ] ) ( urisToResolve ) , {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FETCH_TRENDING_CONTENT_COMPLETED" ] ,
2019-03-13 06:06:43 +01:00
data : {
uris : data ,
success : true
}
} ] ;
2019-04-03 23:34:07 +02:00
dispatch ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "batchActions" ] . apply ( void 0 , actions ) ) ;
2019-03-13 06:06:43 +01:00
} ;
var failure = function failure ( ) {
dispatch ( {
2019-04-03 23:34:07 +02:00
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "FETCH_TRENDING_CONTENT_COMPLETED" ] ,
2019-03-13 06:06:43 +01:00
data : {
uris : [ ]
}
} ) ;
} ;
2019-04-03 23:34:07 +02:00
lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] . call ( 'file' , 'list_trending' ) . then ( success , failure ) ;
2019-03-13 06:06:43 +01:00
} ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 34 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-02-15 10:02:34 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchViewCount" , function ( ) { return doFetchViewCount ; } ) ;
2019-09-25 04:30:53 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doFetchSubCount" , function ( ) { return doFetchSubCount ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 4 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 1 ) ;
2019-02-15 10:02:34 +01:00
2019-04-03 23:34:07 +02:00
var doFetchViewCount = function doFetchViewCount ( claimId ) {
2019-03-14 19:39:39 +01:00
return function ( dispatch ) {
2019-04-03 23:34:07 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_VIEW_COUNT_STARTED" ]
} ) ;
return lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] . call ( 'file' , 'view_count' , {
claim _id : claimId
} ) . then ( function ( result ) {
2019-03-14 19:39:39 +01:00
var viewCount = result [ 0 ] ;
2019-04-03 23:34:07 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_VIEW_COUNT_COMPLETED" ] ,
data : {
claimId : claimId ,
viewCount : viewCount
}
} ) ;
} ) [ "catch" ] ( function ( error ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_VIEW_COUNT_FAILED" ] ,
data : error
} ) ;
2019-03-14 19:39:39 +01:00
} ) ;
} ;
} ;
2019-09-25 04:30:53 +02:00
var doFetchSubCount = function doFetchSubCount ( claimId ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_SUB_COUNT_STARTED" ]
} ) ;
return lbryio _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "default" ] . call ( 'subscription' , 'sub_count' , {
claim _id : claimId
} ) . then ( function ( result ) {
var subCount = result [ 0 ] ;
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_SUB_COUNT_COMPLETED" ] ,
data : {
claimId : claimId ,
subCount : subCount
}
} ) ;
} ) [ "catch" ] ( function ( error ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_SUB_COUNT_FAILED" ] ,
data : error
} ) ;
} ) ;
} ;
} ;
2019-03-14 19:39:39 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 35 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-14 19:39:39 +01:00
2019-04-18 10:02:11 +02:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
2019-05-10 16:45:56 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSetDefaultAccount" , function ( ) { return doSetDefaultAccount ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSetSync" , function ( ) { return doSetSync ; } ) ;
2019-04-18 10:02:11 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doGetSync" , function ( ) { return doGetSync ; } ) ;
2019-05-27 15:57:31 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSyncApply" , function ( ) { return doSyncApply ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doCheckSync" , function ( ) { return doCheckSync ; } ) ;
2019-10-02 22:22:51 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doResetSync" , function ( ) { return doResetSync ; } ) ;
2019-10-17 06:00:43 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doSyncEncryptAndDecrypt" , function ( ) { return doSyncEncryptAndDecrypt ; } ) ;
2019-04-18 10:02:11 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 4 ) ;
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-04-18 10:02:11 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ ) ;
2019-09-06 17:19:17 +02:00
function doSetDefaultAccount ( success , failure ) {
2019-05-10 16:45:56 +02:00
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SET_DEFAULT_ACCOUNT" ]
} ) ;
lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . account _list ( ) . then ( function ( accountList ) {
var accounts = accountList . lbc _mainnet ;
var defaultId ;
2019-05-27 15:57:31 +02:00
for ( var i = 0 ; i < accounts . length ; ++ i ) {
2019-05-10 16:45:56 +02:00
if ( accounts [ i ] . satoshis > 0 ) {
defaultId = accounts [ i ] . id ;
break ;
}
} // In a case where there's no balance on either account
// assume the second (which is created after sync) as default
if ( ! defaultId && accounts . length > 1 ) {
defaultId = accounts [ 1 ] . id ;
} // Set the default account
if ( defaultId ) {
lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . account _set ( {
account _id : defaultId ,
"default" : true
2019-09-06 17:19:17 +02:00
} ) . then ( function ( ) {
if ( success ) {
success ( ) ;
}
} ) [ "catch" ] ( function ( err ) {
if ( failure ) {
failure ( err ) ;
}
2019-05-10 16:45:56 +02:00
} ) ;
2019-10-02 06:15:24 +02:00
} else if ( failure ) {
2019-09-06 17:19:17 +02:00
// no default account to set
2019-10-02 06:15:24 +02:00
failure ( 'Could not set a default account' ) ; // fail
2019-09-06 17:19:17 +02:00
}
} ) [ "catch" ] ( function ( err ) {
if ( failure ) {
failure ( err ) ;
2019-05-10 16:45:56 +02:00
}
} ) ;
} ;
}
2019-10-04 18:52:28 +02:00
function doSetSync ( oldHash , newHash , data ) {
2019-10-02 06:15:24 +02:00
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SET_SYNC_STARTED" ]
} ) ;
2019-10-04 18:52:28 +02:00
return lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . call ( 'sync' , 'set' , {
2019-10-02 06:15:24 +02:00
old _hash : oldHash ,
new _hash : newHash ,
data : data
} , 'post' ) . then ( function ( response ) {
if ( ! response . hash ) {
2019-10-04 18:52:28 +02:00
throw Error ( 'No hash returned for sync/set.' ) ;
2019-10-02 06:15:24 +02:00
}
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SET_SYNC_COMPLETED" ] ,
data : {
syncHash : response . hash
}
} ) ;
} ) [ "catch" ] ( function ( error ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SET_SYNC_FAILED" ] ,
data : {
error : error
}
} ) ;
} ) ;
} ;
}
2019-10-15 05:21:17 +02:00
function doGetSync ( passedPassword , callback ) {
var password = passedPassword === null || passedPassword === undefined ? '' : passedPassword ;
2019-10-15 05:07:41 +02:00
2020-03-19 18:49:47 +01:00
function handleCallback ( error , hasNewData ) {
2019-10-15 05:07:41 +02:00
if ( callback ) {
if ( typeof callback !== 'function' ) {
throw new Error ( 'Second argument passed to "doGetSync" must be a function' ) ;
}
2020-03-19 18:49:47 +01:00
callback ( error , hasNewData ) ;
2019-10-15 05:07:41 +02:00
}
}
2019-04-18 10:02:11 +02:00
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_STARTED" ]
} ) ;
2019-10-02 06:15:24 +02:00
var data = { } ;
2019-10-16 05:35:03 +02:00
lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . wallet _status ( ) . then ( function ( status ) {
if ( status . is _locked ) {
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . wallet _unlock ( {
password : password
} ) ;
2020-01-23 23:11:07 +01:00
} // Wallet is already unlocked
return true ;
} ) . then ( function ( isUnlocked ) {
if ( isUnlocked ) {
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . sync _hash ( ) ;
2019-10-16 05:35:03 +02:00
}
2020-01-23 23:11:07 +01:00
data . unlockFailed = true ;
throw new Error ( ) ;
2019-10-16 05:35:03 +02:00
} ) . then ( function ( hash ) {
return lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . call ( 'sync' , 'get' , {
2019-04-18 10:02:11 +02:00
hash : hash
2019-10-16 05:35:03 +02:00
} , 'post' ) ;
} ) . then ( function ( response ) {
var syncHash = response . hash ;
data . syncHash = syncHash ;
data . syncData = response . data ;
2020-03-19 18:49:47 +01:00
data . changed = response . changed ;
2019-10-16 05:35:03 +02:00
data . hasSyncedWallet = true ;
if ( response . changed ) {
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . sync _apply ( {
password : password ,
2020-01-07 23:01:26 +01:00
data : response . data ,
blocking : true
2019-10-16 05:35:03 +02:00
} ) ;
}
} ) . then ( function ( response ) {
if ( ! response ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_COMPLETED" ] ,
data : data
} ) ;
2020-03-19 18:49:47 +01:00
handleCallback ( null , data . changed ) ;
2019-10-16 05:35:03 +02:00
return ;
}
2019-04-18 10:02:11 +02:00
2019-10-16 05:35:03 +02:00
var walletHash = response . hash ,
walletData = response . data ;
if ( walletHash !== data . syncHash ) {
// different local hash, need to synchronise
dispatch ( doSetSync ( data . syncHash , walletHash , walletData ) ) ;
}
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_COMPLETED" ] ,
data : data
2019-04-18 10:02:11 +02:00
} ) ;
2020-03-19 18:49:47 +01:00
handleCallback ( null , data . changed ) ;
2020-01-23 23:11:07 +01:00
} ) [ "catch" ] ( function ( syncAttemptError ) {
if ( data . unlockFailed ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_FAILED" ] ,
data : {
error : syncAttemptError
}
} ) ;
if ( password !== '' ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_APPLY_BAD_PASSWORD" ]
} ) ;
}
handleCallback ( syncAttemptError ) ;
} else if ( data . hasSyncedWallet ) {
2019-10-16 05:35:03 +02:00
var error = 'Error getting synced wallet' ;
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_FAILED" ] ,
data : {
error : error
}
2019-10-29 20:14:41 +01:00
} ) ; // Temp solution until we have a bad password error code
// Don't fail on blank passwords so we don't show a "password error" message
// before users have ever entered a password
if ( password !== '' ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_APPLY_BAD_PASSWORD" ]
} ) ;
}
2019-10-16 05:35:03 +02:00
handleCallback ( error ) ;
} else {
// user doesn't have a synced wallet
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_COMPLETED" ] ,
data : {
hasSyncedWallet : false ,
syncHash : null
}
} ) ; // call sync_apply to get data to sync
// first time sync. use any string for old hash
lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . sync _apply ( {
password : password
} ) . then ( function ( _ref ) {
var walletHash = _ref . hash ,
syncApplyData = _ref . data ;
dispatch ( doSetSync ( '' , walletHash , syncApplyData , password ) ) ;
handleCallback ( ) ;
2020-01-23 23:11:07 +01:00
} ) [ "catch" ] ( function ( syncApplyError ) {
handleCallback ( syncApplyError ) ;
2019-10-16 05:35:03 +02:00
} ) ;
}
2019-04-18 10:02:11 +02:00
} ) ;
} ;
}
2019-05-27 15:57:31 +02:00
function doSyncApply ( syncHash , syncData , password ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_APPLY_STARTED" ]
} ) ;
lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . sync _apply ( {
password : password ,
data : syncData
2019-10-16 05:35:03 +02:00
} ) . then ( function ( _ref2 ) {
var walletHash = _ref2 . hash ,
walletData = _ref2 . data ;
2019-05-27 15:57:31 +02:00
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_APPLY_COMPLETED" ]
} ) ;
if ( walletHash !== syncHash ) {
// different local hash, need to synchronise
dispatch ( doSetSync ( syncHash , walletHash , walletData ) ) ;
2019-05-28 18:38:43 +02:00
}
2019-05-27 15:57:31 +02:00
} ) [ "catch" ] ( function ( ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_APPLY_FAILED" ] ,
data : {
error : 'Invalid password specified. Please enter the password for your previously synchronised wallet.'
}
} ) ;
} ) ;
} ;
}
function doCheckSync ( ) {
return function ( dispatch ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_STARTED" ]
} ) ;
lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . sync _hash ( ) . then ( function ( hash ) {
lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . call ( 'sync' , 'get' , {
hash : hash
} , 'post' ) . then ( function ( response ) {
var data = {
hasSyncedWallet : true ,
syncHash : response . hash ,
2019-08-16 03:33:07 +02:00
syncData : response . data ,
hashChanged : response . changed
2019-05-27 15:57:31 +02:00
} ;
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_COMPLETED" ] ,
data : data
} ) ;
} ) [ "catch" ] ( function ( ) {
// user doesn't have a synced wallet
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_COMPLETED" ] ,
data : {
hasSyncedWallet : false ,
syncHash : null
}
} ) ;
} ) ;
} ) ;
} ;
}
2019-10-02 22:22:51 +02:00
function doResetSync ( ) {
return function ( dispatch ) {
return new Promise ( function ( resolve ) {
dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_RESET" ]
} ) ;
resolve ( ) ;
} ) ;
} ;
}
2019-10-17 06:00:43 +02:00
function doSyncEncryptAndDecrypt ( oldPassword , newPassword , encrypt ) {
return function ( dispatch ) {
var data = { } ;
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . sync _hash ( ) . then ( function ( hash ) {
return lbryio _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "default" ] . call ( 'sync' , 'get' , {
hash : hash
} , 'post' ) ;
} ) . then ( function ( syncGetResponse ) {
data . oldHash = syncGetResponse . hash ;
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . sync _apply ( {
password : oldPassword ,
data : syncGetResponse . data
} ) ;
} ) . then ( function ( ) {
if ( encrypt ) {
dispatch ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "doWalletEncrypt" ] ) ( newPassword ) ) ;
} else {
dispatch ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "doWalletDecrypt" ] ) ( ) ) ;
}
} ) . then ( function ( ) {
return lbry _redux _ _WEBPACK _IMPORTED _MODULE _2 _ _ [ "Lbry" ] . sync _apply ( {
password : newPassword
} ) ;
} ) . then ( function ( syncApplyResponse ) {
if ( syncApplyResponse . hash !== data . oldHash ) {
return dispatch ( doSetSync ( data . oldHash , syncApplyResponse . hash , syncApplyResponse . data ) ) ;
}
} ) [ "catch" ] ( console . error ) ;
} ;
}
2019-04-18 10:02:11 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 36 */
2019-04-18 10:02:11 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-10-22 21:21:42 +02:00
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "doUpdateUploadProgress" , function ( ) { return doUpdateUploadProgress ; } ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
var doUpdateUploadProgress = function doUpdateUploadProgress ( progress , params , xhr ) {
return function ( dispatch ) {
return dispatch ( {
type : constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "UPDATE_UPLOAD_PROGRESS" ] ,
data : {
progress : progress ,
params : params ,
xhr : xhr
}
} ) ;
} ;
} ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 37 */
2019-10-22 21:21:42 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-14 19:39:39 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "authReducer" , function ( ) { return authReducer ; } ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
2019-02-15 10:02:34 +01:00
var reducers = { } ;
var defaultState = {
authenticating : false
} ;
2019-04-03 23:34:07 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GENERATE_AUTH_TOKEN_FAILURE" ] ] = function ( state ) {
2019-02-15 10:02:34 +01:00
return Object . assign ( { } , state , {
authToken : null ,
authenticating : false
} ) ;
} ;
2019-04-03 23:34:07 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GENERATE_AUTH_TOKEN_STARTED" ] ] = function ( state ) {
2019-02-15 10:02:34 +01:00
return Object . assign ( { } , state , {
authenticating : true
} ) ;
} ;
2019-04-03 23:34:07 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GENERATE_AUTH_TOKEN_SUCCESS" ] ] = function ( state , action ) {
2019-02-15 10:02:34 +01:00
return Object . assign ( { } , state , {
authToken : action . data . authToken ,
authenticating : false
} ) ;
} ;
function authReducer ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : defaultState ;
2019-04-03 23:34:07 +02:00
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2019-02-15 10:02:34 +01:00
var handler = reducers [ action . type ] ;
if ( handler ) return handler ( state , action ) ;
return state ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 38 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-02-15 10:02:34 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "rewardsReducer" , function ( ) { return rewardsReducer ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
function _toConsumableArray ( arr ) { return _arrayWithoutHoles ( arr ) || _iterableToArray ( arr ) || _nonIterableSpread ( ) ; }
2019-02-15 10:02:34 +01:00
2019-04-03 23:34:07 +02:00
function _nonIterableSpread ( ) { throw new TypeError ( "Invalid attempt to spread non-iterable instance" ) ; }
2019-02-15 10:02:34 +01:00
2019-04-03 23:34:07 +02:00
function _iterableToArray ( iter ) { if ( Symbol . iterator in Object ( iter ) || Object . prototype . toString . call ( iter ) === "[object Arguments]" ) return Array . from ( iter ) ; }
2019-02-15 10:02:34 +01:00
2019-04-03 23:34:07 +02:00
function _arrayWithoutHoles ( arr ) { if ( Array . isArray ( arr ) ) { for ( var i = 0 , arr2 = new Array ( arr . length ) ; i < arr . length ; i ++ ) { arr2 [ i ] = arr [ i ] ; } return arr2 ; } }
2019-02-15 10:02:34 +01:00
2019-04-03 23:34:07 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
2019-02-15 10:02:34 +01:00
2019-04-03 23:34:07 +02:00
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-02-15 10:02:34 +01:00
var reducers = { } ;
var defaultState = {
fetching : false ,
2019-04-03 23:34:07 +02:00
claimedRewardsById : { } ,
// id => reward
2019-02-15 10:02:34 +01:00
unclaimedRewards : [ ] ,
claimPendingByType : { } ,
claimErrorsByType : { } ,
rewardedContentClaimIds : [ ]
} ;
2019-04-03 23:34:07 +02:00
reducers [ lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ACTIONS" ] . FETCH _REWARDS _STARTED ] = function ( state ) {
2019-02-15 10:02:34 +01:00
return Object . assign ( { } , state , {
fetching : true
} ) ;
} ;
2019-04-03 23:34:07 +02:00
reducers [ lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ACTIONS" ] . FETCH _REWARDS _COMPLETED ] = function ( state , action ) {
2019-02-15 10:02:34 +01:00
var userRewards = action . data . userRewards ;
var unclaimedRewards = [ ] ;
2018-07-23 15:12:18 +02:00
var claimedRewards = { } ;
userRewards . forEach ( function ( reward ) {
if ( reward . transaction _id ) {
claimedRewards [ reward . id ] = reward ;
} else {
unclaimedRewards . push ( reward ) ;
}
} ) ;
return Object . assign ( { } , state , {
claimedRewardsById : claimedRewards ,
unclaimedRewards : unclaimedRewards ,
fetching : false
} ) ;
} ;
function setClaimRewardState ( state , reward , isClaiming ) {
var errorMessage = arguments . length > 3 && arguments [ 3 ] !== undefined ? arguments [ 3 ] : '' ;
var newClaimPendingByType = Object . assign ( { } , state . claimPendingByType ) ;
2019-04-03 23:34:07 +02:00
var newClaimErrorsByType = Object . assign ( { } , state . claimErrorsByType ) ; // Currently, for multiple rewards of the same type, they will both show "claiming" when one is beacuse we track this by `reward_type`
2019-01-17 07:22:39 +01:00
// To fix this we will need to use `claim_code` instead, and change all selectors to match
2019-04-03 23:34:07 +02:00
2020-05-20 17:52:59 +02:00
if ( reward ) {
if ( isClaiming ) {
newClaimPendingByType [ reward . reward _type ] = isClaiming ;
} else {
delete newClaimPendingByType [ reward . reward _type ] ;
}
2019-04-03 23:34:07 +02:00
2020-05-20 17:52:59 +02:00
if ( errorMessage ) {
newClaimErrorsByType [ reward . reward _type ] = errorMessage ;
} else {
delete newClaimErrorsByType [ reward . reward _type ] ;
}
2018-07-23 15:12:18 +02:00
}
return Object . assign ( { } , state , {
claimPendingByType : newClaimPendingByType ,
claimErrorsByType : newClaimErrorsByType
} ) ;
}
2019-04-03 23:34:07 +02:00
reducers [ lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ACTIONS" ] . CLAIM _REWARD _STARTED ] = function ( state , action ) {
2018-07-23 15:12:18 +02:00
var reward = action . data . reward ;
return setClaimRewardState ( state , reward , true , '' ) ;
} ;
2019-04-03 23:34:07 +02:00
reducers [ lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ACTIONS" ] . CLAIM _REWARD _SUCCESS ] = function ( state , action ) {
2018-07-23 15:12:18 +02:00
var reward = action . data . reward ;
var unclaimedRewards = state . unclaimedRewards ;
var index = unclaimedRewards . findIndex ( function ( ur ) {
2019-01-17 07:22:39 +01:00
return ur . claim _code === reward . claim _code ;
2018-07-23 15:12:18 +02:00
} ) ;
unclaimedRewards . splice ( index , 1 ) ;
var claimedRewardsById = state . claimedRewardsById ;
claimedRewardsById [ reward . id ] = reward ;
2019-04-03 23:34:07 +02:00
var newState = _objectSpread ( { } , state , {
unclaimedRewards : _toConsumableArray ( unclaimedRewards ) ,
claimedRewardsById : _objectSpread ( { } , claimedRewardsById )
2018-07-23 15:12:18 +02:00
} ) ;
2019-03-13 06:06:43 +01:00
return setClaimRewardState ( newState , reward , false , '' ) ;
2018-07-23 15:12:18 +02:00
} ;
2019-04-03 23:34:07 +02:00
reducers [ lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ACTIONS" ] . CLAIM _REWARD _FAILURE ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
var _action$data = action . data ,
reward = _action$data . reward ,
error = _action$data . error ;
return setClaimRewardState ( state , reward , false , error ? error . message : '' ) ;
2018-07-23 15:12:18 +02:00
} ;
2019-04-03 23:34:07 +02:00
reducers [ lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ACTIONS" ] . CLAIM _REWARD _CLEAR _ERROR ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
var reward = action . data . reward ;
return setClaimRewardState ( state , reward , state . claimPendingByType [ reward . reward _type ] , '' ) ;
2018-07-23 15:12:18 +02:00
} ;
2019-04-03 23:34:07 +02:00
reducers [ lbry _redux _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "ACTIONS" ] . FETCH _REWARD _CONTENT _COMPLETED ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
var claimIds = action . data . claimIds ;
2018-07-23 15:12:18 +02:00
return Object . assign ( { } , state , {
2019-03-13 06:06:43 +01:00
rewardedContentClaimIds : claimIds
2018-07-23 15:12:18 +02:00
} ) ;
} ;
2019-03-13 06:06:43 +01:00
function rewardsReducer ( ) {
2018-07-23 15:12:18 +02:00
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : defaultState ;
2019-04-03 23:34:07 +02:00
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2018-07-23 15:12:18 +02:00
var handler = reducers [ action . type ] ;
if ( handler ) return handler ( state , action ) ;
return state ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 39 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-02-15 10:02:34 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "userReducer" , function ( ) { return userReducer ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-04-13 19:43:15 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-02-15 10:02:34 +01:00
2019-03-13 06:06:43 +01:00
var reducers = { } ;
var defaultState = {
authenticationIsPending : false ,
userIsPending : false ,
emailNewIsPending : false ,
emailNewErrorMessage : '' ,
emailToVerify : '' ,
2019-10-25 20:53:13 +02:00
emailAlreadyExists : false ,
2020-04-13 15:40:25 +02:00
emailDoesNotExist : false ,
2019-10-25 20:53:13 +02:00
resendingVerificationEmail : false ,
2020-04-13 15:40:25 +02:00
passwordResetPending : false ,
passwordResetSuccess : false ,
passwordResetError : undefined ,
passwordSetPending : false ,
passwordSetSuccess : false ,
passwordSetError : undefined ,
2019-03-13 06:06:43 +01:00
inviteNewErrorMessage : '' ,
inviteNewIsPending : false ,
inviteStatusIsPending : false ,
invitesRemaining : undefined ,
invitees : undefined ,
2020-01-08 22:58:07 +01:00
referralLink : undefined ,
referralCode : undefined ,
2019-09-17 23:01:10 +02:00
user : undefined ,
2020-01-08 22:58:07 +01:00
accessToken : undefined ,
2019-10-02 06:15:24 +02:00
youtubeChannelImportPending : false ,
2020-01-08 22:58:07 +01:00
youtubeChannelImportErrorMessage : '' ,
2020-01-10 04:44:03 +01:00
referrerSetIsPending : false ,
referrerSetError : ''
2019-02-15 10:02:34 +01:00
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "AUTHENTICATION_STARTED" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
authenticationIsPending : true ,
userIsPending : true ,
2020-01-08 22:58:07 +01:00
accessToken : defaultState . accessToken
2019-02-15 10:02:34 +01:00
} ) ;
2019-03-13 06:06:43 +01:00
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "AUTHENTICATION_SUCCESS" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
authenticationIsPending : false ,
userIsPending : false ,
2020-01-14 21:40:07 +01:00
accessToken : action . data . accessToken ,
user : action . data . user
2019-02-15 10:02:34 +01:00
} ) ;
2019-03-13 06:06:43 +01:00
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "AUTHENTICATION_FAILURE" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
authenticationIsPending : false ,
userIsPending : false ,
user : null
2019-02-15 10:02:34 +01:00
} ) ;
2019-03-13 06:06:43 +01:00
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_FETCH_STARTED" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
2019-08-26 21:32:55 +02:00
userIsPending : true
2019-02-15 10:02:34 +01:00
} ) ;
2019-03-13 06:06:43 +01:00
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_FETCH_SUCCESS" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
userIsPending : false ,
2019-09-16 22:12:43 +02:00
user : action . data . user ,
emailToVerify : action . data . user . has _verified _email ? null : state . emailToVerify
2019-02-15 10:02:34 +01:00
} ) ;
2019-03-13 06:06:43 +01:00
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_FETCH_FAILURE" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
userIsPending : true ,
user : null
2019-02-15 10:02:34 +01:00
} ) ;
2019-03-13 06:06:43 +01:00
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PHONE_NEW_STARTED" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
var user = Object . assign ( { } , state . user ) ;
user . country _code = action . data . country _code ;
return Object . assign ( { } , state , {
phoneNewIsPending : true ,
phoneNewErrorMessage : '' ,
user : user
2019-02-15 10:02:34 +01:00
} ) ;
2019-03-13 06:06:43 +01:00
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PHONE_NEW_SUCCESS" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
phoneToVerify : action . data . phone ,
phoneNewIsPending : false
2019-02-15 10:02:34 +01:00
} ) ;
2019-03-13 06:06:43 +01:00
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PHONE_RESET" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
phoneToVerify : null
2019-02-15 10:02:34 +01:00
} ) ;
2019-03-13 06:06:43 +01:00
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PHONE_NEW_FAILURE" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
phoneNewIsPending : false ,
phoneNewErrorMessage : action . data . error
} ) ;
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PHONE_VERIFY_STARTED" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
phoneVerifyIsPending : true ,
phoneVerifyErrorMessage : ''
} ) ;
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PHONE_VERIFY_SUCCESS" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
phoneToVerify : '' ,
phoneVerifyIsPending : false ,
user : action . data . user
} ) ;
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PHONE_VERIFY_FAILURE" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
phoneVerifyIsPending : false ,
phoneVerifyErrorMessage : action . data . error
} ) ;
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_NEW_STARTED" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
emailNewIsPending : true ,
2019-10-25 20:53:13 +02:00
emailNewErrorMessage : '' ,
2020-04-13 15:40:25 +02:00
emailAlreadyExists : false ,
emailDoesNotExist : false
2019-03-13 06:06:43 +01:00
} ) ;
} ;
2019-02-15 10:02:34 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_NEW_SUCCESS" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
var user = Object . assign ( { } , state . user ) ;
user . primary _email = action . data . email ;
return Object . assign ( { } , state , {
emailToVerify : action . data . email ,
emailNewIsPending : false ,
user : user
} ) ;
} ;
2019-02-15 10:02:34 +01:00
2019-10-25 20:53:13 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_NEW_EXISTS" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
2019-10-25 20:53:13 +02:00
emailAlreadyExists : true
2019-03-13 06:06:43 +01:00
} ) ;
} ;
2019-02-15 10:02:34 +01:00
2020-04-13 15:40:25 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_NEW_DOES_NOT_EXIST" ] ] = function ( state ) {
return Object . assign ( { } , state , {
emailDoesNotExist : true
} ) ;
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_NEW_FAILURE" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
emailNewIsPending : false ,
emailNewErrorMessage : action . data . error
} ) ;
2019-02-15 10:02:34 +01:00
} ;
2020-04-13 15:40:25 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_NEW_CLEAR_ENTRY" ] ] = function ( state ) {
2020-04-13 19:43:15 +02:00
var newUser = _objectSpread ( { } , state . user ) ;
delete newUser . primary _email ;
2020-04-13 15:40:25 +02:00
return Object . assign ( { } , state , {
emailNewErrorMessage : null ,
emailAlreadyExists : false ,
emailDoesNotExist : false ,
passwordExistsForUser : false ,
2020-04-13 19:43:15 +02:00
emailToVerify : null ,
user : newUser
2020-04-13 15:40:25 +02:00
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PASSWORD_SET_CLEAR" ] ] = function ( state ) {
return Object . assign ( { } , state , {
passwordResetSuccess : false ,
passwordResetPending : false ,
passwordResetError : null
} ) ;
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_VERIFY_STARTED" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
emailVerifyIsPending : true ,
emailVerifyErrorMessage : ''
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_VERIFY_SUCCESS" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
var user = Object . assign ( { } , state . user ) ;
user . primary _email = action . data . email ;
return Object . assign ( { } , state , {
emailToVerify : '' ,
emailVerifyIsPending : false ,
user : user
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_VERIFY_FAILURE" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
emailVerifyIsPending : false ,
emailVerifyErrorMessage : action . data . error
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_VERIFY_SET" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
emailToVerify : action . data . email
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_IDENTITY_VERIFY_STARTED" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
identityVerifyIsPending : true ,
identityVerifyErrorMessage : ''
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_IDENTITY_VERIFY_SUCCESS" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
identityVerifyIsPending : false ,
identityVerifyErrorMessage : '' ,
user : action . data . user
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_IDENTITY_VERIFY_FAILURE" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
identityVerifyIsPending : false ,
identityVerifyErrorMessage : action . data . error
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_ACCESS_TOKEN_SUCCESS" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
var token = action . data . token ;
return Object . assign ( { } , state , {
accessToken : token
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_INVITE_STATUS_FETCH_STARTED" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
inviteStatusIsPending : true
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_INVITE_STATUS_FETCH_SUCCESS" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
inviteStatusIsPending : false ,
invitesRemaining : action . data . invitesRemaining ,
invitees : action . data . invitees ,
2020-01-08 22:58:07 +01:00
referralLink : action . data . referralLink ,
referralCode : action . data . referralCode
2019-03-13 06:06:43 +01:00
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_INVITE_NEW_STARTED" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
inviteNewIsPending : true ,
inviteNewErrorMessage : ''
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_INVITE_NEW_SUCCESS" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
inviteNewIsPending : false ,
inviteNewErrorMessage : ''
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_INVITE_NEW_FAILURE" ] ] = function ( state , action ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
inviteNewIsPending : false ,
inviteNewErrorMessage : action . data . error . message
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_INVITE_STATUS_FETCH_FAILURE" ] ] = function ( state ) {
2019-03-13 06:06:43 +01:00
return Object . assign ( { } , state , {
inviteStatusIsPending : false ,
invitesRemaining : null ,
invitees : null
} ) ;
} ;
2019-03-11 03:02:17 +01:00
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_YOUTUBE_IMPORT_STARTED" ] ] = function ( state ) {
2019-09-17 23:01:10 +02:00
return Object . assign ( { } , state , {
2019-10-02 06:15:24 +02:00
youtubeChannelImportPending : true ,
youtubeChannelImportErrorMessage : ''
2019-09-17 23:01:10 +02:00
} ) ;
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_YOUTUBE_IMPORT_SUCCESS" ] ] = function ( state , action ) {
var total = action . data . reduce ( function ( acc , value ) {
return acc + value . total _published _videos ;
} , 0 ) ;
var complete = action . data . reduce ( function ( acc , value ) {
return acc + value . total _transferred ;
} , 0 ) ;
2019-09-17 23:01:10 +02:00
return Object . assign ( { } , state , {
2019-10-02 06:15:24 +02:00
youtubeChannelImportPending : false ,
youtubeChannelImportErrorMessage : '' ,
youtubeChannelImportTotal : total ,
youtubeChannelImportComplete : complete
2019-09-17 23:01:10 +02:00
} ) ;
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_YOUTUBE_IMPORT_FAILURE" ] ] = function ( state , action ) {
2019-09-17 23:01:10 +02:00
return Object . assign ( { } , state , {
2019-10-02 06:15:24 +02:00
youtubeChannelImportPending : false ,
youtubeChannelImportErrorMessage : action . data
2019-09-17 23:01:10 +02:00
} ) ;
} ;
2019-10-25 20:53:13 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_VERIFY_RETRY_STARTED" ] ] = function ( state ) {
return Object . assign ( { } , state , {
resendingVerificationEmail : true
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_VERIFY_RETRY_SUCCESS" ] ] = function ( state ) {
return Object . assign ( { } , state , {
resendingVerificationEmail : false
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_EMAIL_VERIFY_RETRY_FAILURE" ] ] = function ( state ) {
return Object . assign ( { } , state , {
resendingVerificationEmail : false
} ) ;
} ;
2020-01-08 22:58:07 +01:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_SET_REFERRER_STARTED" ] ] = function ( state ) {
return Object . assign ( { } , state , {
2020-01-10 04:44:03 +01:00
referrerSetIsPending : true ,
referrerSetError : defaultState . referrerSetError
2020-01-08 22:58:07 +01:00
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_SET_REFERRER_SUCCESS" ] ] = function ( state ) {
return Object . assign ( { } , state , {
2020-01-10 04:44:03 +01:00
referrerSetIsPending : false ,
referrerSetError : defaultState . referrerSetError
2020-01-08 22:58:07 +01:00
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_SET_REFERRER_FAILURE" ] ] = function ( state , action ) {
return Object . assign ( { } , state , {
2020-01-10 04:44:03 +01:00
referrerSetIsPending : false ,
referrerSetError : action . data . error . message
2020-01-08 22:58:07 +01:00
} ) ;
} ;
2020-01-16 23:52:53 +01:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_SET_REFERRER_RESET" ] ] = function ( state ) {
return Object . assign ( { } , state , {
referrerSetIsPending : false ,
referrerSetError : defaultState . referrerSetError
} ) ;
} ;
2020-04-13 15:40:25 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PASSWORD_EXISTS" ] ] = function ( state ) {
return Object . assign ( { } , state , {
passwordExistsForUser : true
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PASSWORD_RESET_STARTED" ] ] = function ( state ) {
return Object . assign ( { } , state , {
passwordResetPending : true ,
passwordResetSuccess : defaultState . passwordResetSuccess ,
passwordResetError : null
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PASSWORD_RESET_SUCCESS" ] ] = function ( state ) {
return Object . assign ( { } , state , {
passwordResetPending : false ,
passwordResetSuccess : true
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PASSWORD_RESET_FAILURE" ] ] = function ( state , action ) {
return Object . assign ( { } , state , {
passwordResetPending : false ,
passwordResetError : action . data . error
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PASSWORD_SET_STARTED" ] ] = function ( state ) {
return Object . assign ( { } , state , {
passwordSetPending : true ,
passwordSetSuccess : defaultState . passwordSetSuccess
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PASSWORD_SET_SUCCESS" ] ] = function ( state ) {
return Object . assign ( { } , state , {
passwordSetPending : false ,
passwordSetSuccess : true
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "USER_PASSWORD_SET_FAILURE" ] ] = function ( state , action ) {
return Object . assign ( { } , state , {
passwordSetPending : false ,
passwordSetError : action . data . error
} ) ;
} ;
2019-03-13 06:06:43 +01:00
function userReducer ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : defaultState ;
2019-04-03 23:34:07 +02:00
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
2019-03-13 06:06:43 +01:00
var handler = reducers [ action . type ] ;
if ( handler ) return handler ( state , action ) ;
return state ;
2019-03-11 03:02:17 +01:00
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 40 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-11 03:02:17 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "costInfoReducer" , function ( ) { return costInfoReducer ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var util _redux _utils _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 12 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 1 ) ;
2019-03-13 06:06:43 +01:00
var _handleActions ;
2019-03-11 03:02:17 +01:00
2019-04-03 23:34:07 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
2019-03-11 03:02:17 +01:00
2019-04-03 23:34:07 +02:00
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-03-11 03:02:17 +01:00
2019-03-13 06:06:43 +01:00
var defaultState = {
fetching : { } ,
byUri : { }
} ;
2019-04-03 23:34:07 +02:00
var costInfoReducer = Object ( util _redux _utils _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "handleActions" ] ) ( ( _handleActions = { } , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_COST_INFO_STARTED" ] , function ( state , action ) {
2019-03-13 06:06:43 +01:00
var uri = action . data . uri ;
var newFetching = Object . assign ( { } , state . fetching ) ;
newFetching [ uri ] = true ;
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
2019-03-13 06:06:43 +01:00
fetching : newFetching
} ) ;
2019-04-03 23:34:07 +02:00
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_COST_INFO_COMPLETED" ] , function ( state , action ) {
2019-03-13 06:06:43 +01:00
var _action$data = action . data ,
uri = _action$data . uri ,
costInfo = _action$data . costInfo ;
var newByUri = Object . assign ( { } , state . byUri ) ;
var newFetching = Object . assign ( { } , state . fetching ) ;
newByUri [ uri ] = costInfo ;
delete newFetching [ uri ] ;
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
2019-03-13 06:06:43 +01:00
byUri : newByUri ,
fetching : newFetching
} ) ;
} ) , _handleActions ) , defaultState ) ;
2019-03-11 03:02:17 +01:00
2019-03-13 06:06:43 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 41 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-11 03:02:17 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "blacklistReducer" , function ( ) { return blacklistReducer ; } ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var util _redux _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 12 ) ;
2019-03-11 03:02:17 +01:00
var _handleActions ;
2019-04-03 23:34:07 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
2019-03-11 03:02:17 +01:00
2019-04-03 23:34:07 +02:00
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-03-11 03:02:17 +01:00
var defaultState = {
fetchingBlackListedOutpoints : false ,
fetchingBlackListedOutpointsSucceed : undefined ,
blackListedOutpoints : undefined
} ;
2019-04-03 23:34:07 +02:00
var blacklistReducer = Object ( util _redux _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "handleActions" ] ) ( ( _handleActions = { } , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_BLACK_LISTED_CONTENT_STARTED" ] , function ( state ) {
return _objectSpread ( { } , state , {
2019-03-11 03:02:17 +01:00
fetchingBlackListedOutpoints : true
} ) ;
2019-04-03 23:34:07 +02:00
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_BLACK_LISTED_CONTENT_COMPLETED" ] , function ( state , action ) {
2019-03-11 03:02:17 +01:00
var _action$data = action . data ,
outpoints = _action$data . outpoints ,
success = _action$data . success ;
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
2019-03-11 03:02:17 +01:00
fetchingBlackListedOutpoints : false ,
fetchingBlackListedOutpointsSucceed : success ,
blackListedOutpoints : outpoints
} ) ;
2019-04-03 23:34:07 +02:00
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_BLACK_LISTED_CONTENT_FAILED" ] , function ( state , action ) {
2019-03-11 03:02:17 +01:00
var _action$data2 = action . data ,
error = _action$data2 . error ,
success = _action$data2 . success ;
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
2019-03-11 03:02:17 +01:00
fetchingBlackListedOutpoints : false ,
fetchingBlackListedOutpointsSucceed : success ,
fetchingBlackListedOutpointsError : error
} ) ;
} ) , _handleActions ) , defaultState ) ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 42 */
2019-07-09 16:20:01 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "filteredReducer" , function ( ) { return filteredReducer ; } ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var util _redux _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 12 ) ;
2019-07-09 16:20:01 +02:00
var _handleActions ;
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
var defaultState = {
2019-07-11 02:44:15 +02:00
loading : false ,
2019-07-09 16:20:01 +02:00
filteredOutpoints : undefined
} ;
var filteredReducer = Object ( util _redux _utils _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "handleActions" ] ) ( ( _handleActions = { } , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_FILTERED_CONTENT_STARTED" ] , function ( state ) {
return _objectSpread ( { } , state , {
2019-07-11 02:44:15 +02:00
loading : true
2019-07-09 16:20:01 +02:00
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_FILTERED_CONTENT_COMPLETED" ] , function ( state , action ) {
2019-07-11 02:44:15 +02:00
var outpoints = action . data . outpoints ;
2019-07-09 16:20:01 +02:00
return _objectSpread ( { } , state , {
2019-07-11 02:44:15 +02:00
loading : false ,
2019-07-09 16:20:01 +02:00
filteredOutpoints : outpoints
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "FETCH_FILTERED_CONTENT_FAILED" ] , function ( state , action ) {
2019-07-11 02:44:15 +02:00
var error = action . data . error ;
2019-07-09 16:20:01 +02:00
return _objectSpread ( { } , state , {
2019-07-11 02:44:15 +02:00
loading : false ,
2019-07-09 16:20:01 +02:00
fetchingFilteredOutpointsError : error
} ) ;
} ) , _handleActions ) , defaultState ) ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 43 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-11 03:02:17 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "homepageReducer" , function ( ) { return homepageReducer ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var util _redux _utils _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 12 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 1 ) ;
2019-03-11 03:02:17 +01:00
var _handleActions ;
2019-04-03 23:34:07 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
2019-03-11 03:02:17 +01:00
2019-04-03 23:34:07 +02:00
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-03-11 03:02:17 +01:00
var defaultState = {
2019-03-13 06:06:43 +01:00
fetchingFeaturedContent : false ,
fetchingFeaturedContentFailed : false ,
featuredUris : undefined ,
fetchingTrendingContent : false ,
fetchingTrendingContentFailed : false ,
trendingUris : undefined
2019-03-11 03:02:17 +01:00
} ;
2019-04-03 23:34:07 +02:00
var homepageReducer = Object ( util _redux _utils _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "handleActions" ] ) ( ( _handleActions = { } , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_FEATURED_CONTENT_STARTED" ] , function ( state ) {
return _objectSpread ( { } , state , {
2019-03-13 06:06:43 +01:00
fetchingFeaturedContent : true
2019-03-11 03:02:17 +01:00
} ) ;
2019-04-03 23:34:07 +02:00
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_FEATURED_CONTENT_COMPLETED" ] , function ( state , action ) {
2019-03-11 03:02:17 +01:00
var _action$data = action . data ,
2019-03-13 06:06:43 +01:00
uris = _action$data . uris ,
success = _action$data . success ;
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
2019-03-13 06:06:43 +01:00
fetchingFeaturedContent : false ,
fetchingFeaturedContentFailed : ! success ,
featuredUris : uris
} ) ;
2019-04-03 23:34:07 +02:00
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_TRENDING_CONTENT_STARTED" ] , function ( state ) {
return _objectSpread ( { } , state , {
2019-03-13 06:06:43 +01:00
fetchingTrendingContent : true
} ) ;
2019-04-03 23:34:07 +02:00
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_TRENDING_CONTENT_COMPLETED" ] , function ( state , action ) {
2019-03-13 06:06:43 +01:00
var _action$data2 = action . data ,
uris = _action$data2 . uris ,
success = _action$data2 . success ;
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
2019-03-13 06:06:43 +01:00
fetchingTrendingContent : false ,
fetchingTrendingContentFailed : ! success ,
trendingUris : uris
2019-03-11 03:02:17 +01:00
} ) ;
} ) , _handleActions ) , defaultState ) ;
2019-03-13 06:06:43 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 44 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-14 19:39:39 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "statsReducer" , function ( ) { return statsReducer ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var util _redux _utils _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 12 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 1 ) ;
2019-03-14 19:39:39 +01:00
var _handleActions ;
2019-04-03 23:34:07 +02:00
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
2019-03-14 19:39:39 +01:00
2019-04-03 23:34:07 +02:00
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
2019-03-14 19:39:39 +01:00
var defaultState = {
fetchingViewCount : false ,
viewCountError : undefined ,
2019-09-25 04:30:53 +02:00
viewCountById : { } ,
fetchingSubCount : false ,
subCountError : undefined ,
subCountById : { }
2019-03-14 19:39:39 +01:00
} ;
2019-04-03 23:34:07 +02:00
var statsReducer = Object ( util _redux _utils _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "handleActions" ] ) ( ( _handleActions = { } , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_VIEW_COUNT_STARTED" ] , function ( state ) {
return _objectSpread ( { } , state , {
fetchingViewCount : true
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_VIEW_COUNT_FAILED" ] , function ( state , action ) {
return _objectSpread ( { } , state , {
2019-03-14 19:39:39 +01:00
viewCountError : action . data
} ) ;
2019-04-03 23:34:07 +02:00
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_VIEW_COUNT_COMPLETED" ] , function ( state , action ) {
2019-03-14 19:39:39 +01:00
var _action$data = action . data ,
claimId = _action$data . claimId ,
viewCount = _action$data . viewCount ;
2019-04-03 23:34:07 +02:00
var viewCountById = _objectSpread ( { } , state . viewCountById , _defineProperty ( { } , claimId , viewCount ) ) ;
2019-03-14 19:39:39 +01:00
2019-04-03 23:34:07 +02:00
return _objectSpread ( { } , state , {
2019-03-14 19:39:39 +01:00
fetchingViewCount : false ,
viewCountById : viewCountById
} ) ;
2019-09-25 04:30:53 +02:00
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_SUB_COUNT_STARTED" ] , function ( state ) {
return _objectSpread ( { } , state , {
fetchingSubCount : true
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_SUB_COUNT_FAILED" ] , function ( state , action ) {
return _objectSpread ( { } , state , {
subCountError : action . data
} ) ;
} ) , _defineProperty ( _handleActions , constants _action _types _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "FETCH_SUB_COUNT_COMPLETED" ] , function ( state , action ) {
var _action$data2 = action . data ,
claimId = _action$data2 . claimId ,
subCount = _action$data2 . subCount ;
var subCountById = _objectSpread ( { } , state . subCountById , _defineProperty ( { } , claimId , subCount ) ) ;
return _objectSpread ( { } , state , {
fetchingSubCount : false ,
subCountById : subCountById
} ) ;
2019-03-14 19:39:39 +01:00
} ) , _handleActions ) , defaultState ) ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 45 */
2019-04-18 10:02:11 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "syncReducer" , function ( ) { return syncReducer ; } ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
var reducers = { } ;
var defaultState = {
hasSyncedWallet : false ,
syncHash : null ,
2019-05-27 15:57:31 +02:00
syncData : null ,
2019-04-18 10:02:11 +02:00
setSyncErrorMessage : null ,
2019-10-02 06:15:24 +02:00
getSyncErrorMessage : null ,
2019-05-27 15:57:31 +02:00
syncApplyErrorMessage : '' ,
syncApplyIsPending : false ,
2019-10-29 20:14:41 +01:00
syncApplyPasswordError : false ,
2019-05-27 15:57:31 +02:00
getSyncIsPending : false ,
2019-08-16 03:33:07 +02:00
setSyncIsPending : false ,
hashChanged : false
2019-04-18 10:02:11 +02:00
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_STARTED" ] ] = function ( state ) {
return Object . assign ( { } , state , {
2019-10-02 06:15:24 +02:00
getSyncIsPending : true ,
getSyncErrorMessage : null
2019-04-18 10:02:11 +02:00
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_COMPLETED" ] ] = function ( state , action ) {
return Object . assign ( { } , state , {
syncHash : action . data . syncHash ,
2019-05-27 15:57:31 +02:00
syncData : action . data . syncData ,
2019-04-18 10:02:11 +02:00
hasSyncedWallet : action . data . hasSyncedWallet ,
2019-08-16 03:33:07 +02:00
getSyncIsPending : false ,
hashChanged : action . data . hashChanged
2019-04-18 10:02:11 +02:00
} ) ;
} ;
2019-10-02 06:15:24 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "GET_SYNC_FAILED" ] ] = function ( state , action ) {
return Object . assign ( { } , state , {
getSyncIsPending : false ,
getSyncErrorMessage : action . data . error
} ) ;
} ;
2019-04-18 10:02:11 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SET_SYNC_STARTED" ] ] = function ( state ) {
return Object . assign ( { } , state , {
2019-05-27 15:57:31 +02:00
setSyncIsPending : true ,
2019-04-18 10:02:11 +02:00
setSyncErrorMessage : null
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SET_SYNC_FAILED" ] ] = function ( state , action ) {
return Object . assign ( { } , state , {
2019-05-27 15:57:31 +02:00
setSyncIsPending : false ,
2019-04-18 10:02:11 +02:00
setSyncErrorMessage : action . data . error
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SET_SYNC_COMPLETED" ] ] = function ( state , action ) {
return Object . assign ( { } , state , {
2019-05-27 15:57:31 +02:00
setSyncIsPending : false ,
2019-04-18 10:02:11 +02:00
setSyncErrorMessage : null ,
hasSyncedWallet : true ,
// sync was successful, so the user has a synced wallet at this point
syncHash : action . data . syncHash
} ) ;
} ;
2019-05-27 15:57:31 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_APPLY_STARTED" ] ] = function ( state ) {
return Object . assign ( { } , state , {
2019-10-29 20:14:41 +01:00
syncApplyPasswordError : false ,
2019-05-27 15:57:31 +02:00
syncApplyIsPending : true ,
syncApplyErrorMessage : ''
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_APPLY_COMPLETED" ] ] = function ( state ) {
return Object . assign ( { } , state , {
syncApplyIsPending : false ,
syncApplyErrorMessage : ''
} ) ;
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_APPLY_FAILED" ] ] = function ( state , action ) {
return Object . assign ( { } , state , {
syncApplyIsPending : false ,
syncApplyErrorMessage : action . data . error
} ) ;
} ;
2019-10-29 20:14:41 +01:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_APPLY_BAD_PASSWORD" ] ] = function ( state ) {
return Object . assign ( { } , state , {
syncApplyPasswordError : true
} ) ;
} ;
2019-10-02 22:22:51 +02:00
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "SYNC_RESET" ] ] = function ( ) {
return defaultState ;
} ;
2019-04-18 10:02:11 +02:00
function syncReducer ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : defaultState ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
var handler = reducers [ action . type ] ;
if ( handler ) return handler ( state , action ) ;
return state ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 46 */
2019-10-22 21:21:42 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "lbrytvReducer" , function ( ) { return lbrytvReducer ; } ) ;
/* harmony import */ var constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 1 ) ;
function _objectSpread ( target ) { for ( var i = 1 ; i < arguments . length ; i ++ ) { var source = arguments [ i ] != null ? arguments [ i ] : { } ; var ownKeys = Object . keys ( source ) ; if ( typeof Object . getOwnPropertySymbols === 'function' ) { ownKeys = ownKeys . concat ( Object . getOwnPropertySymbols ( source ) . filter ( function ( sym ) { return Object . getOwnPropertyDescriptor ( source , sym ) . enumerable ; } ) ) ; } ownKeys . forEach ( function ( key ) { _defineProperty ( target , key , source [ key ] ) ; } ) ; } return target ; }
function _defineProperty ( obj , key , value ) { if ( key in obj ) { Object . defineProperty ( obj , key , { value : value , enumerable : true , configurable : true , writable : true } ) ; } else { obj [ key ] = value ; } return obj ; }
/ *
test mock :
currentUploads : {
'test#upload' : {
progress : 50 ,
params : {
name : 'steve' ,
thumbnail _url : 'https://dev2.spee.ch/4/KMNtoSZ009fawGz59VG8PrID.jpeg' ,
} ,
} ,
} ,
* /
var reducers = { } ;
var defaultState = {
currentUploads : { }
} ;
reducers [ constants _action _types _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "UPDATE_UPLOAD_PROGRESS" ] ] = function ( state , action ) {
var _action$data = action . data ,
progress = _action$data . progress ,
params = _action$data . params ,
xhr = _action$data . xhr ;
var key = params . channel ? "" . concat ( params . name , "#" ) . concat ( params . channel ) : "" . concat ( params . name , "#anonymous" ) ;
var currentUploads ;
if ( ! progress ) {
currentUploads = Object . assign ( { } , state . currentUploads ) ;
Object . keys ( currentUploads ) . forEach ( function ( k ) {
if ( k === key ) {
delete currentUploads [ key ] ;
}
} ) ;
} else {
currentUploads = Object . assign ( { } , state . currentUploads ) ;
currentUploads [ key ] = {
progress : progress ,
params : params ,
xhr : xhr
} ;
}
return _objectSpread ( { } , state , {
currentUploads : currentUploads
} ) ;
} ;
function lbrytvReducer ( ) {
var state = arguments . length > 0 && arguments [ 0 ] !== undefined ? arguments [ 0 ] : defaultState ;
var action = arguments . length > 1 ? arguments [ 1 ] : undefined ;
var handler = reducers [ action . type ] ;
if ( handler ) return handler ( state , action ) ;
return state ;
}
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 47 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-13 06:06:43 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectAuthToken" , function ( ) { return selectAuthToken ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectIsAuthenticating" , function ( ) { return selectIsAuthenticating ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2019-03-13 06:06:43 +01:00
var selectState = function selectState ( state ) {
return state . auth || { } ;
} ;
2019-04-03 23:34:07 +02:00
var selectAuthToken = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-13 06:06:43 +01:00
return state . authToken ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectIsAuthenticating = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-13 06:06:43 +01:00
return state . authenticating ;
} ) ;
2019-03-11 03:02:17 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 48 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-11 03:02:17 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectState" , function ( ) { return selectState ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectAllCostInfoByUri" , function ( ) { return selectAllCostInfoByUri ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectCostInfoForUri" , function ( ) { return makeSelectCostInfoForUri ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFetchingCostInfo" , function ( ) { return selectFetchingCostInfo ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectFetchingCostInfoForUri" , function ( ) { return makeSelectFetchingCostInfoForUri ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2019-03-11 03:02:17 +01:00
2019-04-03 23:34:07 +02:00
var selectState = function selectState ( state ) {
2019-03-11 03:02:17 +01:00
return state . costInfo || { } ;
} ;
2019-04-03 23:34:07 +02:00
var selectAllCostInfoByUri = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-11 03:02:17 +01:00
return state . byUri || { } ;
} ) ;
2019-04-03 23:34:07 +02:00
var makeSelectCostInfoForUri = function makeSelectCostInfoForUri ( uri ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectAllCostInfoByUri , function ( costInfos ) {
2019-03-11 03:02:17 +01:00
return costInfos && costInfos [ uri ] ;
} ) ;
} ;
2019-04-03 23:34:07 +02:00
var selectFetchingCostInfo = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-11 03:02:17 +01:00
return state . fetching || { } ;
} ) ;
2019-04-03 23:34:07 +02:00
var makeSelectFetchingCostInfoForUri = function makeSelectFetchingCostInfoForUri ( uri ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectFetchingCostInfo , function ( fetchingByUri ) {
2019-03-11 03:02:17 +01:00
return fetchingByUri && fetchingByUri [ uri ] ;
} ) ;
} ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 49 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-11 03:02:17 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectState" , function ( ) { return selectState ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectBlackListedOutpoints" , function ( ) { return selectBlackListedOutpoints ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2019-03-11 03:02:17 +01:00
2019-04-03 23:34:07 +02:00
var selectState = function selectState ( state ) {
2019-03-11 03:02:17 +01:00
return state . blacklist || { } ;
} ;
2019-04-03 23:34:07 +02:00
var selectBlackListedOutpoints = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-11 03:02:17 +01:00
return state . blackListedOutpoints ;
} ) ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 50 */
2019-07-09 16:20:01 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectState" , function ( ) { return selectState ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFilteredOutpoints" , function ( ) { return selectFilteredOutpoints ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-07-09 16:20:01 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
var selectState = function selectState ( state ) {
return state . filtered || { } ;
} ;
var selectFilteredOutpoints = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . filteredOutpoints ;
} ) ;
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 51 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-11 03:02:17 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFeaturedUris" , function ( ) { return selectFeaturedUris ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFetchingFeaturedUris" , function ( ) { return selectFetchingFeaturedUris ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectTrendingUris" , function ( ) { return selectTrendingUris ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectFetchingTrendingUris" , function ( ) { return selectFetchingTrendingUris ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2019-03-11 03:02:17 +01:00
2019-03-13 06:06:43 +01:00
var selectState = function selectState ( state ) {
return state . homepage || { } ;
} ;
2019-03-11 03:02:17 +01:00
2019-04-03 23:34:07 +02:00
var selectFeaturedUris = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-13 06:06:43 +01:00
return state . featuredUris ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectFetchingFeaturedUris = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-13 06:06:43 +01:00
return state . fetchingFeaturedContent ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectTrendingUris = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-13 06:06:43 +01:00
return state . trendingUris ;
} ) ;
2019-04-03 23:34:07 +02:00
var selectFetchingTrendingUris = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-13 06:06:43 +01:00
return state . fetchingTrendingContent ;
} ) ;
2019-03-11 03:02:17 +01:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 52 */
2019-04-03 23:34:07 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
2019-03-14 19:39:39 +01:00
"use strict" ;
2019-04-03 23:34:07 +02:00
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectViewCount" , function ( ) { return selectViewCount ; } ) ;
2019-09-25 04:30:53 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSubCount" , function ( ) { return selectSubCount ; } ) ;
2019-04-03 23:34:07 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectViewCountForUri" , function ( ) { return makeSelectViewCountForUri ; } ) ;
2019-09-25 04:30:53 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "makeSelectSubCountForUri" , function ( ) { return makeSelectSubCountForUri ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ = _ _webpack _require _ _ ( 5 ) ;
2019-04-03 23:34:07 +02:00
/* harmony import */ var lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ ) ;
2019-03-14 19:39:39 +01:00
var selectState = function selectState ( state ) {
return state . stats || { } ;
} ;
2019-04-03 23:34:07 +02:00
var selectViewCount = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
2019-03-14 19:39:39 +01:00
return state . viewCountById ;
} ) ;
2019-09-25 04:30:53 +02:00
var selectSubCount = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . subCountById ;
} ) ;
2019-04-03 23:34:07 +02:00
var makeSelectViewCountForUri = function makeSelectViewCountForUri ( uri ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "makeSelectClaimForUri" ] ) ( uri ) , selectViewCount , function ( claim , viewCountById ) {
2019-12-20 08:45:03 +01:00
return claim ? viewCountById [ claim . claim _id ] || 0 : 0 ;
2019-03-14 19:39:39 +01:00
} ) ;
} ;
2019-09-25 04:30:53 +02:00
var makeSelectSubCountForUri = function makeSelectSubCountForUri ( uri ) {
return Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( Object ( lbry _redux _ _WEBPACK _IMPORTED _MODULE _1 _ _ [ "makeSelectClaimForUri" ] ) ( uri ) , selectSubCount , function ( claim , subCountById ) {
2019-12-20 08:45:03 +01:00
return claim ? subCountById [ claim . claim _id ] || 0 : 0 ;
2019-09-25 04:30:53 +02:00
} ) ;
} ;
2019-03-14 19:39:39 +01:00
2019-04-18 10:02:11 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 53 */
2019-04-18 10:02:11 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectHasSyncedWallet" , function ( ) { return selectHasSyncedWallet ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncHash" , function ( ) { return selectSyncHash ; } ) ;
2019-05-27 15:57:31 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncData" , function ( ) { return selectSyncData ; } ) ;
2019-04-18 10:02:11 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSetSyncErrorMessage" , function ( ) { return selectSetSyncErrorMessage ; } ) ;
2019-10-02 06:15:24 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectGetSyncErrorMessage" , function ( ) { return selectGetSyncErrorMessage ; } ) ;
2019-05-27 15:57:31 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectGetSyncIsPending" , function ( ) { return selectGetSyncIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSetSyncIsPending" , function ( ) { return selectSetSyncIsPending ; } ) ;
2019-08-16 03:33:07 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectHashChanged" , function ( ) { return selectHashChanged ; } ) ;
2019-05-27 15:57:31 +02:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncApplyIsPending" , function ( ) { return selectSyncApplyIsPending ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncApplyErrorMessage" , function ( ) { return selectSyncApplyErrorMessage ; } ) ;
2019-10-29 20:14:41 +01:00
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectSyncApplyPasswordError" , function ( ) { return selectSyncApplyPasswordError ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-04-18 10:02:11 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
var selectState = function selectState ( state ) {
return state . sync || { } ;
} ;
var selectHasSyncedWallet = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . hasSyncedWallet ;
} ) ;
var selectSyncHash = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . syncHash ;
} ) ;
2019-05-27 15:57:31 +02:00
var selectSyncData = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . syncData ;
} ) ;
2019-04-18 10:02:11 +02:00
var selectSetSyncErrorMessage = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . setSyncErrorMessage ;
} ) ;
2019-10-02 06:15:24 +02:00
var selectGetSyncErrorMessage = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . getSyncErrorMessage ;
} ) ;
2019-05-27 15:57:31 +02:00
var selectGetSyncIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . getSyncIsPending ;
} ) ;
var selectSetSyncIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . setSyncIsPending ;
} ) ;
2019-08-16 03:33:07 +02:00
var selectHashChanged = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . hashChanged ;
} ) ;
2019-05-27 15:57:31 +02:00
var selectSyncApplyIsPending = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . syncApplyIsPending ;
2019-04-18 10:02:11 +02:00
} ) ;
2019-05-27 15:57:31 +02:00
var selectSyncApplyErrorMessage = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . syncApplyErrorMessage ;
2019-04-18 10:02:11 +02:00
} ) ;
2019-10-29 20:14:41 +01:00
var selectSyncApplyPasswordError = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . syncApplyPasswordError ;
} ) ;
2019-04-18 10:02:11 +02:00
2019-10-22 21:21:42 +02:00
/***/ } ) ,
2020-01-10 04:28:46 +01:00
/* 54 */
2019-10-22 21:21:42 +02:00
/***/ ( function ( module , _ _webpack _exports _ _ , _ _webpack _require _ _ ) {
"use strict" ;
_ _webpack _require _ _ . r ( _ _webpack _exports _ _ ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectCurrentUploads" , function ( ) { return selectCurrentUploads ; } ) ;
/* harmony export (binding) */ _ _webpack _require _ _ . d ( _ _webpack _exports _ _ , "selectUploadCount" , function ( ) { return selectUploadCount ; } ) ;
2020-01-10 04:28:46 +01:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ = _ _webpack _require _ _ ( 15 ) ;
2019-10-22 21:21:42 +02:00
/* harmony import */ var reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ _default = /*#__PURE__*/ _ _webpack _require _ _ . n ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ ) ;
var selectState = function selectState ( state ) {
return state . lbrytv || { } ;
} ;
var selectCurrentUploads = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectState , function ( state ) {
return state . currentUploads ;
} ) ;
var selectUploadCount = Object ( reselect _ _WEBPACK _IMPORTED _MODULE _0 _ _ [ "createSelector" ] ) ( selectCurrentUploads , function ( currentUploads ) {
return currentUploads && Object . keys ( currentUploads ) . length ;
} ) ;
2018-07-23 15:12:18 +02:00
/***/ } )
/******/ ] ) ;
} ) ;