exports.ids = ["guide/usejsx.md~zh/guide/usejsx.md"];
exports.modules = {

/***/ "../../node_modules/register-service-worker/index.js":
/*!**********************************************************************************************!*\
  !*** /Users/wangyi/Desktop/opensource/rcpress/node_modules/register-service-worker/index.js ***!
  \**********************************************************************************************/
/*! exports provided: register, unregister */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "register", function() { return register; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "unregister", function() { return unregister; });
// Register a service worker to serve assets from local cache.

// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on the "N+1" visit to a page, since previously
// cached resources are updated in the background.

var isLocalhost = function () { return Boolean(
  window.location.hostname === 'localhost' ||
    // [::1] is the IPv6 localhost address.
    window.location.hostname === '[::1]' ||
    // 127.0.0.1/8 is considered localhost for IPv4.
    window.location.hostname.match(
      /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/
    )
); }

function register (swUrl, hooks) {
  if ( hooks === void 0 ) hooks = {};

  var registrationOptions = hooks.registrationOptions; if ( registrationOptions === void 0 ) registrationOptions = {};
  delete hooks.registrationOptions

  var emit = function (hook) {
    var args = [], len = arguments.length - 1;
    while ( len-- > 0 ) args[ len ] = arguments[ len + 1 ];

    if (hooks && hooks[hook]) {
      hooks[hook].apply(hooks, args)
    }
  }

  if ('serviceWorker' in navigator) {
    window.addEventListener('load', function () {
      if (isLocalhost()) {
        // This is running on localhost. Lets check if a service worker still exists or not.
        checkValidServiceWorker(swUrl, emit, registrationOptions)
        navigator.serviceWorker.ready.then(function (registration) {
          emit('ready', registration)
        })
      } else {
        // Is not local host. Just register service worker
        registerValidSW(swUrl, emit, registrationOptions)
      }
    })
  }
}

function registerValidSW (swUrl, emit, registrationOptions) {
  navigator.serviceWorker
    .register(swUrl, registrationOptions)
    .then(function (registration) {
      emit('registered', registration)
      if (registration.waiting) {
        emit('updated', registration)
        return
      }
      registration.onupdatefound = function () {
        emit('updatefound', registration)
        var installingWorker = registration.installing
        installingWorker.onstatechange = function () {
          if (installingWorker.state === 'installed') {
            if (navigator.serviceWorker.controller) {
              // At this point, the old content will have been purged and
              // the fresh content will have been added to the cache.
              // It's the perfect time to display a "New content is
              // available; please refresh." message in your web app.
              emit('updated', registration)
            } else {
              // At this point, everything has been precached.
              // It's the perfect time to display a
              // "Content is cached for offline use." message.
              emit('cached', registration)
            }
          }
        }
      }
    })
    .catch(function (error) {
      emit('error', error)
    })
}

function checkValidServiceWorker (swUrl, emit, registrationOptions) {
  // Check if the service worker can be found.
  fetch(swUrl)
    .then(function (response) {
      // Ensure service worker exists, and that we really are getting a JS file.
      if (response.status === 404) {
        // No service worker found.
        emit('error', new Error(("Service worker not found at " + swUrl)))
        unregister()
      } else if (response.headers.get('content-type').indexOf('javascript') === -1) {
        emit('error', new Error(
          "Expected " + swUrl + " to have javascript content-type, " +
          "but received " + (response.headers.get('content-type'))))
        unregister()
      } else {
        // Service worker found. Proceed as normal.
        registerValidSW(swUrl, emit, registrationOptions)
      }
    })
    .catch(function (error) {
      if (!navigator.onLine) {
        emit('offline')
      } else {
        emit('error', error)
      }
    })
}

function unregister () {
  if ('serviceWorker' in navigator) {
    navigator.serviceWorker.ready.then(function (registration) {
      registration.unregister()
    })
  }
}


/***/ }),

/***/ "../@rcpress/core/lib/web/index.js":
/*!*****************************************!*\
  !*** ../@rcpress/core/lib/web/index.js ***!
  \*****************************************/
/*! exports provided: useSWRegistry, useSWHook, useSiteContext, SiteContext */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony import */ var _serviceWorker__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./serviceWorker */ "../@rcpress/core/lib/web/serviceWorker/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useSWRegistry", function() { return _serviceWorker__WEBPACK_IMPORTED_MODULE_0__["useSWRegistry"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useSWHook", function() { return _serviceWorker__WEBPACK_IMPORTED_MODULE_0__["useSWHook"]; });

/* harmony import */ var _context__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./context */ "../@rcpress/core/lib/web/context/index.js");
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useSiteContext", function() { return _context__WEBPACK_IMPORTED_MODULE_1__["default"]; });

/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "SiteContext", function() { return _context__WEBPACK_IMPORTED_MODULE_1__["SiteContext"]; });

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal["default"].signature : function (a) {
  return a;
};






/***/ }),

/***/ "../@rcpress/core/lib/web/serviceWorker/SWUpdateEvent.js":
/*!***************************************************************!*\
  !*** ../@rcpress/core/lib/web/serviceWorker/SWUpdateEvent.js ***!
  \***************************************************************/
/*! exports provided: default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SWUpdateEvent; });
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }

function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal["default"].signature : function (a) {
  return a;
};

var SWUpdateEvent =
/*#__PURE__*/
function () {
  function SWUpdateEvent(registration) {
    _classCallCheck(this, SWUpdateEvent);

    Object.defineProperty(this, 'registration', {
      value: registration,
      configurable: true,
      writable: true
    });
  }
  /**
   * Check if the new service worker exists or not.
   */


  _createClass(SWUpdateEvent, [{
    key: "update",
    value: function update() {
      return this.registration.update();
    }
    /**
     * Activate new service worker to work 'location.reload()' with new data.
     */

  }, {
    key: "skipWaiting",
    value: function skipWaiting() {
      var worker = this.registration.waiting;

      if (!worker) {
        return Promise.resolve();
      }

      console.log('[rcpress:sw] Doing worker.skipWaiting().');
      return new Promise(function (resolve, reject) {
        var channel = new MessageChannel();

        channel.port1.onmessage = function (event) {
          console.log('[rcpress:sw] Done worker.skipWaiting().');

          if (event.data.error) {
            reject(event.data.error);
          } else {
            resolve(event.data);
          }
        };

        worker.postMessage({
          type: 'skip-waiting'
        }, [channel.port2]);
      });
    }
  }, {
    key: "__reactstandin__regenerateByEval",
    // @ts-ignore
    value: function __reactstandin__regenerateByEval(key, code) {
      // @ts-ignore
      this[key] = eval(code);
    }
  }]);

  return SWUpdateEvent;
}();


;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(SWUpdateEvent, "SWUpdateEvent", "/Users/wangyi/Desktop/opensource/rcpress/packages/@rcpress/core/lib/web/serviceWorker/SWUpdateEvent.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../node_modules/webpack/buildin/harmony-module.js */ "../../node_modules/webpack/buildin/harmony-module.js")(module)))

/***/ }),

/***/ "../@rcpress/core/lib/web/serviceWorker/index.js":
/*!*******************************************************!*\
  !*** ../@rcpress/core/lib/web/serviceWorker/index.js ***!
  \*******************************************************/
/*! exports provided: useSWHook, useSWRegistry */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useSWHook", function() { return useSWHook; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "useSWRegistry", function() { return useSWRegistry; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _shared_noop__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../shared/noop */ "../@rcpress/core/lib/web/shared/noop.js");
/* harmony import */ var _SWUpdateEvent__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./SWUpdateEvent */ "../@rcpress/core/lib/web/serviceWorker/SWUpdateEvent.js");
/* harmony import */ var register_service_worker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! register-service-worker */ "../../node_modules/register-service-worker/index.js");
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal["default"].signature : function (a) {
  return a;
};





var swUpdateObject = {
  ready: _shared_noop__WEBPACK_IMPORTED_MODULE_1__["noop"],
  cached: _shared_noop__WEBPACK_IMPORTED_MODULE_1__["noop"],
  updated: _shared_noop__WEBPACK_IMPORTED_MODULE_1__["noop"],
  offline: _shared_noop__WEBPACK_IMPORTED_MODULE_1__["noop"],
  error: _shared_noop__WEBPACK_IMPORTED_MODULE_1__["noop"]
};
var useSWHook = function useSWHook() {
  var dispatch = function dispatch(args) {
    swUpdateObject[args.type] = args.payload;
  };

  return [swUpdateObject, dispatch];
};
var useSWRegistry = function useSWRegistry() {
  var state = swUpdateObject;
  Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
    // Register service worker
    if (false) {}
  }, []);
};

__signature__(useSWRegistry, "useEffect{}");

;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(swUpdateObject, "swUpdateObject", "/Users/wangyi/Desktop/opensource/rcpress/packages/@rcpress/core/lib/web/serviceWorker/index.js");
  reactHotLoader.register(useSWHook, "useSWHook", "/Users/wangyi/Desktop/opensource/rcpress/packages/@rcpress/core/lib/web/serviceWorker/index.js");
  reactHotLoader.register(useSWRegistry, "useSWRegistry", "/Users/wangyi/Desktop/opensource/rcpress/packages/@rcpress/core/lib/web/serviceWorker/index.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../node_modules/webpack/buildin/harmony-module.js */ "../../node_modules/webpack/buildin/harmony-module.js")(module)))

/***/ }),

/***/ "../@rcpress/core/lib/web/shared/noop.js":
/*!***********************************************!*\
  !*** ../@rcpress/core/lib/web/shared/noop.js ***!
  \***********************************************/
/*! exports provided: default, noop */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "noop", function() { return noop; });
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal["default"].signature : function (a) {
  return a;
};

var _default = {};
/* harmony default export */ __webpack_exports__["default"] = (_default);
var noop = function noop() {};
;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(noop, "noop", "/Users/wangyi/Desktop/opensource/rcpress/packages/@rcpress/core/lib/web/shared/noop.js");
  reactHotLoader.register(_default, "default", "/Users/wangyi/Desktop/opensource/rcpress/packages/@rcpress/core/lib/web/shared/noop.js");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../../node_modules/webpack/buildin/harmony-module.js */ "../../node_modules/webpack/buildin/harmony-module.js")(module)))

/***/ }),

/***/ "./docs/.rcpress/components/ShowModifiedTime.jsx":
/*!*******************************************************!*\
  !*** ./docs/.rcpress/components/ShowModifiedTime.jsx ***!
  \*******************************************************/
/*! exports provided: ShowTime */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* WEBPACK VAR INJECTION */(function(module) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ShowTime", function() { return ShowTime; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! moment */ "../../node_modules/moment/moment.js");
/* harmony import */ var moment__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(moment__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _rcpress_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @rcpress/core */ "../@rcpress/core/lib/web/index.js");
(function () {
  var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
  enterModule && enterModule(module);
})();

var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal["default"].signature : function (a) {
  return a;
};




var ShowTime = function ShowTime() {
  return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement(_rcpress_core__WEBPACK_IMPORTED_MODULE_2__["SiteContext"].Consumer, null, function (context) {
    return react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", {
      className: "modifiedTime modifiedTimeLeft"
    }, context.currentLocaleSiteData.themeConfig.lastUpdated, ' ', moment__WEBPACK_IMPORTED_MODULE_1___default()(context.currentPageInfo.lastUpdated).format('YYYY-MM-DD HH:mm:SS'));
  });
};
;

(function () {
  var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;

  if (!reactHotLoader) {
    return;
  }

  reactHotLoader.register(ShowTime, "ShowTime", "/Users/wangyi/Desktop/opensource/rcpress/packages/docs/docs/.rcpress/components/ShowModifiedTime.jsx");
})();

;

(function () {
  var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
  leaveModule && leaveModule(module);
})();
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./../../../../../node_modules/webpack/buildin/harmony-module.js */ "../../node_modules/webpack/buildin/harmony-module.js")(module)))

/***/ })

};;
//# sourceMappingURL=usejsx.md.server-bundle.js.map