UNPKG

wot-design

Version:

Mobile UI components built on vue.js

893 lines (763 loc) 27.7 kB
module.exports = /******/ (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 = 55); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; }); /* globals __VUE_SSR_CONTEXT__ */ // IMPORTANT: Do NOT use ES2015 features in this file (except for modules). // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. function normalizeComponent ( scriptExports, render, staticRenderFns, functionalTemplate, injectStyles, scopeId, moduleIdentifier, /* server only */ shadowMode /* vue-cli only */ ) { // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (render) { options.render = render options.staticRenderFns = staticRenderFns options._compiled = true } // functional template if (functionalTemplate) { options.functional = true } // scopedId if (scopeId) { options._scopeId = 'data-v-' + scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || // cached call (this.$vnode && this.$vnode.ssrContext) || // stateful (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = shadowMode ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) } : injectStyles } if (hook) { if (options.functional) { // for template-only hot-reload because in that case the render fn doesn't // go through the normalizer options._injectStyles = hook // register for functioal component in vue file var originalRender = options.render options.render = function renderWithStyleInjection (h, context) { hook.call(context) return originalRender(h, context) } } else { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } } return { exports: scriptExports, options: options } } /***/ }), /***/ 1: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return isServer; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return isSupportSticky; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return getScrollTargetEvent; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return padZero; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return range; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return isEqual; }); /* unused harmony export bus */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return getType; }); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); var isServer = vue__WEBPACK_IMPORTED_MODULE_0___default.a.prototype.$isServer; /** * judge if the browser is support sticky */ var isSupportSticky = function isSupportSticky() { var div = document.createElement('div'); var style = 'display: none; position: -webkit-sticky; position: sticky'; div.style.cssText = style; var body = document.body; body.appendChild(div); var isSupport = /sticky/i.test(window.getComputedStyle(div).position); body.removeChild(div); div = null; return isSupport; }; /** * get the overscroll parentNode * @param {*} element current node * @param {*} rootElement root node */ var getScrollTargetEvent = function getScrollTargetEvent(element) { var rootElement = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window; var currentNode = element; while (currentNode && currentNode.tagName !== 'HTML' && currentNode.tagName !== 'BODY' && currentNode !== rootElement && currentNode.nodeType === 1) { var overflowY = document.defaultView.getComputedStyle(currentNode).overflowY; if (overflowY === 'auto' || overflowY === 'scroll') { return currentNode; } currentNode = currentNode.parentNode; } return rootElement; }; var padZero = function padZero(number) { var length = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2; number = number + ''; while (number.length < length) { number = '0' + number; } return number; }; var range = function range(value, min, max) { return Math.min(Math.max(value, min), max); }; /** @description 比较数值是否相等 */ var isEqual = function isEqual(value1, value2) { if (value1 === value2) return true; if (!(value1 instanceof Array)) return false; if (!(value2 instanceof Array)) return false; if (value1.length !== value2.length) return false; for (var i = 0; i !== value1.length; ++i) { if (value1[i] !== value2[i]) return false; } return true; }; var bus = new vue__WEBPACK_IMPORTED_MODULE_0___default.a(); /** * @description 获取目标原始类型 * @param target 任意类型 * @returns {string} type 数据类型 */ function getType(target) { // 得到原生类型 var typeStr = Object.prototype.toString.call(target); // 拿到类型值 var type = typeStr.match(/\[object (\w+)\]/)[1]; // 类型值转小写并返回 return type.toLowerCase(); } /***/ }), /***/ 13: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* unused harmony export supportsPassive */ /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return on; }); /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return off; }); /* unused harmony export stopPropagation */ /* unused harmony export preventDefault */ /* harmony import */ var _index__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1); /** Copyright 2016-present Youzan 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. */ // 高版本浏览器监听 document 的 touch 事件时 event.preventDefault 默认无效,需要手动将 passive 设置为 false var supportsPassive = false; if (!_index__WEBPACK_IMPORTED_MODULE_0__[/* isServer */ "d"]) { try { var opts = {}; Object.defineProperty(opts, 'passive', { get: function get() { supportsPassive = true; } }); window.addEventListener('test-passive', null, opts); } catch (e) {} } function on(target, event, handler) { var passive = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false; if (!_index__WEBPACK_IMPORTED_MODULE_0__[/* isServer */ "d"]) { target.addEventListener(event, handler, supportsPassive ? { capture: false, passive: passive } : false); } } function off(target, event, handler) { if (!_index__WEBPACK_IMPORTED_MODULE_0__[/* isServer */ "d"]) { target.removeEventListener(event, handler); } } function stopPropagation(event) { event.stopPropagation(); } function preventDefault(event, isStopPropagation) { if (typeof event.cancelable !== 'boolean' || event.cancelable) { event.preventDefault(); } if (isStopPropagation) { stopPropagation(event); } } /***/ }), /***/ 14: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(2); /* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_0__); var MIN_DISTANCE = 5; function getDirection(offsetX, offsetY) { if (offsetX > MIN_DISTANCE || offsetY > MIN_DISTANCE) { return offsetX > offsetY ? 'horizontal' : 'vertical'; } return ''; } /* harmony default export */ __webpack_exports__["a"] = (vue__WEBPACK_IMPORTED_MODULE_0___default.a.extend({ data: function data() { return { direction: '', accurateDirection: '' // 详细方向 }; }, methods: { touchStart: function touchStart(event) { this.resetTouchStatus(); this.startX = event.touches[0].clientX; this.startY = event.touches[0].clientY; }, touchMove: function touchMove(event) { var touch = event.touches[0]; this.deltaX = touch.clientX - this.startX; this.deltaY = touch.clientY - this.startY; this.offsetX = Math.abs(this.deltaX); this.offsetY = Math.abs(this.deltaY); this.direction = this.direction || getDirection(this.offsetX, this.offsetY); if (this.direction === 'horizontal') { this.accurateDirection = this.deltaX > 0 ? 'right' : 'left'; } else if (this.direction === 'vertical') { this.accurateDirection = this.deltaY > 0 ? 'down' : 'up'; } }, resetTouchStatus: function resetTouchStatus() { this.direction = ''; this.accurateDirection = ''; this.deltaX = 0; this.deltaY = 0; this.offsetX = 0; this.offsetY = 0; } } })); /***/ }), /***/ 2: /***/ (function(module, exports) { module.exports = require("vue"); /***/ }), /***/ 43: /***/ (function(module, exports) { module.exports = require("wot-design/lib/modal"); /***/ }), /***/ 55: /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; __webpack_require__.r(__webpack_exports__); // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/typeof.js var helpers_typeof = __webpack_require__(9); var typeof_default = /*#__PURE__*/__webpack_require__.n(helpers_typeof); // CONCATENATED MODULE: ./src/mixins/popup/context.js var context = { zIndex: 2000, lockCount: 0, stack: [], getTop: function getTop() { return this.stack[this.stack.length - 1]; } }; // EXTERNAL MODULE: external "vue" var external_vue_ = __webpack_require__(2); var external_vue_default = /*#__PURE__*/__webpack_require__.n(external_vue_); // EXTERNAL MODULE: external "wot-design/lib/modal" var modal_ = __webpack_require__(43); var modal_default = /*#__PURE__*/__webpack_require__.n(modal_); // CONCATENATED MODULE: ./src/mixins/popup/modal.js var modal; function onClickModal() { var topVm = context.getTop(); if (topVm) { var vm = topVm.vm; vm.$emit('click-modal'); if (vm.closeOnClickModal) { vm.close(); } } } var ModalInstance = external_vue_default.a.extend(modal_default.a); function updateModal() { if (!modal) { modal = new ModalInstance({ el: document.createElement('div') }); modal.$on('click-modal', onClickModal); document.body.appendChild(modal.$el); } var topVm = context.getTop(); if (topVm) { var vm = topVm.vm, config = topVm.config; var el = vm.$el; if (el && el.parentNode) { el.parentNode.insertBefore(modal.$el, el); } Object.assign(modal, config, { show: true }); } else { modal.show = false; } } function openModal(vm, config) { if (!context.stack.some(function (item) { return item === vm; })) { context.stack.push({ vm: vm, config: config }); updateModal(); } } function closeModal(vm) { if (context.stack.length) { if (context.getTop().vm === vm) { context.stack.pop(); updateModal(); } else { context.stack = context.stack.filter(function (item) { return item.vm !== vm; }); } } } // EXTERNAL MODULE: ./src/mixins/touch.js var touch = __webpack_require__(14); // CONCATENATED MODULE: ./src/utils/scroll.js /** Copyright 2016-present Youzan 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. */ // get nearest scroll element // http://w3help.org/zh-cn/causes/SD9013 // http://stackoverflow.com/questions/17016740/onscroll-function-is-not-working-for-chrome var overflowScrollReg = /scroll|auto/i; function getScrollEventTarget(element) { var rootParent = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : window; var node = element; while (node && node.tagName !== 'HTML' && node.nodeType === 1 && node !== rootParent) { var _window$getComputedSt = window.getComputedStyle(node), overflowY = _window$getComputedSt.overflowY; if (overflowScrollReg.test(overflowY)) { if (node.tagName !== 'BODY') { return node; } // see: https://github.com/youzan/vant/issues/3823 var _window$getComputedSt2 = window.getComputedStyle(node.parentNode), htmlOverflowY = _window$getComputedSt2.overflowY; if (overflowScrollReg.test(htmlOverflowY)) { return node; } } node = node.parentNode; } return rootParent; } // EXTERNAL MODULE: ./src/utils/event.js var utils_event = __webpack_require__(13); // CONCATENATED MODULE: ./src/mixins/popup/index.js function stopPropagation(event) { event.stopPropagation(); } function preventDefault(event, isStopPropagation) { /* istanbul ignore else */ if (typeof event.cancelable !== 'boolean' || event.cancelable) { event.preventDefault(); } if (isStopPropagation) { stopPropagation(event); } } /* harmony default export */ var popup = ({ mixins: [touch["a" /* default */]], data: function data() { return { inited: this.value }; }, props: { value: Boolean, lockScroll: { type: Boolean, default: true }, closeOnClickModal: { type: Boolean, default: true }, closeOnPopstate: { type: Boolean, default: true }, zIndex: Number, duration: { type: Number, default: 300 }, modal: { type: Boolean, default: true }, modalStyle: { type: Object, default: function _default() { return {}; } }, teleport: { type: [String, Object], default: 'body' } }, watch: { value: function value(val) { var type = val ? 'open' : 'close'; this.inited = this.inited || this.value; this[type](); this.$emit(type); }, teleport: 'appendTeleport' }, methods: { open: function open() { if (this.$isServer || this.opened) return; if (this.zIndex !== undefined) { context.zIndex = this.zIndex; } this.opened = true; this.modal && this.renderModal(); if (this.lockScroll) { Object(utils_event["b" /* on */])(document, 'touchstart', this.touchStart); Object(utils_event["b" /* on */])(document, 'touchmove', this.onTouchMove); if (!context.lockCount) { document.body.classList.add('wd-overflow-hidden'); } context.lockCount++; } }, close: function close() { if (!this.opened) return; if (this.lockScroll) { Object(utils_event["a" /* off */])(document, 'touchstart', this.touchStart); Object(utils_event["a" /* off */])(document, 'touchmove', this.onTouchMove); context.lockCount--; if (!context.lockCount) { document.body.classList.remove('wd-overflow-hidden'); } } this.opened = false; this.modal && closeModal(this); this.$emit('input', false); }, renderModal: function renderModal() { this.$el.style.zIndex = ++context.zIndex + 1; openModal(this, { duration: this.duration, zIndex: context.zIndex++, closeOnClickModal: this.closeOnClickModal, modalStyle: this.modalStyle }); }, onTouchMove: function onTouchMove(event) { this.touchMove(event); var direction = this.deltaY > 0 ? '10' : '01'; var el = getScrollEventTarget(event.target, this.$el); var scrollHeight = el.scrollHeight, offsetHeight = el.offsetHeight, scrollTop = el.scrollTop; var status = '11'; if (scrollTop === 0) { status = offsetHeight >= scrollHeight ? '00' : '01'; } else if (scrollTop + offsetHeight >= scrollHeight) { status = '10'; } if (status !== '11' && this.direction === 'vertical' && !(parseInt(status, 2) & parseInt(direction, 2))) { preventDefault(event); } }, appendTeleport: function appendTeleport() { if (this.$isServer) return; var to = 'body'; var disabled = false; var teleportType = typeof_default()(this.teleport); if (teleportType === 'object') { to = this.teleport.to; disabled = this.teleport.disabled; } else if (teleportType === 'string') { to = this.teleport; } if (!disabled) { var container = document.querySelector(to); container.appendChild(this.$el); } }, handlePopstate: function handlePopstate() { this.$emit('popstate'); this.close(); } }, mounted: function mounted() { if (this.teleport) { this.appendTeleport(); } if (this.value) { this.open(); } if (this.closeOnPopstate) { window.addEventListener('popstate', this.handlePopstate); } }, beforeDestroy: function beforeDestroy() { if (this.teleport) { var parentNode = this.$el.parentNode; parentNode.removeChild(this.$el); } this.close(); if (this.closeOnPopstate) { window.removeEventListener('popstate', this.handlePopstate); } } }); // CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/popup/src/main.vue?vue&type=script&lang=js& /* harmony default export */ var mainvue_type_script_lang_js_ = ({ name: 'WdPopup', mixins: [popup], props: { position: { type: String, default: 'center' }, duration: Number, closable: Boolean, transition: String, safeAreaInsetBottom: Boolean }, computed: { transitionName: function transitionName() { if (this.transition) { return this.transition; } if (this.position === 'center') { return 'wd-fade'; } else { return "wd-popup-slide-".concat(this.position); } } }, methods: { handleOpened: function handleOpened() { this.$emit('opened'); }, handleClosed: function handleClosed() { this.$emit('closed'); } }, render: function render() { var h = arguments[0]; var transitionName = this.transitionName, handleOpened = this.handleOpened, handleClosed = this.handleClosed, value = this.value, position = this.position, duration = this.duration, closable = this.closable, close = this.close, safeAreaInsetBottom = this.safeAreaInsetBottom; return h("transition", { "attrs": { "name": transitionName }, "on": { "afterEnter": handleOpened, "afterLeave": handleClosed } }, [h("div", { "directives": [{ name: "show", value: value }], "ref": "popup", "class": ['wd-popup', "wd-popup--".concat(position), safeAreaInsetBottom ? 'is-safe-area-inset-bottom' : ''], "style": { 'transition-duration': duration ? duration + 'ms' : '' } }, [h("slot"), this.$slots.default, closable ? h("i", { "class": "wd-popup__close wd-icon-add", "on": { "click": close } }) : ''])]); } }); // CONCATENATED MODULE: ./packages/popup/src/main.vue?vue&type=script&lang=js& /* harmony default export */ var src_mainvue_type_script_lang_js_ = (mainvue_type_script_lang_js_); // EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js var componentNormalizer = __webpack_require__(0); // CONCATENATED MODULE: ./packages/popup/src/main.vue var render, staticRenderFns /* normalize component */ var component = Object(componentNormalizer["a" /* default */])( src_mainvue_type_script_lang_js_, render, staticRenderFns, false, null, null, null ) /* hot reload */ if (false) { var api; } component.options.__file = "packages/popup/src/main.vue" /* harmony default export */ var main = (component.exports); // CONCATENATED MODULE: ./packages/popup/index.js main.install = function (Vue) { Vue.component(main.name, main); }; /* harmony default export */ var packages_popup = __webpack_exports__["default"] = (main); /***/ }), /***/ 9: /***/ (function(module, exports) { function _typeof2(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } function _typeof(obj) { if (typeof Symbol === "function" && _typeof2(Symbol.iterator) === "symbol") { module.exports = _typeof = function _typeof(obj) { return _typeof2(obj); }; } else { module.exports = _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : _typeof2(obj); }; } return _typeof(obj); } module.exports = _typeof; /***/ }) /******/ });