diff --git a/app/css/app.css b/app/css/app.css index 7ebe537..bd780e8 100644 --- a/app/css/app.css +++ b/app/css/app.css @@ -18,7 +18,8 @@ body { } * { - box-sizing: border-box; + -webkit-box-sizing: border-box; + box-sizing: border-box; } .mr-1 { @@ -61,7 +62,8 @@ body { .panel { background: #FAFAFA; - box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.16); + -webkit-box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.16); + box-shadow: 0 2px 3px 0 rgba(0, 0, 0, 0.16); border-radius: 4px; margin: 10px; overflow: hidden; @@ -228,7 +230,8 @@ body { .form-control { margin-bottom: 10px; - box-shadow: none; + -webkit-box-shadow: none; + box-shadow: none; border: 2px solid #d7d7d7; display: block; width: 100%; @@ -241,13 +244,17 @@ body { background-image: none; border-radius: 0; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s,-webkit-box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; + transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s,-webkit-box-shadow ease-in-out .15s; } .form-control:focus { border-color: #20b885; outline: 0; - box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(32, 184, 133, 0.6); + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(32, 184, 133, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(32, 184, 133, 0.6); } pre { @@ -303,4 +310,3 @@ pre { text-align: right; } -/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi9Vc2Vycy9zYW0vZWxlY3Ryb24vYW52aWwvc3JjL3Njc3MvYXBwLnNjc3MiXSwic291cmNlc0NvbnRlbnQiOlsiaHRtbCwgYm9keSB7XG4gICAgcGF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FQUNsQixXQUFXLEVBQUUsR0FBRztDQUNuQjs7QUFHTCxBQUFBLFFBQVEsQ0FBQTtFQUNKLE9BQU8sRUFBRSxJQUFJO0VBQ2IsZUFBZSxFQUFFLE1BQU07RUFDdkIsV0FBVyxFQUFFLE1BQU07RUFDbkIsTUFBTSxFQUFFLG1CQUFtQjtFQUMzQixVQUFVLEVBQUUsTUFBTTtFQUNsQixLQUFLLEVBQUUsSUFBSTtDQU1kOztBQVpELEFBUUksUUFSSSxDQVFKLFlBQVksQ0FBQTtFQUNSLFNBQVMsRUFBRSxJQUFJO0VBQ2YsYUFBYSxFQUFFLElBQUk7Q0FDdEI7O0FBR0wsQUFBQSxVQUFVLEVBQUUsQUFBVyxVQUFELENBQUMsQ0FBQyxDQUFBO0VBQ3BCLEtBQUssRUFBRSxJQUFJO0VBQ1gsZUFBZSxFQUFFLElBQUk7RUFDckIsT0FBTyxFQUFFLFlBQVk7RUFDckIsVUFBVSxFQUFFLEtBQUs7Q0FDcEIifQ== */ \ No newline at end of file diff --git a/app/js/app.js b/app/js/app.js index 93b6036..bb9e289 100644 --- a/app/js/app.js +++ b/app/js/app.js @@ -33,9 +33,6 @@ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { @@ -63,21 +60,26 @@ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 37); +/******/ return __webpack_require__(__webpack_require__.s = 2); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports) { -// this module is a runtime utility for cleaner component module output and will -// be included in the final webpack user bundle +/* globals __VUE_SSR_CONTEXT__ */ + +// IMPORTANT: Do NOT use ES2015 features in this file. +// This module is a runtime utility for cleaner component module output and will +// be included in the final webpack user bundle. module.exports = function normalizeComponent ( rawScriptExports, compiledTemplate, + functionalTemplate, + injectStyles, scopeId, - cssModules + moduleIdentifier /* server only */ ) { var esModule var scriptExports = rawScriptExports = rawScriptExports || {} @@ -98,6 +100,12 @@ module.exports = function normalizeComponent ( if (compiledTemplate) { options.render = compiledTemplate.render options.staticRenderFns = compiledTemplate.staticRenderFns + options._compiled = true + } + + // functional template + if (functionalTemplate) { + options.functional = true } // scopedId @@ -105,14 +113,55 @@ module.exports = function normalizeComponent ( options._scopeId = scopeId } - // inject cssModules - if (cssModules) { - var computed = Object.create(options.computed || null) - Object.keys(cssModules).forEach(function (key) { - var module = cssModules[key] - computed[key] = function () { return module } - }) - options.computed = computed + 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 = injectStyles + } + + if (hook) { + var functional = options.functional + var existing = functional + ? options.render + : options.beforeCreate + + if (!functional) { + // inject component registration as beforeCreate hook + options.beforeCreate = existing + ? [].concat(existing, hook) + : [hook] + } else { + // 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 + options.render = function renderWithStyleInjection (h, context) { + hook.call(context) + return existing(h, context) + } + } } return { @@ -152,21 +201,29 @@ module.exports = g; /***/ }), /* 2 */ +/***/ (function(module, exports, __webpack_require__) { + +__webpack_require__(3); +module.exports = __webpack_require__(40); + + +/***/ }), +/* 3 */ /***/ (function(module, __webpack_exports__, __webpack_require__) { "use strict"; Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(34); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(4); /* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_router__ = __webpack_require__(33); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vuex__ = __webpack_require__(35); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routes_js__ = __webpack_require__(13); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__vuex_actions_js__ = __webpack_require__(14); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__vuex_getters_js__ = __webpack_require__(15); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__vuex_mutations_js__ = __webpack_require__(16); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_forge_sdk__ = __webpack_require__(17); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Job__ = __webpack_require__(11); -/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Queue__ = __webpack_require__(12); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1_vue_router__ = __webpack_require__(8); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2_vuex__ = __webpack_require__(9); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_3__routes_js__ = __webpack_require__(10); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_4__vuex_actions_js__ = __webpack_require__(32); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_5__vuex_getters_js__ = __webpack_require__(33); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_6__vuex_mutations_js__ = __webpack_require__(34); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_7_forge_sdk__ = __webpack_require__(35); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_8__Job__ = __webpack_require__(36); +/* harmony import */ var __WEBPACK_IMPORTED_MODULE_9__Queue__ = __webpack_require__(37); @@ -180,7 +237,7 @@ __WEBPACK_IMPORTED_MODULE_0_vue___default.a.use(__WEBPACK_IMPORTED_MODULE_2_vuex var Queue = new __WEBPACK_IMPORTED_MODULE_9__Queue__["a" /* default */](); -window._ = __webpack_require__(18); +window._ = __webpack_require__(38); window.forgeAccounts = accounts ? mapAccounts(accounts) : null; var router = new __WEBPACK_IMPORTED_MODULE_1_vue_router__["a" /* default */]({ @@ -308,32236 +365,34190 @@ function mapAccounts(accounts) { }); } -/***/ }), -/* 3 */ -/***/ (function(module, exports) { - -// removed by extract-text-webpack-plugin - /***/ }), /* 4 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/***/ (function(module, exports, __webpack_require__) { "use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// +/* WEBPACK VAR INJECTION */(function(global, setImmediate) {/*! + * Vue.js v2.5.2 + * (c) 2014-2017 Evan You + * Released under the MIT License. + */ -/* harmony default export */ __webpack_exports__["default"] = ({ - data: function data() { - return { - name: null, - apiToken: null, - connecting: false - }; - }, - computed: {}, - props: [], - methods: { - back: function back() { - return this.$router.push('/'); - }, - logIn: function logIn() { - var data = { api_token: this.apiToken, name: this.name }; - accounts.push(data); - localStorage.setItem('accounts', JSON.stringify(accounts)); - window.location.reload(); - } - }, - mounted: function mounted() {} -}); -/***/ }), -/* 5 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* */ -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// +// these helpers produces better vm code in JS engines due to their +// explicitness and function inlining +function isUndef (v) { + return v === undefined || v === null +} -/* harmony default export */ __webpack_exports__["default"] = ({ - data: function data() { - return { - rebooting: false, - rebootingMysql: false, - rebootingNginx: false, - rebootingPostgres: false, +function isDef (v) { + return v !== undefined && v !== null +} - stoping: false, - stopingMysql: false, - stopingNginx: false, - stopingPostgres: false - }; - }, - computed: { - server: function server() { - var server = this.$store.getters.getServerById(this.$route.params.server_id); - console.log(server); - return server; - }, - sites: function sites() { - return this.$store.getters.getSitesForServer(this.server); - } - }, - props: [], - methods: { - back: function back() { - return this.$router.push('/servers'); - }, - viewOnForge: function viewOnForge() { - shell.openExternal('https://forge.laravel.com/servers/' + this.server.id); - }, - rebootServer: function rebootServer() { - var _this = this; +function isTrue (v) { + return v === true +} - this.rebooting = true; - forge.rebootServer(this.server.id).then(function (r) { - _this.rebooting = false; - }); - }, - rebootMysql: function rebootMysql() { - var _this2 = this; +function isFalse (v) { + return v === false +} - this.rebootingMysql = true; - forge.rebootMysql(this.server.id).then(function (r) { - _this2.rebootingMysql = false; - }); - }, - rebootNginx: function rebootNginx() { - var _this3 = this; +/** + * Check if value is primitive + */ +function isPrimitive (value) { + return ( + typeof value === 'string' || + typeof value === 'number' || + typeof value === 'boolean' + ) +} - this.rebootingNginx = true; - forge.rebootNginx(this.server.id).then(function (r) { - _this3.rebootingNginx = false; - }); - }, - rebootPostgres: function rebootPostgres() { - var _this4 = this; +/** + * Quick object check - this is primarily used to tell + * Objects from primitive values when we know the value + * is a JSON-compliant type. + */ +function isObject (obj) { + return obj !== null && typeof obj === 'object' +} - this.rebootingPostgres = true; - forge.rebootPostgres(this.server.id).then(function (r) { - _this4.rebootingPostgres = false; - }); - }, - stopServer: function stopServer() { - var _this5 = this; +/** + * Get the raw type string of a value e.g. [object Object] + */ +var _toString = Object.prototype.toString; - this.stoping = true; - forge.stopServer(this.server.id).then(function (r) { - _this5.stoping = false; - }); - }, - stopMysql: function stopMysql() { - var _this6 = this; +function toRawType (value) { + return _toString.call(value).slice(8, -1) +} - this.stopingMysql = true; - forge.stopMysql(this.server.id).then(function (r) { - _this6.stopingMysql = false; - }); - }, - stopNginx: function stopNginx() { - var _this7 = this; +/** + * Strict object type check. Only returns true + * for plain JavaScript objects. + */ +function isPlainObject (obj) { + return _toString.call(obj) === '[object Object]' +} - this.stopingNginx = true; - forge.stopNginx(this.server.id).then(function (r) { - _this7.stopingNginx = false; - }); - }, - stopPostgres: function stopPostgres() { - var _this8 = this; +function isRegExp (v) { + return _toString.call(v) === '[object RegExp]' +} - this.stopingPostgres = true; - forge.stopPostgres(this.server.id).then(function (r) { - _this8.stopingPostgres = false; - }); - }, - getSiteApp: function getSiteApp(site) { - if (site.app) { - if (site.app === 'WordPress') { - return ''; - } +/** + * Check if val is a valid array index. + */ +function isValidArrayIndex (val) { + var n = parseFloat(String(val)); + return n >= 0 && Math.floor(n) === n && isFinite(val) +} - return ''; - } else if (site.repository_provider) { - if (site.repository_provider === 'gitlab') { - return ''; - } - if (site.repository_provider === 'github') { - return ''; - } - if (site.repository_provider === 'bitbucket') { - return ''; - } +/** + * Convert a value to a string that is actually rendered. + */ +function toString (val) { + return val == null + ? '' + : typeof val === 'object' + ? JSON.stringify(val, null, 2) + : String(val) +} - return ''; - } +/** + * Convert a input value to a number for persistence. + * If the conversion fails, return original string. + */ +function toNumber (val) { + var n = parseFloat(val); + return isNaN(n) ? val : n +} - return ''; - }, - openSshInIterm: function openSshInIterm() { - osap('tell application "iTerm"\rset newWindow to (create window with default profile command "ssh forge@' + this.server.ip_address + '")\rend tell'); - }, - openSshInTerm: function openSshInTerm() { - osap('tell application "Terminal"\rset currentTab to do script ("ssh forge@' + this.server.ip_address + '")\rend tell'); - } +/** + * Make a map and return a function for checking if a key + * is in that map. + */ +function makeMap ( + str, + expectsLowerCase +) { + var map = Object.create(null); + var list = str.split(','); + for (var i = 0; i < list.length; i++) { + map[list[i]] = true; + } + return expectsLowerCase + ? function (val) { return map[val.toLowerCase()]; } + : function (val) { return map[val]; } +} + +/** + * Check if a tag is a built-in tag. + */ +var isBuiltInTag = makeMap('slot,component', true); + +/** + * Check if a attribute is a reserved attribute. + */ +var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); + +/** + * Remove an item from an array + */ +function remove (arr, item) { + if (arr.length) { + var index = arr.indexOf(item); + if (index > -1) { + return arr.splice(index, 1) } -}); + } +} -/***/ }), -/* 6 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * Check whether the object has the property. + */ +var hasOwnProperty = Object.prototype.hasOwnProperty; +function hasOwn (obj, key) { + return hasOwnProperty.call(obj, key) +} -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// +/** + * Create a cached version of a pure function. + */ +function cached (fn) { + var cache = Object.create(null); + return (function cachedFn (str) { + var hit = cache[str]; + return hit || (cache[str] = fn(str)) + }) +} -/* harmony default export */ __webpack_exports__["default"] = ({ - data: function data() { - return { - showingArchived: false - }; - }, - props: [], - computed: { - servers: function servers() { - return this.$store.state.servers; - }, - archivedServers: function archivedServers() { - return this.servers.filter(function (server) { - return server.revoked; - }); - }, - serverGroups: function serverGroups() { - var servers = null; - if (this.showingArchived) { - servers = this.servers; - } - servers = this.servers.filter(function (server) { - return !server.revoked; - }); - var groups = _.groupBy(servers, function (i) { - return i.account.name; - }); - console.log(); - return groups; - } - }, - methods: {} +/** + * Camelize a hyphen-delimited string. + */ +var camelizeRE = /-(\w)/g; +var camelize = cached(function (str) { + return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) }); -/***/ }), -/* 7 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// +/** + * Capitalize a string. + */ +var capitalize = cached(function (str) { + return str.charAt(0).toUpperCase() + str.slice(1) +}); -/* harmony default export */ __webpack_exports__["default"] = ({ - data: function data() { - return { - deployScript: null, - saving: true - }; - }, - computed: { - server: function server() { - var server = this.$store.getters.getServerById(this.$route.params.server_id); - return server; - }, - site: function site() { - var site = this.$store.getters.getSiteById(this.$route.params.site_id); - console.log(site); - if (!this.deployScript) { - this.getDeployScript(site); - } - return site; - } - }, - props: [], - methods: { - back: function back() { - return this.$router.push('/servers/' + this.server.id + '/sites/' + this.site.id); - }, - save: function save() { - var _this = this; +/** + * Hyphenate a camelCase string. + */ +var hyphenateRE = /\B([A-Z])/g; +var hyphenate = cached(function (str) { + return str.replace(hyphenateRE, '-$1').toLowerCase() +}); - this.saving = true; - this.server.account.updateSiteDeploymentScript(this.server.id, this.site.id, this.$refs.deployScriptBox.value).then(function (r) { - _this.$router.push('/servers/' + _this.server.id + '/sites/' + _this.site.id); - }); - }, - getDeployScript: function getDeployScript(site) { - var _this2 = this; - - console.log('SITE', site.id); - this.server.account.siteDeploymentScript(this.server.id, site.id).then(function (r) { - console.log(r); - _this2.deployScript = r; - _this2.saving = false; - }); - } - }, - mounted: function mounted() {} -}); - -/***/ }), -/* 8 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { - -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// - -/* harmony default export */ __webpack_exports__["default"] = ({ - data: function data() { - return { - log: null, - loading: true - }; - }, - computed: { - server: function server() { - var server = this.$store.getters.getServerById(this.$route.params.server_id); - return server; - }, - site: function site() { - var site = this.$store.getters.getSiteById(this.$route.params.site_id); - if (!this.log) { - this.getDeploymentLog(site); - } - return site; - } - }, - props: [], - methods: { - back: function back() { - return this.$router.push('/servers/' + this.server.id + '/sites/' + this.site.id); - }, - getDeploymentLog: function getDeploymentLog(site) { - var _this = this; +/** + * Simple bind, faster than native + */ +function bind (fn, ctx) { + function boundFn (a) { + var l = arguments.length; + return l + ? l > 1 + ? fn.apply(ctx, arguments) + : fn.call(ctx, a) + : fn.call(ctx) + } + // record original fn length + boundFn._length = fn.length; + return boundFn +} - console.log(this.server, site); - site.account.siteDeploymentLog(this.server.id, site.id).then(function (r) { - console.log(r); - _this.loading = false; - _this.log = r; - }); - } - }, - mounted: function mounted() {} -}); +/** + * Convert an Array-like object to a real Array. + */ +function toArray (list, start) { + start = start || 0; + var i = list.length - start; + var ret = new Array(i); + while (i--) { + ret[i] = list[i + start]; + } + return ret +} -/***/ }), -/* 9 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * Mix properties into target object. + */ +function extend (to, _from) { + for (var key in _from) { + to[key] = _from[key]; + } + return to +} -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// +/** + * Merge an Array of Objects into a single Object. + */ +function toObject (arr) { + var res = {}; + for (var i = 0; i < arr.length; i++) { + if (arr[i]) { + extend(res, arr[i]); + } + } + return res +} -/* harmony default export */ __webpack_exports__["default"] = ({ - data: function data() { - return { - deployScript: null, - deploying: false - }; - }, - computed: { - server: function server() { - var server = this.$store.getters.getServerById(this.$route.params.server_id); - return server; - }, - site: function site() { - var site = this.$store.getters.getSiteById(this.$route.params.site_id); - if (!this.deployScript) { - // this.getDeployScript(site) - } - return site; - } - }, - props: [], - methods: { - back: function back() { - return this.$router.push('/servers/' + this.server.id); - }, - visitSite: function visitSite() { - console.log('Opening', shell); - shell.openExternal('http://' + this.site.name); - }, - viewOnForge: function viewOnForge() { - console.log('Opening', shell); - shell.openExternal('https://forge.laravel.com/servers/' + this.server.id + '/sites/' + this.site.id); - }, - getSiteApp: function getSiteApp(site) { - if (site.app) { - if (site.app === 'WordPress') { - return ''; - } +/** + * Perform no operation. + * Stubbing args to make Flow happy without leaving useless transpiled code + * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/) + */ +function noop (a, b, c) {} - return ''; - } else if (site.repository_provider) { - if (site.repository_provider === 'gitlab') { - return ''; - } - if (site.repository_provider === 'github') { - return ''; - } +/** + * Always return false. + */ +var no = function (a, b, c) { return false; }; - return ''; - } +/** + * Return same value + */ +var identity = function (_) { return _; }; - return ''; - }, - deployNow: function deployNow() { - var _this = this; +/** + * Generate a static keys string from compiler modules. + */ +function genStaticKeys (modules) { + return modules.reduce(function (keys, m) { + return keys.concat(m.staticKeys || []) + }, []).join(',') +} - this.deploying = true; - this.server.account.deploySite(this.server.id, this.site.id).then(function (r) { - return _this.deploying = false; - }); - }, - toggleQuickDeploy: function toggleQuickDeploy() { - // this.site.quick_deploy = !this.site.quick_deploy; - this.$store.dispatch('toggleQuickDeploy', { server: this.server, site: this.site }); - }, - editDeployScript: function editDeployScript() { - this.$router.push('/servers/' + this.server.id + '/sites/' + this.site.id + '/deployment/script'); - }, - shouldGetDeployScript: function shouldGetDeployScript() { - if (this.site.app != "WordPress") { - return true; - } - return false; - } +/** + * Check if two values are loosely equal - that is, + * if they are plain objects, do they have the same shape? + */ +function looseEqual (a, b) { + if (a === b) { return true } + var isObjectA = isObject(a); + var isObjectB = isObject(b); + if (isObjectA && isObjectB) { + try { + var isArrayA = Array.isArray(a); + var isArrayB = Array.isArray(b); + if (isArrayA && isArrayB) { + return a.length === b.length && a.every(function (e, i) { + return looseEqual(e, b[i]) + }) + } else if (!isArrayA && !isArrayB) { + var keysA = Object.keys(a); + var keysB = Object.keys(b); + return keysA.length === keysB.length && keysA.every(function (key) { + return looseEqual(a[key], b[key]) + }) + } else { + /* istanbul ignore next */ + return false + } + } catch (e) { + /* istanbul ignore next */ + return false } -}); - -/***/ }), -/* 10 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + } else if (!isObjectA && !isObjectB) { + return String(a) === String(b) + } else { + return false + } +} -"use strict"; -Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); -// -// -// -// -// -// -// -// -// -// -// -// -// -// -// +function looseIndexOf (arr, val) { + for (var i = 0; i < arr.length; i++) { + if (looseEqual(arr[i], val)) { return i } + } + return -1 +} -/* harmony default export */ __webpack_exports__["default"] = ({ - data: function data() { - return { - env: null, - saving: true - }; - }, - computed: { - server: function server() { - var server = this.$store.getters.getServerById(this.$route.params.server_id); - return server; - }, - site: function site() { - var site = this.$store.getters.getSiteById(this.$route.params.site_id); - if (!this.env) { - this.getEnv(site); - } - return site; - } - }, - props: [], - methods: { - back: function back() { - return this.$router.push('/servers/' + this.server.id + '/sites/' + this.site.id); - }, - save: function save() { - var _this = this; +/** + * Ensure a function is called only once. + */ +function once (fn) { + var called = false; + return function () { + if (!called) { + called = true; + fn.apply(this, arguments); + } + } +} - this.saving = true; - this.server.account.updateSiteEnvironmentFile(this.server.id, this.site.id, this.env).then(function (r) { - _this.back(); - }); - }, - getEnv: function getEnv(site) { - var _this2 = this; +var SSR_ATTR = 'data-server-rendered'; - this.server.account.siteEnvironmentFile(this.server.id, site.id).then(function (r) { - console.log(r); - _this2.env = r; - _this2.saving = false; - }); - } - }, - mounted: function mounted() {} -}); +var ASSET_TYPES = [ + 'component', + 'directive', + 'filter' +]; -/***/ }), -/* 11 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +var LIFECYCLE_HOOKS = [ + 'beforeCreate', + 'created', + 'beforeMount', + 'mounted', + 'beforeUpdate', + 'updated', + 'beforeDestroy', + 'destroyed', + 'activated', + 'deactivated', + 'errorCaptured' +]; -"use strict"; -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); +/* */ -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } +var config = ({ + /** + * Option merge strategies (used in core/util/options) + */ + optionMergeStrategies: Object.create(null), -// End Structure of a Job -// { -// url: 'path/to/thing', -// method: "GET", -// convertsTo: "text", -// compare(){}, -// callback(){}, -// interval: 12000, -// } + /** + * Whether to suppress warnings. + */ + silent: false, -var Job = function () { - function Job(url) { - _classCallCheck(this, Job); + /** + * Show production mode tip message on boot? + */ + productionTip: "development" !== 'production', - this.url = url; - this.callback = function () { - return true; - }; - this.compare = function () { - return true; - }; - this.interval = 12000; - this.convertsTo = "text"; - this.method = "GET"; - } + /** + * Whether to enable devtools + */ + devtools: "development" !== 'production', - _createClass(Job, [{ - key: "withCallback", - value: function withCallback(callback) { - this.callback = callback; - return this; - } - }, { - key: "using", - value: function using(method) { - this.method = method; - return this; - } - }, { - key: "return", - value: function _return(convertsTo) { - this.convertsTo = convertsTo; - return this; - } - }, { - key: "every", - value: function every(interval) { - this.interval = interval; - return this; - } - }, { - key: "compareWith", - value: function compareWith(compare) { - this.compare = compare; - return this; - } - }]); + /** + * Whether to record perf + */ + performance: false, - return Job; -}(); + /** + * Error handler for watcher errors + */ + errorHandler: null, -/* unused harmony default export */ var _unused_webpack_default_export = (Job); + /** + * Warn handler for watcher warns + */ + warnHandler: null, -/***/ }), -/* 12 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /** + * Ignore certain custom elements + */ + ignoredElements: [], -"use strict"; -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); + /** + * Custom user key aliases for v-on + */ + keyCodes: Object.create(null), -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } + /** + * Check if a tag is reserved so that it cannot be registered as a + * component. This is platform-dependent and may be overwritten. + */ + isReservedTag: no, -var Queue = function () { - function Queue() { - _classCallCheck(this, Queue); + /** + * Check if an attribute is reserved so that it cannot be used as a component + * prop. This is platform-dependent and may be overwritten. + */ + isReservedAttr: no, - this.jobs = {}; - } - - _createClass(Queue, [{ - key: 'count', - value: function count() { - return Object.keys(this.jobs).length; - } - }, { - key: 'push', - value: function push(job) { - var _this = this; - - var uniqueId = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; - - var jobId = uniqueId ? uniqueId : Math.floor(Math.random() * (999999 - 100000)) + 100000; - this.jobs[jobId] = job; - var timer = setInterval(function () { - console.log('TRIED'); - fetch(job.url, { method: job.method }).then(function (r) { - return r[job.convertsTo](); - }).then(function (r) { - console.log(r); - if (job.compare(r)) { - clearInterval(timer); - job.callback(); - delete _this.jobs[jobId]; - console.log('DONE TRYING'); - } - }); - }, job.interval); - } - }]); - - return Queue; -}(); - -/* harmony default export */ __webpack_exports__["a"] = (Queue); + /** + * Check if a tag is an unknown element. + * Platform-dependent. + */ + isUnknownElement: no, -/***/ }), -/* 13 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /** + * Get the namespace of an element + */ + getTagNamespace: noop, -"use strict"; -/* harmony default export */ __webpack_exports__["a"] = ([{ path: '/', redirect: '/servers' }, { path: '/add-account', component: __webpack_require__(19) }, { path: '/servers', component: __webpack_require__(21) }, { path: '/servers/:server_id', component: __webpack_require__(20) }, { path: '/servers/:server_id/sites/:site_id', component: __webpack_require__(24) }, { path: '/servers/:server_id/sites/:site_id/deployment/script', component: __webpack_require__(22) }, { path: '/servers/:server_id/sites/:site_id/deployment/log', component: __webpack_require__(23) }, { path: '/servers/:server_id/sites/:site_id/env', component: __webpack_require__(25) }]); + /** + * Parse the real tag name for the specific platform. + */ + parsePlatformTagName: identity, -/***/ }), -/* 14 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { + /** + * Check if an attribute must be bound using property, e.g. value + * Platform-dependent. + */ + mustUseProp: no, -"use strict"; -/* harmony default export */ __webpack_exports__["a"] = ({ - getServers: function getServers(_ref, account) { - var commit = _ref.commit, - dispatch = _ref.dispatch; + /** + * Exposed for legacy reasons + */ + _lifecycleHooks: LIFECYCLE_HOOKS +}); - console.log('Adding Servers: ', account); - account.servers().then(function (r) { - var servers = r.map(function (server) { - server.account = account; - return server; - }); - console.log(account.id, servers); - commit('set-servers', r); - r.forEach(function (s) { - dispatch('getServerSites', s); - }); - }); - }, - getServerSites: function getServerSites(_ref2, server) { - var commit = _ref2.commit; +/* */ - server.account.sites(server.id).then(function (r) { - commit('add-sites', r.map(function (site) { - site.server_id = server.id; - site.account = server.account; - return site; - })); - commit('ready'); - }); - }, - toggleQuickDeploy: function toggleQuickDeploy(_ref3, _ref4) { - var commit = _ref3.commit; - var server = _ref4.server, - site = _ref4.site; +var emptyObject = Object.freeze({}); - if (site.quick_deploy) { - site.quick_deploy = false; - commit('set-site', site); - return site.account.disableQuickDeploy(server.id, site.id); - } - site.quick_deploy = true; - commit('set-site', site); - return site.account.enableQuickDeploy(server.id, site.id); - } -}); +/** + * Check if a string starts with $ or _ + */ +function isReserved (str) { + var c = (str + '').charCodeAt(0); + return c === 0x24 || c === 0x5F +} -/***/ }), -/* 15 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/** + * Define a property. + */ +function def (obj, key, val, enumerable) { + Object.defineProperty(obj, key, { + value: val, + enumerable: !!enumerable, + writable: true, + configurable: true + }); +} -"use strict"; -/* harmony default export */ __webpack_exports__["a"] = ({ - getServerById: function getServerById(state) { - return function (id) { - return state.servers.find(function (s) { - return s.id.toString() === id; - }); - }; - }, - getSitesForServer: function getSitesForServer(state) { - return function (server) { - return state.sites.filter(function (s) { - return s.server_id === server.id; - }); - }; - }, - getSiteById: function getSiteById(state) { - return function (id) { - return state.sites.find(function (s) { - return s.id.toString() === id; - }); - }; +/** + * Parse simple path. + */ +var bailRE = /[^\w.$]/; +function parsePath (path) { + if (bailRE.test(path)) { + return + } + var segments = path.split('.'); + return function (obj) { + for (var i = 0; i < segments.length; i++) { + if (!obj) { return } + obj = obj[segments[i]]; } -}); + return obj + } +} -/***/ }), -/* 16 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +/* */ -"use strict"; -function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } +// can we use __proto__? +var hasProto = '__proto__' in {}; -/* harmony default export */ __webpack_exports__["a"] = ({ - 'set-servers': function setServers(state, servers) { - var _state$servers; +// Browser environment sniffing +var inBrowser = typeof window !== 'undefined'; +var UA = inBrowser && window.navigator.userAgent.toLowerCase(); +var isIE = UA && /msie|trident/.test(UA); +var isIE9 = UA && UA.indexOf('msie 9.0') > 0; +var isEdge = UA && UA.indexOf('edge/') > 0; +var isAndroid = UA && UA.indexOf('android') > 0; +var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA); +var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; - (_state$servers = state.servers).push.apply(_state$servers, _toConsumableArray(servers)); - }, - 'add-sites': function addSites(state, sites) { - var _state$sites; +// Firefox has a "watch" function on Object.prototype... +var nativeWatch = ({}).watch; - (_state$sites = state.sites).push.apply(_state$sites, _toConsumableArray(sites)); - }, - ready: function ready(state) { - state.loading = false; - }, +var supportsPassive = false; +if (inBrowser) { + try { + var opts = {}; + Object.defineProperty(opts, 'passive', ({ + get: function get () { + /* istanbul ignore next */ + supportsPassive = true; + } + })); // https://github.com/facebook/flow/issues/285 + window.addEventListener('test-passive', null, opts); + } catch (e) {} +} - 'set-site': function setSite(state, site) { - var theIndex = state.sites.findIndex(function (s) { - return s.id === site.id; - }); - state.sites[theIndex] = site; +// this needs to be lazy-evaled because vue may be required before +// vue-server-renderer can set VUE_ENV +var _isServer; +var isServerRendering = function () { + if (_isServer === undefined) { + /* istanbul ignore if */ + if (!inBrowser && typeof global !== 'undefined') { + // detect presence of vue-server-renderer and avoid + // Webpack shimming the process + _isServer = global['process'].env.VUE_ENV === 'server'; + } else { + _isServer = false; } -}); + } + return _isServer +}; -/***/ }), -/* 17 */ -/***/ (function(module, __webpack_exports__, __webpack_require__) { +// detect devtools +var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; -"use strict"; -class MySQLDatabase { - constructor(data) { - Object.keys(data).forEach(i => { - this[i] = data[i]; - }); - } +/* istanbul ignore next */ +function isNative (Ctor) { + return typeof Ctor === 'function' && /native code/.test(Ctor.toString()) } -class ForgeRequest { - constructor(api_key) { - this.api_key = api_key; +var hasSymbol = + typeof Symbol !== 'undefined' && isNative(Symbol) && + typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys); - this.headers = { - 'Content-Type': 'application/json', - 'Accept': 'application/json', - 'Authorization': 'Bearer ' + this.api_key - }; +var _Set; +/* istanbul ignore if */ // $flow-disable-line +if (typeof Set !== 'undefined' && isNative(Set)) { + // use native Set when available. + _Set = Set; +} else { + // a non-standard Set polyfill that only works with primitive keys. + _Set = (function () { + function Set () { + this.set = Object.create(null); } + Set.prototype.has = function has (key) { + return this.set[key] === true + }; + Set.prototype.add = function add (key) { + this.set[key] = true; + }; + Set.prototype.clear = function clear () { + this.set = Object.create(null); + }; - base(method, path, body = null, callback = () => true) { - return new Promise((resolve, reject) => { - fetch('https://forge.laravel.com/api/v1/' + path, { - method, - headers: this.headers, - body: body ? JSON.stringify(body) : null - }).then(r => resolve(callback(r))).catch(err => { - console.error(err); - reject(err); - }); - }); - } + return Set; + }()); +} - json(method, path, body, callback = () => true) { - return new Promise((resolve, reject) => { - this.base(method, path, body, r => r.json()).then(r => resolve(callback(r))).catch(err => reject(err)); - }); - } +/* */ - text(method, path, body, callback = () => true) { - return new Promise((resolve, reject) => { - return this.base(method, path, body, r => r.text()).then(r => resolve(callback(r))).catch(err => reject(err)); - }); - } -} +var warn = noop; +var tip = noop; +var generateComponentTrace = (noop); // work around flow check +var formatComponentName = (noop); -class FirewallRule { - constructor(data) { - Object.keys(data).forEach(i => { - this[i] = data[i]; - }); - } -} +if (true) { + var hasConsole = typeof console !== 'undefined'; + var classifyRE = /(?:^|[-_])(\w)/g; + var classify = function (str) { return str + .replace(classifyRE, function (c) { return c.toUpperCase(); }) + .replace(/[-_]/g, ''); }; -class Certificate { - constructor(data) { - Object.keys(data).forEach(i => { - this[i] = data[i]; - }); - } -} + warn = function (msg, vm) { + var trace = vm ? generateComponentTrace(vm) : ''; -class MySQLUser { - constructor(data) { - Object.keys(data).forEach(i => { - this[i] = data[i]; - }); + if (config.warnHandler) { + config.warnHandler.call(null, msg, vm, trace); + } else if (hasConsole && (!config.silent)) { + console.error(("[Vue warn]: " + msg + trace)); } -} + }; -class Server { - constructor(data) { - Object.keys(data).forEach(i => { - this[i] = data[i]; - }); + tip = function (msg, vm) { + if (hasConsole && (!config.silent)) { + console.warn("[Vue tip]: " + msg + ( + vm ? generateComponentTrace(vm) : '' + )); } -} + }; -class Daemon { - constructor(data) { - Object.keys(data).forEach(i => { - this[i] = data[i]; - }); + formatComponentName = function (vm, includeFile) { + if (vm.$root === vm) { + return '' + } + var options = typeof vm === 'function' && vm.cid != null + ? vm.options + : vm._isVue + ? vm.$options || vm.constructor.options + : vm || {}; + var name = options.name || options._componentTag; + var file = options.__file; + if (!name && file) { + var match = file.match(/([^/\\]+)\.vue$/); + name = match && match[1]; } -} -class Worker { - constructor(data) { - Object.keys(data).forEach(i => { - this[i] = data[i]; - }); + return ( + (name ? ("<" + (classify(name)) + ">") : "") + + (file && includeFile !== false ? (" at " + file) : '') + ) + }; + + var repeat = function (str, n) { + var res = ''; + while (n) { + if (n % 2 === 1) { res += str; } + if (n > 1) { str += str; } + n >>= 1; } -} + return res + }; -class Site { - constructor(data) { - Object.keys(data).forEach(i => { - this[i] = data[i]; - }); + generateComponentTrace = function (vm) { + if (vm._isVue && vm.$parent) { + var tree = []; + var currentRecursiveSequence = 0; + while (vm) { + if (tree.length > 0) { + var last = tree[tree.length - 1]; + if (last.constructor === vm.constructor) { + currentRecursiveSequence++; + vm = vm.$parent; + continue + } else if (currentRecursiveSequence > 0) { + tree[tree.length - 1] = [last, currentRecursiveSequence]; + currentRecursiveSequence = 0; + } + } + tree.push(vm); + vm = vm.$parent; + } + return '\n\nfound in\n\n' + tree + .map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) + ? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)") + : formatComponentName(vm))); }) + .join('\n') + } else { + return ("\n\n(found in " + (formatComponentName(vm)) + ")") } + }; } -class Forge { - - constructor(api_key) { - this.request = new ForgeRequest(api_key); - } - - // --------------------------------- - // Servers - // --------------------------------- - - servers() { - return this.request.json('GET', `servers`, null, r => r.servers.map(data => new Server(data))); - } - - server(serverId) { - return this.request.json('GET', `servers/${serverId}`, null, r => new Server(r.server)); - } - - rebootServer(serverId) { - return this.request.base('POST', `servers/${serverId}/reboot`); - } - - // --------------------------------- - // Services - // --------------------------------- +/* */ - // MySQL - rebootMysql(serverId) { - return this.request.base('POST', `servers/${serverId}/mysql/reboot`); - } - stopMysql(serverId) { - return this.request.base('POST', `servers/${serverId}/mysql/stop`); - } +var uid = 0; - // Postgres - rebootPostgres(serverId) { - return this.request.base('POST', `servers/${serverId}/postgres/reboot`); - } +/** + * A dep is an observable that can have multiple + * directives subscribing to it. + */ +var Dep = function Dep () { + this.id = uid++; + this.subs = []; +}; - stopPostgres(serverId) { - return this.request.base('POST', `servers/${serverId}/postgres/stop`); - } +Dep.prototype.addSub = function addSub (sub) { + this.subs.push(sub); +}; - // NginX - rebootNginx(serverId) { - return this.request.base('POST', `servers/${serverId}/nginx/reboot`); - } +Dep.prototype.removeSub = function removeSub (sub) { + remove(this.subs, sub); +}; - stopNginx(serverId) { - return this.request.base('POST', `servers/${serverId}/nginx/stop`); +Dep.prototype.depend = function depend () { + if (Dep.target) { + Dep.target.addDep(this); } +}; - siteNginxFile(serverId, siteId) { - return this.request.text('GET', `servers/${serverId}/sites/${siteId}/nginx`, null, r => r); +Dep.prototype.notify = function notify () { + // stabilize the subscriber list first + var subs = this.subs.slice(); + for (var i = 0, l = subs.length; i < l; i++) { + subs[i].update(); } +}; - updateSiteNginxFile(serverId, siteId, content) { - return this.request.base('PUT', `servers/${serverId}/sites/${siteId}/nginx`, { content }); - } +// the current target watcher being evaluated. +// this is globally unique because there could be only one +// watcher being evaluated at any time. +Dep.target = null; +var targetStack = []; - // Blackfire - installBlackfire(serverId, data) { - return this.request.base('POST', `servers/${serverId}/blackfire/install`, data); - } +function pushTarget (_target) { + if (Dep.target) { targetStack.push(Dep.target); } + Dep.target = _target; +} - removeBlackfire(serverId) { - return this.request.base('DELETE', `servers/${serverId}/blackfire/remove`); - } +function popTarget () { + Dep.target = targetStack.pop(); +} - // Papertrail - installPapertrail(serverId, data) { - return this.request.base('POST', `servers/${serverId}/papertrail/install`, data); - } +/* */ - removePapertrail(serverId) { - return this.request.base('DELETE', `servers/${serverId}/papertrail/remove`); - } - - // --------------------------------- - // Daemons - // --------------------------------- - - daemons(serverId) { - return this.request.json('GET', `servers/${serverId}/daemons`, null, r => r.daemons.map(data => new Daemon(data))); - } - - daemon(serverId, daemonId) { - return this.request.json('GET', `servers/${serverId}/daemons/${daemonId}`, null, r => new Daemon(r.daemon)); - } +var VNode = function VNode ( + tag, + data, + children, + text, + elm, + context, + componentOptions, + asyncFactory +) { + this.tag = tag; + this.data = data; + this.children = children; + this.text = text; + this.elm = elm; + this.ns = undefined; + this.context = context; + this.functionalContext = undefined; + this.functionalOptions = undefined; + this.functionalScopeId = undefined; + this.key = data && data.key; + this.componentOptions = componentOptions; + this.componentInstance = undefined; + this.parent = undefined; + this.raw = false; + this.isStatic = false; + this.isRootInsert = true; + this.isComment = false; + this.isCloned = false; + this.isOnce = false; + this.asyncFactory = asyncFactory; + this.asyncMeta = undefined; + this.isAsyncPlaceholder = false; +}; - createDaemon(serverId, data) { - return this.request.json('POST', `servers/${serverId}/daemons`, data, r => new Daemon(r.daemon)); - } +var prototypeAccessors = { child: { configurable: true } }; - restartDaemon(serverId, daemonId) { - return this.request.base('POST', `servers/${serverId}/daemons/${daemonId}/restart`); - } +// DEPRECATED: alias for componentInstance for backwards compat. +/* istanbul ignore next */ +prototypeAccessors.child.get = function () { + return this.componentInstance +}; - deleteDaemon(serverId, daemonId) { - return this.request.base('DELETE', `servers/${serverId}/daemons/${daemonId}`); - } +Object.defineProperties( VNode.prototype, prototypeAccessors ); - // --------------------------------- - // Firewall Rules - // --------------------------------- +var createEmptyVNode = function (text) { + if ( text === void 0 ) text = ''; - firewallRules(serverId) { - return this.request.json('GET', `servers/${serverId}/firewall-rules`, null, r => r.rules.map(data => new FirewallRule(data))); - } + var node = new VNode(); + node.text = text; + node.isComment = true; + return node +}; - firewallRule(serverId, ruleId) { - return this.request.json('GET', `servers/${serverId}/firewall-rules/${ruleId}`, null, r => new FirewallRule(r.rule)); - } +function createTextVNode (val) { + return new VNode(undefined, undefined, undefined, String(val)) +} - createFirewallRule(serverId, data) { - return this.request.json('POST', `servers/${serverId}/firewall-rules`, data, r => new FirewallRule(r.rule)); +// optimized shallow clone +// used for static nodes and slot nodes because they may be reused across +// multiple renders, cloning them avoids errors when DOM manipulations rely +// on their elm reference. +function cloneVNode (vnode, deep) { + var cloned = new VNode( + vnode.tag, + vnode.data, + vnode.children, + vnode.text, + vnode.elm, + vnode.context, + vnode.componentOptions, + vnode.asyncFactory + ); + cloned.ns = vnode.ns; + cloned.isStatic = vnode.isStatic; + cloned.key = vnode.key; + cloned.isComment = vnode.isComment; + cloned.isCloned = true; + if (deep && vnode.children) { + cloned.children = cloneVNodes(vnode.children); } + return cloned +} - deleteFirewallRule(serverId, ruleId) { - return this.request.json('DELETE', `servers/${serverId}/firewall-rules/${ruleId}`); +function cloneVNodes (vnodes, deep) { + var len = vnodes.length; + var res = new Array(len); + for (var i = 0; i < len; i++) { + res[i] = cloneVNode(vnodes[i], deep); } + return res +} - // --------------------------------- - // Sites - // --------------------------------- +/* + * not type checking this file because flow doesn't play well with + * dynamically accessing methods on Array prototype + */ - sites(serverId) { - return this.request.json('GET', `servers/${serverId}/sites`, null, r => r.sites.map(data => new Site(data))); - } +var arrayProto = Array.prototype; +var arrayMethods = Object.create(arrayProto);[ + 'push', + 'pop', + 'shift', + 'unshift', + 'splice', + 'sort', + 'reverse' +] +.forEach(function (method) { + // cache original method + var original = arrayProto[method]; + def(arrayMethods, method, function mutator () { + var args = [], len = arguments.length; + while ( len-- ) args[ len ] = arguments[ len ]; - site(serverId, siteId) { - return this.request.json('GET', `servers/${serverId}/sites/${siteId}`, null, r => new Site(r.site)); - } + var result = original.apply(this, args); + var ob = this.__ob__; + var inserted; + switch (method) { + case 'push': + case 'unshift': + inserted = args; + break + case 'splice': + inserted = args.slice(2); + break + } + if (inserted) { ob.observeArray(inserted); } + // notify change + ob.dep.notify(); + return result + }); +}); - createSite(serverId, data) { - return this.request.json('POST', `servers/${serverId}/sites`, data, r => new Site(r.site)); - } +/* */ - updateSite(serverId, siteId, data) { - return this.request.json('PUT', `servers/${serverId}/sites/${siteId}`, data, r => new Site(r.site)); - } +var arrayKeys = Object.getOwnPropertyNames(arrayMethods); - // NOT FOUND IN API DOCS --- @TODO: CHECK OUT FORGE PHP SDK - // refreshSiteToken(serverId, siteId){} +/** + * By default, when a reactive property is set, the new value is + * also converted to become reactive. However when passing down props, + * we don't want to force conversion because the value may be a nested value + * under a frozen data structure. Converting it would defeat the optimization. + */ +var observerState = { + shouldConvert: true +}; - deleteSite(serverId, siteId) { - return this.request.base('DELETE', `servers/${serverId}/sites/${siteId}`); +/** + * Observer class that are attached to each observed + * object. Once attached, the observer converts target + * object's property keys into getter/setters that + * collect dependencies and dispatches updates. + */ +var Observer = function Observer (value) { + this.value = value; + this.dep = new Dep(); + this.vmCount = 0; + def(value, '__ob__', this); + if (Array.isArray(value)) { + var augment = hasProto + ? protoAugment + : copyAugment; + augment(value, arrayMethods, arrayKeys); + this.observeArray(value); + } else { + this.walk(value); } +}; - // Environment File - siteEnvironmentFile(serverId, siteId) { - return this.request.text('GET', `servers/${serverId}/sites/${siteId}/env`, null, r => r); +/** + * Walk through each property and convert them into + * getter/setters. This method should only be called when + * value type is Object. + */ +Observer.prototype.walk = function walk (obj) { + var keys = Object.keys(obj); + for (var i = 0; i < keys.length; i++) { + defineReactive(obj, keys[i], obj[keys[i]]); } +}; - updateSiteEnvironmentFile(serverId, siteId, content) { - return this.request.base('PUT', `servers/${serverId}/sites/${siteId}/env`, { content }); +/** + * Observe a list of Array items. + */ +Observer.prototype.observeArray = function observeArray (items) { + for (var i = 0, l = items.length; i < l; i++) { + observe(items[i]); } +}; - // Site Repositories and Deployments - installGitRepositoryOnSite(serverId, siteId, data) { - return this.request.base('POST', `servers/${serverId}/sites/${siteId}/git`, data); - } +// helpers - // NOT FOUND IN API DOCS --- @TODO: CHECK OUT FORGE PHP SDK - // updateSiteGitRepository(serverId, siteId, data){} +/** + * Augment an target Object or Array by intercepting + * the prototype chain using __proto__ + */ +function protoAugment (target, src, keys) { + /* eslint-disable no-proto */ + target.__proto__ = src; + /* eslint-enable no-proto */ +} - destroySiteGitRepository(serverId, siteId) { - return this.request.base('DELETE', `servers/${serverId}/sites/${siteId}/git`); +/** + * Augment an target Object or Array by defining + * hidden properties. + */ +/* istanbul ignore next */ +function copyAugment (target, src, keys) { + for (var i = 0, l = keys.length; i < l; i++) { + var key = keys[i]; + def(target, key, src[key]); } +} - siteDeploymentScript(serverId, siteId) { - return this.request.text('GET', `servers/${serverId}/sites/${siteId}/deployment/script`, null, r => r); +/** + * Attempt to create an observer instance for a value, + * returns the new observer if successfully observed, + * or the existing observer if the value already has one. + */ +function observe (value, asRootData) { + if (!isObject(value) || value instanceof VNode) { + return } - - updateSiteDeploymentScript(serverId, siteId, content) { - return this.request.text('PUT', `servers/${serverId}/sites/${siteId}/deployment/script`, { content }); + var ob; + if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { + ob = value.__ob__; + } else if ( + observerState.shouldConvert && + !isServerRendering() && + (Array.isArray(value) || isPlainObject(value)) && + Object.isExtensible(value) && + !value._isVue + ) { + ob = new Observer(value); } - - enableQuickDeploy(serverId, siteId) { - return this.request.base('POST', `servers/${serverId}/sites/${siteId}/deployment`); - } - - disableQuickDeploy(serverId, siteId) { - return this.request.base('DELETE', `servers/${serverId}/sites/${siteId}/deployment`); - } - - deploySite(serverId, siteId) { - return this.request.base('POST', `servers/${serverId}/sites/${siteId}/deployment/deploy`); + if (asRootData && ob) { + ob.vmCount++; } + return ob +} - resetDeploymentState(serverId, siteId) { - return this.request.base('POST', `servers/${serverId}/sites/${siteId}/deployment/reset`); - } +/** + * Define a reactive property on an Object. + */ +function defineReactive ( + obj, + key, + val, + customSetter, + shallow +) { + var dep = new Dep(); - siteDeploymentLog(serverId, siteId) { - return this.request.text('GET', `servers/${serverId}/sites/${siteId}/deployment/log`, null, r => r); + var property = Object.getOwnPropertyDescriptor(obj, key); + if (property && property.configurable === false) { + return } - // Notifications - enableHipchatNotifications(serverId, siteId, data) {} - - disableHipchatNotifications(serverId, siteId) {} + // cater for pre-defined getter/setters + var getter = property && property.get; + var setter = property && property.set; - // Installing Wordpress - installWordPress(serverId, siteId, data) { - return this.request.base('POST', `servers/${serverId}/sites/${siteId}/wordpress`, data); - } + var childOb = !shallow && observe(val); + Object.defineProperty(obj, key, { + enumerable: true, + configurable: true, + get: function reactiveGetter () { + var value = getter ? getter.call(obj) : val; + if (Dep.target) { + dep.depend(); + if (childOb) { + childOb.dep.depend(); + if (Array.isArray(value)) { + dependArray(value); + } + } + } + return value + }, + set: function reactiveSetter (newVal) { + var value = getter ? getter.call(obj) : val; + /* eslint-disable no-self-compare */ + if (newVal === value || (newVal !== newVal && value !== value)) { + return + } + /* eslint-enable no-self-compare */ + if ("development" !== 'production' && customSetter) { + customSetter(); + } + if (setter) { + setter.call(obj, newVal); + } else { + val = newVal; + } + childOb = !shallow && observe(newVal); + dep.notify(); + } + }); +} - removeWordPress(serverId, siteId) { - return this.request.base('DELETE', `servers/${serverId}/sites/${siteId}/wordpress`); +/** + * Set a property on an object. Adds the new property and + * triggers change notification if the property doesn't + * already exist. + */ +function set (target, key, val) { + if (Array.isArray(target) && isValidArrayIndex(key)) { + target.length = Math.max(target.length, key); + target.splice(key, 1, val); + return val } - - // Updating Load balancing Configuration - updateLoadBalancingConfiguration(serverId, siteId, data) { - return this.request.base('POST', `servers/${serverId}/sites/${siteId}/balancing`, data); + if (hasOwn(target, key)) { + target[key] = val; + return val } - - // --------------------------------- - // Workers - // --------------------------------- - - workers(serverId, siteId) { - return this.request.json('GET', `servers/${serverId}/sites/${siteId}/workers`, null, r => r.workers.map(data => new Worker(data))); + var ob = (target).__ob__; + if (target._isVue || (ob && ob.vmCount)) { + "development" !== 'production' && warn( + 'Avoid adding reactive properties to a Vue instance or its root $data ' + + 'at runtime - declare it upfront in the data option.' + ); + return val } - - worker(serverId, siteId, workerId) { - return this.request.json('GET', `servers/${serverId}/sites/${siteId}/workers/${workerId}`, null, r => new Worker(r.worker)); + if (!ob) { + target[key] = val; + return val } + defineReactive(ob.value, key, val); + ob.dep.notify(); + return val +} - createWorker(serverId, siteId, data) { - return this.request.json('POST', `servers/${serverId}/sites/${siteId}/workers`, data, r => new Worker(r.worker)); +/** + * Delete a property and trigger change if necessary. + */ +function del (target, key) { + if (Array.isArray(target) && isValidArrayIndex(key)) { + target.splice(key, 1); + return } - - deleteWorker(serverId, siteId, workerId) { - return this.request.base('DELETE', `servers/${serverId}/sites/${siteId}/workers/${workerId}`); + var ob = (target).__ob__; + if (target._isVue || (ob && ob.vmCount)) { + "development" !== 'production' && warn( + 'Avoid deleting properties on a Vue instance or its root $data ' + + '- just set it to null.' + ); + return } - - restartWorker(serverId, siteId, workerId) { - return this.request.base('POST', `servers/${serverId}/sites/${siteId}/workers/${workerId}/restart`); + if (!hasOwn(target, key)) { + return } - - // --------------------------------- - // Site SSL Certificates - // --------------------------------- - certificates(serverId, siteId) { - return this.request.json('GET', `servers/${serverId}/sites/${siteId}/certificates`, null, ({ certificates }) => certificates.map(data => new Certificate(data))); + delete target[key]; + if (!ob) { + return } + ob.dep.notify(); +} - certificate(serverId, siteId, certificateId) { - return this.request.json('GET', `servers/${serverId}/sites/${siteId}/certificates/${certificateId}`, null, ({ certificate }) => new Certificate(certificate)); +/** + * Collect dependencies on array elements when the array is touched, since + * we cannot intercept array element access like property getters. + */ +function dependArray (value) { + for (var e = (void 0), i = 0, l = value.length; i < l; i++) { + e = value[i]; + e && e.__ob__ && e.__ob__.dep.depend(); + if (Array.isArray(e)) { + dependArray(e); + } } +} - createCertificate(serverId, siteId, data) { - return this.request.json('POST', `servers/${serverId}/sites/${siteId}/certificates`, data, ({ certificate }) => new Certificate(certificate)); - } +/* */ - deleteCertificate(serverId, siteId, certificateId) { - return this.request.base('DELETE', `servers/${serverId}/sites/${siteId}/certificates/${certificateId}`); - } +/** + * Option overwriting strategies are functions that handle + * how to merge a parent option value and a child option + * value into the final value. + */ +var strats = config.optionMergeStrategies; - getCertificateSigningRequest(serverId, siteId, certificateId) { - return this.request.base('GET', `servers/${serverId}/sites/${siteId}/certificates/${certificateId}/csr`); - } +/** + * Options with restrictions + */ +if (true) { + strats.el = strats.propsData = function (parent, child, vm, key) { + if (!vm) { + warn( + "option \"" + key + "\" can only be used during instance " + + 'creation with the `new` keyword.' + ); + } + return defaultStrat(parent, child) + }; +} - installCertificate(serverId, siteId, certificateId) { - return this.request.base('POST', `servers/${serverId}/sites/${siteId}/certificates/${certificateId}/install`, data); +/** + * Helper that recursively merges two data objects together. + */ +function mergeData (to, from) { + if (!from) { return to } + var key, toVal, fromVal; + var keys = Object.keys(from); + for (var i = 0; i < keys.length; i++) { + key = keys[i]; + toVal = to[key]; + fromVal = from[key]; + if (!hasOwn(to, key)) { + set(to, key, fromVal); + } else if (isPlainObject(toVal) && isPlainObject(fromVal)) { + mergeData(toVal, fromVal); + } } + return to +} - activateCertificate(serverId, siteId, certificateId) { - return this.request.base('POST', `servers/${serverId}/sites/${siteId}/certificates/${certificateId}/activate`); +/** + * Data + */ +function mergeDataOrFn ( + parentVal, + childVal, + vm +) { + if (!vm) { + // in a Vue.extend merge, both should be functions + if (!childVal) { + return parentVal + } + if (!parentVal) { + return childVal + } + // when parentVal & childVal are both present, + // we need to return a function that returns the + // merged result of both functions... no need to + // check if parentVal is a function here because + // it has to be a function to pass previous merges. + return function mergedDataFn () { + return mergeData( + typeof childVal === 'function' ? childVal.call(this) : childVal, + typeof parentVal === 'function' ? parentVal.call(this) : parentVal + ) + } + } else if (parentVal || childVal) { + return function mergedInstanceDataFn () { + // instance merge + var instanceData = typeof childVal === 'function' + ? childVal.call(vm) + : childVal; + var defaultData = typeof parentVal === 'function' + ? parentVal.call(vm) + : parentVal; + if (instanceData) { + return mergeData(instanceData, defaultData) + } else { + return defaultData + } + } } +} - obtainLetsEncryptCertificate(serverId, siteId, data) { - return this.request.json('POST', `servers/${serverId}/sites/${siteId}/certificates/letsencrypt`, data, ({ certificate }) => new Certificate(certificate)); - } - - // --------------------------------- - // MySQL - // --------------------------------- +strats.data = function ( + parentVal, + childVal, + vm +) { + if (!vm) { + if (childVal && typeof childVal !== 'function') { + "development" !== 'production' && warn( + 'The "data" option should be a function ' + + 'that returns a per-instance value in component ' + + 'definitions.', + vm + ); - mysqlDatabases(serverId) { - return this.request.json('GET', `servers/${serverId}/mysql`, data, ({ databases }) => databases.map(data => new MySQLDatabase(data))); + return parentVal + } + return mergeDataOrFn.call(this, parentVal, childVal) } - mysqlDatabase(serverId, databaseId) { - return this.request.json('GET', `servers/${serverId}/mysql/${databaseId}`, data, ({ database }) => new MySQLDatabase(database)); - } + return mergeDataOrFn(parentVal, childVal, vm) +}; - createMysqlDatabase(serverId, data) { - return this.request.json('POST', `servers/${serverId}/mysql`, data, ({ database }) => new MySQLDatabase(database)); - } +/** + * Hooks and props are merged as arrays. + */ +function mergeHook ( + parentVal, + childVal +) { + return childVal + ? parentVal + ? parentVal.concat(childVal) + : Array.isArray(childVal) + ? childVal + : [childVal] + : parentVal +} - updateMysqlDatabase(serverId, databaseId, data) { - return this.request.json('PUT', `servers/${serverId}/mysql/${databaseId}`, data, ({ database }) => new MySQLDatabase(database)); +LIFECYCLE_HOOKS.forEach(function (hook) { + strats[hook] = mergeHook; +}); + +/** + * Assets + * + * When a vm is present (instance creation), we need to do + * a three-way merge between constructor options, instance + * options and parent options. + */ +function mergeAssets ( + parentVal, + childVal, + vm, + key +) { + var res = Object.create(parentVal || null); + if (childVal) { + "development" !== 'production' && assertObjectType(key, childVal, vm); + return extend(res, childVal) + } else { + return res } +} - deleteMysqlDatabase(serverId, databaseId) { - return this.request.base('DELETE', `servers/${serverId}/mysql/${databaseId}`); +ASSET_TYPES.forEach(function (type) { + strats[type + 's'] = mergeAssets; +}); + +/** + * Watchers. + * + * Watchers hashes should not overwrite one + * another, so we merge them as arrays. + */ +strats.watch = function ( + parentVal, + childVal, + vm, + key +) { + // work around Firefox's Object.prototype.watch... + if (parentVal === nativeWatch) { parentVal = undefined; } + if (childVal === nativeWatch) { childVal = undefined; } + /* istanbul ignore if */ + if (!childVal) { return Object.create(parentVal || null) } + if (true) { + assertObjectType(key, childVal, vm); + } + if (!parentVal) { return childVal } + var ret = {}; + extend(ret, parentVal); + for (var key$1 in childVal) { + var parent = ret[key$1]; + var child = childVal[key$1]; + if (parent && !Array.isArray(parent)) { + parent = [parent]; + } + ret[key$1] = parent + ? parent.concat(child) + : Array.isArray(child) ? child : [child]; } + return ret +}; - // Users - mysqlUsers(serverId) { - return this.request.json('GET', `servers/${serverId}/mysql-users`, data, ({ users }) => users.map(data => new MySQLUser(data))); +/** + * Other object hashes. + */ +strats.props = +strats.methods = +strats.inject = +strats.computed = function ( + parentVal, + childVal, + vm, + key +) { + if (childVal && "development" !== 'production') { + assertObjectType(key, childVal, vm); } + if (!parentVal) { return childVal } + var ret = Object.create(null); + extend(ret, parentVal); + if (childVal) { extend(ret, childVal); } + return ret +}; +strats.provide = mergeDataOrFn; - mysqlUser(serverId, userId) { - return this.request.json('GET', `servers/${serverId}/mysql-users/${userId}`, data, ({ user }) => new MySQLUser(user)); +/** + * Default strategy. + */ +var defaultStrat = function (parentVal, childVal) { + return childVal === undefined + ? parentVal + : childVal +}; + +/** + * Validate component names + */ +function checkComponents (options) { + for (var key in options.components) { + var lower = key.toLowerCase(); + if (isBuiltInTag(lower) || config.isReservedTag(lower)) { + warn( + 'Do not use built-in or reserved HTML elements as component ' + + 'id: ' + key + ); + } } +} - createMysqlUser(serverId, data) { - return this.request.json('POST', `servers/${serverId}/mysql-users`, data, ({ user }) => new MySQLUser(user)); +/** + * Ensure all props option syntax are normalized into the + * Object-based format. + */ +function normalizeProps (options, vm) { + var props = options.props; + if (!props) { return } + var res = {}; + var i, val, name; + if (Array.isArray(props)) { + i = props.length; + while (i--) { + val = props[i]; + if (typeof val === 'string') { + name = camelize(val); + res[name] = { type: null }; + } else if (true) { + warn('props must be strings when using array syntax.'); + } + } + } else if (isPlainObject(props)) { + for (var key in props) { + val = props[key]; + name = camelize(key); + res[name] = isPlainObject(val) + ? val + : { type: val }; + } + } else if (true) { + warn( + "Invalid value for option \"props\": expected an Array or an Object, " + + "but got " + (toRawType(props)) + ".", + vm + ); } + options.props = res; +} - updateMysqlUser(serverId, userId, data) { - return this.request.json('PUT', `servers/${serverId}/mysql-users/${userId}`, data, ({ user }) => new MySQLUser(user)); +/** + * Normalize all injections into Object-based format + */ +function normalizeInject (options, vm) { + var inject = options.inject; + var normalized = options.inject = {}; + if (Array.isArray(inject)) { + for (var i = 0; i < inject.length; i++) { + normalized[inject[i]] = { from: inject[i] }; + } + } else if (isPlainObject(inject)) { + for (var key in inject) { + var val = inject[key]; + normalized[key] = isPlainObject(val) + ? extend({ from: key }, val) + : { from: val }; + } + } else if ("development" !== 'production' && inject) { + warn( + "Invalid value for option \"inject\": expected an Array or an Object, " + + "but got " + (toRawType(inject)) + ".", + vm + ); } +} - deleteMysqlUser(serverId, userId) { - return this.request.base('DELETE', `servers/${serverId}/mysql-users/${userId}`); +/** + * Normalize raw function directives into object format. + */ +function normalizeDirectives (options) { + var dirs = options.directives; + if (dirs) { + for (var key in dirs) { + var def = dirs[key]; + if (typeof def === 'function') { + dirs[key] = { bind: def, update: def }; + } + } } +} +function assertObjectType (name, value, vm) { + if (!isPlainObject(value)) { + warn( + "Invalid value for option \"" + name + "\": expected an Object, " + + "but got " + (toRawType(value)) + ".", + vm + ); + } } -/* harmony default export */ __webpack_exports__["a"] = (Forge); +/** + * Merge two option objects into a new one. + * Core utility used in both instantiation and inheritance. + */ +function mergeOptions ( + parent, + child, + vm +) { + if (true) { + checkComponents(child); + } + if (typeof child === 'function') { + child = child.options; + } -/***/ }), -/* 18 */ -/***/ (function(module, exports, __webpack_require__) { + normalizeProps(child, vm); + normalizeInject(child, vm); + normalizeDirectives(child); + var extendsFrom = child.extends; + if (extendsFrom) { + parent = mergeOptions(parent, extendsFrom, vm); + } + if (child.mixins) { + for (var i = 0, l = child.mixins.length; i < l; i++) { + parent = mergeOptions(parent, child.mixins[i], vm); + } + } + var options = {}; + var key; + for (key in parent) { + mergeField(key); + } + for (key in child) { + if (!hasOwn(parent, key)) { + mergeField(key); + } + } + function mergeField (key) { + var strat = strats[key] || defaultStrat; + options[key] = strat(parent[key], child[key], vm, key); + } + return options +} -/* WEBPACK VAR INJECTION */(function(global, module) {var __WEBPACK_AMD_DEFINE_RESULT__;/** - * @license - * Lodash - * Copyright JS Foundation and other contributors - * Released under MIT license - * Based on Underscore.js 1.8.3 - * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors +/** + * Resolve an asset. + * This function is used because child instances need access + * to assets defined in its ancestor chain. */ -;(function() { - - /** Used as a safe reference for `undefined` in pre-ES5 environments. */ - var undefined; +function resolveAsset ( + options, + type, + id, + warnMissing +) { + /* istanbul ignore if */ + if (typeof id !== 'string') { + return + } + var assets = options[type]; + // check local registration variations first + if (hasOwn(assets, id)) { return assets[id] } + var camelizedId = camelize(id); + if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } + var PascalCaseId = capitalize(camelizedId); + if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } + // fallback to prototype chain + var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; + if ("development" !== 'production' && warnMissing && !res) { + warn( + 'Failed to resolve ' + type.slice(0, -1) + ': ' + id, + options + ); + } + return res +} - /** Used as the semantic version number. */ - var VERSION = '4.17.4'; +/* */ - /** Used as the size to enable large array optimizations. */ - var LARGE_ARRAY_SIZE = 200; +function validateProp ( + key, + propOptions, + propsData, + vm +) { + var prop = propOptions[key]; + var absent = !hasOwn(propsData, key); + var value = propsData[key]; + // handle boolean props + if (isType(Boolean, prop.type)) { + if (absent && !hasOwn(prop, 'default')) { + value = false; + } else if (!isType(String, prop.type) && (value === '' || value === hyphenate(key))) { + value = true; + } + } + // check default value + if (value === undefined) { + value = getPropDefaultValue(vm, prop, key); + // since the default value is a fresh copy, + // make sure to observe it. + var prevShouldConvert = observerState.shouldConvert; + observerState.shouldConvert = true; + observe(value); + observerState.shouldConvert = prevShouldConvert; + } + if (true) { + assertProp(prop, key, value, vm, absent); + } + return value +} - /** Error message constants. */ - var CORE_ERROR_TEXT = 'Unsupported core-js use. Try https://npms.io/search?q=ponyfill.', - FUNC_ERROR_TEXT = 'Expected a function'; +/** + * Get the default value of a prop. + */ +function getPropDefaultValue (vm, prop, key) { + // no default, return undefined + if (!hasOwn(prop, 'default')) { + return undefined + } + var def = prop.default; + // warn against non-factory defaults for Object & Array + if ("development" !== 'production' && isObject(def)) { + warn( + 'Invalid default value for prop "' + key + '": ' + + 'Props with type Object/Array must use a factory function ' + + 'to return the default value.', + vm + ); + } + // the raw prop value was also undefined from previous render, + // return previous default value to avoid unnecessary watcher trigger + if (vm && vm.$options.propsData && + vm.$options.propsData[key] === undefined && + vm._props[key] !== undefined + ) { + return vm._props[key] + } + // call factory function for non-Function types + // a value is Function if its prototype is function even across different execution context + return typeof def === 'function' && getType(prop.type) !== 'Function' + ? def.call(vm) + : def +} - /** Used to stand-in for `undefined` hash values. */ - var HASH_UNDEFINED = '__lodash_hash_undefined__'; +/** + * Assert whether a prop is valid. + */ +function assertProp ( + prop, + name, + value, + vm, + absent +) { + if (prop.required && absent) { + warn( + 'Missing required prop: "' + name + '"', + vm + ); + return + } + if (value == null && !prop.required) { + return + } + var type = prop.type; + var valid = !type || type === true; + var expectedTypes = []; + if (type) { + if (!Array.isArray(type)) { + type = [type]; + } + for (var i = 0; i < type.length && !valid; i++) { + var assertedType = assertType(value, type[i]); + expectedTypes.push(assertedType.expectedType || ''); + valid = assertedType.valid; + } + } + if (!valid) { + warn( + "Invalid prop: type check failed for prop \"" + name + "\"." + + " Expected " + (expectedTypes.map(capitalize).join(', ')) + + ", got " + (toRawType(value)) + ".", + vm + ); + return + } + var validator = prop.validator; + if (validator) { + if (!validator(value)) { + warn( + 'Invalid prop: custom validator check failed for prop "' + name + '".', + vm + ); + } + } +} - /** Used as the maximum memoize cache size. */ - var MAX_MEMOIZE_SIZE = 500; +var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; - /** Used as the internal argument placeholder. */ - var PLACEHOLDER = '__lodash_placeholder__'; +function assertType (value, type) { + var valid; + var expectedType = getType(type); + if (simpleCheckRE.test(expectedType)) { + var t = typeof value; + valid = t === expectedType.toLowerCase(); + // for primitive wrapper objects + if (!valid && t === 'object') { + valid = value instanceof type; + } + } else if (expectedType === 'Object') { + valid = isPlainObject(value); + } else if (expectedType === 'Array') { + valid = Array.isArray(value); + } else { + valid = value instanceof type; + } + return { + valid: valid, + expectedType: expectedType + } +} - /** Used to compose bitmasks for cloning. */ - var CLONE_DEEP_FLAG = 1, - CLONE_FLAT_FLAG = 2, - CLONE_SYMBOLS_FLAG = 4; +/** + * Use function string name to check built-in types, + * because a simple equality check will fail when running + * across different vms / iframes. + */ +function getType (fn) { + var match = fn && fn.toString().match(/^\s*function (\w+)/); + return match ? match[1] : '' +} - /** Used to compose bitmasks for value comparisons. */ - var COMPARE_PARTIAL_FLAG = 1, - COMPARE_UNORDERED_FLAG = 2; +function isType (type, fn) { + if (!Array.isArray(fn)) { + return getType(fn) === getType(type) + } + for (var i = 0, len = fn.length; i < len; i++) { + if (getType(fn[i]) === getType(type)) { + return true + } + } + /* istanbul ignore next */ + return false +} - /** Used to compose bitmasks for function metadata. */ - var WRAP_BIND_FLAG = 1, - WRAP_BIND_KEY_FLAG = 2, - WRAP_CURRY_BOUND_FLAG = 4, - WRAP_CURRY_FLAG = 8, - WRAP_CURRY_RIGHT_FLAG = 16, - WRAP_PARTIAL_FLAG = 32, - WRAP_PARTIAL_RIGHT_FLAG = 64, - WRAP_ARY_FLAG = 128, - WRAP_REARG_FLAG = 256, - WRAP_FLIP_FLAG = 512; +/* */ - /** Used as default options for `_.truncate`. */ - var DEFAULT_TRUNC_LENGTH = 30, - DEFAULT_TRUNC_OMISSION = '...'; +function handleError (err, vm, info) { + if (vm) { + var cur = vm; + while ((cur = cur.$parent)) { + var hooks = cur.$options.errorCaptured; + if (hooks) { + for (var i = 0; i < hooks.length; i++) { + try { + var capture = hooks[i].call(cur, err, vm, info) === false; + if (capture) { return } + } catch (e) { + globalHandleError(e, cur, 'errorCaptured hook'); + } + } + } + } + } + globalHandleError(err, vm, info); +} - /** Used to detect hot functions by number of calls within a span of milliseconds. */ - var HOT_COUNT = 800, - HOT_SPAN = 16; +function globalHandleError (err, vm, info) { + if (config.errorHandler) { + try { + return config.errorHandler.call(null, err, vm, info) + } catch (e) { + logError(e, null, 'config.errorHandler'); + } + } + logError(err, vm, info); +} - /** Used to indicate the type of lazy iteratees. */ - var LAZY_FILTER_FLAG = 1, - LAZY_MAP_FLAG = 2, - LAZY_WHILE_FLAG = 3; +function logError (err, vm, info) { + if (true) { + warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); + } + /* istanbul ignore else */ + if (inBrowser && typeof console !== 'undefined') { + console.error(err); + } else { + throw err + } +} - /** Used as references for various `Number` constants. */ - var INFINITY = 1 / 0, - MAX_SAFE_INTEGER = 9007199254740991, - MAX_INTEGER = 1.7976931348623157e+308, - NAN = 0 / 0; +/* */ +/* globals MessageChannel */ + +var callbacks = []; +var pending = false; + +function flushCallbacks () { + pending = false; + var copies = callbacks.slice(0); + callbacks.length = 0; + for (var i = 0; i < copies.length; i++) { + copies[i](); + } +} + +// Here we have async deferring wrappers using both micro and macro tasks. +// In < 2.4 we used micro tasks everywhere, but there are some scenarios where +// micro tasks have too high a priority and fires in between supposedly +// sequential events (e.g. #4521, #6690) or even between bubbling of the same +// event (#6566). However, using macro tasks everywhere also has subtle problems +// when state is changed right before repaint (e.g. #6813, out-in transitions). +// Here we use micro task by default, but expose a way to force macro task when +// needed (e.g. in event handlers attached by v-on). +var microTimerFunc; +var macroTimerFunc; +var useMacroTask = false; + +// Determine (macro) Task defer implementation. +// Technically setImmediate should be the ideal choice, but it's only available +// in IE. The only polyfill that consistently queues the callback after all DOM +// events triggered in the same loop is by using MessageChannel. +/* istanbul ignore if */ +if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { + macroTimerFunc = function () { + setImmediate(flushCallbacks); + }; +} else if (typeof MessageChannel !== 'undefined' && ( + isNative(MessageChannel) || + // PhantomJS + MessageChannel.toString() === '[object MessageChannelConstructor]' +)) { + var channel = new MessageChannel(); + var port = channel.port2; + channel.port1.onmessage = flushCallbacks; + macroTimerFunc = function () { + port.postMessage(1); + }; +} else { + /* istanbul ignore next */ + macroTimerFunc = function () { + setTimeout(flushCallbacks, 0); + }; +} - /** Used as references for the maximum length and index of an array. */ - var MAX_ARRAY_LENGTH = 4294967295, - MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, - HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1; - - /** Used to associate wrap methods with their bit flags. */ - var wrapFlags = [ - ['ary', WRAP_ARY_FLAG], - ['bind', WRAP_BIND_FLAG], - ['bindKey', WRAP_BIND_KEY_FLAG], - ['curry', WRAP_CURRY_FLAG], - ['curryRight', WRAP_CURRY_RIGHT_FLAG], - ['flip', WRAP_FLIP_FLAG], - ['partial', WRAP_PARTIAL_FLAG], - ['partialRight', WRAP_PARTIAL_RIGHT_FLAG], - ['rearg', WRAP_REARG_FLAG] - ]; - - /** `Object#toString` result references. */ - var argsTag = '[object Arguments]', - arrayTag = '[object Array]', - asyncTag = '[object AsyncFunction]', - boolTag = '[object Boolean]', - dateTag = '[object Date]', - domExcTag = '[object DOMException]', - errorTag = '[object Error]', - funcTag = '[object Function]', - genTag = '[object GeneratorFunction]', - mapTag = '[object Map]', - numberTag = '[object Number]', - nullTag = '[object Null]', - objectTag = '[object Object]', - promiseTag = '[object Promise]', - proxyTag = '[object Proxy]', - regexpTag = '[object RegExp]', - setTag = '[object Set]', - stringTag = '[object String]', - symbolTag = '[object Symbol]', - undefinedTag = '[object Undefined]', - weakMapTag = '[object WeakMap]', - weakSetTag = '[object WeakSet]'; - - var arrayBufferTag = '[object ArrayBuffer]', - dataViewTag = '[object DataView]', - float32Tag = '[object Float32Array]', - float64Tag = '[object Float64Array]', - int8Tag = '[object Int8Array]', - int16Tag = '[object Int16Array]', - int32Tag = '[object Int32Array]', - uint8Tag = '[object Uint8Array]', - uint8ClampedTag = '[object Uint8ClampedArray]', - uint16Tag = '[object Uint16Array]', - uint32Tag = '[object Uint32Array]'; - - /** Used to match empty string literals in compiled template source. */ - var reEmptyStringLeading = /\b__p \+= '';/g, - reEmptyStringMiddle = /\b(__p \+=) '' \+/g, - reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g; +// Determine MicroTask defer implementation. +/* istanbul ignore next, $flow-disable-line */ +if (typeof Promise !== 'undefined' && isNative(Promise)) { + var p = Promise.resolve(); + microTimerFunc = function () { + p.then(flushCallbacks); + // in problematic UIWebViews, Promise.then doesn't completely break, but + // it can get stuck in a weird state where callbacks are pushed into the + // microtask queue but the queue isn't being flushed, until the browser + // needs to do some other work, e.g. handle a timer. Therefore we can + // "force" the microtask queue to be flushed by adding an empty timer. + if (isIOS) { setTimeout(noop); } + }; +} else { + // fallback to macro + microTimerFunc = macroTimerFunc; +} - /** Used to match HTML entities and HTML characters. */ - var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, - reUnescapedHtml = /[&<>"']/g, - reHasEscapedHtml = RegExp(reEscapedHtml.source), - reHasUnescapedHtml = RegExp(reUnescapedHtml.source); +/** + * Wrap a function so that if any code inside triggers state change, + * the changes are queued using a Task instead of a MicroTask. + */ +function withMacroTask (fn) { + return fn._withTask || (fn._withTask = function () { + useMacroTask = true; + var res = fn.apply(null, arguments); + useMacroTask = false; + return res + }) +} - /** Used to match template delimiters. */ - var reEscape = /<%-([\s\S]+?)%>/g, - reEvaluate = /<%([\s\S]+?)%>/g, - reInterpolate = /<%=([\s\S]+?)%>/g; +function nextTick (cb, ctx) { + var _resolve; + callbacks.push(function () { + if (cb) { + try { + cb.call(ctx); + } catch (e) { + handleError(e, ctx, 'nextTick'); + } + } else if (_resolve) { + _resolve(ctx); + } + }); + if (!pending) { + pending = true; + if (useMacroTask) { + macroTimerFunc(); + } else { + microTimerFunc(); + } + } + // $flow-disable-line + if (!cb && typeof Promise !== 'undefined') { + return new Promise(function (resolve) { + _resolve = resolve; + }) + } +} - /** Used to match property names within property paths. */ - var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, - reIsPlainProp = /^\w*$/, - reLeadingDot = /^\./, - rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g; +/* */ - /** - * Used to match `RegExp` - * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns). - */ - var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, - reHasRegExpChar = RegExp(reRegExpChar.source); +var mark; +var measure; - /** Used to match leading and trailing whitespace. */ - var reTrim = /^\s+|\s+$/g, - reTrimStart = /^\s+/, - reTrimEnd = /\s+$/; +if (true) { + var perf = inBrowser && window.performance; + /* istanbul ignore if */ + if ( + perf && + perf.mark && + perf.measure && + perf.clearMarks && + perf.clearMeasures + ) { + mark = function (tag) { return perf.mark(tag); }; + measure = function (name, startTag, endTag) { + perf.measure(name, startTag, endTag); + perf.clearMarks(startTag); + perf.clearMarks(endTag); + perf.clearMeasures(name); + }; + } +} - /** Used to match wrap detail comments. */ - var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, - reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, - reSplitDetails = /,? & /; +/* not type checking this file because flow doesn't play well with Proxy */ - /** Used to match words composed of alphanumeric characters. */ - var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g; +var initProxy; - /** Used to match backslashes in property paths. */ - var reEscapeChar = /\\(\\)?/g; +if (true) { + var allowedGlobals = makeMap( + 'Infinity,undefined,NaN,isFinite,isNaN,' + + 'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + + 'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + + 'require' // for Webpack/Browserify + ); - /** - * Used to match - * [ES template delimiters](http://ecma-international.org/ecma-262/7.0/#sec-template-literal-lexical-components). - */ - var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g; + var warnNonPresent = function (target, key) { + warn( + "Property or method \"" + key + "\" is not defined on the instance but " + + 'referenced during render. Make sure that this property is reactive, ' + + 'either in the data option, or for class-based components, by ' + + 'initializing the property. ' + + 'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', + target + ); + }; - /** Used to match `RegExp` flags from their coerced string values. */ - var reFlags = /\w*$/; + var hasProxy = + typeof Proxy !== 'undefined' && + Proxy.toString().match(/native code/); - /** Used to detect bad signed hexadecimal string values. */ - var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; + if (hasProxy) { + var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact'); + config.keyCodes = new Proxy(config.keyCodes, { + set: function set (target, key, value) { + if (isBuiltInModifier(key)) { + warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); + return false + } else { + target[key] = value; + return true + } + } + }); + } - /** Used to detect binary string values. */ - var reIsBinary = /^0b[01]+$/i; + var hasHandler = { + has: function has (target, key) { + var has = key in target; + var isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; + if (!has && !isAllowed) { + warnNonPresent(target, key); + } + return has || !isAllowed + } + }; - /** Used to detect host constructors (Safari). */ - var reIsHostCtor = /^\[object .+?Constructor\]$/; + var getHandler = { + get: function get (target, key) { + if (typeof key === 'string' && !(key in target)) { + warnNonPresent(target, key); + } + return target[key] + } + }; - /** Used to detect octal string values. */ - var reIsOctal = /^0o[0-7]+$/i; + initProxy = function initProxy (vm) { + if (hasProxy) { + // determine which proxy handler to use + var options = vm.$options; + var handlers = options.render && options.render._withStripped + ? getHandler + : hasHandler; + vm._renderProxy = new Proxy(vm, handlers); + } else { + vm._renderProxy = vm; + } + }; +} - /** Used to detect unsigned integer values. */ - var reIsUint = /^(?:0|[1-9]\d*)$/; +/* */ - /** Used to match Latin Unicode letters (excluding mathematical operators). */ - var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g; +var normalizeEvent = cached(function (name) { + var passive = name.charAt(0) === '&'; + name = passive ? name.slice(1) : name; + var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first + name = once$$1 ? name.slice(1) : name; + var capture = name.charAt(0) === '!'; + name = capture ? name.slice(1) : name; + return { + name: name, + once: once$$1, + capture: capture, + passive: passive + } +}); - /** Used to ensure capturing order of template delimiters. */ - var reNoMatch = /($^)/; +function createFnInvoker (fns) { + function invoker () { + var arguments$1 = arguments; - /** Used to match unescaped characters in compiled string literals. */ - var reUnescapedString = /['\n\r\u2028\u2029\\]/g; + var fns = invoker.fns; + if (Array.isArray(fns)) { + var cloned = fns.slice(); + for (var i = 0; i < cloned.length; i++) { + cloned[i].apply(null, arguments$1); + } + } else { + // return handler return value for single handlers + return fns.apply(null, arguments) + } + } + invoker.fns = fns; + return invoker +} - /** Used to compose unicode character classes. */ - var rsAstralRange = '\\ud800-\\udfff', - rsComboMarksRange = '\\u0300-\\u036f', - reComboHalfMarksRange = '\\ufe20-\\ufe2f', - rsComboSymbolsRange = '\\u20d0-\\u20ff', - rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, - rsDingbatRange = '\\u2700-\\u27bf', - rsLowerRange = 'a-z\\xdf-\\xf6\\xf8-\\xff', - rsMathOpRange = '\\xac\\xb1\\xd7\\xf7', - rsNonCharRange = '\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf', - rsPunctuationRange = '\\u2000-\\u206f', - rsSpaceRange = ' \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000', - rsUpperRange = 'A-Z\\xc0-\\xd6\\xd8-\\xde', - rsVarRange = '\\ufe0e\\ufe0f', - rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange; +function updateListeners ( + on, + oldOn, + add, + remove$$1, + vm +) { + var name, cur, old, event; + for (name in on) { + cur = on[name]; + old = oldOn[name]; + event = normalizeEvent(name); + if (isUndef(cur)) { + "development" !== 'production' && warn( + "Invalid handler for event \"" + (event.name) + "\": got " + String(cur), + vm + ); + } else if (isUndef(old)) { + if (isUndef(cur.fns)) { + cur = on[name] = createFnInvoker(cur); + } + add(event.name, cur, event.once, event.capture, event.passive); + } else if (cur !== old) { + old.fns = cur; + on[name] = old; + } + } + for (name in oldOn) { + if (isUndef(on[name])) { + event = normalizeEvent(name); + remove$$1(event.name, oldOn[name], event.capture); + } + } +} - /** Used to compose unicode capture groups. */ - var rsApos = "['\u2019]", - rsAstral = '[' + rsAstralRange + ']', - rsBreak = '[' + rsBreakRange + ']', - rsCombo = '[' + rsComboRange + ']', - rsDigits = '\\d+', - rsDingbat = '[' + rsDingbatRange + ']', - rsLower = '[' + rsLowerRange + ']', - rsMisc = '[^' + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + ']', - rsFitz = '\\ud83c[\\udffb-\\udfff]', - rsModifier = '(?:' + rsCombo + '|' + rsFitz + ')', - rsNonAstral = '[^' + rsAstralRange + ']', - rsRegional = '(?:\\ud83c[\\udde6-\\uddff]){2}', - rsSurrPair = '[\\ud800-\\udbff][\\udc00-\\udfff]', - rsUpper = '[' + rsUpperRange + ']', - rsZWJ = '\\u200d'; +/* */ - /** Used to compose unicode regexes. */ - var rsMiscLower = '(?:' + rsLower + '|' + rsMisc + ')', - rsMiscUpper = '(?:' + rsUpper + '|' + rsMisc + ')', - rsOptContrLower = '(?:' + rsApos + '(?:d|ll|m|re|s|t|ve))?', - rsOptContrUpper = '(?:' + rsApos + '(?:D|LL|M|RE|S|T|VE))?', - reOptMod = rsModifier + '?', - rsOptVar = '[' + rsVarRange + ']?', - rsOptJoin = '(?:' + rsZWJ + '(?:' + [rsNonAstral, rsRegional, rsSurrPair].join('|') + ')' + rsOptVar + reOptMod + ')*', - rsOrdLower = '\\d*(?:(?:1st|2nd|3rd|(?![123])\\dth)\\b)', - rsOrdUpper = '\\d*(?:(?:1ST|2ND|3RD|(?![123])\\dTH)\\b)', - rsSeq = rsOptVar + reOptMod + rsOptJoin, - rsEmoji = '(?:' + [rsDingbat, rsRegional, rsSurrPair].join('|') + ')' + rsSeq, - rsSymbol = '(?:' + [rsNonAstral + rsCombo + '?', rsCombo, rsRegional, rsSurrPair, rsAstral].join('|') + ')'; +function mergeVNodeHook (def, hookKey, hook) { + var invoker; + var oldHook = def[hookKey]; - /** Used to match apostrophes. */ - var reApos = RegExp(rsApos, 'g'); + function wrappedHook () { + hook.apply(this, arguments); + // important: remove merged hook to ensure it's called only once + // and prevent memory leak + remove(invoker.fns, wrappedHook); + } - /** - * Used to match [combining diacritical marks](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks) and - * [combining diacritical marks for symbols](https://en.wikipedia.org/wiki/Combining_Diacritical_Marks_for_Symbols). - */ - var reComboMark = RegExp(rsCombo, 'g'); + if (isUndef(oldHook)) { + // no existing hook + invoker = createFnInvoker([wrappedHook]); + } else { + /* istanbul ignore if */ + if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { + // already a merged invoker + invoker = oldHook; + invoker.fns.push(wrappedHook); + } else { + // existing plain hook + invoker = createFnInvoker([oldHook, wrappedHook]); + } + } - /** Used to match [string symbols](https://mathiasbynens.be/notes/javascript-unicode). */ - var reUnicode = RegExp(rsFitz + '(?=' + rsFitz + ')|' + rsSymbol + rsSeq, 'g'); + invoker.merged = true; + def[hookKey] = invoker; +} - /** Used to match complex or compound words. */ - var reUnicodeWord = RegExp([ - rsUpper + '?' + rsLower + '+' + rsOptContrLower + '(?=' + [rsBreak, rsUpper, '$'].join('|') + ')', - rsMiscUpper + '+' + rsOptContrUpper + '(?=' + [rsBreak, rsUpper + rsMiscLower, '$'].join('|') + ')', - rsUpper + '?' + rsMiscLower + '+' + rsOptContrLower, - rsUpper + '+' + rsOptContrUpper, - rsOrdUpper, - rsOrdLower, - rsDigits, - rsEmoji - ].join('|'), 'g'); +/* */ - /** Used to detect strings with [zero-width joiners or code points from the astral planes](http://eev.ee/blog/2015/09/12/dark-corners-of-unicode/). */ - var reHasUnicode = RegExp('[' + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + ']'); +function extractPropsFromVNodeData ( + data, + Ctor, + tag +) { + // we are only extracting raw values here. + // validation and default values are handled in the child + // component itself. + var propOptions = Ctor.options.props; + if (isUndef(propOptions)) { + return + } + var res = {}; + var attrs = data.attrs; + var props = data.props; + if (isDef(attrs) || isDef(props)) { + for (var key in propOptions) { + var altKey = hyphenate(key); + if (true) { + var keyInLowerCase = key.toLowerCase(); + if ( + key !== keyInLowerCase && + attrs && hasOwn(attrs, keyInLowerCase) + ) { + tip( + "Prop \"" + keyInLowerCase + "\" is passed to component " + + (formatComponentName(tag || Ctor)) + ", but the declared prop name is" + + " \"" + key + "\". " + + "Note that HTML attributes are case-insensitive and camelCased " + + "props need to use their kebab-case equivalents when using in-DOM " + + "templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"." + ); + } + } + checkProp(res, props, key, altKey, true) || + checkProp(res, attrs, key, altKey, false); + } + } + return res +} - /** Used to detect strings that need a more robust regexp to match words. */ - var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/; +function checkProp ( + res, + hash, + key, + altKey, + preserve +) { + if (isDef(hash)) { + if (hasOwn(hash, key)) { + res[key] = hash[key]; + if (!preserve) { + delete hash[key]; + } + return true + } else if (hasOwn(hash, altKey)) { + res[key] = hash[altKey]; + if (!preserve) { + delete hash[altKey]; + } + return true + } + } + return false +} - /** Used to assign default `context` object properties. */ - var contextProps = [ - 'Array', 'Buffer', 'DataView', 'Date', 'Error', 'Float32Array', 'Float64Array', - 'Function', 'Int8Array', 'Int16Array', 'Int32Array', 'Map', 'Math', 'Object', - 'Promise', 'RegExp', 'Set', 'String', 'Symbol', 'TypeError', 'Uint8Array', - 'Uint8ClampedArray', 'Uint16Array', 'Uint32Array', 'WeakMap', - '_', 'clearTimeout', 'isFinite', 'parseInt', 'setTimeout' - ]; +/* */ - /** Used to make template sourceURLs easier to identify. */ - var templateCounter = -1; +// The template compiler attempts to minimize the need for normalization by +// statically analyzing the template at compile time. +// +// For plain HTML markup, normalization can be completely skipped because the +// generated render function is guaranteed to return Array. There are +// two cases where extra normalization is needed: - /** Used to identify `toStringTag` values of typed arrays. */ - var typedArrayTags = {}; - typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = - typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = - typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = - typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = - typedArrayTags[uint32Tag] = true; - typedArrayTags[argsTag] = typedArrayTags[arrayTag] = - typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = - typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = - typedArrayTags[errorTag] = typedArrayTags[funcTag] = - typedArrayTags[mapTag] = typedArrayTags[numberTag] = - typedArrayTags[objectTag] = typedArrayTags[regexpTag] = - typedArrayTags[setTag] = typedArrayTags[stringTag] = - typedArrayTags[weakMapTag] = false; +// 1. When the children contains components - because a functional component +// may return an Array instead of a single root. In this case, just a simple +// normalization is needed - if any child is an Array, we flatten the whole +// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep +// because functional components already normalize their own children. +function simpleNormalizeChildren (children) { + for (var i = 0; i < children.length; i++) { + if (Array.isArray(children[i])) { + return Array.prototype.concat.apply([], children) + } + } + return children +} - /** Used to identify `toStringTag` values supported by `_.clone`. */ - var cloneableTags = {}; - cloneableTags[argsTag] = cloneableTags[arrayTag] = - cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = - cloneableTags[boolTag] = cloneableTags[dateTag] = - cloneableTags[float32Tag] = cloneableTags[float64Tag] = - cloneableTags[int8Tag] = cloneableTags[int16Tag] = - cloneableTags[int32Tag] = cloneableTags[mapTag] = - cloneableTags[numberTag] = cloneableTags[objectTag] = - cloneableTags[regexpTag] = cloneableTags[setTag] = - cloneableTags[stringTag] = cloneableTags[symbolTag] = - cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = - cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true; - cloneableTags[errorTag] = cloneableTags[funcTag] = - cloneableTags[weakMapTag] = false; +// 2. When the children contains constructs that always generated nested Arrays, +// e.g.