UNPKG

orkan

Version:

__[Orkan](https://www.orkanjs.com) is a content management toolkit for building and managing dynamic React applications with ease.__

1,386 lines (1,141 loc) 114 kB
(function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define("orkan", [], factory); else if(typeof exports === 'object') exports["orkan"] = factory(); else root["orkan"] = factory(); })(typeof self !== 'undefined' ? self : this, function() { return /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) { /******/ return installedModules[moduleId].exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); /******/ } /******/ }; /******/ /******/ // define __esModule on exports /******/ __webpack_require__.r = function(exports) { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ /******/ // create a fake namespace object /******/ // mode & 1: value is a module id, require it /******/ // mode & 2: merge all properties of value into the ns /******/ // mode & 4: return value when already ns object /******/ // mode & 8|1: behave like require /******/ __webpack_require__.t = function(value, mode) { /******/ if(mode & 1) value = __webpack_require__(value); /******/ if(mode & 8) return value; /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; /******/ var ns = Object.create(null); /******/ __webpack_require__.r(ns); /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); /******/ return ns; /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/"; /******/ /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 40); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { module.exports = require("prop-types"); /***/ }), /* 1 */ /***/ (function(module, exports) { module.exports = require("mobx"); /***/ }), /* 2 */ /***/ (function(module, exports) { module.exports = require("react"); /***/ }), /* 3 */ /***/ (function(module, exports) { module.exports = require("autobind-decorator"); /***/ }), /* 4 */ /***/ (function(module, exports) { module.exports = require("mobx-react"); /***/ }), /* 5 */ /***/ (function(module, exports) { module.exports = require("firebase/app"); /***/ }), /* 6 */ /***/ (function(module, exports) { module.exports = require("isomorphic-style-loader/lib/withStyles"); /***/ }), /* 7 */ /***/ (function(module, exports) { module.exports = require("classnames"); /***/ }), /* 8 */ /***/ (function(module, exports) { module.exports = require("invariant"); /***/ }), /* 9 */ /***/ (function(module, exports) { /* MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ // css base code, injected by the css-loader module.exports = function(useSourceMap) { var list = []; // return the list of modules as css string list.toString = function toString() { return this.map(function (item) { var content = cssWithMappingToString(item, useSourceMap); if(item[2]) { return "@media " + item[2] + "{" + content + "}"; } else { return content; } }).join(""); }; // import a list of modules into the list list.i = function(modules, mediaQuery) { if(typeof modules === "string") modules = [[null, modules, ""]]; var alreadyImportedModules = {}; for(var i = 0; i < this.length; i++) { var id = this[i][0]; if(typeof id === "number") alreadyImportedModules[id] = true; } for(i = 0; i < modules.length; i++) { var item = modules[i]; // skip already imported module // this implementation is not 100% perfect for weird media query combinations // when a module is imported multiple times with different media queries. // I hope this will never occur (Hey this way we have smaller bundles) if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { if(mediaQuery && !item[2]) { item[2] = mediaQuery; } else if(mediaQuery) { item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; } list.push(item); } } }; return list; }; function cssWithMappingToString(item, useSourceMap) { var content = item[1] || ''; var cssMapping = item[3]; if (!cssMapping) { return content; } if (useSourceMap && typeof btoa === 'function') { var sourceMapping = toComment(cssMapping); var sourceURLs = cssMapping.sources.map(function (source) { return '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */' }); return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); } return [content].join('\n'); } // Adapted from convert-source-map (MIT) function toComment(sourceMap) { // eslint-disable-next-line no-undef var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); var data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64; return '/*# ' + data + ' */'; } /***/ }), /* 10 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; var _stringify = __webpack_require__(34); var _stringify2 = _interopRequireDefault(_stringify); var _slicedToArray2 = __webpack_require__(35); var _slicedToArray3 = _interopRequireDefault(_slicedToArray2); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /** * Isomorphic CSS style loader for Webpack * * Copyright © 2015-present Kriasoft, LLC. All rights reserved. * * This source code is licensed under the MIT license found in the * LICENSE.txt file in the root directory of this source tree. */ var prefix = 's'; var inserted = {}; // Base64 encoding and decoding - The "Unicode Problem" // https://developer.mozilla.org/en-US/docs/Web/API/WindowBase64/Base64_encoding_and_decoding#The_Unicode_Problem function b64EncodeUnicode(str) { return btoa(encodeURIComponent(str).replace(/%([0-9A-F]{2})/g, function (match, p1) { return String.fromCharCode('0x' + p1); })); } /** * Remove style/link elements for specified node IDs * if they are no longer referenced by UI components. */ function removeCss(ids) { ids.forEach(function (id) { if (--inserted[id] <= 0) { var elem = document.getElementById(prefix + id); if (elem) { elem.parentNode.removeChild(elem); } } }); } /** * Example: * // Insert CSS styles object generated by `css-loader` into DOM * var removeCss = insertCss([[1, 'body { color: red; }']]); * * // Remove it from the DOM * removeCss(); */ function insertCss(styles) { var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}, _ref$replace = _ref.replace, replace = _ref$replace === undefined ? false : _ref$replace, _ref$prepend = _ref.prepend, prepend = _ref$prepend === undefined ? false : _ref$prepend; var ids = []; for (var i = 0; i < styles.length; i++) { var _styles$i = (0, _slicedToArray3.default)(styles[i], 4), moduleId = _styles$i[0], css = _styles$i[1], media = _styles$i[2], sourceMap = _styles$i[3]; var id = moduleId + '-' + i; ids.push(id); if (inserted[id]) { if (!replace) { inserted[id]++; continue; } } inserted[id] = 1; var elem = document.getElementById(prefix + id); var create = false; if (!elem) { create = true; elem = document.createElement('style'); elem.setAttribute('type', 'text/css'); elem.id = prefix + id; if (media) { elem.setAttribute('media', media); } } var cssText = css; if (sourceMap && typeof btoa === 'function') { // skip IE9 and below, see http://caniuse.com/atob-btoa cssText += '\n/*# sourceMappingURL=data:application/json;base64,' + b64EncodeUnicode((0, _stringify2.default)(sourceMap)) + '*/'; cssText += '\n/*# sourceURL=' + sourceMap.file + '?' + id + '*/'; } if ('textContent' in elem) { elem.textContent = cssText; } else { elem.styleSheet.cssText = cssText; } if (create) { if (prepend) { document.head.insertBefore(elem, document.head.childNodes[0]); } else { document.head.appendChild(elem); } } } return removeCss.bind(null, ids); } module.exports = insertCss; /***/ }), /* 11 */ /***/ (function(module, exports) { module.exports = require("lodash/mapValues"); /***/ }), /* 12 */ /***/ (function(module, exports) { module.exports = require("lodash/omitBy"); /***/ }), /* 13 */ /***/ (function(module, exports) { module.exports = require("lodash/forEach"); /***/ }), /* 14 */ /***/ (function(module, exports) { module.exports = require("react-dom"); /***/ }), /* 15 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(process) {// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. // resolves . and .. elements in a path array with directory names there // must be no slashes, empty elements, or device names (c:\) in the array // (so also no leading and trailing slashes - it does not distinguish // relative and absolute paths) function normalizeArray(parts, allowAboveRoot) { // if the path tries to go above the root, `up` ends up > 0 var up = 0; for (var i = parts.length - 1; i >= 0; i--) { var last = parts[i]; if (last === '.') { parts.splice(i, 1); } else if (last === '..') { parts.splice(i, 1); up++; } else if (up) { parts.splice(i, 1); up--; } } // if the path is allowed to go above the root, restore leading ..s if (allowAboveRoot) { for (; up--; up) { parts.unshift('..'); } } return parts; } // Split a filename into [root, dir, basename, ext], unix version // 'root' is just a slash, or nothing. var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/; var splitPath = function(filename) { return splitPathRe.exec(filename).slice(1); }; // path.resolve([from ...], to) // posix version exports.resolve = function() { var resolvedPath = '', resolvedAbsolute = false; for (var i = arguments.length - 1; i >= -1 && !resolvedAbsolute; i--) { var path = (i >= 0) ? arguments[i] : process.cwd(); // Skip empty and invalid entries if (typeof path !== 'string') { throw new TypeError('Arguments to path.resolve must be strings'); } else if (!path) { continue; } resolvedPath = path + '/' + resolvedPath; resolvedAbsolute = path.charAt(0) === '/'; } // At this point the path should be resolved to a full absolute path, but // handle relative paths to be safe (might happen when process.cwd() fails) // Normalize the path resolvedPath = normalizeArray(filter(resolvedPath.split('/'), function(p) { return !!p; }), !resolvedAbsolute).join('/'); return ((resolvedAbsolute ? '/' : '') + resolvedPath) || '.'; }; // path.normalize(path) // posix version exports.normalize = function(path) { var isAbsolute = exports.isAbsolute(path), trailingSlash = substr(path, -1) === '/'; // Normalize the path path = normalizeArray(filter(path.split('/'), function(p) { return !!p; }), !isAbsolute).join('/'); if (!path && !isAbsolute) { path = '.'; } if (path && trailingSlash) { path += '/'; } return (isAbsolute ? '/' : '') + path; }; // posix version exports.isAbsolute = function(path) { return path.charAt(0) === '/'; }; // posix version exports.join = function() { var paths = Array.prototype.slice.call(arguments, 0); return exports.normalize(filter(paths, function(p, index) { if (typeof p !== 'string') { throw new TypeError('Arguments to path.join must be strings'); } return p; }).join('/')); }; // path.relative(from, to) // posix version exports.relative = function(from, to) { from = exports.resolve(from).substr(1); to = exports.resolve(to).substr(1); function trim(arr) { var start = 0; for (; start < arr.length; start++) { if (arr[start] !== '') break; } var end = arr.length - 1; for (; end >= 0; end--) { if (arr[end] !== '') break; } if (start > end) return []; return arr.slice(start, end - start + 1); } var fromParts = trim(from.split('/')); var toParts = trim(to.split('/')); var length = Math.min(fromParts.length, toParts.length); var samePartsLength = length; for (var i = 0; i < length; i++) { if (fromParts[i] !== toParts[i]) { samePartsLength = i; break; } } var outputParts = []; for (var i = samePartsLength; i < fromParts.length; i++) { outputParts.push('..'); } outputParts = outputParts.concat(toParts.slice(samePartsLength)); return outputParts.join('/'); }; exports.sep = '/'; exports.delimiter = ':'; exports.dirname = function(path) { var result = splitPath(path), root = result[0], dir = result[1]; if (!root && !dir) { // No dirname whatsoever return '.'; } if (dir) { // It has a dirname, strip trailing slash dir = dir.substr(0, dir.length - 1); } return root + dir; }; exports.basename = function(path, ext) { var f = splitPath(path)[2]; // TODO: make this comparison case-insensitive on windows? if (ext && f.substr(-1 * ext.length) === ext) { f = f.substr(0, f.length - ext.length); } return f; }; exports.extname = function(path) { return splitPath(path)[3]; }; function filter (xs, f) { if (xs.filter) return xs.filter(f); var res = []; for (var i = 0; i < xs.length; i++) { if (f(xs[i], i, xs)) res.push(xs[i]); } return res; } // String.prototype.substr - negative index don't work in IE8 var substr = 'ab'.substr(-1) === 'b' ? function (str, start, len) { return str.substr(start, len) } : function (str, start, len) { if (start < 0) start = str.length + start; return str.substr(start, len); } ; /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(29))) /***/ }), /* 16 */ /***/ (function(module, exports) { module.exports = require("is-hotkey"); /***/ }), /* 17 */ /***/ (function(module, exports, __webpack_require__) { var content = __webpack_require__(33); var insertCss = __webpack_require__(10); if (typeof content === 'string') { content = [[module.i, content, '']]; } module.exports = content.locals || {}; module.exports._getContent = function() { return content; }; module.exports._getCss = function() { return content.toString(); }; module.exports._insertCss = function(options) { return insertCss(content, options) }; // Hot Module Replacement // https://webpack.github.io/docs/hot-module-replacement // Only activated in browser context if (false) { var removeCss; } /***/ }), /* 18 */ /***/ (function(module, exports, __webpack_require__) { var content = __webpack_require__(36); var insertCss = __webpack_require__(10); if (typeof content === 'string') { content = [[module.i, content, '']]; } module.exports = content.locals || {}; module.exports._getContent = function() { return content; }; module.exports._getCss = function() { return content.toString(); }; module.exports._insertCss = function(options) { return insertCss(content, options) }; // Hot Module Replacement // https://webpack.github.io/docs/hot-module-replacement // Only activated in browser context if (false) { var removeCss; } /***/ }), /* 19 */ /***/ (function(module, exports, __webpack_require__) { var content = __webpack_require__(37); var insertCss = __webpack_require__(10); if (typeof content === 'string') { content = [[module.i, content, '']]; } module.exports = content.locals || {}; module.exports._getContent = function() { return content; }; module.exports._getCss = function() { return content.toString(); }; module.exports._insertCss = function(options) { return insertCss(content, options) }; // Hot Module Replacement // https://webpack.github.io/docs/hot-module-replacement // Only activated in browser context if (false) { var removeCss; } /***/ }), /* 20 */ /***/ (function(module, exports, __webpack_require__) { var content = __webpack_require__(38); var insertCss = __webpack_require__(10); if (typeof content === 'string') { content = [[module.i, content, '']]; } module.exports = content.locals || {}; module.exports._getContent = function() { return content; }; module.exports._getCss = function() { return content.toString(); }; module.exports._insertCss = function(options) { return insertCss(content, options) }; // Hot Module Replacement // https://webpack.github.io/docs/hot-module-replacement // Only activated in browser context if (false) { var removeCss; } /***/ }), /* 21 */ /***/ (function(module, exports, __webpack_require__) { var content = __webpack_require__(39); var insertCss = __webpack_require__(10); if (typeof content === 'string') { content = [[module.i, content, '']]; } module.exports = content.locals || {}; module.exports._getContent = function() { return content; }; module.exports._getCss = function() { return content.toString(); }; module.exports._insertCss = function(options) { return insertCss(content, options) }; // Hot Module Replacement // https://webpack.github.io/docs/hot-module-replacement // Only activated in browser context if (false) { var removeCss; } /***/ }), /* 22 */ /***/ (function(module, exports) { module.exports = require("lodash/values"); /***/ }), /* 23 */ /***/ (function(module, exports) { module.exports = require("react-addons-shallow-compare"); /***/ }), /* 24 */ /***/ (function(module, exports) { module.exports = require("lodash/find"); /***/ }), /* 25 */ /***/ (function(module, exports) { module.exports = require("observable-nested-map"); /***/ }), /* 26 */ /***/ (function(module, exports) { module.exports = require("lodash/assignWith"); /***/ }), /* 27 */ /***/ (function(module, exports) { module.exports = require("lodash/mapKeys"); /***/ }), /* 28 */ /***/ (function(module, exports) { module.exports = require("lodash/map"); /***/ }), /* 29 */ /***/ (function(module, exports) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /* 30 */ /***/ (function(module, exports) { module.exports = require("firebase/firestore"); /***/ }), /* 31 */ /***/ (function(module, exports) { module.exports = require("firebase/auth"); /***/ }), /* 32 */ /***/ (function(module, exports) { module.exports = require("firebase/storage"); /***/ }), /* 33 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(false); // imports // module exports.push([module.i, ".s1wT2rux {\n z-index: 99999999999999;\n animation: s1wT1g5_;\n animation-timing-function: ease-in-out;\n animation-duration: .2s;\n width: 100%;\n height: 5px;\n position: fixed;\n top: 0;\n left: 0; }\n .s1wT2rux:after {\n animation-timing-function: linear !important;\n animation: s1wT1izN;\n animation-duration: 1s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n transform: translate3d(0, 0, 0);\n transition: transform 3s ease-in-out;\n content: '';\n position: absolute;\n left: -68px;\n top: 0;\n right: 0;\n bottom: 0;\n background: repeating-linear-gradient(45deg, #FA2949, #FA2949 20px, #fc7489 20px, #fc7489 40px); }\n .s1wT2rux.s1wT2LT0:after {\n animation-play-state: running; }\n .s1wT2rux.s1wT2jX0:after {\n animation-play-state: paused; }\n\n.s1wTEAl3:after {\n background: repeating-linear-gradient(45deg, #1a1e2b, #1a1e2b 20px, #565e7b 20px, #565e7b 40px); }\n\n@keyframes s1wT1izN {\n from {\n transform: translate3d(0, 0, 0); }\n to {\n transform: translate3d(58px, 0, 0); } }\n", ""]); // exports exports.locals = { "root": "s1wT2rux", "modalAnimation": "s1wT1g5_", "OrkanIndicatorBusyAnimation": "s1wT1izN", "busy": "s1wT2LT0", "notBusy": "s1wT2jX0", "dark": "s1wTEAl3" }; /***/ }), /* 34 */ /***/ (function(module, exports) { module.exports = require("babel-runtime/core-js/json/stringify"); /***/ }), /* 35 */ /***/ (function(module, exports) { module.exports = require("babel-runtime/helpers/slicedToArray"); /***/ }), /* 36 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(false); // imports // module exports.push([module.i, ".s1wT3Kq7 {\n display: inline-block;\n white-space: pre; }\n\n.s1wTxe4L:hover {\n position: relative; }\n .s1wTxe4L:hover:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: repeating-linear-gradient(45deg, rgba(250, 41, 73, 0.9), rgba(250, 41, 73, 0.9) 20px, rgba(250, 41, 73, 0.8) 20px, rgba(250, 41, 73, 0.8) 40px);\n font-weight: 400 !important;\n letter-spacing: normal;\n text-transform: none;\n cursor: pointer;\n color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100000000;\n border: 2px solid #FA2949; }\n\n.s1wTxe4L.s1wT2QNt:hover {\n position: relative; }\n .s1wTxe4L.s1wT2QNt:hover:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9) 20px, rgba(255, 255, 255, 0.8) 20px, rgba(255, 255, 255, 0.8) 40px);\n font-weight: 400 !important;\n letter-spacing: normal;\n text-transform: none;\n cursor: pointer;\n color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100000000;\n border: 2px solid white; }\n", ""]); // exports exports.locals = { "root": "s1wT3Kq7", "editMode": "s1wTxe4L", "lightOverlay": "s1wT2QNt" }; /***/ }), /* 37 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(false); // imports // module exports.push([module.i, ".s1wT3DcY:hover {\n position: relative; }\n .s1wT3DcY:hover:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: repeating-linear-gradient(45deg, rgba(250, 41, 73, 0.9), rgba(250, 41, 73, 0.9) 20px, rgba(250, 41, 73, 0.8) 20px, rgba(250, 41, 73, 0.8) 40px);\n font-weight: 400 !important;\n letter-spacing: normal;\n text-transform: none;\n cursor: pointer;\n color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100000000;\n border: 2px solid #FA2949; }\n\n.s1wT3DcY.s1wT1LKh:hover {\n position: relative; }\n .s1wT3DcY.s1wT1LKh:hover:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9) 20px, rgba(255, 255, 255, 0.8) 20px, rgba(255, 255, 255, 0.8) 40px);\n font-weight: 400 !important;\n letter-spacing: normal;\n text-transform: none;\n cursor: pointer;\n color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100000000;\n border: 2px solid white; }\n", ""]); // exports exports.locals = { "editMode": "s1wT3DcY", "lightOverlay": "s1wT1LKh" }; /***/ }), /* 38 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(false); // imports // module exports.push([module.i, ".s1wTCOCO:hover {\n position: relative; }\n .s1wTCOCO:hover:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: repeating-linear-gradient(45deg, rgba(250, 41, 73, 0.9), rgba(250, 41, 73, 0.9) 20px, rgba(250, 41, 73, 0.8) 20px, rgba(250, 41, 73, 0.8) 40px);\n font-weight: 400 !important;\n letter-spacing: normal;\n text-transform: none;\n cursor: pointer;\n color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100000000;\n border: 2px solid #FA2949; }\n\n.s1wTCOCO.s1wT1zg5:hover {\n position: relative; }\n .s1wTCOCO.s1wT1zg5:hover:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9) 20px, rgba(255, 255, 255, 0.8) 20px, rgba(255, 255, 255, 0.8) 40px);\n font-weight: 400 !important;\n letter-spacing: normal;\n text-transform: none;\n cursor: pointer;\n color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100000000;\n border: 2px solid white; }\n", ""]); // exports exports.locals = { "editMode": "s1wTCOCO", "lightOverlay": "s1wT1zg5" }; /***/ }), /* 39 */ /***/ (function(module, exports, __webpack_require__) { exports = module.exports = __webpack_require__(9)(false); // imports // module exports.push([module.i, ".s1wT3Xrg:hover {\n position: relative; }\n .s1wT3Xrg:hover:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: repeating-linear-gradient(45deg, rgba(250, 41, 73, 0.9), rgba(250, 41, 73, 0.9) 20px, rgba(250, 41, 73, 0.8) 20px, rgba(250, 41, 73, 0.8) 40px);\n font-weight: 400 !important;\n letter-spacing: normal;\n text-transform: none;\n cursor: pointer;\n color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100000000;\n border: 2px solid #FA2949; }\n\n.s1wT3Xrg.s1wTm58S:hover {\n position: relative; }\n .s1wT3Xrg.s1wTm58S:hover:after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n bottom: 0;\n right: 0;\n background: repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9) 20px, rgba(255, 255, 255, 0.8) 20px, rgba(255, 255, 255, 0.8) 40px);\n font-weight: 400 !important;\n letter-spacing: normal;\n text-transform: none;\n cursor: pointer;\n color: black;\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 100000000;\n border: 2px solid white; }\n", ""]); // exports exports.locals = { "editMode": "s1wT3Xrg", "lightOverlay": "s1wTm58S" }; /***/ }), /* 40 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: external "react" var external_react_ = __webpack_require__(2); var external_react_default = /*#__PURE__*/__webpack_require__.n(external_react_); // EXTERNAL MODULE: external "prop-types" var external_prop_types_ = __webpack_require__(0); var external_prop_types_default = /*#__PURE__*/__webpack_require__.n(external_prop_types_); // EXTERNAL MODULE: external "mobx-react" var external_mobx_react_ = __webpack_require__(4); // EXTERNAL MODULE: external "lodash/mapValues" var mapValues_ = __webpack_require__(11); var mapValues_default = /*#__PURE__*/__webpack_require__.n(mapValues_); // EXTERNAL MODULE: external "lodash/values" var values_ = __webpack_require__(22); var values_default = /*#__PURE__*/__webpack_require__.n(values_); // EXTERNAL MODULE: external "lodash/omitBy" var omitBy_ = __webpack_require__(12); var omitBy_default = /*#__PURE__*/__webpack_require__.n(omitBy_); // EXTERNAL MODULE: external "react-addons-shallow-compare" var external_react_addons_shallow_compare_ = __webpack_require__(23); var external_react_addons_shallow_compare_default = /*#__PURE__*/__webpack_require__.n(external_react_addons_shallow_compare_); // EXTERNAL MODULE: external "invariant" var external_invariant_ = __webpack_require__(8); var external_invariant_default = /*#__PURE__*/__webpack_require__.n(external_invariant_); // EXTERNAL MODULE: external "lodash/forEach" var forEach_ = __webpack_require__(13); var forEach_default = /*#__PURE__*/__webpack_require__.n(forEach_); // EXTERNAL MODULE: external "lodash/find" var find_ = __webpack_require__(24); var find_default = /*#__PURE__*/__webpack_require__.n(find_); // EXTERNAL MODULE: external "mobx" var external_mobx_ = __webpack_require__(1); // EXTERNAL MODULE: external "observable-nested-map" var external_observable_nested_map_ = __webpack_require__(25); var external_observable_nested_map_default = /*#__PURE__*/__webpack_require__.n(external_observable_nested_map_); // EXTERNAL MODULE: ./node_modules/path-browserify/index.js var path_browserify = __webpack_require__(15); var path_browserify_default = /*#__PURE__*/__webpack_require__.n(path_browserify); // EXTERNAL MODULE: external "firebase/app" var app_ = __webpack_require__(5); var app_default = /*#__PURE__*/__webpack_require__.n(app_); // CONCATENATED MODULE: ./src/firestore.js var __assign = (undefined && undefined.__assign) || function () { __assign = Object.assign || function(t) { for (var s, i = 1, n = arguments.length; i < n; i++) { s = arguments[i]; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p]; } return t; }; return __assign.apply(this, arguments); }; var __decorate = (undefined && undefined.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) { return new (P || (P = Promise))(function (resolve, reject) { function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); } step((generator = generator.apply(thisArg, _arguments || [])).next()); }); }; var __generator = (undefined && undefined.__generator) || function (thisArg, body) { var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g; return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g; function verb(n) { return function (v) { return step([n, v]); }; } function step(op) { if (f) throw new TypeError("Generator is already executing."); while (_) try { if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t; if (y = 0, t) op = [op[0] & 2, t.value]; switch (op[0]) { case 0: case 1: t = op; break; case 4: _.label++; return { value: op[1], done: false }; case 5: _.label++; y = op[1]; op = [0]; continue; case 7: op = _.ops.pop(); _.trys.pop(); continue; default: if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; } if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; } if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; } if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; } if (t[2]) _.ops.pop(); _.trys.pop(); continue; } op = body.call(thisArg, _); } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; } if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true }; } }; var validPathInvariant = function (path) { external_invariant_default()(!!path.length, 'Invalid path, expected a non empty string'); external_invariant_default()(typeof path === 'string', 'Invalid path expected a string, got ' + typeof path); external_invariant_default()(!path.startsWith('.') && !path.startsWith('/'), 'Invalid path structure. paths cannot start with `.` or `/`. got:' + path); }; var validQueryInvariant = function (path, options) { external_invariant_default()(!options || path.split('/').length === 1, "Invalid query arguments. cannot query non collections with options"); }; var settablePathInvariant = function (path) { external_invariant_default()(path.split('/').length <= 2, "Non queryable path " + path); }; var collectionPathInvariant = function (path) { return external_invariant_default()(path.split('/').length === 1, 'Invalid collection path. expected a path with one segment'); }; /* where: { path: {operator: value}, ... } */ var applyWhereOptionsToQuery = function (query, whereOptions) { if (whereOptions === void 0) { whereOptions = {}; } var finalQuery = query; iterateWhereOptions(whereOptions, function (path, optionOperator, optionValue) { return finalQuery = finalQuery.where(path, optionOperator, optionValue); }); return finalQuery; }; var iterateWhereOptions = function (whereOptions, cb) { forEach_default()(whereOptions, function (option, path) { forEach_default()(option, function (optionValue, optionOperator) { return cb(path, optionOperator, optionValue); }); }); }; var serializeQueryOptions = function (options, includeLimit) { if (options === void 0) { options = {}; } if (includeLimit === void 0) { includeLimit = false; } var queryString = []; iterateWhereOptions(options.where, function (path, optionOperator, optionValue) { return queryString.push("where=" + path + optionOperator + optionValue); }); forEach_default()(options.orderBy, function (direction, path) { queryString.push("orderBy:" + path + "|" + direction); }); includeLimit && options.limit !== undefined && queryString.push("limit:" + options.limit); return queryString.join('&'); }; var serializeQuery = function (path, options, includeLimit) { return toQueryablePath(path) + '?' + serializeQueryOptions(options, includeLimit); }; /* orderBy: { path: 'asc'|'desc', ... } */ var applyOrderByOptionsToQuery = function (query, orderByOptions) { if (orderByOptions === void 0) { orderByOptions = {}; } var finalQuery = query; forEach_default()(orderByOptions, function (direction, path) { finalQuery = finalQuery.orderBy(path, direction); }); return finalQuery; }; var toDotPath = function (slashPath) { return slashPath.split('/').join('.'); }; var breakPath = function (path) { var _a = path.split('/'), collection = _a[0], docPath = _a[1], innerParts = _a.slice(2); return { collection: collection, docPath: docPath, innerPath: innerParts.join('/') }; }; var toQueryablePath = function (path) { return path.split('/').slice(0, 2).join('/'); }; var isCollectionPath = function (path) { return path.split('/').length === 1; }; /* # how does it work? ## listening to values - regardless the path requested, the most basic piece of data which will be loaded is a document - values returned will always be accurate to the path requested store.listen('objects/home/hero/title') => listens to objects/home store.load('objects/home/hero/title') => loads objects/home, returns objects/home/hero/title store.getValue('objects/home/hero/title') => returns objects/home/hero/title store.listen('posts/12345/title') => listens to posts/12345 store.load('posts/12345/title') => loads posts/12345, returns posts/12345/title store.getValue('posts/12345/title') => returns posts/12345/title ## listening to collections - don't use options on non collection paths - collections data and order are cached even if not listened to anymore, to ensure fresh order on next listen - clear cache store.listen('posts', {where.. orderBy..}) => listens to posts with options. on collections only store.load('posts', {where.. orderBy..}) => loads posts with options. on collections only store.getValue('posts', {where.. orderBy..}) => returns posts with options. on collections only ## check initial loading status store.isLoading('posts') => return if posts is loading store.isLoading('posts', {where.. orderBy..}) => return if posts is running with options. on collections only store.isLoading('posts/12345/title') => return if posts/12345 is loading store.isLoading('objects/home/hero/title') -> return if objects/home is loading ## setting values - setting values is available only on a collection or document level store.setValue('posts/1234', {...}) => will add/override posts/1234 store.setValue('objects/home', {...}) => will add/override object/homes store.setValue('posts', {...}) => will push a new document to posts with auto key ## removing values - removing values is available only on a document level store.remove('posts/1234') => will remove posts/1234 store.remove('objects/home') => will remove objects/home */ /** @module */ /** * A thin observable wrapper around Firestore's SDK * @param {firebae.firestore} api - A Firebase SDK Firestore instance * @param {object} [initialState] - the initial state of the store, perfect for server rendering hydration process * @param {object} [options] - an options object which accepts DocumentSnapshot, QuerySnapshot and QueryDocumentSnapshot * */ var firestore_Firestore = /** @class */ (function () { function Firestore(api, initialState, options) { if (initialState === void 0) { initialState = {}; } if (options === void 0) { options = {}; } this.map = new external_observable_nested_map_default.a({}); this.pathsStatus = external_mobx_["observable"].map({}); this.listeners = external_mobx_["observable"].map({}); this.collections = external_mobx_["observable"].map({}); this.options = { DocumentSnapshot: app_default.a.firestore.DocumentSnapshot, QuerySnapshot: app_default.a.firestore.QuerySnapshot, QueryDocumentSnapshot: app_default.a.firestore.QueryDocumentSnapshot }; this.api = api; this.map.merge(initialState.map); this.collections.merge(initialState.collections); this.pathsStatus.merge(initialState.pathsStatus); this.listeners.merge(initialState.listeners); this.options = __assign({}, this.options, options); } Firestore.prototype.getBusyPromise = function () { var _this = this; var isBusy = function () { return !!find_default()(Object(external_mobx_["toJS"])(_this.pathsStatus), function (path) { return path.isLoading; }); }; if (isBusy()) { return Object(external_mobx_["when"])(function () { return !isBusy(); }); } }; /** * Synchronously returns an observable value from the local cache. * @param {string} path - the path of the data in the database * @param {object} [options] - an options object which accepts where, orderBy, limit * @returns {any} * */ Firestore.prototype.getValue = function (path, options) { var _this = this; validPathInvariant(path); validQueryInvariant(path, options); if (isCollectionPath(path)) { var serializedPath = serializeQuery(path, options); var collection = this.collections.get(serializedPath) || []; var limit = (options && options.limit) || collection.length; return collection.slice(0, limit).map(function (collectionKey) { var value = _this.map.get(toDotPath(path_browserify_default.a.join(path, collectionKey))); var raw = Object(external_mobx_["isObservable"])(value) ? Object(external_mobx_["toJS"])(value) : value; if (typeof raw === 'object') { return __assign({}, raw, { $key: collectionKey }); } else { return { $value: raw, $key: collectionKey }; } }); } else { var value = this.map.get(toDotPath(path)); return Object(external_mobx_["isObservable"])(value) ? Object(external_mobx_["toJS"])(value) : value; } }; /** * Writes into a path and updates local cache. * if the path is a collection path, a document with an auto generated id will be pushed * @param {string} path - the path of the data in the database * @param {any} value - the new value to write * @returns {promise} *