You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 lines
24 KiB
1 lines
24 KiB
{"ast":null,"code":"require(\"core-js/modules/es.array.map.js\");\n\nrequire(\"core-js/modules/es.regexp.exec.js\");\n\nrequire(\"core-js/modules/es.string.split.js\");\n\nrequire(\"core-js/modules/es.number.constructor.js\");\n\nrequire(\"core-js/modules/es.array.splice.js\");\n\nrequire(\"core-js/modules/es.array.concat.js\");\n\nrequire(\"core-js/modules/es.object.to-string.js\");\n\nrequire(\"core-js/modules/web.dom-collections.for-each.js\");\n\nrequire(\"core-js/modules/es.array.slice.js\");\n\nrequire(\"core-js/modules/es.object.keys.js\");\n\nvar Vue; // late bind\n\nvar version;\nvar map = Object.create(null);\n\nif (typeof window !== 'undefined') {\n window.__VUE_HOT_MAP__ = map;\n}\n\nvar installed = false;\nvar isBrowserify = false;\nvar initHookName = 'beforeCreate';\n\nexports.install = function (vue, browserify) {\n if (installed) {\n return;\n }\n\n installed = true;\n Vue = vue.__esModule ? vue.default : vue;\n version = Vue.version.split('.').map(Number);\n isBrowserify = browserify; // compat with < 2.0.0-alpha.7\n\n if (Vue.config._lifecycleHooks.indexOf('init') > -1) {\n initHookName = 'init';\n }\n\n exports.compatible = version[0] >= 2;\n\n if (!exports.compatible) {\n console.warn('[HMR] You are using a version of vue-hot-reload-api that is ' + 'only compatible with Vue.js core ^2.0.0.');\n return;\n }\n};\n/**\n * Create a record for a hot module, which keeps track of its constructor\n * and instances\n *\n * @param {String} id\n * @param {Object} options\n */\n\n\nexports.createRecord = function (id, options) {\n if (map[id]) {\n return;\n }\n\n var Ctor = null;\n\n if (typeof options === 'function') {\n Ctor = options;\n options = Ctor.options;\n }\n\n makeOptionsHot(id, options);\n map[id] = {\n Ctor: Ctor,\n options: options,\n instances: []\n };\n};\n/**\n * Check if module is recorded\n *\n * @param {String} id\n */\n\n\nexports.isRecorded = function (id) {\n return typeof map[id] !== 'undefined';\n};\n/**\n * Make a Component options object hot.\n *\n * @param {String} id\n * @param {Object} options\n */\n\n\nfunction makeOptionsHot(id, options) {\n if (options.functional) {\n var render = options.render;\n\n options.render = function (h, ctx) {\n var instances = map[id].instances;\n\n if (ctx && instances.indexOf(ctx.parent) < 0) {\n instances.push(ctx.parent);\n }\n\n return render(h, ctx);\n };\n } else {\n injectHook(options, initHookName, function () {\n var record = map[id];\n\n if (!record.Ctor) {\n record.Ctor = this.constructor;\n }\n\n record.instances.push(this);\n });\n injectHook(options, 'beforeDestroy', function () {\n var instances = map[id].instances;\n instances.splice(instances.indexOf(this), 1);\n });\n }\n}\n/**\n * Inject a hook to a hot reloadable component so that\n * we can keep track of it.\n *\n * @param {Object} options\n * @param {String} name\n * @param {Function} hook\n */\n\n\nfunction injectHook(options, name, hook) {\n var existing = options[name];\n options[name] = existing ? Array.isArray(existing) ? existing.concat(hook) : [existing, hook] : [hook];\n}\n\nfunction tryWrap(fn) {\n return function (id, arg) {\n try {\n fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn('Something went wrong during Vue component hot-reload. Full reload required.');\n }\n };\n}\n\nfunction updateOptions(oldOptions, newOptions) {\n for (var key in oldOptions) {\n if (!(key in newOptions)) {\n delete oldOptions[key];\n }\n }\n\n for (var key$1 in newOptions) {\n oldOptions[key$1] = newOptions[key$1];\n }\n}\n\nexports.rerender = tryWrap(function (id, options) {\n var record = map[id];\n\n if (!options) {\n record.instances.slice().forEach(function (instance) {\n instance.$forceUpdate();\n });\n return;\n }\n\n if (typeof options === 'function') {\n options = options.options;\n }\n\n if (record.Ctor) {\n record.Ctor.options.render = options.render;\n record.Ctor.options.staticRenderFns = options.staticRenderFns;\n record.instances.slice().forEach(function (instance) {\n instance.$options.render = options.render;\n instance.$options.staticRenderFns = options.staticRenderFns; // reset static trees\n // pre 2.5, all static trees are cached together on the instance\n\n if (instance._staticTrees) {\n instance._staticTrees = [];\n } // 2.5.0\n\n\n if (Array.isArray(record.Ctor.options.cached)) {\n record.Ctor.options.cached = [];\n } // 2.5.3\n\n\n if (Array.isArray(instance.$options.cached)) {\n instance.$options.cached = [];\n } // post 2.5.4: v-once trees are cached on instance._staticTrees.\n // Pure static trees are cached on the staticRenderFns array\n // (both already reset above)\n // 2.6: temporarily mark rendered scoped slots as unstable so that\n // child components can be forced to update\n\n\n var restore = patchScopedSlots(instance);\n instance.$forceUpdate();\n instance.$nextTick(restore);\n });\n } else {\n // functional or no instance created yet\n record.options.render = options.render;\n record.options.staticRenderFns = options.staticRenderFns; // handle functional component re-render\n\n if (record.options.functional) {\n // rerender with full options\n if (Object.keys(options).length > 2) {\n updateOptions(record.options, options);\n } else {\n // template-only rerender.\n // need to inject the style injection code for CSS modules\n // to work properly.\n var injectStyles = record.options._injectStyles;\n\n if (injectStyles) {\n var render = options.render;\n\n record.options.render = function (h, ctx) {\n injectStyles.call(ctx);\n return render(h, ctx);\n };\n }\n }\n\n record.options._Ctor = null; // 2.5.3\n\n if (Array.isArray(record.options.cached)) {\n record.options.cached = [];\n }\n\n record.instances.slice().forEach(function (instance) {\n instance.$forceUpdate();\n });\n }\n }\n});\nexports.reload = tryWrap(function (id, options) {\n var record = map[id];\n\n if (options) {\n if (typeof options === 'function') {\n options = options.options;\n }\n\n makeOptionsHot(id, options);\n\n if (record.Ctor) {\n if (version[1] < 2) {\n // preserve pre 2.2 behavior for global mixin handling\n record.Ctor.extendOptions = options;\n }\n\n var newCtor = record.Ctor.super.extend(options); // prevent record.options._Ctor from being overwritten accidentally\n\n newCtor.options._Ctor = record.options._Ctor;\n record.Ctor.options = newCtor.options;\n record.Ctor.cid = newCtor.cid;\n record.Ctor.prototype = newCtor.prototype;\n\n if (newCtor.release) {\n // temporary global mixin strategy used in < 2.0.0-alpha.6\n newCtor.release();\n }\n } else {\n updateOptions(record.options, options);\n }\n }\n\n record.instances.slice().forEach(function (instance) {\n if (instance.$vnode && instance.$vnode.context) {\n instance.$vnode.context.$forceUpdate();\n } else {\n console.warn('Root or manually mounted instance modified. Full reload required.');\n }\n });\n}); // 2.6 optimizes template-compiled scoped slots and skips updates if child\n// only uses scoped slots. We need to patch the scoped slots resolving helper\n// to temporarily mark all scoped slots as unstable in order to force child\n// updates.\n\nfunction patchScopedSlots(instance) {\n if (!instance._u) {\n return;\n } // https://github.com/vuejs/vue/blob/dev/src/core/instance/render-helpers/resolve-scoped-slots.js\n\n\n var original = instance._u;\n\n instance._u = function (slots) {\n try {\n // 2.6.4 ~ 2.6.6\n return original(slots, true);\n } catch (e) {\n // 2.5 / >= 2.6.7\n return original(slots, null, true);\n }\n };\n\n return function () {\n instance._u = original;\n };\n}","map":{"version":3,"sources":["/tmp/vue-hello/node_modules/vue-hot-reload-api/dist/index.js"],"names":["Vue","version","map","Object","create","window","__VUE_HOT_MAP__","installed","isBrowserify","initHookName","exports","install","vue","browserify","__esModule","default","split","Number","config","_lifecycleHooks","indexOf","compatible","console","warn","createRecord","id","options","Ctor","makeOptionsHot","instances","isRecorded","functional","render","h","ctx","parent","push","injectHook","record","constructor","splice","name","hook","existing","Array","isArray","concat","tryWrap","fn","arg","e","error","updateOptions","oldOptions","newOptions","key","key$1","rerender","slice","forEach","instance","$forceUpdate","staticRenderFns","$options","_staticTrees","cached","restore","patchScopedSlots","$nextTick","keys","length","injectStyles","_injectStyles","call","_Ctor","reload","extendOptions","newCtor","super","extend","cid","prototype","release","$vnode","context","_u","original","slots"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,IAAIA,GAAJ,C,CAAQ;;AACR,IAAIC,OAAJ;AACA,IAAIC,GAAG,GAAGC,MAAM,CAACC,MAAP,CAAc,IAAd,CAAV;;AACA,IAAI,OAAOC,MAAP,KAAkB,WAAtB,EAAmC;AACjCA,EAAAA,MAAM,CAACC,eAAP,GAAyBJ,GAAzB;AACD;;AACD,IAAIK,SAAS,GAAG,KAAhB;AACA,IAAIC,YAAY,GAAG,KAAnB;AACA,IAAIC,YAAY,GAAG,cAAnB;;AAEAC,OAAO,CAACC,OAAR,GAAkB,UAAUC,GAAV,EAAeC,UAAf,EA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C,UAAUC,QAAV,EAAoB;AACnD,QAAIA,QAAQ,CAACuB,MAAT,IAAmBvB,QAAQ,CAACuB,MAAT,CAAgBC,OAAvC,EAAgD;AAC9CxB,MAAAA,QAAQ,CAACuB,MAAT,CAAgBC,OAAhB,CAAwBvB,YAAxB;AACD,KAFD,MAEO;AACLvC,MAAAA,OAAO,CAACC,IAAR,CACE,mEADF;AAGD;AACF,GARD;AASD,CAnCuB,CAAxB,C,CAqCA;AACA;AACA;AACA;;AACA,SAAS4C,gBAAT,CAA2BP,QAA3B,EAAqC;AACnC,MAAI,CAACA,QAAQ,CAACyB,EAAd,EAAkB;AAAE;AAAQ,GADO,CAEnC;;;AACA,MAAIC,QAAQ,GAAG1B,QAAQ,CAACyB,EAAxB;;AACAzB,EAAAA,QAAQ,CAACyB,EAAT,GAAc,UAAUE,KAAV,EAAiB;AAC7B,QAAI;AACF;AACA,aAAOD,QAAQ,CAACC,KAAD,EAAQ,IAAR,CAAf;AACD,KAHD,CAGE,OAAOrC,CAAP,EAAU;AACV;AACA,aAAOoC,QAAQ,CAACC,KAAD,EAAQ,IAAR,EAAc,IAAd,CAAf;AACD;AACF,GARD;;AASA,SAAO,YAAY;AACjB3B,IAAAA,QAAQ,CAACyB,EAAT,GAAcC,QAAd;AACD,GAFD;AAGD","sourcesContent":["var Vue // late bind\nvar version\nvar map = Object.create(null)\nif (typeof window !== 'undefined') {\n window.__VUE_HOT_MAP__ = map\n}\nvar installed = false\nvar isBrowserify = false\nvar initHookName = 'beforeCreate'\n\nexports.install = function (vue, browserify) {\n if (installed) { return }\n installed = true\n\n Vue = vue.__esModule ? vue.default : vue\n version = Vue.version.split('.').map(Number)\n isBrowserify = browserify\n\n // compat with < 2.0.0-alpha.7\n if (Vue.config._lifecycleHooks.indexOf('init') > -1) {\n initHookName = 'init'\n }\n\n exports.compatible = version[0] >= 2\n if (!exports.compatible) {\n console.warn(\n '[HMR] You are using a version of vue-hot-reload-api that is ' +\n 'only compatible with Vue.js core ^2.0.0.'\n )\n return\n }\n}\n\n/**\n * Create a record for a hot module, which keeps track of its constructor\n * and instances\n *\n * @param {String} id\n * @param {Object} options\n */\n\nexports.createRecord = function (id, options) {\n if(map[id]) { return }\n\n var Ctor = null\n if (typeof options === 'function') {\n Ctor = options\n options = Ctor.options\n }\n makeOptionsHot(id, options)\n map[id] = {\n Ctor: Ctor,\n options: options,\n instances: []\n }\n}\n\n/**\n * Check if module is recorded\n *\n * @param {String} id\n */\n\nexports.isRecorded = function (id) {\n return typeof map[id] !== 'undefined'\n}\n\n/**\n * Make a Component options object hot.\n *\n * @param {String} id\n * @param {Object} options\n */\n\nfunction makeOptionsHot(id, options) {\n if (options.functional) {\n var render = options.render\n options.render = function (h, ctx) {\n var instances = map[id].instances\n if (ctx && instances.indexOf(ctx.parent) < 0) {\n instances.push(ctx.parent)\n }\n return render(h, ctx)\n }\n } else {\n injectHook(options, initHookName, function() {\n var record = map[id]\n if (!record.Ctor) {\n record.Ctor = this.constructor\n }\n record.instances.push(this)\n })\n injectHook(options, 'beforeDestroy', function() {\n var instances = map[id].instances\n instances.splice(instances.indexOf(this), 1)\n })\n }\n}\n\n/**\n * Inject a hook to a hot reloadable component so that\n * we can keep track of it.\n *\n * @param {Object} options\n * @param {String} name\n * @param {Function} hook\n */\n\nfunction injectHook(options, name, hook) {\n var existing = options[name]\n options[name] = existing\n ? Array.isArray(existing) ? existing.concat(hook) : [existing, hook]\n : [hook]\n}\n\nfunction tryWrap(fn) {\n return function (id, arg) {\n try {\n fn(id, arg)\n } catch (e) {\n console.error(e)\n console.warn(\n 'Something went wrong during Vue component hot-reload. Full reload required.'\n )\n }\n }\n}\n\nfunction updateOptions (oldOptions, newOptions) {\n for (var key in oldOptions) {\n if (!(key in newOptions)) {\n delete oldOptions[key]\n }\n }\n for (var key$1 in newOptions) {\n oldOptions[key$1] = newOptions[key$1]\n }\n}\n\nexports.rerender = tryWrap(function (id, options) {\n var record = map[id]\n if (!options) {\n record.instances.slice().forEach(function (instance) {\n instance.$forceUpdate()\n })\n return\n }\n if (typeof options === 'function') {\n options = options.options\n }\n if (record.Ctor) {\n record.Ctor.options.render = options.render\n record.Ctor.options.staticRenderFns = options.staticRenderFns\n record.instances.slice().forEach(function (instance) {\n instance.$options.render = options.render\n instance.$options.staticRenderFns = options.staticRenderFns\n // reset static trees\n // pre 2.5, all static trees are cached together on the instance\n if (instance._staticTrees) {\n instance._staticTrees = []\n }\n // 2.5.0\n if (Array.isArray(record.Ctor.options.cached)) {\n record.Ctor.options.cached = []\n }\n // 2.5.3\n if (Array.isArray(instance.$options.cached)) {\n instance.$options.cached = []\n }\n\n // post 2.5.4: v-once trees are cached on instance._staticTrees.\n // Pure static trees are cached on the staticRenderFns array\n // (both already reset above)\n\n // 2.6: temporarily mark rendered scoped slots as unstable so that\n // child components can be forced to update\n var restore = patchScopedSlots(instance)\n instance.$forceUpdate()\n instance.$nextTick(restore)\n })\n } else {\n // functional or no instance created yet\n record.options.render = options.render\n record.options.staticRenderFns = options.staticRenderFns\n\n // handle functional component re-render\n if (record.options.functional) {\n // rerender with full options\n if (Object.keys(options).length > 2) {\n updateOptions(record.options, options)\n } else {\n // template-only rerender.\n // need to inject the style injection code for CSS modules\n // to work properly.\n var injectStyles = record.options._injectStyles\n if (injectStyles) {\n var render = options.render\n record.options.render = function (h, ctx) {\n injectStyles.call(ctx)\n return render(h, ctx)\n }\n }\n }\n record.options._Ctor = null\n // 2.5.3\n if (Array.isArray(record.options.cached)) {\n record.options.cached = []\n }\n record.instances.slice().forEach(function (instance) {\n instance.$forceUpdate()\n })\n }\n }\n})\n\nexports.reload = tryWrap(function (id, options) {\n var record = map[id]\n if (options) {\n if (typeof options === 'function') {\n options = options.options\n }\n makeOptionsHot(id, options)\n if (record.Ctor) {\n if (version[1] < 2) {\n // preserve pre 2.2 behavior for global mixin handling\n record.Ctor.extendOptions = options\n }\n var newCtor = record.Ctor.super.extend(options)\n // prevent record.options._Ctor from being overwritten accidentally\n newCtor.options._Ctor = record.options._Ctor\n record.Ctor.options = newCtor.options\n record.Ctor.cid = newCtor.cid\n record.Ctor.prototype = newCtor.prototype\n if (newCtor.release) {\n // temporary global mixin strategy used in < 2.0.0-alpha.6\n newCtor.release()\n }\n } else {\n updateOptions(record.options, options)\n }\n }\n record.instances.slice().forEach(function (instance) {\n if (instance.$vnode && instance.$vnode.context) {\n instance.$vnode.context.$forceUpdate()\n } else {\n console.warn(\n 'Root or manually mounted instance modified. Full reload required.'\n )\n }\n })\n})\n\n// 2.6 optimizes template-compiled scoped slots and skips updates if child\n// only uses scoped slots. We need to patch the scoped slots resolving helper\n// to temporarily mark all scoped slots as unstable in order to force child\n// updates.\nfunction patchScopedSlots (instance) {\n if (!instance._u) { return }\n // https://github.com/vuejs/vue/blob/dev/src/core/instance/render-helpers/resolve-scoped-slots.js\n var original = instance._u\n instance._u = function (slots) {\n try {\n // 2.6.4 ~ 2.6.6\n return original(slots, true)\n } catch (e) {\n // 2.5 / >= 2.6.7\n return original(slots, null, true)\n }\n }\n return function () {\n instance._u = original\n }\n}\n"]},"metadata":{},"sourceType":"script"} |