module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = require('../../../ssr-module-cache.js');
/******/
/******/ 	// 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
/******/ 		var threw = true;
/******/ 		try {
/******/ 			modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ 			threw = false;
/******/ 		} finally {
/******/ 			if(threw) delete installedModules[moduleId];
/******/ 		}
/******/
/******/ 		// 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:
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__("23aj");


/***/ }),

/***/ "0bYB":
/***/ (function(module, exports) {

module.exports = require("isomorphic-unfetch");

/***/ }),

/***/ "23aj":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "savingMachine", function() { return savingMachine; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Translation", function() { return Translation; });
/* harmony import */ var styled_jsx_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("HJQg");
/* harmony import */ var styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(styled_jsx_style__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("cDcd");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _components_Layout__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("apO0");
/* harmony import */ var isomorphic_unfetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("0bYB");
/* harmony import */ var isomorphic_unfetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(isomorphic_unfetch__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _components_allLanguages_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("eP9L");
var _components_allLanguages_json__WEBPACK_IMPORTED_MODULE_4___namespace = /*#__PURE__*/__webpack_require__.t("eP9L", 1);
/* harmony import */ var xstate__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("w8Mv");
/* harmony import */ var xstate__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(xstate__WEBPACK_IMPORTED_MODULE_5__);
/* harmony import */ var _xstate_react__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("LrOz");
/* harmony import */ var _xstate_react__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_xstate_react__WEBPACK_IMPORTED_MODULE_6__);

var __jsx = react__WEBPACK_IMPORTED_MODULE_1__["createElement"];






const savingMachine = Object(xstate__WEBPACK_IMPORTED_MODULE_5__["Machine"])({
  id: 'toggle',
  initial: 'inactive',
  states: {
    inactive: {
      on: {
        TOGGLE: 'saving'
      }
    },
    saving: {
      on: {
        TOGGLE: 'completed'
      }
    },
    completed: {
      on: {
        TOGGLE: 'saving'
      }
    }
  }
});

const IndexPage = props => __jsx(_components_Layout__WEBPACK_IMPORTED_MODULE_2__[/* default */ "a"], {
  title: "Flight Translating",
  languages: props.languages
}, __jsx("div", {
  style: {
    display: 'grid',
    gridAutoFlow: 'column',
    paddingTop: '68px'
  }
}, props.languages.filter(fileName => fileName !== 'default.json').map(key => {
  return __jsx(Translation, {
    translation: props.translations[key],
    defaultText: props.translations['default.json'],
    language: key.split('.')[0],
    key: key
  });
})));

function Translation({
  translation,
  defaultText,
  language
}) {
  const [onlyShowEmpty, setOnlyShowEmpty] = react__WEBPACK_IMPORTED_MODULE_1__["useState"](false);
  const [current, send] = Object(_xstate_react__WEBPACK_IMPORTED_MODULE_6__["useMachine"])(savingMachine);
  const [translationValues, setTranslationValues] = react__WEBPACK_IMPORTED_MODULE_1__["useState"](translation);

  function handleEmptySwitch(e) {
    setOnlyShowEmpty(e.target.checked);
  }

  const formRef = react__WEBPACK_IMPORTED_MODULE_1__["createRef"]();
  const translationPercentage = Math.floor(Object.values(translation).filter(({
    missing
  }) => !missing).length / Object.values(translation).length * 100);
  const isFullTranslation = translationPercentage === 100;

  async function handleSubmit(lang) {
    send('TOGGLE');
    const formData = formRef.current ? new FormData(formRef.current) : null;
    let payload = {};

    if (formData) {
      formData.forEach((value, key) => {
        payload[key] = value;
      });
    }

    const result = await isomorphic_unfetch__WEBPACK_IMPORTED_MODULE_3___default()(`http://localhost:8080/translations/${lang}`, {
      method: 'PATCH',
      body: JSON.stringify(payload),
      headers: {
        'Content-Type': 'application/json'
      }
    });
    const resp = await result.json();
    send('TOGGLE');
    setTranslationValues(resp);
  }

  const entries = Object.entries(translationValues);
  entries.sort((a, b) => a[0] > b[0] ? 1 : -1); // const missingValues = Object.entries(translation).filter(
  //   (t: any) => t[1].missing
  // );

  const languageObject = _components_allLanguages_json__WEBPACK_IMPORTED_MODULE_4__[language];
  const languageName = !!languageObject ? `${languageObject.name.split(',')[0].split(';')[0]} (${language})` : language;
  return __jsx("div", {
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + "container"
  }, __jsx("form", {
    ref: formRef,
    name: language,
    id: language,
    onSubmit: e => {
      e.preventDefault();
      handleSubmit(language);
    },
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]])
  }, __jsx("div", {
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + "heading-section"
  }, __jsx("h1", {
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]])
  }, languageName), __jsx("div", {
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]])
  }, __jsx("input", {
    type: "checkbox",
    onChange: handleEmptySwitch,
    id: `onlyEmpty_${language}`,
    disabled: isFullTranslation,
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]])
  }), ' ', __jsx("label", {
    htmlFor: `onlyEmpty_${language}`,
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + `show-empty ${isFullTranslation ? 'disabled' : ''}`
  }, "Only show empty?")), __jsx("div", {
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + "percentage-bar-container"
  }, __jsx("div", {
    style: {
      width: `${translationPercentage}%`,
      backgroundColor: isFullTranslation ? '#51bb51' : '#2f80ed'
    },
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + "percentage-bar"
  })), __jsx("div", {
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + "translation-percentage-text"
  }, translationPercentage, "% translated")), __jsx("ul", {
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]])
  }, entries.map(([key, val]) => {
    return __jsx("li", {
      style: {
        display: onlyShowEmpty && !val.missing ? 'none' : 'block'
      },
      key: `${key}`,
      className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]])
    }, __jsx("label", {
      className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + "input-title"
    }, defaultText[key].message), __jsx("span", {
      className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + "message-code"
    }, key), __jsx("input", {
      defaultValue: val.message,
      type: "text",
      name: key,
      style: {
        borderColor: val.missing ? 'red' : '#a59898'
      },
      className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]])
    }));
  })), __jsx("button", {
    type: "submit",
    onClick: () => handleSubmit(language),
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]])
  }, "Submit"), current.matches('saving') && __jsx("span", {
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + "status"
  }, "Saving..."), current.matches('completed') && __jsx("span", {
    className: styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a.dynamic([["2946281994", [onlyShowEmpty ? 'transparent' : '#efefef']]]) + " " + "status saved"
  }, "Saved!")), __jsx(styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a, {
    id: "2946281994",
    dynamic: [onlyShowEmpty ? 'transparent' : '#efefef']
  }, [".container.__jsx-style-dynamic-selector{font-family:sans-serif;min-width:350px;}", ".heading-section.__jsx-style-dynamic-selector{margin:0 1.5rem;}", "h1.__jsx-style-dynamic-selector{font-size:1.5rem;}", "ul.__jsx-style-dynamic-selector{padding:0;}", "ul.__jsx-style-dynamic-selector li.__jsx-style-dynamic-selector{padding:1rem 1.5rem;}", `ul.__jsx-style-dynamic-selector li.__jsx-style-dynamic-selector:nth-child(odd){background:${onlyShowEmpty ? 'transparent' : '#efefef'};}`, "label.input-title.__jsx-style-dynamic-selector,span.message-code.__jsx-style-dynamic-selector{display:block;}", "label.__jsx-style-dynamic-selector{font-weight:bold;font-size:0.75rem;margin-bottom:2px;}", ".show-empty.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;opacity:0.5;}", "span.message-code.__jsx-style-dynamic-selector{font-size:0.625rem;color:gray;margin-bottom:8px;}", "input.__jsx-style-dynamic-selector:disabled{cursor:not-allowed;}", "input[type='text'].__jsx-style-dynamic-selector{font-family:sans-serif;border:1px solid #a59898;border-radius:6px;width:100%;max-width:350px;box-sizing:border-box;padding:0.75em;}", "input[type='text'].__jsx-style-dynamic-selector:focus{outline:none;}", "button[type='submit'].__jsx-style-dynamic-selector{background-color:#2f80ed;color:#fff;border-radius:4px;padding:0.5rem 1rem;height:34px;font-size:0.925rem;margin-left:1.5rem;margin-bottom:1rem;cursor:pointer;}", "button.__jsx-style-dynamic-selector:focus{outline:none;background-color:#2067c5;}", "span.status.__jsx-style-dynamic-selector{margin-left:0.5rem;font-size:0.825rem;font-weight:bold;}", "span.status.saved.__jsx-style-dynamic-selector{color:#2f80ed;}", ".percentage-bar-container.__jsx-style-dynamic-selector{height:8px;width:100%;max-width:350px;border-radius:8px;border:1px solid gray;margin-top:0.5rem;}", ".percentage-bar.__jsx-style-dynamic-selector{background:#2f80ed;height:100%;}", ".translation-percentage-text.__jsx-style-dynamic-selector{margin-top:0.25rem;font-size:0.75rem;}"]));
}

IndexPage.getInitialProps = async function () {
  const res = await isomorphic_unfetch__WEBPACK_IMPORTED_MODULE_3___default()('http://localhost:8080/translations');
  const data = await res.json();
  const languages = Object.keys(data);
  return {
    translations: data,
    languages
  };
};

/* harmony default export */ __webpack_exports__["default"] = (IndexPage);

/***/ }),

/***/ "2MIm":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__("IGGJ");

exports.__esModule = true;
exports.default = withRouter;

var _react = _interopRequireDefault(__webpack_require__("cDcd"));

var _router = __webpack_require__("7xIC");

function withRouter(ComposedComponent) {
  function WithRouterWrapper(props) {
    return /*#__PURE__*/_react.default.createElement(ComposedComponent, Object.assign({
      router: (0, _router.useRouter)()
    }, props));
  }

  WithRouterWrapper.getInitialProps = ComposedComponent.getInitialProps // This is needed to allow checking for custom getInitialProps in _app
  ;
  WithRouterWrapper.origGetInitialProps = ComposedComponent.origGetInitialProps;

  if (false) {}

  return WithRouterWrapper;
}

/***/ }),

/***/ "4Q3z":
/***/ (function(module, exports) {

module.exports = require("next/router");

/***/ }),

/***/ "7xIC":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireWildcard = __webpack_require__("yWCo");

var _interopRequireDefault = __webpack_require__("IGGJ");

exports.__esModule = true;
exports.useRouter = useRouter;
exports.makePublicRouterInstance = makePublicRouterInstance;
exports.createRouter = exports.withRouter = exports.default = void 0;

var _react = _interopRequireDefault(__webpack_require__("cDcd"));

var _router2 = _interopRequireWildcard(__webpack_require__("L9lV"));

exports.Router = _router2.default;
exports.NextRouter = _router2.NextRouter;

var _routerContext = __webpack_require__("Osoz");

var _withRouter = _interopRequireDefault(__webpack_require__("2MIm"));

exports.withRouter = _withRouter.default;
/* global window */

const singletonRouter = {
  router: null,
  // holds the actual router instance
  readyCallbacks: [],

  ready(cb) {
    if (this.router) return cb();

    if (false) {}
  }

}; // Create public properties and methods of the router in the singletonRouter

const urlPropertyFields = ['pathname', 'route', 'query', 'asPath', 'components', 'isFallback', 'basePath'];
const routerEvents = ['routeChangeStart', 'beforeHistoryChange', 'routeChangeComplete', 'routeChangeError', 'hashChangeStart', 'hashChangeComplete'];
const coreMethodFields = ['push', 'replace', 'reload', 'back', 'prefetch', 'beforePopState']; // Events is a static property on the router, the router doesn't have to be initialized to use it

Object.defineProperty(singletonRouter, 'events', {
  get() {
    return _router2.default.events;
  }

});
urlPropertyFields.forEach(field => {
  // Here we need to use Object.defineProperty because, we need to return
  // the property assigned to the actual router
  // The value might get changed as we change routes and this is the
  // proper way to access it
  Object.defineProperty(singletonRouter, field, {
    get() {
      const router = getRouter();
      return router[field];
    }

  });
});
coreMethodFields.forEach(field => {
  // We don't really know the types here, so we add them later instead
  ;

  singletonRouter[field] = (...args) => {
    const router = getRouter();
    return router[field](...args);
  };
});
routerEvents.forEach(event => {
  singletonRouter.ready(() => {
    _router2.default.events.on(event, (...args) => {
      const eventField = `on${event.charAt(0).toUpperCase()}${event.substring(1)}`;
      const _singletonRouter = singletonRouter;

      if (_singletonRouter[eventField]) {
        try {
          _singletonRouter[eventField](...args);
        } catch (err) {
          // tslint:disable-next-line:no-console
          console.error(`Error when running the Router event: ${eventField}`); // tslint:disable-next-line:no-console

          console.error(`${err.message}\n${err.stack}`);
        }
      }
    });
  });
});

function getRouter() {
  if (!singletonRouter.router) {
    const message = 'No router instance found.\n' + 'You should only use "next/router" inside the client side of your app.\n';
    throw new Error(message);
  }

  return singletonRouter.router;
} // Export the singletonRouter and this is the public API.


var _default = singletonRouter; // Reexport the withRoute HOC

exports.default = _default;

function useRouter() {
  return _react.default.useContext(_routerContext.RouterContext);
} // INTERNAL APIS
// -------------
// (do not use following exports inside the app)
// Create a router and assign it as the singleton instance.
// This is used in client side when we are initilizing the app.
// This should **not** use inside the server.


const createRouter = (...args) => {
  singletonRouter.router = new _router2.default(...args);
  singletonRouter.readyCallbacks.forEach(cb => cb());
  singletonRouter.readyCallbacks = [];
  return singletonRouter.router;
}; // This function is used to create the `withRouter` router instance


exports.createRouter = createRouter;

function makePublicRouterInstance(router) {
  const _router = router;
  const instance = {};

  for (const property of urlPropertyFields) {
    if (typeof _router[property] === 'object') {
      instance[property] = Object.assign({}, _router[property]); // makes sure query is not stateful

      continue;
    }

    instance[property] = _router[property];
  } // Events is a static property on the router, the router doesn't have to be initialized to use it


  instance.events = _router2.default.events;
  coreMethodFields.forEach(field => {
    instance[field] = (...args) => {
      return _router[field](...args);
    };
  });
  return instance;
}

/***/ }),

/***/ "HJQg":
/***/ (function(module, exports) {

module.exports = require("styled-jsx/style");

/***/ }),

/***/ "IGGJ":
/***/ (function(module, exports) {

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    "default": obj
  };
}

module.exports = _interopRequireDefault;

/***/ }),

/***/ "KeDb":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


var _interopRequireDefault = __webpack_require__("IGGJ");

var _interopRequireWildcard = __webpack_require__("yWCo");

exports.__esModule = true;
exports.default = void 0;

var _react = _interopRequireWildcard(__webpack_require__("cDcd"));

var _url = __webpack_require__("bzos");

var _utils = __webpack_require__("kYf9");

var _router = _interopRequireDefault(__webpack_require__("7xIC"));

var _router2 = __webpack_require__("L9lV");

function isLocal(href) {
  const url = (0, _url.parse)(href, false, true);
  const origin = (0, _url.parse)((0, _utils.getLocationOrigin)(), false, true);
  return !url.host || url.protocol === origin.protocol && url.host === origin.host;
}

function memoizedFormatUrl(formatFunc) {
  let lastHref = null;
  let lastAs = null;
  let lastResult = null;
  return (href, as) => {
    if (lastResult && href === lastHref && as === lastAs) {
      return lastResult;
    }

    const result = formatFunc(href, as);
    lastHref = href;
    lastAs = as;
    lastResult = result;
    return result;
  };
}

function formatUrl(url) {
  return url && typeof url === 'object' ? (0, _utils.formatWithValidation)(url) : url;
}

let observer;
const listeners = new Map();
const IntersectionObserver = false ? undefined : null;
const prefetched = {};

function getObserver() {
  // Return shared instance of IntersectionObserver if already created
  if (observer) {
    return observer;
  } // Only create shared IntersectionObserver if supported in browser


  if (!IntersectionObserver) {
    return undefined;
  }

  return observer = new IntersectionObserver(entries => {
    entries.forEach(entry => {
      if (!listeners.has(entry.target)) {
        return;
      }

      const cb = listeners.get(entry.target);

      if (entry.isIntersecting || entry.intersectionRatio > 0) {
        observer.unobserve(entry.target);
        listeners.delete(entry.target);
        cb();
      }
    });
  }, {
    rootMargin: '200px'
  });
}

const listenToIntersections = (el, cb) => {
  const observer = getObserver();

  if (!observer) {
    return () => {};
  }

  observer.observe(el);
  listeners.set(el, cb);
  return () => {
    try {
      observer.unobserve(el);
    } catch (err) {
      console.error(err);
    }

    listeners.delete(el);
  };
};

class Link extends _react.Component {
  constructor(props) {
    super(props);
    this.p = void 0;

    this.cleanUpListeners = () => {};

    this.formatUrls = memoizedFormatUrl((href, asHref) => {
      return {
        href: (0, _router2.addBasePath)(formatUrl(href)),
        as: asHref ? (0, _router2.addBasePath)(formatUrl(asHref)) : asHref
      };
    });

    this.linkClicked = e => {
      const {
        nodeName,
        target
      } = e.currentTarget;

      if (nodeName === 'A' && (target && target !== '_self' || e.metaKey || e.ctrlKey || e.shiftKey || e.nativeEvent && e.nativeEvent.which === 2)) {
        // ignore click for new tab / new window behavior
        return;
      }

      let {
        href,
        as
      } = this.formatUrls(this.props.href, this.props.as);

      if (!isLocal(href)) {
        // ignore click if it's outside our scope (e.g. https://google.com)
        return;
      }

      const {
        pathname
      } = window.location;
      href = (0, _url.resolve)(pathname, href);
      as = as ? (0, _url.resolve)(pathname, as) : href;
      e.preventDefault(); //  avoid scroll for urls with anchor refs

      let {
        scroll
      } = this.props;

      if (scroll == null) {
        scroll = as.indexOf('#') < 0;
      } // replace state instead of push if prop is present


      _router.default[this.props.replace ? 'replace' : 'push'](href, as, {
        shallow: this.props.shallow
      }).then(success => {
        if (!success) return;

        if (scroll) {
          window.scrollTo(0, 0);
          document.body.focus();
        }
      });
    };

    if (false) {}

    this.p = props.prefetch !== false;
  }

  componentWillUnmount() {
    this.cleanUpListeners();
  }

  getPaths() {
    const {
      pathname
    } = window.location;
    const {
      href: parsedHref,
      as: parsedAs
    } = this.formatUrls(this.props.href, this.props.as);
    const resolvedHref = (0, _url.resolve)(pathname, parsedHref);
    return [resolvedHref, parsedAs ? (0, _url.resolve)(pathname, parsedAs) : resolvedHref];
  }

  handleRef(ref) {
    if (this.p && IntersectionObserver && ref && ref.tagName) {
      this.cleanUpListeners();
      const isPrefetched = prefetched[this.getPaths().join( // Join on an invalid URI character
      '%')];

      if (!isPrefetched) {
        this.cleanUpListeners = listenToIntersections(ref, () => {
          this.prefetch();
        });
      }
    }
  } // The function is memoized so that no extra lifecycles are needed
  // as per https://reactjs.org/blog/2018/06/07/you-probably-dont-need-derived-state.html


  prefetch(options) {
    if (!this.p || true) return; // Prefetch the JSON page if asked (only in the client)

    const paths = this.getPaths(); // We need to handle a prefetch error here since we may be
    // loading with priority which can reject but we don't
    // want to force navigation since this is only a prefetch

    _router.default.prefetch(paths[
    /* href */
    0], paths[
    /* asPath */
    1], options).catch(err => {
      if (false) {}
    });

    prefetched[paths.join( // Join on an invalid URI character
    '%')] = true;
  }

  render() {
    let {
      children
    } = this.props;
    const {
      href,
      as
    } = this.formatUrls(this.props.href, this.props.as); // Deprecated. Warning shown by propType check. If the children provided is a string (<Link>example</Link>) we wrap it in an <a> tag

    if (typeof children === 'string') {
      children = /*#__PURE__*/_react.default.createElement("a", null, children);
    } // This will return the first child, if multiple are provided it will throw an error


    const child = _react.Children.only(children);

    const props = {
      ref: el => {
        this.handleRef(el);

        if (child && typeof child === 'object' && child.ref) {
          if (typeof child.ref === 'function') child.ref(el);else if (typeof child.ref === 'object') {
            child.ref.current = el;
          }
        }
      },
      onMouseEnter: e => {
        if (child.props && typeof child.props.onMouseEnter === 'function') {
          child.props.onMouseEnter(e);
        }

        this.prefetch({
          priority: true
        });
      },
      onClick: e => {
        if (child.props && typeof child.props.onClick === 'function') {
          child.props.onClick(e);
        }

        if (!e.defaultPrevented) {
          this.linkClicked(e);
        }
      }
    }; // If child is an <a> tag and doesn't have a href attribute, or if the 'passHref' property is
    // defined, we specify the current 'href', so that repetition is not needed by the user

    if (this.props.passHref || child.type === 'a' && !('href' in child.props)) {
      props.href = as || href;
    } // Add the ending slash to the paths. So, we can serve the
    // "<page>/index.html" directly.


    if (false) {}

    return _react.default.cloneElement(child, props);
  }

}

if (false) {}

var _default = Link;
exports.default = _default;

/***/ }),

/***/ "L9lV":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.addBasePath = addBasePath;
exports.delBasePath = delBasePath;
exports.default = void 0;

var _url2 = __webpack_require__("bzos");

var _mitt = _interopRequireDefault(__webpack_require__("YBsB"));

var _utils = __webpack_require__("fvxO");

var _isDynamic = __webpack_require__("Lko9");

var _routeMatcher = __webpack_require__("TBBy");

var _routeRegex = __webpack_require__("uChv");

function _interopRequireDefault(obj) {
  return obj && obj.__esModule ? obj : {
    default: obj
  };
}
/* global __NEXT_DATA__ */
// tslint:disable:no-console


const basePath =  false || '';

function addBasePath(path) {
  return path.indexOf(basePath) !== 0 ? basePath + path : path;
}

function delBasePath(path) {
  return path.indexOf(basePath) === 0 ? path.substr(basePath.length) || '/' : path;
}

function toRoute(path) {
  return path.replace(/\/$/, '') || '/';
}

const prepareRoute = path => toRoute(!path || path === '/' ? '/index' : path);

function fetchNextData(pathname, query, isServerRender, cb) {
  let attempts = isServerRender ? 3 : 1;

  function getResponse() {
    return fetch((0, _utils.formatWithValidation)({
      pathname: addBasePath( // @ts-ignore __NEXT_DATA__
      `/_next/data/${__NEXT_DATA__.buildId}${delBasePath(pathname)}.json`),
      query
    }), {
      // Cookies are required to be present for Next.js' SSG "Preview Mode".
      // Cookies may also be required for `getServerSideProps`.
      //
      // > `fetch` won’t send cookies, unless you set the credentials init
      // > option.
      // https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API/Using_Fetch
      //
      // > For maximum browser compatibility when it comes to sending &
      // > receiving cookies, always supply the `credentials: 'same-origin'`
      // > option instead of relying on the default.
      // https://github.com/github/fetch#caveats
      credentials: 'same-origin'
    }).then(res => {
      if (!res.ok) {
        if (--attempts > 0 && res.status >= 500) {
          return getResponse();
        }

        throw new Error(`Failed to load static props`);
      }

      return res.json();
    });
  }

  return getResponse().then(data => {
    return cb ? cb(data) : data;
  }).catch(err => {
    // We should only trigger a server-side transition if this was caused
    // on a client-side transition. Otherwise, we'd get into an infinite
    // loop.
    if (!isServerRender) {
      ;
      err.code = 'PAGE_LOAD_ERROR';
    }

    throw err;
  });
}

class Router {
  /**
  * Map of all components loaded in `Router`
  */
  // Static Data Cache
  constructor(_pathname, _query, _as2, {
    initialProps,
    pageLoader,
    App,
    wrapApp,
    Component,
    err,
    subscription,
    isFallback
  }) {
    this.route = void 0;
    this.pathname = void 0;
    this.query = void 0;
    this.asPath = void 0;
    this.basePath = void 0;
    this.components = void 0;
    this.sdc = {};
    this.sub = void 0;
    this.clc = void 0;
    this.pageLoader = void 0;
    this._bps = void 0;
    this.events = void 0;
    this._wrapApp = void 0;
    this.isSsr = void 0;
    this.isFallback = void 0;

    this.onPopState = e => {
      if (!e.state) {
        // We get state as undefined for two reasons.
        //  1. With older safari (< 8) and older chrome (< 34)
        //  2. When the URL changed with #
        //
        // In the both cases, we don't need to proceed and change the route.
        // (as it's already changed)
        // But we can simply replace the state with the new changes.
        // Actually, for (1) we don't need to nothing. But it's hard to detect that event.
        // So, doing the following for (1) does no harm.
        const {
          pathname,
          query
        } = this;
        this.changeState('replaceState', (0, _utils.formatWithValidation)({
          pathname,
          query
        }), (0, _utils.getURL)());
        return;
      } // Make sure we don't re-render on initial load,
      // can be caused by navigating back from an external site


      if (e.state && this.isSsr && e.state.as === this.asPath && (0, _url2.parse)(e.state.url).pathname === this.pathname) {
        return;
      } // If the downstream application returns falsy, return.
      // They will then be responsible for handling the event.


      if (this._bps && !this._bps(e.state)) {
        return;
      }

      const {
        url,
        as,
        options
      } = e.state;

      if (false) {}

      this.replace(url, as, options);
    };

    this._getStaticData = asPath => {
      const pathname = prepareRoute((0, _url2.parse)(asPath).pathname);
      return  true && this.sdc[pathname] ? Promise.resolve(this.sdc[pathname]) : fetchNextData(pathname, null, this.isSsr, data => this.sdc[pathname] = data);
    };

    this._getServerData = asPath => {
      let {
        pathname,
        query
      } = (0, _url2.parse)(asPath, true);
      pathname = prepareRoute(pathname);
      return fetchNextData(pathname, query, this.isSsr);
    }; // represents the current component key


    this.route = toRoute(_pathname); // set up the component cache (by route keys)

    this.components = {}; // We should not keep the cache, if there's an error
    // Otherwise, this cause issues when when going back and
    // come again to the errored page.

    if (_pathname !== '/_error') {
      this.components[this.route] = {
        Component,
        props: initialProps,
        err,
        __N_SSG: initialProps && initialProps.__N_SSG,
        __N_SSP: initialProps && initialProps.__N_SSP
      };
    }

    this.components['/_app'] = {
      Component: App
    }; // Backwards compat for Router.router.events
    // TODO: Should be remove the following major version as it was never documented

    this.events = Router.events;
    this.pageLoader = pageLoader;
    this.pathname = _pathname;
    this.query = _query; // if auto prerendered and dynamic route wait to update asPath
    // until after mount to prevent hydration mismatch

    this.asPath = // @ts-ignore this is temporarily global (attached to window)
    (0, _isDynamic.isDynamicRoute)(_pathname) && __NEXT_DATA__.autoExport ? _pathname : _as2;
    this.basePath = basePath;
    this.sub = subscription;
    this.clc = null;
    this._wrapApp = wrapApp; // make sure to ignore extra popState in safari on navigating
    // back from external site

    this.isSsr = true;
    this.isFallback = isFallback;

    if (false) {}
  } // @deprecated backwards compatibility even though it's a private method.


  static _rewriteUrlForNextExport(url) {
    if (false) {} else {
      return url;
    }
  }

  update(route, mod) {
    const Component = mod.default || mod;
    const data = this.components[route];

    if (!data) {
      throw new Error(`Cannot update unavailable route: ${route}`);
    }

    const newData = Object.assign({}, data, {
      Component,
      __N_SSG: mod.__N_SSG,
      __N_SSP: mod.__N_SSP
    });
    this.components[route] = newData; // pages/_app.js updated

    if (route === '/_app') {
      this.notify(this.components[this.route]);
      return;
    }

    if (route === this.route) {
      this.notify(newData);
    }
  }

  reload() {
    window.location.reload();
  }
  /**
  * Go back in history
  */


  back() {
    window.history.back();
  }
  /**
  * Performs a `pushState` with arguments
  * @param url of the route
  * @param as masks `url` for the browser
  * @param options object you can define `shallow` and other options
  */


  push(url, as = url, options = {}) {
    return this.change('pushState', url, as, options);
  }
  /**
  * Performs a `replaceState` with arguments
  * @param url of the route
  * @param as masks `url` for the browser
  * @param options object you can define `shallow` and other options
  */


  replace(url, as = url, options = {}) {
    return this.change('replaceState', url, as, options);
  }

  change(method, _url, _as, options) {
    return new Promise((resolve, reject) => {
      if (!options._h) {
        this.isSsr = false;
      } // marking route changes as a navigation start entry


      if (_utils.ST) {
        performance.mark('routeChange');
      } // If url and as provided as an object representation,
      // we'll format them into the string version here.


      let url = typeof _url === 'object' ? (0, _utils.formatWithValidation)(_url) : _url;
      let as = typeof _as === 'object' ? (0, _utils.formatWithValidation)(_as) : _as;
      url = addBasePath(url);
      as = addBasePath(as); // Add the ending slash to the paths. So, we can serve the
      // "<page>/index.html" directly for the SSR page.

      if (false) {}

      this.abortComponentLoad(as); // If the url change is only related to a hash change
      // We should not proceed. We should only change the state.
      // WARNING: `_h` is an internal option for handing Next.js client-side
      // hydration. Your app should _never_ use this property. It may change at
      // any time without notice.

      if (!options._h && this.onlyAHashChange(as)) {
        this.asPath = as;
        Router.events.emit('hashChangeStart', as);
        this.changeState(method, url, as, options);
        this.scrollToHash(as);
        Router.events.emit('hashChangeComplete', as);
        return resolve(true);
      }

      const {
        pathname,
        query,
        protocol
      } = (0, _url2.parse)(url, true);

      if (!pathname || protocol) {
        if (false) {}

        return resolve(false);
      } // If asked to change the current URL we should reload the current page
      // (not location.reload() but reload getInitialProps and other Next.js stuffs)
      // We also need to set the method = replaceState always
      // as this should not go into the history (That's how browsers work)
      // We should compare the new asPath to the current asPath, not the url


      if (!this.urlIsNew(as)) {
        method = 'replaceState';
      }

      const route = toRoute(pathname);
      const {
        shallow = false
      } = options;

      if ((0, _isDynamic.isDynamicRoute)(route)) {
        const {
          pathname: asPathname
        } = (0, _url2.parse)(as);
        const routeRegex = (0, _routeRegex.getRouteRegex)(route);
        const routeMatch = (0, _routeMatcher.getRouteMatcher)(routeRegex)(asPathname);

        if (!routeMatch) {
          const missingParams = Object.keys(routeRegex.groups).filter(param => !query[param]);

          if (missingParams.length > 0) {
            if (false) {}

            return reject(new Error(`The provided \`as\` value (${asPathname}) is incompatible with the \`href\` value (${route}). ` + `Read more: https://err.sh/vercel/next.js/incompatible-href-as`));
          }
        } else {
          // Merge params into `query`, overwriting any specified in search
          Object.assign(query, routeMatch);
        }
      }

      Router.events.emit('routeChangeStart', as); // If shallow is true and the route exists in the router cache we reuse the previous result

      this.getRouteInfo(route, pathname, query, as, shallow).then(routeInfo => {
        const {
          error
        } = routeInfo;

        if (error && error.cancelled) {
          return resolve(false);
        }

        Router.events.emit('beforeHistoryChange', as);
        this.changeState(method, url, as, options);

        if (false) {}

        this.set(route, pathname, query, as, routeInfo).then(() => {
          if (error) {
            Router.events.emit('routeChangeError', error, as);
            throw error;
          }

          Router.events.emit('routeChangeComplete', as);
          return resolve(true);
        });
      }, reject);
    });
  }

  changeState(method, url, as, options = {}) {
    if (false) {}

    if (method !== 'pushState' || (0, _utils.getURL)() !== as) {
      window.history[method]({
        url,
        as,
        options
      }, // Most browsers currently ignores this parameter, although they may use it in the future.
      // Passing the empty string here should be safe against future changes to the method.
      // https://developer.mozilla.org/en-US/docs/Web/API/History/replaceState
      '', as);
    }
  }

  getRouteInfo(route, pathname, query, as, shallow = false) {
    const cachedRouteInfo = this.components[route]; // If there is a shallow route transition possible
    // If the route is already rendered on the screen.

    if (shallow && cachedRouteInfo && this.route === route) {
      return Promise.resolve(cachedRouteInfo);
    }

    const handleError = (err, loadErrorFail) => {
      return new Promise(resolve => {
        if (err.code === 'PAGE_LOAD_ERROR' || loadErrorFail) {
          // If we can't load the page it could be one of following reasons
          //  1. Page doesn't exists
          //  2. Page does exist in a different zone
          //  3. Internal error while loading the page
          // So, doing a hard reload is the proper way to deal with this.
          window.location.href = as; // Changing the URL doesn't block executing the current code path.
          // So, we need to mark it as a cancelled error and stop the routing logic.

          err.cancelled = true; // @ts-ignore TODO: fix the control flow here

          return resolve({
            error: err
          });
        }

        if (err.cancelled) {
          // @ts-ignore TODO: fix the control flow here
          return resolve({
            error: err
          });
        }

        resolve(this.fetchComponent('/_error').then(res => {
          const {
            page: Component
          } = res;
          const routeInfo = {
            Component,
            err
          };
          return new Promise(resolve => {
            this.getInitialProps(Component, {
              err,
              pathname,
              query
            }).then(props => {
              routeInfo.props = props;
              routeInfo.error = err;
              resolve(routeInfo);
            }, gipErr => {
              console.error('Error in error page `getInitialProps`: ', gipErr);
              routeInfo.error = err;
              routeInfo.props = {};
              resolve(routeInfo);
            });
          });
        }).catch(err => handleError(err, true)));
      });
    };

    return new Promise((resolve, reject) => {
      if (cachedRouteInfo) {
        return resolve(cachedRouteInfo);
      }

      this.fetchComponent(route).then(res => resolve({
        Component: res.page,
        __N_SSG: res.mod.__N_SSG,
        __N_SSP: res.mod.__N_SSP
      }), reject);
    }).then(routeInfo => {
      const {
        Component,
        __N_SSG,
        __N_SSP
      } = routeInfo;

      if (false) {}

      return this._getData(() => __N_SSG ? this._getStaticData(as) : __N_SSP ? this._getServerData(as) : this.getInitialProps(Component, // we provide AppTree later so this needs to be `any`
      {
        pathname,
        query,
        asPath: as
      })).then(props => {
        routeInfo.props = props;
        this.components[route] = routeInfo;
        return routeInfo;
      });
    }).catch(handleError);
  }

  set(route, pathname, query, as, data) {
    this.isFallback = false;
    this.route = route;
    this.pathname = pathname;
    this.query = query;
    this.asPath = as;
    return this.notify(data);
  }
  /**
  * Callback to execute before replacing router state
  * @param cb callback to be executed
  */


  beforePopState(cb) {
    this._bps = cb;
  }

  onlyAHashChange(as) {
    if (!this.asPath) return false;
    const [oldUrlNoHash, oldHash] = this.asPath.split('#');
    const [newUrlNoHash, newHash] = as.split('#'); // Makes sure we scroll to the provided hash if the url/hash are the same

    if (newHash && oldUrlNoHash === newUrlNoHash && oldHash === newHash) {
      return true;
    } // If the urls are change, there's more than a hash change


    if (oldUrlNoHash !== newUrlNoHash) {
      return false;
    } // If the hash has changed, then it's a hash only change.
    // This check is necessary to handle both the enter and
    // leave hash === '' cases. The identity case falls through
    // and is treated as a next reload.


    return oldHash !== newHash;
  }

  scrollToHash(as) {
    const [, hash] = as.split('#'); // Scroll to top if the hash is just `#` with no value

    if (hash === '') {
      window.scrollTo(0, 0);
      return;
    } // First we check if the element by id is found


    const idEl = document.getElementById(hash);

    if (idEl) {
      idEl.scrollIntoView();
      return;
    } // If there's no element with the id, we check the `name` property
    // To mirror browsers


    const nameEl = document.getElementsByName(hash)[0];

    if (nameEl) {
      nameEl.scrollIntoView();
    }
  }

  urlIsNew(asPath) {
    return this.asPath !== asPath;
  }
  /**
  * Prefetch page code, you may wait for the data during page rendering.
  * This feature only works in production!
  * @param url the href of prefetched page
  * @param asPath the as path of the prefetched page
  */


  prefetch(url, asPath = url, options = {}) {
    return new Promise((resolve, reject) => {
      const {
        pathname,
        protocol
      } = (0, _url2.parse)(url);

      if (!pathname || protocol) {
        if (false) {}

        return;
      } // Prefetch is not supported in development mode because it would trigger on-demand-entries


      if (false) {}

      const route = delBasePath(toRoute(pathname));
      Promise.all([this.pageLoader.prefetchData(url, delBasePath(asPath)), this.pageLoader[options.priority ? 'loadPage' : 'prefetch'](route)]).then(() => resolve(), reject);
    });
  }

  async fetchComponent(route) {
    let cancelled = false;

    const cancel = this.clc = () => {
      cancelled = true;
    };

    route = delBasePath(route);
    const componentResult = await this.pageLoader.loadPage(route);

    if (cancelled) {
      const error = new Error(`Abort fetching component for route: "${route}"`);
      error.cancelled = true;
      throw error;
    }

    if (cancel === this.clc) {
      this.clc = null;
    }

    return componentResult;
  }

  _getData(fn) {
    let cancelled = false;

    const cancel = () => {
      cancelled = true;
    };

    this.clc = cancel;
    return fn().then(data => {
      if (cancel === this.clc) {
        this.clc = null;
      }

      if (cancelled) {
        const err = new Error('Loading initial props cancelled');
        err.cancelled = true;
        throw err;
      }

      return data;
    });
  }

  getInitialProps(Component, ctx) {
    const {
      Component: App
    } = this.components['/_app'];

    const AppTree = this._wrapApp(App);

    ctx.AppTree = AppTree;
    return (0, _utils.loadGetInitialProps)(App, {
      AppTree,
      Component,
      router: this,
      ctx
    });
  }

  abortComponentLoad(as) {
    if (this.clc) {
      const e = new Error('Route Cancelled');
      e.cancelled = true;
      Router.events.emit('routeChangeError', e, as);
      this.clc();
      this.clc = null;
    }
  }

  notify(data) {
    return this.sub(data, this.components['/_app'].Component);
  }

}

exports.default = Router;
Router.events = (0, _mitt.default)();

/***/ }),

/***/ "Lko9":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.isDynamicRoute = isDynamicRoute; // Identify /[param]/ in route string

const TEST_ROUTE = /\/\[[^/]+?\](?=\/|$)/;

function isDynamicRoute(route) {
  return TEST_ROUTE.test(route);
}

/***/ }),

/***/ "LrOz":
/***/ (function(module, exports) {

module.exports = require("@xstate/react");

/***/ }),

/***/ "Osoz":
/***/ (function(module, exports) {

module.exports = require("next/dist/next-server/lib/router-context.js");

/***/ }),

/***/ "T0aG":
/***/ (function(module, exports) {

function _typeof(obj) {
  "@babel/helpers - typeof";

  if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
    module.exports = _typeof = function _typeof(obj) {
      return typeof obj;
    };
  } else {
    module.exports = _typeof = function _typeof(obj) {
      return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
    };
  }

  return _typeof(obj);
}

module.exports = _typeof;

/***/ }),

/***/ "TBBy":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.getRouteMatcher = getRouteMatcher;

function getRouteMatcher(routeRegex) {
  const {
    re,
    groups
  } = routeRegex;
  return pathname => {
    const routeMatch = re.exec(pathname);

    if (!routeMatch) {
      return false;
    }

    const decode = param => {
      try {
        return decodeURIComponent(param);
      } catch (_) {
        const err = new Error('failed to decode param');
        err.code = 'DECODE_FAILED';
        throw err;
      }
    };

    const params = {};
    Object.keys(groups).forEach(slugName => {
      const g = groups[slugName];
      const m = routeMatch[g.pos];

      if (m !== undefined) {
        params[slugName] = ~m.indexOf('/') ? m.split('/').map(entry => decode(entry)) : g.repeat ? [decode(m)] : decode(m);
      }
    });
    return params;
  };
}

/***/ }),

/***/ "YBsB":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.default = mitt;
/*
MIT License
Copyright (c) Jason Miller (https://jasonformat.com/)
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.
*/
// This file is based on https://github.com/developit/mitt/blob/v1.1.3/src/index.js
// It's been edited for the needs of this script
// See the LICENSE at the top of the file

function mitt() {
  const all = Object.create(null);
  return {
    on(type, handler) {
      ;
      (all[type] || (all[type] = [])).push(handler);
    },

    off(type, handler) {
      if (all[type]) {
        // tslint:disable-next-line:no-bitwise
        all[type].splice(all[type].indexOf(handler) >>> 0, 1);
      }
    },

    emit(type, ...evts) {
      // eslint-disable-next-line array-callback-return
      ;
      (all[type] || []).slice().map(handler => {
        handler(...evts);
      });
    }

  };
}

/***/ }),

/***/ "apO0":
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
/* harmony import */ var styled_jsx_style__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("HJQg");
/* harmony import */ var styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(styled_jsx_style__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("cDcd");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("jvFD");
/* harmony import */ var next_link__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(next_link__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("xnum");
/* harmony import */ var next_head__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(next_head__WEBPACK_IMPORTED_MODULE_3__);
/* harmony import */ var _allLanguages_json__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("eP9L");
var _allLanguages_json__WEBPACK_IMPORTED_MODULE_4___namespace = /*#__PURE__*/__webpack_require__.t("eP9L", 1);
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("4Q3z");
/* harmony import */ var next_router__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(next_router__WEBPACK_IMPORTED_MODULE_5__);

var __jsx = react__WEBPACK_IMPORTED_MODULE_1__["createElement"];






const Layout = ({
  children,
  title = 'Flight Translating',
  languages = [],
  router
}) => __jsx("div", {
  className: "jsx-2729679767"
}, __jsx(next_head__WEBPACK_IMPORTED_MODULE_3___default.a, null, __jsx("title", {
  className: "jsx-2729679767"
}, title), __jsx("meta", {
  charSet: "utf-8",
  className: "jsx-2729679767"
}), __jsx("meta", {
  name: "viewport",
  content: "initial-scale=1.0, width=device-width",
  className: "jsx-2729679767"
})), __jsx("header", {
  className: "jsx-2729679767"
}, __jsx("nav", {
  className: "jsx-2729679767" + " " + "main-nav"
}, __jsx(next_link__WEBPACK_IMPORTED_MODULE_2___default.a, {
  href: "/"
}, __jsx("a", {
  className: "jsx-2729679767" + " " + ((router.asPath === '/' ? 'active' : '') || "")
}, "All languages")), languages.filter(fileName => fileName !== 'default.json').map(key => __jsx(LanguageLink, {
  key: key,
  languageFileName: key,
  router: router
})))), children, __jsx(styled_jsx_style__WEBPACK_IMPORTED_MODULE_0___default.a, {
  id: "2729679767"
}, ["body{margin:0;padding:0;}", "header{overflow:hidden;position:fixed;top:0;width:100%;background:white;}", "nav.main-nav{padding:0 1.5rem;margin:0 -0.5rem;border-bottom:1px solid #a9a1a1;}", "nav.main-nav a{padding:1.5rem 0;margin:0 0.75rem;display:inline-block;-webkit-text-decoration:none;text-decoration:none;color:#111;font-size:1rem;font-family:sans-serif;-webkit-letter-spacing:-0.5px;-moz-letter-spacing:-0.5px;-ms-letter-spacing:-0.5px;letter-spacing:-0.5px;}", "nav.main-nav a.active{font-weight:bold;}"]));

const LanguageLink = ({
  languageFileName,
  router
}) => {
  const language = languageFileName.split('.')[0];
  const languageObject = _allLanguages_json__WEBPACK_IMPORTED_MODULE_4__[language];
  const linkText = !!languageObject ? `${languageObject.name.split(',')[0].split(';')[0]} (${language})` : language;
  return __jsx(next_link__WEBPACK_IMPORTED_MODULE_2___default.a, {
    href: "/translations/[lang]",
    as: `/translations/${language}`
  }, __jsx("a", {
    className: router.asPath === `/translations/${language}` ? 'active' : ''
  }, linkText));
};

/* harmony default export */ __webpack_exports__["a"] = (Object(next_router__WEBPACK_IMPORTED_MODULE_5__["withRouter"])(Layout));

/***/ }),

/***/ "bzos":
/***/ (function(module, exports) {

module.exports = require("url");

/***/ }),

/***/ "cDcd":
/***/ (function(module, exports) {

module.exports = require("react");

/***/ }),

/***/ "eP9L":
/***/ (function(module) {

module.exports = JSON.parse("{\"ab\":{\"name\":\"Abkhaz\",\"nativeName\":\"аҧсуа\"},\"aa\":{\"name\":\"Afar\",\"nativeName\":\"Afaraf\"},\"af\":{\"name\":\"Afrikaans\",\"nativeName\":\"Afrikaans\"},\"ak\":{\"name\":\"Akan\",\"nativeName\":\"Akan\"},\"sq\":{\"name\":\"Albanian\",\"nativeName\":\"Shqip\"},\"am\":{\"name\":\"Amharic\",\"nativeName\":\"አማርኛ\"},\"ar\":{\"name\":\"Arabic\",\"nativeName\":\"العربية\"},\"an\":{\"name\":\"Aragonese\",\"nativeName\":\"Aragonés\"},\"hy\":{\"name\":\"Armenian\",\"nativeName\":\"Հայերեն\"},\"as\":{\"name\":\"Assamese\",\"nativeName\":\"অসমীয়া\"},\"av\":{\"name\":\"Avaric\",\"nativeName\":\"авар мацӀ, магӀарул мацӀ\"},\"ae\":{\"name\":\"Avestan\",\"nativeName\":\"avesta\"},\"ay\":{\"name\":\"Aymara\",\"nativeName\":\"aymar aru\"},\"az\":{\"name\":\"Azerbaijani\",\"nativeName\":\"azərbaycan dili\"},\"bm\":{\"name\":\"Bambara\",\"nativeName\":\"bamanankan\"},\"ba\":{\"name\":\"Bashkir\",\"nativeName\":\"башҡорт теле\"},\"eu\":{\"name\":\"Basque\",\"nativeName\":\"euskara, euskera\"},\"be\":{\"name\":\"Belarusian\",\"nativeName\":\"Беларуская\"},\"bn\":{\"name\":\"Bengali\",\"nativeName\":\"বাংলা\"},\"bh\":{\"name\":\"Bihari\",\"nativeName\":\"भोजपुरी\"},\"bi\":{\"name\":\"Bislama\",\"nativeName\":\"Bislama\"},\"bs\":{\"name\":\"Bosnian\",\"nativeName\":\"bosanski jezik\"},\"br\":{\"name\":\"Breton\",\"nativeName\":\"brezhoneg\"},\"bg\":{\"name\":\"Bulgarian\",\"nativeName\":\"български език\"},\"my\":{\"name\":\"Burmese\",\"nativeName\":\"ဗမာစာ\"},\"ca\":{\"name\":\"Catalan; Valencian\",\"nativeName\":\"Català\"},\"ch\":{\"name\":\"Chamorro\",\"nativeName\":\"Chamoru\"},\"ce\":{\"name\":\"Chechen\",\"nativeName\":\"нохчийн мотт\"},\"ny\":{\"name\":\"Chichewa; Chewa; Nyanja\",\"nativeName\":\"chiCheŵa, chinyanja\"},\"zh\":{\"name\":\"Chinese\",\"nativeName\":\"中文 (Zhōngwén), 汉语, 漢語\"},\"cv\":{\"name\":\"Chuvash\",\"nativeName\":\"чӑваш чӗлхи\"},\"kw\":{\"name\":\"Cornish\",\"nativeName\":\"Kernewek\"},\"co\":{\"name\":\"Corsican\",\"nativeName\":\"corsu, lingua corsa\"},\"cr\":{\"name\":\"Cree\",\"nativeName\":\"ᓀᐦᐃᔭᐍᐏᐣ\"},\"hr\":{\"name\":\"Croatian\",\"nativeName\":\"hrvatski\"},\"cs\":{\"name\":\"Czech\",\"nativeName\":\"česky, čeština\"},\"da\":{\"name\":\"Danish\",\"nativeName\":\"dansk\"},\"dv\":{\"name\":\"Divehi; Dhivehi; Maldivian;\",\"nativeName\":\"ދިވެހި\"},\"nl\":{\"name\":\"Dutch\",\"nativeName\":\"Nederlands, Vlaams\"},\"en\":{\"name\":\"English\",\"nativeName\":\"English\"},\"eo\":{\"name\":\"Esperanto\",\"nativeName\":\"Esperanto\"},\"et\":{\"name\":\"Estonian\",\"nativeName\":\"eesti, eesti keel\"},\"ee\":{\"name\":\"Ewe\",\"nativeName\":\"Eʋegbe\"},\"fo\":{\"name\":\"Faroese\",\"nativeName\":\"føroyskt\"},\"fj\":{\"name\":\"Fijian\",\"nativeName\":\"vosa Vakaviti\"},\"fi\":{\"name\":\"Finnish\",\"nativeName\":\"suomi, suomen kieli\"},\"fr\":{\"name\":\"French\",\"nativeName\":\"français, langue française\"},\"ff\":{\"name\":\"Fula; Fulah; Pulaar; Pular\",\"nativeName\":\"Fulfulde, Pulaar, Pular\"},\"gl\":{\"name\":\"Galician\",\"nativeName\":\"Galego\"},\"ka\":{\"name\":\"Georgian\",\"nativeName\":\"ქართული\"},\"de\":{\"name\":\"German\",\"nativeName\":\"Deutsch\"},\"el\":{\"name\":\"Greek, Modern\",\"nativeName\":\"Ελληνικά\"},\"gn\":{\"name\":\"Guaraní\",\"nativeName\":\"Avañeẽ\"},\"gu\":{\"name\":\"Gujarati\",\"nativeName\":\"ગુજરાતી\"},\"ht\":{\"name\":\"Haitian; Haitian Creole\",\"nativeName\":\"Kreyòl ayisyen\"},\"ha\":{\"name\":\"Hausa\",\"nativeName\":\"Hausa, هَوُسَ\"},\"he\":{\"name\":\"Hebrew (modern)\",\"nativeName\":\"עברית\"},\"hz\":{\"name\":\"Herero\",\"nativeName\":\"Otjiherero\"},\"hi\":{\"name\":\"Hindi\",\"nativeName\":\"हिन्दी, हिंदी\"},\"ho\":{\"name\":\"Hiri Motu\",\"nativeName\":\"Hiri Motu\"},\"hu\":{\"name\":\"Hungarian\",\"nativeName\":\"Magyar\"},\"ia\":{\"name\":\"Interlingua\",\"nativeName\":\"Interlingua\"},\"id\":{\"name\":\"Indonesian\",\"nativeName\":\"Bahasa Indonesia\"},\"ie\":{\"name\":\"Interlingue\",\"nativeName\":\"Originally called Occidental; then Interlingue after WWII\"},\"ga\":{\"name\":\"Irish\",\"nativeName\":\"Gaeilge\"},\"ig\":{\"name\":\"Igbo\",\"nativeName\":\"Asụsụ Igbo\"},\"ik\":{\"name\":\"Inupiaq\",\"nativeName\":\"Iñupiaq, Iñupiatun\"},\"io\":{\"name\":\"Ido\",\"nativeName\":\"Ido\"},\"is\":{\"name\":\"Icelandic\",\"nativeName\":\"Íslenska\"},\"it\":{\"name\":\"Italian\",\"nativeName\":\"Italiano\"},\"iu\":{\"name\":\"Inuktitut\",\"nativeName\":\"ᐃᓄᒃᑎᑐᑦ\"},\"ja\":{\"name\":\"Japanese\",\"nativeName\":\"日本語 (にほんご／にっぽんご)\"},\"jv\":{\"name\":\"Javanese\",\"nativeName\":\"basa Jawa\"},\"kl\":{\"name\":\"Kalaallisut, Greenlandic\",\"nativeName\":\"kalaallisut, kalaallit oqaasii\"},\"kn\":{\"name\":\"Kannada\",\"nativeName\":\"ಕನ್ನಡ\"},\"kr\":{\"name\":\"Kanuri\",\"nativeName\":\"Kanuri\"},\"ks\":{\"name\":\"Kashmiri\",\"nativeName\":\"कश्मीरी, كشميري‎\"},\"kk\":{\"name\":\"Kazakh\",\"nativeName\":\"Қазақ тілі\"},\"km\":{\"name\":\"Khmer\",\"nativeName\":\"ភាសាខ្មែរ\"},\"ki\":{\"name\":\"Kikuyu, Gikuyu\",\"nativeName\":\"Gĩkũyũ\"},\"rw\":{\"name\":\"Kinyarwanda\",\"nativeName\":\"Ikinyarwanda\"},\"ky\":{\"name\":\"Kirghiz, Kyrgyz\",\"nativeName\":\"кыргыз тили\"},\"kv\":{\"name\":\"Komi\",\"nativeName\":\"коми кыв\"},\"kg\":{\"name\":\"Kongo\",\"nativeName\":\"KiKongo\"},\"ko\":{\"name\":\"Korean\",\"nativeName\":\"한국어 (韓國語), 조선말 (朝鮮語)\"},\"ku\":{\"name\":\"Kurdish\",\"nativeName\":\"Kurdî, كوردی‎\"},\"kj\":{\"name\":\"Kwanyama, Kuanyama\",\"nativeName\":\"Kuanyama\"},\"la\":{\"name\":\"Latin\",\"nativeName\":\"latine, lingua latina\"},\"lb\":{\"name\":\"Luxembourgish, Letzeburgesch\",\"nativeName\":\"Lëtzebuergesch\"},\"lg\":{\"name\":\"Luganda\",\"nativeName\":\"Luganda\"},\"li\":{\"name\":\"Limburgish, Limburgan, Limburger\",\"nativeName\":\"Limburgs\"},\"ln\":{\"name\":\"Lingala\",\"nativeName\":\"Lingála\"},\"lo\":{\"name\":\"Lao\",\"nativeName\":\"ພາສາລາວ\"},\"lt\":{\"name\":\"Lithuanian\",\"nativeName\":\"lietuvių kalba\"},\"lu\":{\"name\":\"Luba-Katanga\",\"nativeName\":\"\"},\"lv\":{\"name\":\"Latvian\",\"nativeName\":\"latviešu valoda\"},\"gv\":{\"name\":\"Manx\",\"nativeName\":\"Gaelg, Gailck\"},\"mk\":{\"name\":\"Macedonian\",\"nativeName\":\"македонски јазик\"},\"mg\":{\"name\":\"Malagasy\",\"nativeName\":\"Malagasy fiteny\"},\"ms\":{\"name\":\"Malay\",\"nativeName\":\"bahasa Melayu, بهاس ملايو‎\"},\"ml\":{\"name\":\"Malayalam\",\"nativeName\":\"മലയാളം\"},\"mt\":{\"name\":\"Maltese\",\"nativeName\":\"Malti\"},\"mi\":{\"name\":\"Māori\",\"nativeName\":\"te reo Māori\"},\"mr\":{\"name\":\"Marathi (Marāṭhī)\",\"nativeName\":\"मराठी\"},\"mh\":{\"name\":\"Marshallese\",\"nativeName\":\"Kajin M̧ajeļ\"},\"mn\":{\"name\":\"Mongolian\",\"nativeName\":\"монгол\"},\"na\":{\"name\":\"Nauru\",\"nativeName\":\"Ekakairũ Naoero\"},\"nv\":{\"name\":\"Navajo, Navaho\",\"nativeName\":\"Diné bizaad, Dinékʼehǰí\"},\"nb\":{\"name\":\"Norwegian Bokmål\",\"nativeName\":\"Norsk bokmål\"},\"nd\":{\"name\":\"North Ndebele\",\"nativeName\":\"isiNdebele\"},\"ne\":{\"name\":\"Nepali\",\"nativeName\":\"नेपाली\"},\"ng\":{\"name\":\"Ndonga\",\"nativeName\":\"Owambo\"},\"nn\":{\"name\":\"Norwegian Nynorsk\",\"nativeName\":\"Norsk nynorsk\"},\"no\":{\"name\":\"Norwegian\",\"nativeName\":\"Norsk\"},\"ii\":{\"name\":\"Nuosu\",\"nativeName\":\"ꆈꌠ꒿ Nuosuhxop\"},\"nr\":{\"name\":\"South Ndebele\",\"nativeName\":\"isiNdebele\"},\"oc\":{\"name\":\"Occitan\",\"nativeName\":\"Occitan\"},\"oj\":{\"name\":\"Ojibwe, Ojibwa\",\"nativeName\":\"ᐊᓂᔑᓈᐯᒧᐎᓐ\"},\"cu\":{\"name\":\"Old Church Slavonic, Church Slavic, Church Slavonic, Old Bulgarian, Old Slavonic\",\"nativeName\":\"ѩзыкъ словѣньскъ\"},\"om\":{\"name\":\"Oromo\",\"nativeName\":\"Afaan Oromoo\"},\"or\":{\"name\":\"Oriya\",\"nativeName\":\"ଓଡ଼ିଆ\"},\"os\":{\"name\":\"Ossetian, Ossetic\",\"nativeName\":\"ирон æвзаг\"},\"pa\":{\"name\":\"Panjabi, Punjabi\",\"nativeName\":\"ਪੰਜਾਬੀ, پنجابی‎\"},\"pi\":{\"name\":\"Pāli\",\"nativeName\":\"पाऴि\"},\"fa\":{\"name\":\"Persian\",\"nativeName\":\"فارسی\"},\"pl\":{\"name\":\"Polish\",\"nativeName\":\"polski\"},\"ps\":{\"name\":\"Pashto, Pushto\",\"nativeName\":\"پښتو\"},\"pt\":{\"name\":\"Portuguese\",\"nativeName\":\"Português\"},\"qu\":{\"name\":\"Quechua\",\"nativeName\":\"Runa Simi, Kichwa\"},\"rm\":{\"name\":\"Romansh\",\"nativeName\":\"rumantsch grischun\"},\"rn\":{\"name\":\"Kirundi\",\"nativeName\":\"kiRundi\"},\"ro\":{\"name\":\"Romanian, Moldavian, Moldovan\",\"nativeName\":\"română\"},\"ru\":{\"name\":\"Russian\",\"nativeName\":\"русский язык\"},\"sa\":{\"name\":\"Sanskrit (Saṁskṛta)\",\"nativeName\":\"संस्कृतम्\"},\"sc\":{\"name\":\"Sardinian\",\"nativeName\":\"sardu\"},\"sd\":{\"name\":\"Sindhi\",\"nativeName\":\"सिन्धी, سنڌي، سندھی‎\"},\"se\":{\"name\":\"Northern Sami\",\"nativeName\":\"Davvisámegiella\"},\"sm\":{\"name\":\"Samoan\",\"nativeName\":\"gagana faa Samoa\"},\"sg\":{\"name\":\"Sango\",\"nativeName\":\"yângâ tî sängö\"},\"sr\":{\"name\":\"Serbian\",\"nativeName\":\"српски језик\"},\"gd\":{\"name\":\"Scottish Gaelic; Gaelic\",\"nativeName\":\"Gàidhlig\"},\"sn\":{\"name\":\"Shona\",\"nativeName\":\"chiShona\"},\"si\":{\"name\":\"Sinhala, Sinhalese\",\"nativeName\":\"සිංහල\"},\"sk\":{\"name\":\"Slovak\",\"nativeName\":\"slovenčina\"},\"sl\":{\"name\":\"Slovene\",\"nativeName\":\"slovenščina\"},\"so\":{\"name\":\"Somali\",\"nativeName\":\"Soomaaliga, af Soomaali\"},\"st\":{\"name\":\"Southern Sotho\",\"nativeName\":\"Sesotho\"},\"es\":{\"name\":\"Spanish; Castilian\",\"nativeName\":\"español, castellano\"},\"su\":{\"name\":\"Sundanese\",\"nativeName\":\"Basa Sunda\"},\"sw\":{\"name\":\"Swahili\",\"nativeName\":\"Kiswahili\"},\"ss\":{\"name\":\"Swati\",\"nativeName\":\"SiSwati\"},\"sv\":{\"name\":\"Swedish\",\"nativeName\":\"svenska\"},\"ta\":{\"name\":\"Tamil\",\"nativeName\":\"தமிழ்\"},\"te\":{\"name\":\"Telugu\",\"nativeName\":\"తెలుగు\"},\"tg\":{\"name\":\"Tajik\",\"nativeName\":\"тоҷикӣ, toğikī, تاجیکی‎\"},\"th\":{\"name\":\"Thai\",\"nativeName\":\"ไทย\"},\"ti\":{\"name\":\"Tigrinya\",\"nativeName\":\"ትግርኛ\"},\"bo\":{\"name\":\"Tibetan Standard, Tibetan, Central\",\"nativeName\":\"བོད་ཡིག\"},\"tk\":{\"name\":\"Turkmen\",\"nativeName\":\"Türkmen, Түркмен\"},\"tl\":{\"name\":\"Tagalog\",\"nativeName\":\"Wikang Tagalog, ᜏᜒᜃᜅ᜔ ᜆᜄᜎᜓᜄ᜔\"},\"tn\":{\"name\":\"Tswana\",\"nativeName\":\"Setswana\"},\"to\":{\"name\":\"Tonga (Tonga Islands)\",\"nativeName\":\"faka Tonga\"},\"tr\":{\"name\":\"Turkish\",\"nativeName\":\"Türkçe\"},\"ts\":{\"name\":\"Tsonga\",\"nativeName\":\"Xitsonga\"},\"tt\":{\"name\":\"Tatar\",\"nativeName\":\"татарча, tatarça, تاتارچا‎\"},\"tw\":{\"name\":\"Twi\",\"nativeName\":\"Twi\"},\"ty\":{\"name\":\"Tahitian\",\"nativeName\":\"Reo Tahiti\"},\"ug\":{\"name\":\"Uighur, Uyghur\",\"nativeName\":\"Uyƣurqə, ئۇيغۇرچە‎\"},\"uk\":{\"name\":\"Ukrainian\",\"nativeName\":\"українська\"},\"ur\":{\"name\":\"Urdu\",\"nativeName\":\"اردو\"},\"uz\":{\"name\":\"Uzbek\",\"nativeName\":\"zbek, Ўзбек, أۇزبېك‎\"},\"ve\":{\"name\":\"Venda\",\"nativeName\":\"Tshivenḓa\"},\"vi\":{\"name\":\"Vietnamese\",\"nativeName\":\"Tiếng Việt\"},\"vo\":{\"name\":\"Volapük\",\"nativeName\":\"Volapük\"},\"wa\":{\"name\":\"Walloon\",\"nativeName\":\"Walon\"},\"cy\":{\"name\":\"Welsh\",\"nativeName\":\"Cymraeg\"},\"wo\":{\"name\":\"Wolof\",\"nativeName\":\"Wollof\"},\"fy\":{\"name\":\"Western Frisian\",\"nativeName\":\"Frysk\"},\"xh\":{\"name\":\"Xhosa\",\"nativeName\":\"isiXhosa\"},\"yi\":{\"name\":\"Yiddish\",\"nativeName\":\"ייִדיש\"},\"yo\":{\"name\":\"Yoruba\",\"nativeName\":\"Yorùbá\"},\"za\":{\"name\":\"Zhuang, Chuang\",\"nativeName\":\"Saɯ cueŋƅ, Saw cuengh\"}}");

/***/ }),

/***/ "fvxO":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.execOnce = execOnce;
exports.getLocationOrigin = getLocationOrigin;
exports.getURL = getURL;
exports.getDisplayName = getDisplayName;
exports.isResSent = isResSent;
exports.loadGetInitialProps = loadGetInitialProps;
exports.formatWithValidation = formatWithValidation;
exports.ST = exports.SP = exports.urlObjectKeys = void 0;

var _url = __webpack_require__("bzos");
/**
* Utils
*/


function execOnce(fn) {
  let used = false;
  let result;
  return (...args) => {
    if (!used) {
      used = true;
      result = fn(...args);
    }

    return result;
  };
}

function getLocationOrigin() {
  const {
    protocol,
    hostname,
    port
  } = window.location;
  return `${protocol}//${hostname}${port ? ':' + port : ''}`;
}

function getURL() {
  const {
    href
  } = window.location;
  const origin = getLocationOrigin();
  return href.substring(origin.length);
}

function getDisplayName(Component) {
  return typeof Component === 'string' ? Component : Component.displayName || Component.name || 'Unknown';
}

function isResSent(res) {
  return res.finished || res.headersSent;
}

async function loadGetInitialProps(App, ctx) {
  if (false) { var _App$prototype; } // when called from _app `ctx` is nested in `ctx`


  const res = ctx.res || ctx.ctx && ctx.ctx.res;

  if (!App.getInitialProps) {
    if (ctx.ctx && ctx.Component) {
      // @ts-ignore pageProps default
      return {
        pageProps: await loadGetInitialProps(ctx.Component, ctx.ctx)
      };
    }

    return {};
  }

  const props = await App.getInitialProps(ctx);

  if (res && isResSent(res)) {
    return props;
  }

  if (!props) {
    const message = `"${getDisplayName(App)}.getInitialProps()" should resolve to an object. But found "${props}" instead.`;
    throw new Error(message);
  }

  if (false) {}

  return props;
}

const urlObjectKeys = ['auth', 'hash', 'host', 'hostname', 'href', 'path', 'pathname', 'port', 'protocol', 'query', 'search', 'slashes'];
exports.urlObjectKeys = urlObjectKeys;

function formatWithValidation(url, options) {
  if (false) {}

  return (0, _url.format)(url, options);
}

const SP = typeof performance !== 'undefined';
exports.SP = SP;
const ST = SP && typeof performance.mark === 'function' && typeof performance.measure === 'function';
exports.ST = ST;

/***/ }),

/***/ "jvFD":
/***/ (function(module, exports, __webpack_require__) {

module.exports = __webpack_require__("KeDb")


/***/ }),

/***/ "kYf9":
/***/ (function(module, exports) {

module.exports = require("next/dist/next-server/lib/utils.js");

/***/ }),

/***/ "uChv":
/***/ (function(module, exports, __webpack_require__) {

"use strict";


exports.__esModule = true;
exports.getRouteRegex = getRouteRegex; // this isn't importing the escape-string-regex module
// to reduce bytes

function escapeRegex(str) {
  return str.replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&');
}

function getRouteRegex(normalizedRoute) {
  // Escape all characters that could be considered RegEx
  const escapedRoute = escapeRegex(normalizedRoute.replace(/\/$/, '') || '/');
  const groups = {};
  let groupIndex = 1;
  const parameterizedRoute = escapedRoute.replace(/\/\\\[([^/]+?)\\\](?=\/|$)/g, (_, $1) => {
    const isOptional = /^\\\[.*\\\]$/.test($1);

    if (isOptional) {
      $1 = $1.slice(2, -2);
    }

    const isCatchAll = /^(\\\.){3}/.test($1);

    if (isCatchAll) {
      $1 = $1.slice(6);
    }

    groups[$1 // Un-escape key
    .replace(/\\([|\\{}()[\]^$+*?.-])/g, '$1') // eslint-disable-next-line no-sequences
    ] = {
      pos: groupIndex++,
      repeat: isCatchAll
    };
    return isCatchAll ? isOptional ? '(?:/(.+?))?' : '/(.+?)' : '/([^/]+?)';
  });
  let namedParameterizedRoute; // dead code eliminate for browser since it's only needed
  // while generating routes-manifest

  if (true) {
    namedParameterizedRoute = escapedRoute.replace(/\/\\\[([^/]+?)\\\](?=\/|$)/g, (_, $1) => {
      const isCatchAll = /^(\\\.){3}/.test($1);
      const key = $1 // Un-escape key
      .replace(/\\([|\\{}()[\]^$+*?.-])/g, '$1').replace(/^\.{3}/, '');
      return isCatchAll ? `/(?<${escapeRegex(key)}>.+?)` : `/(?<${escapeRegex(key)}>[^/]+?)`;
    });
  }

  return {
    re: new RegExp('^' + parameterizedRoute + '(?:/)?$', 'i'),
    groups,
    namedRegex: namedParameterizedRoute ? `^${namedParameterizedRoute}(?:/)?$` : undefined
  };
}

/***/ }),

/***/ "w8Mv":
/***/ (function(module, exports) {

module.exports = require("xstate");

/***/ }),

/***/ "xnum":
/***/ (function(module, exports) {

module.exports = require("next/head");

/***/ }),

/***/ "yWCo":
/***/ (function(module, exports, __webpack_require__) {

var _typeof = __webpack_require__("T0aG");

function _getRequireWildcardCache() {
  if (typeof WeakMap !== "function") return null;
  var cache = new WeakMap();

  _getRequireWildcardCache = function _getRequireWildcardCache() {
    return cache;
  };

  return cache;
}

function _interopRequireWildcard(obj) {
  if (obj && obj.__esModule) {
    return obj;
  }

  if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") {
    return {
      "default": obj
    };
  }

  var cache = _getRequireWildcardCache();

  if (cache && cache.has(obj)) {
    return cache.get(obj);
  }

  var newObj = {};
  var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;

  for (var key in obj) {
    if (Object.prototype.hasOwnProperty.call(obj, key)) {
      var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;

      if (desc && (desc.get || desc.set)) {
        Object.defineProperty(newObj, key, desc);
      } else {
        newObj[key] = obj[key];
      }
    }
  }

  newObj["default"] = obj;

  if (cache) {
    cache.set(obj, newObj);
  }

  return newObj;
}

module.exports = _interopRequireWildcard;

/***/ })

/******/ });