rails_admin_image_manager 0.1.23 → 0.1.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3c6574c759ed89f9034f18ad197f38dce01503f7
4
- data.tar.gz: 69e928509f752792fa10c352bd85c76d67eebcfe
3
+ metadata.gz: 2b01244b2abda0d5cc4256875e701908d41604bc
4
+ data.tar.gz: 90a5ab9f7c76948b3bfcc355e7d350dd369aa665
5
5
  SHA512:
6
- metadata.gz: 864994eb32b35748d9e465c57e1eed14cf8047d59e70392aa79576fb64de7f001bd318ed31b2ddb78cf6d69bd926333c7f067a332153080b18c8bfd67c97ecb6
7
- data.tar.gz: 68f83b314330bec869716bf9786a0caadab997c13cc89e527382aa019fe6eb86e34dca050e98f0c84956446b4d5ea351c2bdc68a092eb6369bb586a1b90520a8
6
+ metadata.gz: 7e79842cd98891e74d520e3df8eed00b985a74e6dbf5809e9d9d59c9f8cb6a10e1309213a82b810125a282161f612bd025073af081599d47942cf91315c8891f
7
+ data.tar.gz: 4383f234925ce9be6d480ff90761a459a74bf0d6744cb0a3e7e6ddedc6cef55250510c77dc15b7feef164fde9f37df45753847b442336a7b8c2bccaad39a3f34
@@ -132,7 +132,7 @@
132
132
  /***/ (function(module, exports, __webpack_require__) {
133
133
 
134
134
  /* WEBPACK VAR INJECTION */(function(global) {/*!
135
- * Vue.js v2.3.4
135
+ * Vue.js v2.4.4
136
136
  * (c) 2014-2017 Evan You
137
137
  * Released under the MIT License.
138
138
  */
@@ -161,11 +161,16 @@
161
161
  function isFalse (v) {
162
162
  return v === false
163
163
  }
164
+
164
165
  /**
165
166
  * Check if value is primitive
166
167
  */
167
168
  function isPrimitive (value) {
168
- return typeof value === 'string' || typeof value === 'number'
169
+ return (
170
+ typeof value === 'string' ||
171
+ typeof value === 'number' ||
172
+ typeof value === 'boolean'
173
+ )
169
174
  }
170
175
 
171
176
  /**
@@ -191,6 +196,14 @@
191
196
  return _toString.call(v) === '[object RegExp]'
192
197
  }
193
198
 
199
+ /**
200
+ * Check if val is a valid array index.
201
+ */
202
+ function isValidArrayIndex (val) {
203
+ var n = parseFloat(val);
204
+ return n >= 0 && Math.floor(n) === n && isFinite(val)
205
+ }
206
+
194
207
  /**
195
208
  * Convert a value to a string that is actually rendered.
196
209
  */
@@ -234,6 +247,11 @@
234
247
  */
235
248
  var isBuiltInTag = makeMap('slot,component', true);
236
249
 
250
+ /**
251
+ * Check if a attribute is a reserved attribute.
252
+ */
253
+ var isReservedAttribute = makeMap('key,ref,slot,is');
254
+
237
255
  /**
238
256
  * Remove an item from an array
239
257
  */
@@ -283,12 +301,9 @@
283
301
  /**
284
302
  * Hyphenate a camelCase string.
285
303
  */
286
- var hyphenateRE = /([^-])([A-Z])/g;
304
+ var hyphenateRE = /\B([A-Z])/g;
287
305
  var hyphenate = cached(function (str) {
288
- return str
289
- .replace(hyphenateRE, '$1-$2')
290
- .replace(hyphenateRE, '$1-$2')
291
- .toLowerCase()
306
+ return str.replace(hyphenateRE, '-$1').toLowerCase()
292
307
  });
293
308
 
294
309
  /**
@@ -346,13 +361,15 @@
346
361
 
347
362
  /**
348
363
  * Perform no operation.
364
+ * Stubbing args to make Flow happy without leaving useless transpiled code
365
+ * with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/)
349
366
  */
350
- function noop () {}
367
+ function noop (a, b, c) {}
351
368
 
352
369
  /**
353
370
  * Always return false.
354
371
  */
355
- var no = function () { return false; };
372
+ var no = function (a, b, c) { return false; };
356
373
 
357
374
  /**
358
375
  * Return same value
@@ -373,14 +390,30 @@
373
390
  * if they are plain objects, do they have the same shape?
374
391
  */
375
392
  function looseEqual (a, b) {
393
+ if (a === b) { return true }
376
394
  var isObjectA = isObject(a);
377
395
  var isObjectB = isObject(b);
378
396
  if (isObjectA && isObjectB) {
379
397
  try {
380
- return JSON.stringify(a) === JSON.stringify(b)
398
+ var isArrayA = Array.isArray(a);
399
+ var isArrayB = Array.isArray(b);
400
+ if (isArrayA && isArrayB) {
401
+ return a.length === b.length && a.every(function (e, i) {
402
+ return looseEqual(e, b[i])
403
+ })
404
+ } else if (!isArrayA && !isArrayB) {
405
+ var keysA = Object.keys(a);
406
+ var keysB = Object.keys(b);
407
+ return keysA.length === keysB.length && keysA.every(function (key) {
408
+ return looseEqual(a[key], b[key])
409
+ })
410
+ } else {
411
+ /* istanbul ignore next */
412
+ return false
413
+ }
381
414
  } catch (e) {
382
- // possible circular reference
383
- return a === b
415
+ /* istanbul ignore next */
416
+ return false
384
417
  }
385
418
  } else if (!isObjectA && !isObjectB) {
386
419
  return String(a) === String(b)
@@ -463,6 +496,11 @@
463
496
  */
464
497
  errorHandler: null,
465
498
 
499
+ /**
500
+ * Warn handler for watcher warns
501
+ */
502
+ warnHandler: null,
503
+
466
504
  /**
467
505
  * Ignore certain custom elements
468
506
  */
@@ -569,10 +607,12 @@
569
607
  .replace(/[-_]/g, ''); };
570
608
 
571
609
  warn = function (msg, vm) {
572
- if (hasConsole && (!config.silent)) {
573
- console.error("[Vue warn]: " + msg + (
574
- vm ? generateComponentTrace(vm) : ''
575
- ));
610
+ var trace = vm ? generateComponentTrace(vm) : '';
611
+
612
+ if (config.warnHandler) {
613
+ config.warnHandler.call(null, msg, vm, trace);
614
+ } else if (hasConsole && (!config.silent)) {
615
+ console.error(("[Vue warn]: " + msg + trace));
576
616
  }
577
617
  };
578
618
 
@@ -682,6 +722,9 @@
682
722
  var isIOS = UA && /iphone|ipad|ipod|ios/.test(UA);
683
723
  var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge;
684
724
 
725
+ // Firefox has a "watch" function on Object.prototype...
726
+ var nativeWatch = ({}).watch;
727
+
685
728
  var supportsPassive = false;
686
729
  if (inBrowser) {
687
730
  try {
@@ -691,7 +734,7 @@
691
734
  /* istanbul ignore next */
692
735
  supportsPassive = true;
693
736
  }
694
- } )); // https://github.com/facebook/flow/issues/285
737
+ })); // https://github.com/facebook/flow/issues/285
695
738
  window.addEventListener('test-passive', null, opts);
696
739
  } catch (e) {}
697
740
  }
@@ -761,13 +804,13 @@
761
804
  // "force" the microtask queue to be flushed by adding an empty timer.
762
805
  if (isIOS) { setTimeout(noop); }
763
806
  };
764
- } else if (typeof MutationObserver !== 'undefined' && (
807
+ } else if (!isIE && typeof MutationObserver !== 'undefined' && (
765
808
  isNative(MutationObserver) ||
766
809
  // PhantomJS and iOS 7.x
767
810
  MutationObserver.toString() === '[object MutationObserverConstructor]'
768
811
  )) {
769
812
  // use MutationObserver where native Promise is not available,
770
- // e.g. PhantomJS IE11, iOS7, Android 4.4
813
+ // e.g. PhantomJS, iOS7, Android 4.4
771
814
  var counter = 1;
772
815
  var observer = new MutationObserver(nextTickHandler);
773
816
  var textNode = document.createTextNode(String(counter));
@@ -906,22 +949,14 @@
906
949
  // cache original method
907
950
  var original = arrayProto[method];
908
951
  def(arrayMethods, method, function mutator () {
909
- var arguments$1 = arguments;
952
+ var args = [], len = arguments.length;
953
+ while ( len-- ) args[ len ] = arguments[ len ];
910
954
 
911
- // avoid leaking arguments:
912
- // http://jsperf.com/closure-with-arguments
913
- var i = arguments.length;
914
- var args = new Array(i);
915
- while (i--) {
916
- args[i] = arguments$1[i];
917
- }
918
955
  var result = original.apply(this, args);
919
956
  var ob = this.__ob__;
920
957
  var inserted;
921
958
  switch (method) {
922
959
  case 'push':
923
- inserted = args;
924
- break
925
960
  case 'unshift':
926
961
  inserted = args;
927
962
  break
@@ -947,8 +982,7 @@
947
982
  * under a frozen data structure. Converting it would defeat the optimization.
948
983
  */
949
984
  var observerState = {
950
- shouldConvert: true,
951
- isSettingProps: false
985
+ shouldConvert: true
952
986
  };
953
987
 
954
988
  /**
@@ -1000,7 +1034,7 @@
1000
1034
  * Augment an target Object or Array by intercepting
1001
1035
  * the prototype chain using __proto__
1002
1036
  */
1003
- function protoAugment (target, src) {
1037
+ function protoAugment (target, src, keys) {
1004
1038
  /* eslint-disable no-proto */
1005
1039
  target.__proto__ = src;
1006
1040
  /* eslint-enable no-proto */
@@ -1052,7 +1086,8 @@
1052
1086
  obj,
1053
1087
  key,
1054
1088
  val,
1055
- customSetter
1089
+ customSetter,
1090
+ shallow
1056
1091
  ) {
1057
1092
  var dep = new Dep();
1058
1093
 
@@ -1065,7 +1100,7 @@
1065
1100
  var getter = property && property.get;
1066
1101
  var setter = property && property.set;
1067
1102
 
1068
- var childOb = observe(val);
1103
+ var childOb = !shallow && observe(val);
1069
1104
  Object.defineProperty(obj, key, {
1070
1105
  enumerable: true,
1071
1106
  configurable: true,
@@ -1075,9 +1110,9 @@
1075
1110
  dep.depend();
1076
1111
  if (childOb) {
1077
1112
  childOb.dep.depend();
1078
- }
1079
- if (Array.isArray(value)) {
1080
- dependArray(value);
1113
+ if (Array.isArray(value)) {
1114
+ dependArray(value);
1115
+ }
1081
1116
  }
1082
1117
  }
1083
1118
  return value
@@ -1097,7 +1132,7 @@
1097
1132
  } else {
1098
1133
  val = newVal;
1099
1134
  }
1100
- childOb = observe(newVal);
1135
+ childOb = !shallow && observe(newVal);
1101
1136
  dep.notify();
1102
1137
  }
1103
1138
  });
@@ -1109,7 +1144,7 @@
1109
1144
  * already exist.
1110
1145
  */
1111
1146
  function set (target, key, val) {
1112
- if (Array.isArray(target) && typeof key === 'number') {
1147
+ if (Array.isArray(target) && isValidArrayIndex(key)) {
1113
1148
  target.length = Math.max(target.length, key);
1114
1149
  target.splice(key, 1, val);
1115
1150
  return val
@@ -1118,7 +1153,7 @@
1118
1153
  target[key] = val;
1119
1154
  return val
1120
1155
  }
1121
- var ob = (target ).__ob__;
1156
+ var ob = (target).__ob__;
1122
1157
  if (target._isVue || (ob && ob.vmCount)) {
1123
1158
  "development" !== 'production' && warn(
1124
1159
  'Avoid adding reactive properties to a Vue instance or its root $data ' +
@@ -1139,11 +1174,11 @@
1139
1174
  * Delete a property and trigger change if necessary.
1140
1175
  */
1141
1176
  function del (target, key) {
1142
- if (Array.isArray(target) && typeof key === 'number') {
1177
+ if (Array.isArray(target) && isValidArrayIndex(key)) {
1143
1178
  target.splice(key, 1);
1144
1179
  return
1145
1180
  }
1146
- var ob = (target ).__ob__;
1181
+ var ob = (target).__ob__;
1147
1182
  if (target._isVue || (ob && ob.vmCount)) {
1148
1183
  "development" !== 'production' && warn(
1149
1184
  'Avoid deleting properties on a Vue instance or its root $data ' +
@@ -1222,7 +1257,7 @@
1222
1257
  /**
1223
1258
  * Data
1224
1259
  */
1225
- strats.data = function (
1260
+ function mergeDataOrFn (
1226
1261
  parentVal,
1227
1262
  childVal,
1228
1263
  vm
@@ -1232,15 +1267,6 @@
1232
1267
  if (!childVal) {
1233
1268
  return parentVal
1234
1269
  }
1235
- if (typeof childVal !== 'function') {
1236
- "development" !== 'production' && warn(
1237
- 'The "data" option should be a function ' +
1238
- 'that returns a per-instance value in component ' +
1239
- 'definitions.',
1240
- vm
1241
- );
1242
- return parentVal
1243
- }
1244
1270
  if (!parentVal) {
1245
1271
  return childVal
1246
1272
  }
@@ -1251,8 +1277,8 @@
1251
1277
  // it has to be a function to pass previous merges.
1252
1278
  return function mergedDataFn () {
1253
1279
  return mergeData(
1254
- childVal.call(this),
1255
- parentVal.call(this)
1280
+ typeof childVal === 'function' ? childVal.call(this) : childVal,
1281
+ typeof parentVal === 'function' ? parentVal.call(this) : parentVal
1256
1282
  )
1257
1283
  }
1258
1284
  } else if (parentVal || childVal) {
@@ -1263,7 +1289,7 @@
1263
1289
  : childVal;
1264
1290
  var defaultData = typeof parentVal === 'function'
1265
1291
  ? parentVal.call(vm)
1266
- : undefined;
1292
+ : parentVal;
1267
1293
  if (instanceData) {
1268
1294
  return mergeData(instanceData, defaultData)
1269
1295
  } else {
@@ -1271,6 +1297,28 @@
1271
1297
  }
1272
1298
  }
1273
1299
  }
1300
+ }
1301
+
1302
+ strats.data = function (
1303
+ parentVal,
1304
+ childVal,
1305
+ vm
1306
+ ) {
1307
+ if (!vm) {
1308
+ if (childVal && typeof childVal !== 'function') {
1309
+ "development" !== 'production' && warn(
1310
+ 'The "data" option should be a function ' +
1311
+ 'that returns a per-instance value in component ' +
1312
+ 'definitions.',
1313
+ vm
1314
+ );
1315
+
1316
+ return parentVal
1317
+ }
1318
+ return mergeDataOrFn.call(this, parentVal, childVal)
1319
+ }
1320
+
1321
+ return mergeDataOrFn(parentVal, childVal, vm)
1274
1322
  };
1275
1323
 
1276
1324
  /**
@@ -1318,6 +1366,9 @@
1318
1366
  * another, so we merge them as arrays.
1319
1367
  */
1320
1368
  strats.watch = function (parentVal, childVal) {
1369
+ // work around Firefox's Object.prototype.watch...
1370
+ if (parentVal === nativeWatch) { parentVal = undefined; }
1371
+ if (childVal === nativeWatch) { childVal = undefined; }
1321
1372
  /* istanbul ignore if */
1322
1373
  if (!childVal) { return Object.create(parentVal || null) }
1323
1374
  if (!parentVal) { return childVal }
@@ -1331,7 +1382,7 @@
1331
1382
  }
1332
1383
  ret[key] = parent
1333
1384
  ? parent.concat(child)
1334
- : [child];
1385
+ : Array.isArray(child) ? child : [child];
1335
1386
  }
1336
1387
  return ret
1337
1388
  };
@@ -1341,14 +1392,15 @@
1341
1392
  */
1342
1393
  strats.props =
1343
1394
  strats.methods =
1395
+ strats.inject =
1344
1396
  strats.computed = function (parentVal, childVal) {
1345
- if (!childVal) { return Object.create(parentVal || null) }
1346
1397
  if (!parentVal) { return childVal }
1347
1398
  var ret = Object.create(null);
1348
1399
  extend(ret, parentVal);
1349
- extend(ret, childVal);
1400
+ if (childVal) { extend(ret, childVal); }
1350
1401
  return ret
1351
1402
  };
1403
+ strats.provide = mergeDataOrFn;
1352
1404
 
1353
1405
  /**
1354
1406
  * Default strategy.
@@ -1406,6 +1458,19 @@
1406
1458
  options.props = res;
1407
1459
  }
1408
1460
 
1461
+ /**
1462
+ * Normalize all injections into Object-based format
1463
+ */
1464
+ function normalizeInject (options) {
1465
+ var inject = options.inject;
1466
+ if (Array.isArray(inject)) {
1467
+ var normalized = options.inject = {};
1468
+ for (var i = 0; i < inject.length; i++) {
1469
+ normalized[inject[i]] = inject[i];
1470
+ }
1471
+ }
1472
+ }
1473
+
1409
1474
  /**
1410
1475
  * Normalize raw function directives into object format.
1411
1476
  */
@@ -1439,6 +1504,7 @@
1439
1504
  }
1440
1505
 
1441
1506
  normalizeProps(child);
1507
+ normalizeInject(child);
1442
1508
  normalizeDirectives(child);
1443
1509
  var extendsFrom = child.extends;
1444
1510
  if (extendsFrom) {
@@ -1626,7 +1692,12 @@
1626
1692
  var valid;
1627
1693
  var expectedType = getType(type);
1628
1694
  if (simpleCheckRE.test(expectedType)) {
1629
- valid = typeof value === expectedType.toLowerCase();
1695
+ var t = typeof value;
1696
+ valid = t === expectedType.toLowerCase();
1697
+ // for primitive wrapper objects
1698
+ if (!valid && t === 'object') {
1699
+ valid = value instanceof type;
1700
+ }
1630
1701
  } else if (expectedType === 'Object') {
1631
1702
  valid = isPlainObject(value);
1632
1703
  } else if (expectedType === 'Array') {
@@ -1771,7 +1842,8 @@
1771
1842
  text,
1772
1843
  elm,
1773
1844
  context,
1774
- componentOptions
1845
+ componentOptions,
1846
+ asyncFactory
1775
1847
  ) {
1776
1848
  this.tag = tag;
1777
1849
  this.data = data;
@@ -1791,6 +1863,9 @@
1791
1863
  this.isComment = false;
1792
1864
  this.isCloned = false;
1793
1865
  this.isOnce = false;
1866
+ this.asyncFactory = asyncFactory;
1867
+ this.asyncMeta = undefined;
1868
+ this.isAsyncPlaceholder = false;
1794
1869
  };
1795
1870
 
1796
1871
  var prototypeAccessors = { child: {} };
@@ -1803,9 +1878,11 @@
1803
1878
 
1804
1879
  Object.defineProperties( VNode.prototype, prototypeAccessors );
1805
1880
 
1806
- var createEmptyVNode = function () {
1881
+ var createEmptyVNode = function (text) {
1882
+ if ( text === void 0 ) text = '';
1883
+
1807
1884
  var node = new VNode();
1808
- node.text = '';
1885
+ node.text = text;
1809
1886
  node.isComment = true;
1810
1887
  return node
1811
1888
  };
@@ -1818,7 +1895,7 @@
1818
1895
  // used for static nodes and slot nodes because they may be reused across
1819
1896
  // multiple renders, cloning them avoids errors when DOM manipulations rely
1820
1897
  // on their elm reference.
1821
- function cloneVNode (vnode) {
1898
+ function cloneVNode (vnode, deep) {
1822
1899
  var cloned = new VNode(
1823
1900
  vnode.tag,
1824
1901
  vnode.data,
@@ -1826,21 +1903,25 @@
1826
1903
  vnode.text,
1827
1904
  vnode.elm,
1828
1905
  vnode.context,
1829
- vnode.componentOptions
1906
+ vnode.componentOptions,
1907
+ vnode.asyncFactory
1830
1908
  );
1831
1909
  cloned.ns = vnode.ns;
1832
1910
  cloned.isStatic = vnode.isStatic;
1833
1911
  cloned.key = vnode.key;
1834
1912
  cloned.isComment = vnode.isComment;
1835
1913
  cloned.isCloned = true;
1914
+ if (deep && vnode.children) {
1915
+ cloned.children = cloneVNodes(vnode.children);
1916
+ }
1836
1917
  return cloned
1837
1918
  }
1838
1919
 
1839
- function cloneVNodes (vnodes) {
1920
+ function cloneVNodes (vnodes, deep) {
1840
1921
  var len = vnodes.length;
1841
1922
  var res = new Array(len);
1842
1923
  for (var i = 0; i < len; i++) {
1843
- res[i] = cloneVNode(vnodes[i]);
1924
+ res[i] = cloneVNode(vnodes[i], deep);
1844
1925
  }
1845
1926
  return res
1846
1927
  }
@@ -1854,8 +1935,10 @@
1854
1935
  name = once$$1 ? name.slice(1) : name;
1855
1936
  var capture = name.charAt(0) === '!';
1856
1937
  name = capture ? name.slice(1) : name;
1938
+ var plain = !(passive || once$$1 || capture);
1857
1939
  return {
1858
1940
  name: name,
1941
+ plain: plain,
1859
1942
  once: once$$1,
1860
1943
  capture: capture,
1861
1944
  passive: passive
@@ -1868,8 +1951,9 @@
1868
1951
 
1869
1952
  var fns = invoker.fns;
1870
1953
  if (Array.isArray(fns)) {
1871
- for (var i = 0; i < fns.length; i++) {
1872
- fns[i].apply(null, arguments$1);
1954
+ var cloned = fns.slice();
1955
+ for (var i = 0; i < cloned.length; i++) {
1956
+ cloned[i].apply(null, arguments$1);
1873
1957
  }
1874
1958
  } else {
1875
1959
  // return handler return value for single handlers
@@ -1880,6 +1964,11 @@
1880
1964
  return invoker
1881
1965
  }
1882
1966
 
1967
+ // #6552
1968
+ function prioritizePlainEvents (a, b) {
1969
+ return a.plain ? -1 : b.plain ? 1 : 0
1970
+ }
1971
+
1883
1972
  function updateListeners (
1884
1973
  on,
1885
1974
  oldOn,
@@ -1888,10 +1977,13 @@
1888
1977
  vm
1889
1978
  ) {
1890
1979
  var name, cur, old, event;
1980
+ var toAdd = [];
1981
+ var hasModifier = false;
1891
1982
  for (name in on) {
1892
1983
  cur = on[name];
1893
1984
  old = oldOn[name];
1894
1985
  event = normalizeEvent(name);
1986
+ if (!event.plain) { hasModifier = true; }
1895
1987
  if (isUndef(cur)) {
1896
1988
  "development" !== 'production' && warn(
1897
1989
  "Invalid handler for event \"" + (event.name) + "\": got " + String(cur),
@@ -1901,12 +1993,20 @@
1901
1993
  if (isUndef(cur.fns)) {
1902
1994
  cur = on[name] = createFnInvoker(cur);
1903
1995
  }
1904
- add(event.name, cur, event.once, event.capture, event.passive);
1996
+ event.handler = cur;
1997
+ toAdd.push(event);
1905
1998
  } else if (cur !== old) {
1906
1999
  old.fns = cur;
1907
2000
  on[name] = old;
1908
2001
  }
1909
2002
  }
2003
+ if (toAdd.length) {
2004
+ if (hasModifier) { toAdd.sort(prioritizePlainEvents); }
2005
+ for (var i = 0; i < toAdd.length; i++) {
2006
+ var event$1 = toAdd[i];
2007
+ add(event$1.name, event$1.handler, event$1.once, event$1.capture, event$1.passive);
2008
+ }
2009
+ }
1910
2010
  for (name in oldOn) {
1911
2011
  if (isUndef(on[name])) {
1912
2012
  event = normalizeEvent(name);
@@ -2096,11 +2196,27 @@
2096
2196
  /* */
2097
2197
 
2098
2198
  function ensureCtor (comp, base) {
2199
+ if (comp.__esModule && comp.default) {
2200
+ comp = comp.default;
2201
+ }
2099
2202
  return isObject(comp)
2100
2203
  ? base.extend(comp)
2101
2204
  : comp
2102
2205
  }
2103
2206
 
2207
+ function createAsyncPlaceholder (
2208
+ factory,
2209
+ data,
2210
+ context,
2211
+ children,
2212
+ tag
2213
+ ) {
2214
+ var node = createEmptyVNode();
2215
+ node.asyncFactory = factory;
2216
+ node.asyncMeta = { data: data, context: context, children: children, tag: tag };
2217
+ return node
2218
+ }
2219
+
2104
2220
  function resolveAsyncComponent (
2105
2221
  factory,
2106
2222
  baseCtor,
@@ -2203,11 +2319,17 @@
2203
2319
 
2204
2320
  /* */
2205
2321
 
2322
+ function isAsyncPlaceholder (node) {
2323
+ return node.isComment && node.asyncFactory
2324
+ }
2325
+
2326
+ /* */
2327
+
2206
2328
  function getFirstComponentChild (children) {
2207
2329
  if (Array.isArray(children)) {
2208
2330
  for (var i = 0; i < children.length; i++) {
2209
2331
  var c = children[i];
2210
- if (isDef(c) && isDef(c.componentOptions)) {
2332
+ if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) {
2211
2333
  return c
2212
2334
  }
2213
2335
  }
@@ -2294,8 +2416,8 @@
2294
2416
  }
2295
2417
  // array of events
2296
2418
  if (Array.isArray(event)) {
2297
- for (var i$1 = 0, l = event.length; i$1 < l; i$1++) {
2298
- this$1.$off(event[i$1], fn);
2419
+ for (var i = 0, l = event.length; i < l; i++) {
2420
+ this$1.$off(event[i], fn);
2299
2421
  }
2300
2422
  return vm
2301
2423
  }
@@ -2308,14 +2430,16 @@
2308
2430
  vm._events[event] = null;
2309
2431
  return vm
2310
2432
  }
2311
- // specific handler
2312
- var cb;
2313
- var i = cbs.length;
2314
- while (i--) {
2315
- cb = cbs[i];
2316
- if (cb === fn || cb.fn === fn) {
2317
- cbs.splice(i, 1);
2318
- break
2433
+ if (fn) {
2434
+ // specific handler
2435
+ var cb;
2436
+ var i$1 = cbs.length;
2437
+ while (i$1--) {
2438
+ cb = cbs[i$1];
2439
+ if (cb === fn || cb.fn === fn) {
2440
+ cbs.splice(i$1, 1);
2441
+ break
2442
+ }
2319
2443
  }
2320
2444
  }
2321
2445
  return vm
@@ -2340,7 +2464,11 @@
2340
2464
  cbs = cbs.length > 1 ? toArray(cbs) : cbs;
2341
2465
  var args = toArray(arguments, 1);
2342
2466
  for (var i = 0, l = cbs.length; i < l; i++) {
2343
- cbs[i].apply(vm, args);
2467
+ try {
2468
+ cbs[i].apply(vm, args);
2469
+ } catch (e) {
2470
+ handleError(e, vm, ("event handler for \"" + event + "\""));
2471
+ }
2344
2472
  }
2345
2473
  }
2346
2474
  return vm
@@ -2363,10 +2491,15 @@
2363
2491
  var defaultSlot = [];
2364
2492
  for (var i = 0, l = children.length; i < l; i++) {
2365
2493
  var child = children[i];
2494
+ var data = child.data;
2495
+ // remove slot attribute if the node is resolved as a Vue slot node
2496
+ if (data && data.attrs && data.attrs.slot) {
2497
+ delete data.attrs.slot;
2498
+ }
2366
2499
  // named slots should only be respected if the vnode was rendered in the
2367
2500
  // same context.
2368
2501
  if ((child.context === context || child.functionalContext === context) &&
2369
- child.data && child.data.slot != null
2502
+ data && data.slot != null
2370
2503
  ) {
2371
2504
  var name = child.data.slot;
2372
2505
  var slot = (slots[name] || (slots[name] = []));
@@ -2408,6 +2541,7 @@
2408
2541
  /* */
2409
2542
 
2410
2543
  var activeInstance = null;
2544
+ var isUpdatingChildComponent = false;
2411
2545
 
2412
2546
  function initLifecycle (vm) {
2413
2547
  var options = vm.$options;
@@ -2455,6 +2589,9 @@
2455
2589
  vm.$options._parentElm,
2456
2590
  vm.$options._refElm
2457
2591
  );
2592
+ // no need for the ref nodes after initial patch
2593
+ // this prevents keeping a detached DOM tree in memory (#5851)
2594
+ vm.$options._parentElm = vm.$options._refElm = null;
2458
2595
  } else {
2459
2596
  // updates
2460
2597
  vm.$el = vm.__patch__(prevVnode, vnode);
@@ -2519,8 +2656,6 @@
2519
2656
  if (vm.$el) {
2520
2657
  vm.$el.__vue__ = null;
2521
2658
  }
2522
- // remove reference to DOM nodes (prevents leak)
2523
- vm.$options._parentElm = vm.$options._refElm = null;
2524
2659
  };
2525
2660
  }
2526
2661
 
@@ -2596,6 +2731,10 @@
2596
2731
  parentVnode,
2597
2732
  renderChildren
2598
2733
  ) {
2734
+ {
2735
+ isUpdatingChildComponent = true;
2736
+ }
2737
+
2599
2738
  // determine whether component has slot children
2600
2739
  // we need to do this before overwriting $options._renderChildren
2601
2740
  var hasChildren = !!(
@@ -2607,17 +2746,21 @@
2607
2746
 
2608
2747
  vm.$options._parentVnode = parentVnode;
2609
2748
  vm.$vnode = parentVnode; // update vm's placeholder node without re-render
2749
+
2610
2750
  if (vm._vnode) { // update child tree's parent
2611
2751
  vm._vnode.parent = parentVnode;
2612
2752
  }
2613
2753
  vm.$options._renderChildren = renderChildren;
2614
2754
 
2755
+ // update $attrs and $listeners hash
2756
+ // these are also reactive so they may trigger child update if the child
2757
+ // used them during render
2758
+ vm.$attrs = (parentVnode.data && parentVnode.data.attrs) || emptyObject;
2759
+ vm.$listeners = listeners || emptyObject;
2760
+
2615
2761
  // update props
2616
2762
  if (propsData && vm.$options.props) {
2617
2763
  observerState.shouldConvert = false;
2618
- {
2619
- observerState.isSettingProps = true;
2620
- }
2621
2764
  var props = vm._props;
2622
2765
  var propKeys = vm.$options._propKeys || [];
2623
2766
  for (var i = 0; i < propKeys.length; i++) {
@@ -2625,12 +2768,10 @@
2625
2768
  props[key] = validateProp(key, vm.$options.props, propsData, vm);
2626
2769
  }
2627
2770
  observerState.shouldConvert = true;
2628
- {
2629
- observerState.isSettingProps = false;
2630
- }
2631
2771
  // keep a copy of raw propsData
2632
2772
  vm.$options.propsData = propsData;
2633
2773
  }
2774
+
2634
2775
  // update listeners
2635
2776
  if (listeners) {
2636
2777
  var oldListeners = vm.$options._parentListeners;
@@ -2642,6 +2783,10 @@
2642
2783
  vm.$slots = resolveSlots(renderChildren, parentVnode.context);
2643
2784
  vm.$forceUpdate();
2644
2785
  }
2786
+
2787
+ {
2788
+ isUpdatingChildComponent = false;
2789
+ }
2645
2790
  }
2646
2791
 
2647
2792
  function isInInactiveTree (vm) {
@@ -2775,7 +2920,7 @@
2775
2920
 
2776
2921
  // call component updated and activated hooks
2777
2922
  callActivatedHooks(activatedQueue);
2778
- callUpdateHooks(updatedQueue);
2923
+ callUpdatedHooks(updatedQueue);
2779
2924
 
2780
2925
  // devtool hook
2781
2926
  /* istanbul ignore if */
@@ -2784,7 +2929,7 @@
2784
2929
  }
2785
2930
  }
2786
2931
 
2787
- function callUpdateHooks (queue) {
2932
+ function callUpdatedHooks (queue) {
2788
2933
  var i = queue.length;
2789
2934
  while (i--) {
2790
2935
  var watcher = queue[i];
@@ -2903,22 +3048,23 @@
2903
3048
  pushTarget(this);
2904
3049
  var value;
2905
3050
  var vm = this.vm;
2906
- if (this.user) {
2907
- try {
2908
- value = this.getter.call(vm, vm);
2909
- } catch (e) {
3051
+ try {
3052
+ value = this.getter.call(vm, vm);
3053
+ } catch (e) {
3054
+ if (this.user) {
2910
3055
  handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\""));
3056
+ } else {
3057
+ throw e
2911
3058
  }
2912
- } else {
2913
- value = this.getter.call(vm, vm);
2914
- }
2915
- // "touch" every property so they are all tracked as
2916
- // dependencies for deep watching
2917
- if (this.deep) {
2918
- traverse(value);
3059
+ } finally {
3060
+ // "touch" every property so they are all tracked as
3061
+ // dependencies for deep watching
3062
+ if (this.deep) {
3063
+ traverse(value);
3064
+ }
3065
+ popTarget();
3066
+ this.cleanupDeps();
2919
3067
  }
2920
- popTarget();
2921
- this.cleanupDeps();
2922
3068
  return value
2923
3069
  };
2924
3070
 
@@ -3111,14 +3257,20 @@
3111
3257
  observe(vm._data = {}, true /* asRootData */);
3112
3258
  }
3113
3259
  if (opts.computed) { initComputed(vm, opts.computed); }
3114
- if (opts.watch) { initWatch(vm, opts.watch); }
3260
+ if (opts.watch && opts.watch !== nativeWatch) {
3261
+ initWatch(vm, opts.watch);
3262
+ }
3115
3263
  }
3116
3264
 
3117
- var isReservedProp = {
3118
- key: 1,
3119
- ref: 1,
3120
- slot: 1
3121
- };
3265
+ function checkOptionType (vm, name) {
3266
+ var option = vm.$options[name];
3267
+ if (!isPlainObject(option)) {
3268
+ warn(
3269
+ ("component option \"" + name + "\" should be an object."),
3270
+ vm
3271
+ );
3272
+ }
3273
+ }
3122
3274
 
3123
3275
  function initProps (vm, propsOptions) {
3124
3276
  var propsData = vm.$options.propsData || {};
@@ -3134,14 +3286,14 @@
3134
3286
  var value = validateProp(key, propsOptions, propsData, vm);
3135
3287
  /* istanbul ignore else */
3136
3288
  {
3137
- if (isReservedProp[key] || config.isReservedAttr(key)) {
3289
+ if (isReservedAttribute(key) || config.isReservedAttr(key)) {
3138
3290
  warn(
3139
3291
  ("\"" + key + "\" is a reserved attribute and cannot be used as component prop."),
3140
3292
  vm
3141
3293
  );
3142
3294
  }
3143
3295
  defineReactive$$1(props, key, value, function () {
3144
- if (vm.$parent && !observerState.isSettingProps) {
3296
+ if (vm.$parent && !isUpdatingChildComponent) {
3145
3297
  warn(
3146
3298
  "Avoid mutating a prop directly since the value will be " +
3147
3299
  "overwritten whenever the parent component re-renders. " +
@@ -3180,16 +3332,26 @@
3180
3332
  // proxy data on instance
3181
3333
  var keys = Object.keys(data);
3182
3334
  var props = vm.$options.props;
3335
+ var methods = vm.$options.methods;
3183
3336
  var i = keys.length;
3184
3337
  while (i--) {
3185
- if (props && hasOwn(props, keys[i])) {
3338
+ var key = keys[i];
3339
+ {
3340
+ if (methods && hasOwn(methods, key)) {
3341
+ warn(
3342
+ ("Method \"" + key + "\" has already been defined as a data property."),
3343
+ vm
3344
+ );
3345
+ }
3346
+ }
3347
+ if (props && hasOwn(props, key)) {
3186
3348
  "development" !== 'production' && warn(
3187
- "The data property \"" + (keys[i]) + "\" is already declared as a prop. " +
3349
+ "The data property \"" + key + "\" is already declared as a prop. " +
3188
3350
  "Use prop default value instead.",
3189
3351
  vm
3190
3352
  );
3191
- } else if (!isReserved(keys[i])) {
3192
- proxy(vm, "_data", keys[i]);
3353
+ } else if (!isReserved(key)) {
3354
+ proxy(vm, "_data", key);
3193
3355
  }
3194
3356
  }
3195
3357
  // observe data
@@ -3208,22 +3370,30 @@
3208
3370
  var computedWatcherOptions = { lazy: true };
3209
3371
 
3210
3372
  function initComputed (vm, computed) {
3373
+ "development" !== 'production' && checkOptionType(vm, 'computed');
3211
3374
  var watchers = vm._computedWatchers = Object.create(null);
3375
+ // computed properties are just getters during SSR
3376
+ var isSSR = isServerRendering();
3212
3377
 
3213
3378
  for (var key in computed) {
3214
3379
  var userDef = computed[key];
3215
3380
  var getter = typeof userDef === 'function' ? userDef : userDef.get;
3216
- {
3217
- if (getter === undefined) {
3218
- warn(
3219
- ("No getter function has been defined for computed property \"" + key + "\"."),
3220
- vm
3221
- );
3222
- getter = noop;
3223
- }
3381
+ if ("development" !== 'production' && getter == null) {
3382
+ warn(
3383
+ ("Getter is missing for computed property \"" + key + "\"."),
3384
+ vm
3385
+ );
3386
+ }
3387
+
3388
+ if (!isSSR) {
3389
+ // create internal watcher for the computed property.
3390
+ watchers[key] = new Watcher(
3391
+ vm,
3392
+ getter || noop,
3393
+ noop,
3394
+ computedWatcherOptions
3395
+ );
3224
3396
  }
3225
- // create internal watcher for the computed property.
3226
- watchers[key] = new Watcher(vm, getter, noop, computedWatcherOptions);
3227
3397
 
3228
3398
  // component-defined computed properties are already defined on the
3229
3399
  // component prototype. We only need to define computed properties defined
@@ -3240,13 +3410,20 @@
3240
3410
  }
3241
3411
  }
3242
3412
 
3243
- function defineComputed (target, key, userDef) {
3413
+ function defineComputed (
3414
+ target,
3415
+ key,
3416
+ userDef
3417
+ ) {
3418
+ var shouldCache = !isServerRendering();
3244
3419
  if (typeof userDef === 'function') {
3245
- sharedPropertyDefinition.get = createComputedGetter(key);
3420
+ sharedPropertyDefinition.get = shouldCache
3421
+ ? createComputedGetter(key)
3422
+ : userDef;
3246
3423
  sharedPropertyDefinition.set = noop;
3247
3424
  } else {
3248
3425
  sharedPropertyDefinition.get = userDef.get
3249
- ? userDef.cache !== false
3426
+ ? shouldCache && userDef.cache !== false
3250
3427
  ? createComputedGetter(key)
3251
3428
  : userDef.get
3252
3429
  : noop;
@@ -3254,6 +3431,15 @@
3254
3431
  ? userDef.set
3255
3432
  : noop;
3256
3433
  }
3434
+ if ("development" !== 'production' &&
3435
+ sharedPropertyDefinition.set === noop) {
3436
+ sharedPropertyDefinition.set = function () {
3437
+ warn(
3438
+ ("Computed property \"" + key + "\" was assigned to but it has no setter."),
3439
+ this
3440
+ );
3441
+ };
3442
+ }
3257
3443
  Object.defineProperty(target, key, sharedPropertyDefinition);
3258
3444
  }
3259
3445
 
@@ -3273,28 +3459,36 @@
3273
3459
  }
3274
3460
 
3275
3461
  function initMethods (vm, methods) {
3462
+ "development" !== 'production' && checkOptionType(vm, 'methods');
3276
3463
  var props = vm.$options.props;
3277
3464
  for (var key in methods) {
3278
- vm[key] = methods[key] == null ? noop : bind(methods[key], vm);
3279
3465
  {
3280
3466
  if (methods[key] == null) {
3281
3467
  warn(
3282
- "method \"" + key + "\" has an undefined value in the component definition. " +
3468
+ "Method \"" + key + "\" has an undefined value in the component definition. " +
3283
3469
  "Did you reference the function correctly?",
3284
3470
  vm
3285
3471
  );
3286
3472
  }
3287
3473
  if (props && hasOwn(props, key)) {
3288
3474
  warn(
3289
- ("method \"" + key + "\" has already been defined as a prop."),
3475
+ ("Method \"" + key + "\" has already been defined as a prop."),
3290
3476
  vm
3291
3477
  );
3292
3478
  }
3479
+ if ((key in vm) && isReserved(key)) {
3480
+ warn(
3481
+ "Method \"" + key + "\" conflicts with an existing Vue instance method. " +
3482
+ "Avoid defining component methods that start with _ or $."
3483
+ );
3484
+ }
3293
3485
  }
3486
+ vm[key] = methods[key] == null ? noop : bind(methods[key], vm);
3294
3487
  }
3295
3488
  }
3296
3489
 
3297
3490
  function initWatch (vm, watch) {
3491
+ "development" !== 'production' && checkOptionType(vm, 'watch');
3298
3492
  for (var key in watch) {
3299
3493
  var handler = watch[key];
3300
3494
  if (Array.isArray(handler)) {
@@ -3307,8 +3501,12 @@
3307
3501
  }
3308
3502
  }
3309
3503
 
3310
- function createWatcher (vm, key, handler) {
3311
- var options;
3504
+ function createWatcher (
3505
+ vm,
3506
+ keyOrFn,
3507
+ handler,
3508
+ options
3509
+ ) {
3312
3510
  if (isPlainObject(handler)) {
3313
3511
  options = handler;
3314
3512
  handler = handler.handler;
@@ -3316,7 +3514,7 @@
3316
3514
  if (typeof handler === 'string') {
3317
3515
  handler = vm[handler];
3318
3516
  }
3319
- vm.$watch(key, handler, options);
3517
+ return vm.$watch(keyOrFn, handler, options)
3320
3518
  }
3321
3519
 
3322
3520
  function stateMixin (Vue) {
@@ -3351,6 +3549,9 @@
3351
3549
  options
3352
3550
  ) {
3353
3551
  var vm = this;
3552
+ if (isPlainObject(cb)) {
3553
+ return createWatcher(vm, expOrFn, cb, options)
3554
+ }
3354
3555
  options = options || {};
3355
3556
  options.user = true;
3356
3557
  var watcher = new Watcher(vm, expOrFn, cb, options);
@@ -3377,6 +3578,7 @@
3377
3578
  function initInjections (vm) {
3378
3579
  var result = resolveInject(vm.$options.inject, vm);
3379
3580
  if (result) {
3581
+ observerState.shouldConvert = false;
3380
3582
  Object.keys(result).forEach(function (key) {
3381
3583
  /* istanbul ignore else */
3382
3584
  {
@@ -3390,24 +3592,24 @@
3390
3592
  });
3391
3593
  }
3392
3594
  });
3595
+ observerState.shouldConvert = true;
3393
3596
  }
3394
3597
  }
3395
3598
 
3396
3599
  function resolveInject (inject, vm) {
3397
3600
  if (inject) {
3398
3601
  // inject is :any because flow is not smart enough to figure out cached
3399
- // isArray here
3400
- var isArray = Array.isArray(inject);
3401
3602
  var result = Object.create(null);
3402
- var keys = isArray
3403
- ? inject
3404
- : hasSymbol
3405
- ? Reflect.ownKeys(inject)
3603
+ var keys = hasSymbol
3604
+ ? Reflect.ownKeys(inject).filter(function (key) {
3605
+ /* istanbul ignore next */
3606
+ return Object.getOwnPropertyDescriptor(inject, key).enumerable
3607
+ })
3406
3608
  : Object.keys(inject);
3407
3609
 
3408
3610
  for (var i = 0; i < keys.length; i++) {
3409
3611
  var key = keys[i];
3410
- var provideKey = isArray ? key : inject[key];
3612
+ var provideKey = inject[key];
3411
3613
  var source = vm;
3412
3614
  while (source) {
3413
3615
  if (source._provided && provideKey in source._provided) {
@@ -3416,6 +3618,9 @@
3416
3618
  }
3417
3619
  source = source.$parent;
3418
3620
  }
3621
+ if ("development" !== 'production' && !source) {
3622
+ warn(("Injection \"" + key + "\" not found"), vm);
3623
+ }
3419
3624
  }
3420
3625
  return result
3421
3626
  }
@@ -3434,7 +3639,7 @@
3434
3639
  var propOptions = Ctor.options.props;
3435
3640
  if (isDef(propOptions)) {
3436
3641
  for (var key in propOptions) {
3437
- props[key] = validateProp(key, propOptions, propsData || {});
3642
+ props[key] = validateProp(key, propOptions, propsData || emptyObject);
3438
3643
  }
3439
3644
  } else {
3440
3645
  if (isDef(data.attrs)) { mergeProps(props, data.attrs); }
@@ -3449,7 +3654,7 @@
3449
3654
  props: props,
3450
3655
  children: children,
3451
3656
  parent: context,
3452
- listeners: data.on || {},
3657
+ listeners: data.on || emptyObject,
3453
3658
  injections: resolveInject(Ctor.options.inject, context),
3454
3659
  slots: function () { return resolveSlots(children, context); }
3455
3660
  });
@@ -3569,21 +3774,30 @@
3569
3774
  }
3570
3775
 
3571
3776
  // async component
3777
+ var asyncFactory;
3572
3778
  if (isUndef(Ctor.cid)) {
3573
- Ctor = resolveAsyncComponent(Ctor, baseCtor, context);
3779
+ asyncFactory = Ctor;
3780
+ Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context);
3574
3781
  if (Ctor === undefined) {
3575
- // return nothing if this is indeed an async component
3576
- // wait for the callback to trigger parent update.
3577
- return
3782
+ // return a placeholder node for async component, which is rendered
3783
+ // as a comment node but preserves all the raw information for the node.
3784
+ // the information will be used for async server-rendering and hydration.
3785
+ return createAsyncPlaceholder(
3786
+ asyncFactory,
3787
+ data,
3788
+ context,
3789
+ children,
3790
+ tag
3791
+ )
3578
3792
  }
3579
3793
  }
3580
3794
 
3795
+ data = data || {};
3796
+
3581
3797
  // resolve constructor options in case global mixins are applied after
3582
3798
  // component constructor creation
3583
3799
  resolveConstructorOptions(Ctor);
3584
3800
 
3585
- data = data || {};
3586
-
3587
3801
  // transform component v-model data into props & events
3588
3802
  if (isDef(data.model)) {
3589
3803
  transformModel(Ctor.options, data);
@@ -3601,12 +3815,19 @@
3601
3815
  // child component listeners instead of DOM listeners
3602
3816
  var listeners = data.on;
3603
3817
  // replace with listeners with .native modifier
3818
+ // so it gets processed during parent component patch.
3604
3819
  data.on = data.nativeOn;
3605
3820
 
3606
3821
  if (isTrue(Ctor.options.abstract)) {
3607
3822
  // abstract components do not keep anything
3608
- // other than props & listeners
3823
+ // other than props & listeners & slot
3824
+
3825
+ // work around flow
3826
+ var slot = data.slot;
3609
3827
  data = {};
3828
+ if (slot) {
3829
+ data.slot = slot;
3830
+ }
3610
3831
  }
3611
3832
 
3612
3833
  // merge component management hooks onto the placeholder node
@@ -3617,7 +3838,8 @@
3617
3838
  var vnode = new VNode(
3618
3839
  ("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')),
3619
3840
  data, undefined, undefined, undefined, context,
3620
- { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }
3841
+ { Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children },
3842
+ asyncFactory
3621
3843
  );
3622
3844
  return vnode
3623
3845
  }
@@ -3722,10 +3944,24 @@
3722
3944
  );
3723
3945
  return createEmptyVNode()
3724
3946
  }
3947
+ // object syntax in v-bind
3948
+ if (isDef(data) && isDef(data.is)) {
3949
+ tag = data.is;
3950
+ }
3725
3951
  if (!tag) {
3726
3952
  // in case of component :is set to falsy value
3727
3953
  return createEmptyVNode()
3728
3954
  }
3955
+ // warn against non-primitive key
3956
+ if ("development" !== 'production' &&
3957
+ isDef(data) && isDef(data.key) && !isPrimitive(data.key)
3958
+ ) {
3959
+ warn(
3960
+ 'Avoid using non-primitive value as key, ' +
3961
+ 'use string/number value instead.',
3962
+ context
3963
+ );
3964
+ }
3729
3965
  // support single function children as default scoped slot
3730
3966
  if (Array.isArray(children) &&
3731
3967
  typeof children[0] === 'function'
@@ -3742,7 +3978,7 @@
3742
3978
  var vnode, ns;
3743
3979
  if (typeof tag === 'string') {
3744
3980
  var Ctor;
3745
- ns = config.getTagNamespace(tag);
3981
+ ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag);
3746
3982
  if (config.isReservedTag(tag)) {
3747
3983
  // platform built-in elements
3748
3984
  vnode = new VNode(
@@ -3838,7 +4074,7 @@
3838
4074
  if (scopedSlotFn) { // scoped slot
3839
4075
  props = props || {};
3840
4076
  if (bindObject) {
3841
- extend(props, bindObject);
4077
+ props = extend(extend({}, bindObject), props);
3842
4078
  }
3843
4079
  return scopedSlotFn(props) || fallback
3844
4080
  } else {
@@ -3892,7 +4128,8 @@
3892
4128
  data,
3893
4129
  tag,
3894
4130
  value,
3895
- asProp
4131
+ asProp,
4132
+ isSync
3896
4133
  ) {
3897
4134
  if (value) {
3898
4135
  if (!isObject(value)) {
@@ -3905,8 +4142,12 @@
3905
4142
  value = toObject(value);
3906
4143
  }
3907
4144
  var hash;
3908
- for (var key in value) {
3909
- if (key === 'class' || key === 'style') {
4145
+ var loop = function ( key ) {
4146
+ if (
4147
+ key === 'class' ||
4148
+ key === 'style' ||
4149
+ isReservedAttribute(key)
4150
+ ) {
3910
4151
  hash = data;
3911
4152
  } else {
3912
4153
  var type = data.attrs && data.attrs.type;
@@ -3916,8 +4157,17 @@
3916
4157
  }
3917
4158
  if (!(key in hash)) {
3918
4159
  hash[key] = value[key];
4160
+
4161
+ if (isSync) {
4162
+ var on = data.on || (data.on = {});
4163
+ on[("update:" + key)] = function ($event) {
4164
+ value[key] = $event;
4165
+ };
4166
+ }
3919
4167
  }
3920
- }
4168
+ };
4169
+
4170
+ for (var key in value) loop( key );
3921
4171
  }
3922
4172
  }
3923
4173
  return data
@@ -3984,6 +4234,27 @@
3984
4234
 
3985
4235
  /* */
3986
4236
 
4237
+ function bindObjectListeners (data, value) {
4238
+ if (value) {
4239
+ if (!isPlainObject(value)) {
4240
+ "development" !== 'production' && warn(
4241
+ 'v-on without argument expects an Object value',
4242
+ this
4243
+ );
4244
+ } else {
4245
+ var on = data.on = data.on ? extend({}, data.on) : {};
4246
+ for (var key in value) {
4247
+ var existing = on[key];
4248
+ var ours = value[key];
4249
+ on[key] = existing ? [].concat(ours, existing) : ours;
4250
+ }
4251
+ }
4252
+ }
4253
+ return data
4254
+ }
4255
+
4256
+ /* */
4257
+
3987
4258
  function initRender (vm) {
3988
4259
  vm._vnode = null; // the root of the child tree
3989
4260
  vm._staticTrees = null;
@@ -3999,6 +4270,20 @@
3999
4270
  // normalization is always applied for the public version, used in
4000
4271
  // user-written render functions.
4001
4272
  vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); };
4273
+
4274
+ // $attrs & $listeners are exposed for easier HOC creation.
4275
+ // they need to be reactive so that HOCs using them are always updated
4276
+ var parentData = parentVnode && parentVnode.data;
4277
+
4278
+ /* istanbul ignore else */
4279
+ {
4280
+ defineReactive$$1(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () {
4281
+ !isUpdatingChildComponent && warn("$attrs is readonly.", vm);
4282
+ }, true);
4283
+ defineReactive$$1(vm, '$listeners', vm.$options._parentListeners || emptyObject, function () {
4284
+ !isUpdatingChildComponent && warn("$listeners is readonly.", vm);
4285
+ }, true);
4286
+ }
4002
4287
  }
4003
4288
 
4004
4289
  function renderMixin (Vue) {
@@ -4014,9 +4299,13 @@
4014
4299
  var _parentVnode = ref._parentVnode;
4015
4300
 
4016
4301
  if (vm._isMounted) {
4017
- // clone slot nodes on re-renders
4302
+ // if the parent didn't update, the slot nodes will be the ones from
4303
+ // last render. They need to be cloned to ensure "freshness" for this render.
4018
4304
  for (var key in vm.$slots) {
4019
- vm.$slots[key] = cloneVNodes(vm.$slots[key]);
4305
+ var slot = vm.$slots[key];
4306
+ if (slot._rendered) {
4307
+ vm.$slots[key] = cloneVNodes(slot, true /* deep */);
4308
+ }
4020
4309
  }
4021
4310
  }
4022
4311
 
@@ -4076,6 +4365,7 @@
4076
4365
  Vue.prototype._v = createTextVNode;
4077
4366
  Vue.prototype._e = createEmptyVNode;
4078
4367
  Vue.prototype._u = resolveScopedSlots;
4368
+ Vue.prototype._g = bindObjectListeners;
4079
4369
  }
4080
4370
 
4081
4371
  /* */
@@ -4232,10 +4522,11 @@
4232
4522
 
4233
4523
  function initUse (Vue) {
4234
4524
  Vue.use = function (plugin) {
4235
- /* istanbul ignore if */
4236
- if (plugin.installed) {
4525
+ var installedPlugins = (this._installedPlugins || (this._installedPlugins = []));
4526
+ if (installedPlugins.indexOf(plugin) > -1) {
4237
4527
  return this
4238
4528
  }
4529
+
4239
4530
  // additional parameters
4240
4531
  var args = toArray(arguments, 1);
4241
4532
  args.unshift(this);
@@ -4244,7 +4535,7 @@
4244
4535
  } else if (typeof plugin === 'function') {
4245
4536
  plugin.apply(null, args);
4246
4537
  }
4247
- plugin.installed = true;
4538
+ installedPlugins.push(plugin);
4248
4539
  return this
4249
4540
  };
4250
4541
  }
@@ -4395,14 +4686,16 @@
4395
4686
 
4396
4687
  /* */
4397
4688
 
4398
- var patternTypes = [String, RegExp];
4689
+ var patternTypes = [String, RegExp, Array];
4399
4690
 
4400
4691
  function getComponentName (opts) {
4401
4692
  return opts && (opts.Ctor.options.name || opts.tag)
4402
4693
  }
4403
4694
 
4404
4695
  function matches (pattern, name) {
4405
- if (typeof pattern === 'string') {
4696
+ if (Array.isArray(pattern)) {
4697
+ return pattern.indexOf(name) > -1
4698
+ } else if (typeof pattern === 'string') {
4406
4699
  return pattern.split(',').indexOf(name) > -1
4407
4700
  } else if (isRegExp(pattern)) {
4408
4701
  return pattern.test(name)
@@ -4549,11 +4842,11 @@
4549
4842
  Object.defineProperty(Vue$3.prototype, '$ssrContext', {
4550
4843
  get: function get () {
4551
4844
  /* istanbul ignore next */
4552
- return this.$vnode.ssrContext
4845
+ return this.$vnode && this.$vnode.ssrContext
4553
4846
  }
4554
4847
  });
4555
4848
 
4556
- Vue$3.version = '2.3.4';
4849
+ Vue$3.version = '2.4.4';
4557
4850
 
4558
4851
  /* */
4559
4852
 
@@ -4562,7 +4855,7 @@
4562
4855
  var isReservedAttr = makeMap('style,class');
4563
4856
 
4564
4857
  // attributes that should be using props for binding
4565
- var acceptValue = makeMap('input,textarea,option,select');
4858
+ var acceptValue = makeMap('input,textarea,option,select,progress');
4566
4859
  var mustUseProp = function (tag, type, attr) {
4567
4860
  return (
4568
4861
  (attr === 'value' && acceptValue(tag)) && type !== 'button' ||
@@ -4614,7 +4907,7 @@
4614
4907
  data = mergeClassData(data, parentNode.data);
4615
4908
  }
4616
4909
  }
4617
- return genClassFromData(data)
4910
+ return renderClass(data.staticClass, data.class)
4618
4911
  }
4619
4912
 
4620
4913
  function mergeClassData (child, parent) {
@@ -4626,9 +4919,10 @@
4626
4919
  }
4627
4920
  }
4628
4921
 
4629
- function genClassFromData (data) {
4630
- var dynamicClass = data.class;
4631
- var staticClass = data.staticClass;
4922
+ function renderClass (
4923
+ staticClass,
4924
+ dynamicClass
4925
+ ) {
4632
4926
  if (isDef(staticClass) || isDef(dynamicClass)) {
4633
4927
  return concat(staticClass, stringifyClass(dynamicClass))
4634
4928
  }
@@ -4641,31 +4935,39 @@
4641
4935
  }
4642
4936
 
4643
4937
  function stringifyClass (value) {
4644
- if (isUndef(value)) {
4645
- return ''
4938
+ if (Array.isArray(value)) {
4939
+ return stringifyArray(value)
4940
+ }
4941
+ if (isObject(value)) {
4942
+ return stringifyObject(value)
4646
4943
  }
4647
4944
  if (typeof value === 'string') {
4648
4945
  return value
4649
4946
  }
4947
+ /* istanbul ignore next */
4948
+ return ''
4949
+ }
4950
+
4951
+ function stringifyArray (value) {
4650
4952
  var res = '';
4651
- if (Array.isArray(value)) {
4652
- var stringified;
4653
- for (var i = 0, l = value.length; i < l; i++) {
4654
- if (isDef(value[i])) {
4655
- if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
4656
- res += stringified + ' ';
4657
- }
4658
- }
4953
+ var stringified;
4954
+ for (var i = 0, l = value.length; i < l; i++) {
4955
+ if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') {
4956
+ if (res) { res += ' '; }
4957
+ res += stringified;
4659
4958
  }
4660
- return res.slice(0, -1)
4661
4959
  }
4662
- if (isObject(value)) {
4663
- for (var key in value) {
4664
- if (value[key]) { res += key + ' '; }
4960
+ return res
4961
+ }
4962
+
4963
+ function stringifyObject (value) {
4964
+ var res = '';
4965
+ for (var key in value) {
4966
+ if (value[key]) {
4967
+ if (res) { res += ' '; }
4968
+ res += key;
4665
4969
  }
4666
- return res.slice(0, -1)
4667
4970
  }
4668
- /* istanbul ignore next */
4669
4971
  return res
4670
4972
  }
4671
4973
 
@@ -4679,7 +4981,7 @@
4679
4981
  var isHTMLTag = makeMap(
4680
4982
  'html,body,base,head,link,meta,style,title,' +
4681
4983
  'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' +
4682
- 'div,dd,dl,dt,figcaption,figure,hr,img,li,main,ol,p,pre,ul,' +
4984
+ 'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' +
4683
4985
  'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' +
4684
4986
  's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' +
4685
4987
  'embed,object,param,source,canvas,script,noscript,del,ins,' +
@@ -4687,7 +4989,7 @@
4687
4989
  'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' +
4688
4990
  'output,progress,select,textarea,' +
4689
4991
  'details,dialog,menu,menuitem,summary,' +
4690
- 'content,element,shadow,template'
4992
+ 'content,element,shadow,template,blockquote,iframe,tfoot'
4691
4993
  );
4692
4994
 
4693
4995
  // this map is intentionally selective, only covering SVG elements that may
@@ -4742,6 +5044,8 @@
4742
5044
  }
4743
5045
  }
4744
5046
 
5047
+ var isTextInputType = makeMap('text,number,password,search,email,tel,url');
5048
+
4745
5049
  /* */
4746
5050
 
4747
5051
  /**
@@ -4868,10 +5172,11 @@
4868
5172
  }
4869
5173
  } else {
4870
5174
  if (vnode.data.refInFor) {
4871
- if (Array.isArray(refs[key]) && refs[key].indexOf(ref) < 0) {
4872
- refs[key].push(ref);
4873
- } else {
5175
+ if (!Array.isArray(refs[key])) {
4874
5176
  refs[key] = [ref];
5177
+ } else if (refs[key].indexOf(ref) < 0) {
5178
+ // $flow-disable-line
5179
+ refs[key].push(ref);
4875
5180
  }
4876
5181
  } else {
4877
5182
  refs[key] = ref;
@@ -4887,8 +5192,6 @@
4887
5192
  *
4888
5193
  * modified by Evan You (@yyx990803)
4889
5194
  *
4890
-
4891
- /*
4892
5195
  * Not type-checking this because this file is perf-critical and the cost
4893
5196
  * of making flow understand it is not worth it.
4894
5197
  */
@@ -4899,22 +5202,27 @@
4899
5202
 
4900
5203
  function sameVnode (a, b) {
4901
5204
  return (
4902
- a.key === b.key &&
4903
- a.tag === b.tag &&
4904
- a.isComment === b.isComment &&
4905
- isDef(a.data) === isDef(b.data) &&
4906
- sameInputType(a, b)
5205
+ a.key === b.key && (
5206
+ (
5207
+ a.tag === b.tag &&
5208
+ a.isComment === b.isComment &&
5209
+ isDef(a.data) === isDef(b.data) &&
5210
+ sameInputType(a, b)
5211
+ ) || (
5212
+ isTrue(a.isAsyncPlaceholder) &&
5213
+ a.asyncFactory === b.asyncFactory &&
5214
+ isUndef(b.asyncFactory.error)
5215
+ )
5216
+ )
4907
5217
  )
4908
5218
  }
4909
5219
 
4910
- // Some browsers do not support dynamically changing type for <input>
4911
- // so they need to be treated as different nodes
4912
5220
  function sameInputType (a, b) {
4913
5221
  if (a.tag !== 'input') { return true }
4914
5222
  var i;
4915
5223
  var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type;
4916
5224
  var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type;
4917
- return typeA === typeB
5225
+ return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB)
4918
5226
  }
4919
5227
 
4920
5228
  function createKeyToOldIdx (children, beginIdx, endIdx) {
@@ -5081,11 +5389,11 @@
5081
5389
  insert(parentElm, vnode.elm, refElm);
5082
5390
  }
5083
5391
 
5084
- function insert (parent, elm, ref) {
5392
+ function insert (parent, elm, ref$$1) {
5085
5393
  if (isDef(parent)) {
5086
- if (isDef(ref)) {
5087
- if (ref.parentNode === parent) {
5088
- nodeOps.insertBefore(parent, elm, ref);
5394
+ if (isDef(ref$$1)) {
5395
+ if (ref$$1.parentNode === parent) {
5396
+ nodeOps.insertBefore(parent, elm, ref$$1);
5089
5397
  }
5090
5398
  } else {
5091
5399
  nodeOps.appendChild(parent, elm);
@@ -5246,10 +5554,11 @@
5246
5554
  newStartVnode = newCh[++newStartIdx];
5247
5555
  } else {
5248
5556
  if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); }
5249
- idxInOld = isDef(newStartVnode.key) ? oldKeyToIdx[newStartVnode.key] : null;
5557
+ idxInOld = isDef(newStartVnode.key)
5558
+ ? oldKeyToIdx[newStartVnode.key]
5559
+ : findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx);
5250
5560
  if (isUndef(idxInOld)) { // New element
5251
5561
  createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
5252
- newStartVnode = newCh[++newStartIdx];
5253
5562
  } else {
5254
5563
  elmToMove = oldCh[idxInOld];
5255
5564
  /* istanbul ignore if */
@@ -5262,14 +5571,13 @@
5262
5571
  if (sameVnode(elmToMove, newStartVnode)) {
5263
5572
  patchVnode(elmToMove, newStartVnode, insertedVnodeQueue);
5264
5573
  oldCh[idxInOld] = undefined;
5265
- canMove && nodeOps.insertBefore(parentElm, newStartVnode.elm, oldStartVnode.elm);
5266
- newStartVnode = newCh[++newStartIdx];
5574
+ canMove && nodeOps.insertBefore(parentElm, elmToMove.elm, oldStartVnode.elm);
5267
5575
  } else {
5268
5576
  // same key but different element. treat as new element
5269
5577
  createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm);
5270
- newStartVnode = newCh[++newStartIdx];
5271
5578
  }
5272
5579
  }
5580
+ newStartVnode = newCh[++newStartIdx];
5273
5581
  }
5274
5582
  }
5275
5583
  if (oldStartIdx > oldEndIdx) {
@@ -5280,10 +5588,29 @@
5280
5588
  }
5281
5589
  }
5282
5590
 
5591
+ function findIdxInOld (node, oldCh, start, end) {
5592
+ for (var i = start; i < end; i++) {
5593
+ var c = oldCh[i];
5594
+ if (isDef(c) && sameVnode(node, c)) { return i }
5595
+ }
5596
+ }
5597
+
5283
5598
  function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) {
5284
5599
  if (oldVnode === vnode) {
5285
5600
  return
5286
5601
  }
5602
+
5603
+ var elm = vnode.elm = oldVnode.elm;
5604
+
5605
+ if (isTrue(oldVnode.isAsyncPlaceholder)) {
5606
+ if (isDef(vnode.asyncFactory.resolved)) {
5607
+ hydrate(oldVnode.elm, vnode, insertedVnodeQueue);
5608
+ } else {
5609
+ vnode.isAsyncPlaceholder = true;
5610
+ }
5611
+ return
5612
+ }
5613
+
5287
5614
  // reuse element for static trees.
5288
5615
  // note we only do this if the vnode is cloned -
5289
5616
  // if the new node is not cloned it means the render functions have been
@@ -5293,16 +5620,16 @@
5293
5620
  vnode.key === oldVnode.key &&
5294
5621
  (isTrue(vnode.isCloned) || isTrue(vnode.isOnce))
5295
5622
  ) {
5296
- vnode.elm = oldVnode.elm;
5297
5623
  vnode.componentInstance = oldVnode.componentInstance;
5298
5624
  return
5299
5625
  }
5626
+
5300
5627
  var i;
5301
5628
  var data = vnode.data;
5302
5629
  if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) {
5303
5630
  i(oldVnode, vnode);
5304
5631
  }
5305
- var elm = vnode.elm = oldVnode.elm;
5632
+
5306
5633
  var oldCh = oldVnode.children;
5307
5634
  var ch = vnode.children;
5308
5635
  if (isDef(data) && isPatchable(vnode)) {
@@ -5347,6 +5674,11 @@
5347
5674
 
5348
5675
  // Note: this is a browser-only function so we can assume elms are DOM nodes.
5349
5676
  function hydrate (elm, vnode, insertedVnodeQueue) {
5677
+ if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) {
5678
+ vnode.elm = elm;
5679
+ vnode.isAsyncPlaceholder = true;
5680
+ return true
5681
+ }
5350
5682
  {
5351
5683
  if (!assertNodeMatch(elm, vnode)) {
5352
5684
  return false
@@ -5370,27 +5702,46 @@
5370
5702
  if (!elm.hasChildNodes()) {
5371
5703
  createChildren(vnode, children, insertedVnodeQueue);
5372
5704
  } else {
5373
- var childrenMatch = true;
5374
- var childNode = elm.firstChild;
5375
- for (var i$1 = 0; i$1 < children.length; i$1++) {
5376
- if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {
5377
- childrenMatch = false;
5378
- break
5705
+ // v-html and domProps: innerHTML
5706
+ if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) {
5707
+ if (i !== elm.innerHTML) {
5708
+ /* istanbul ignore if */
5709
+ if ("development" !== 'production' &&
5710
+ typeof console !== 'undefined' &&
5711
+ !bailed
5712
+ ) {
5713
+ bailed = true;
5714
+ console.warn('Parent: ', elm);
5715
+ console.warn('server innerHTML: ', i);
5716
+ console.warn('client innerHTML: ', elm.innerHTML);
5717
+ }
5718
+ return false
5379
5719
  }
5380
- childNode = childNode.nextSibling;
5381
- }
5382
- // if childNode is not null, it means the actual childNodes list is
5383
- // longer than the virtual children list.
5384
- if (!childrenMatch || childNode) {
5385
- if ("development" !== 'production' &&
5386
- typeof console !== 'undefined' &&
5387
- !bailed
5388
- ) {
5389
- bailed = true;
5390
- console.warn('Parent: ', elm);
5391
- console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
5720
+ } else {
5721
+ // iterate and compare children lists
5722
+ var childrenMatch = true;
5723
+ var childNode = elm.firstChild;
5724
+ for (var i$1 = 0; i$1 < children.length; i$1++) {
5725
+ if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue)) {
5726
+ childrenMatch = false;
5727
+ break
5728
+ }
5729
+ childNode = childNode.nextSibling;
5730
+ }
5731
+ // if childNode is not null, it means the actual childNodes list is
5732
+ // longer than the virtual children list.
5733
+ if (!childrenMatch || childNode) {
5734
+ /* istanbul ignore if */
5735
+ if ("development" !== 'production' &&
5736
+ typeof console !== 'undefined' &&
5737
+ !bailed
5738
+ ) {
5739
+ bailed = true;
5740
+ console.warn('Parent: ', elm);
5741
+ console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children);
5742
+ }
5743
+ return false
5392
5744
  }
5393
- return false
5394
5745
  }
5395
5746
  }
5396
5747
  }
@@ -5481,14 +5832,28 @@
5481
5832
  // component root element replaced.
5482
5833
  // update parent placeholder node element, recursively
5483
5834
  var ancestor = vnode.parent;
5835
+ var patchable = isPatchable(vnode);
5484
5836
  while (ancestor) {
5837
+ for (var i = 0; i < cbs.destroy.length; ++i) {
5838
+ cbs.destroy[i](ancestor);
5839
+ }
5485
5840
  ancestor.elm = vnode.elm;
5486
- ancestor = ancestor.parent;
5487
- }
5488
- if (isPatchable(vnode)) {
5489
- for (var i = 0; i < cbs.create.length; ++i) {
5490
- cbs.create[i](emptyNode, vnode.parent);
5841
+ if (patchable) {
5842
+ for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) {
5843
+ cbs.create[i$1](emptyNode, ancestor);
5844
+ }
5845
+ // #6513
5846
+ // invoke insert hooks that may have been merged by create hooks.
5847
+ // e.g. for directives that uses the "inserted" hook.
5848
+ var insert = ancestor.data.hook.insert;
5849
+ if (insert.merged) {
5850
+ // start at index 1 to avoid re-invoking component mounted hook
5851
+ for (var i$2 = 1; i$2 < insert.fns.length; i$2++) {
5852
+ insert.fns[i$2]();
5853
+ }
5854
+ }
5491
5855
  }
5856
+ ancestor = ancestor.parent;
5492
5857
  }
5493
5858
  }
5494
5859
 
@@ -5626,6 +5991,10 @@
5626
5991
  /* */
5627
5992
 
5628
5993
  function updateAttrs (oldVnode, vnode) {
5994
+ var opts = vnode.componentOptions;
5995
+ if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) {
5996
+ return
5997
+ }
5629
5998
  if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) {
5630
5999
  return
5631
6000
  }
@@ -5668,7 +6037,12 @@
5668
6037
  if (isFalsyAttrValue(value)) {
5669
6038
  el.removeAttribute(key);
5670
6039
  } else {
5671
- el.setAttribute(key, key);
6040
+ // technically allowfullscreen is a boolean attribute for <iframe>,
6041
+ // but Flash expects a value of "true" when used on <embed> tag
6042
+ value = key === 'allowfullscreen' && el.tagName === 'EMBED'
6043
+ ? 'true'
6044
+ : key;
6045
+ el.setAttribute(key, value);
5672
6046
  }
5673
6047
  } else if (isEnumeratedAttr(key)) {
5674
6048
  el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true');
@@ -5991,10 +6365,7 @@
5991
6365
  if (modelRs.idx === null) {
5992
6366
  return (value + "=" + assignment)
5993
6367
  } else {
5994
- return "var $$exp = " + (modelRs.exp) + ", $$idx = " + (modelRs.idx) + ";" +
5995
- "if (!Array.isArray($$exp)){" +
5996
- value + "=" + assignment + "}" +
5997
- "else{$$exp.splice($$idx, 1, " + assignment + ")}"
6368
+ return ("$set(" + (modelRs.exp) + ", " + (modelRs.idx) + ", " + assignment + ")")
5998
6369
  }
5999
6370
  }
6000
6371
 
@@ -6125,7 +6496,11 @@
6125
6496
  }
6126
6497
  }
6127
6498
 
6128
- if (tag === 'select') {
6499
+ if (el.component) {
6500
+ genComponentModel(el, value, modifiers);
6501
+ // component v-model doesn't need extra runtime
6502
+ return false
6503
+ } else if (tag === 'select') {
6129
6504
  genSelect(el, value, modifiers);
6130
6505
  } else if (tag === 'input' && type === 'checkbox') {
6131
6506
  genCheckboxModel(el, value, modifiers);
@@ -6174,7 +6549,7 @@
6174
6549
  'if(Array.isArray($$a)){' +
6175
6550
  "var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," +
6176
6551
  '$$i=_i($$a,$$v);' +
6177
- "if($$c){$$i<0&&(" + value + "=$$a.concat($$v))}" +
6552
+ "if($$el.checked){$$i<0&&(" + value + "=$$a.concat([$$v]))}" +
6178
6553
  "else{$$i>-1&&(" + value + "=$$a.slice(0,$$i).concat($$a.slice($$i+1)))}" +
6179
6554
  "}else{" + (genAssignmentCode(value, '$$c')) + "}",
6180
6555
  null, true
@@ -6242,7 +6617,7 @@
6242
6617
 
6243
6618
  addProp(el, 'value', ("(" + value + ")"));
6244
6619
  addHandler(el, event, code, null, true);
6245
- if (trim || number || type === 'number') {
6620
+ if (trim || number) {
6246
6621
  addHandler(el, 'blur', '$forceUpdate()');
6247
6622
  }
6248
6623
  }
@@ -6386,14 +6761,19 @@
6386
6761
  }
6387
6762
 
6388
6763
  function isDirty (elm, checkVal) {
6389
- // return true when textbox (.number and .trim) loses focus and its value is not equal to the updated value
6390
- return document.activeElement !== elm && elm.value !== checkVal
6764
+ // return true when textbox (.number and .trim) loses focus and its value is
6765
+ // not equal to the updated value
6766
+ var notInFocus = true;
6767
+ // #6157
6768
+ // work around IE bug when accessing document.activeElement in an iframe
6769
+ try { notInFocus = document.activeElement !== elm; } catch (e) {}
6770
+ return notInFocus && elm.value !== checkVal
6391
6771
  }
6392
6772
 
6393
6773
  function isInputChanged (elm, newVal) {
6394
6774
  var value = elm.value;
6395
6775
  var modifiers = elm._vModifiers; // injected by v-model runtime
6396
- if ((isDef(modifiers) && modifiers.number) || elm.type === 'number') {
6776
+ if (isDef(modifiers) && modifiers.number) {
6397
6777
  return toNumber(value) !== toNumber(newVal)
6398
6778
  }
6399
6779
  if (isDef(modifiers) && modifiers.trim) {
@@ -6499,20 +6879,20 @@
6499
6879
  }
6500
6880
  };
6501
6881
 
6502
- var prefixes = ['Webkit', 'Moz', 'ms'];
6882
+ var vendorNames = ['Webkit', 'Moz', 'ms'];
6503
6883
 
6504
- var testEl;
6884
+ var emptyStyle;
6505
6885
  var normalize = cached(function (prop) {
6506
- testEl = testEl || document.createElement('div');
6886
+ emptyStyle = emptyStyle || document.createElement('div').style;
6507
6887
  prop = camelize(prop);
6508
- if (prop !== 'filter' && (prop in testEl.style)) {
6888
+ if (prop !== 'filter' && (prop in emptyStyle)) {
6509
6889
  return prop
6510
6890
  }
6511
- var upper = prop.charAt(0).toUpperCase() + prop.slice(1);
6512
- for (var i = 0; i < prefixes.length; i++) {
6513
- var prefixed = prefixes[i] + upper;
6514
- if (prefixed in testEl.style) {
6515
- return prefixed
6891
+ var capName = prop.charAt(0).toUpperCase() + prop.slice(1);
6892
+ for (var i = 0; i < vendorNames.length; i++) {
6893
+ var name = vendorNames[i] + capName;
6894
+ if (name in emptyStyle) {
6895
+ return name
6516
6896
  }
6517
6897
  }
6518
6898
  });
@@ -6538,7 +6918,7 @@
6538
6918
  var style = normalizeStyleBinding(vnode.data.style) || {};
6539
6919
 
6540
6920
  // store normalized style under a different key for next diff
6541
- // make sure to clone it if it's reactive, since the user likley wants
6921
+ // make sure to clone it if it's reactive, since the user likely wants
6542
6922
  // to mutate it.
6543
6923
  vnode.data.normalizedStyle = isDef(style.__ob__)
6544
6924
  ? extend({}, style)
@@ -6609,13 +6989,21 @@
6609
6989
  } else {
6610
6990
  el.classList.remove(cls);
6611
6991
  }
6992
+ if (!el.classList.length) {
6993
+ el.removeAttribute('class');
6994
+ }
6612
6995
  } else {
6613
6996
  var cur = " " + (el.getAttribute('class') || '') + " ";
6614
6997
  var tar = ' ' + cls + ' ';
6615
6998
  while (cur.indexOf(tar) >= 0) {
6616
6999
  cur = cur.replace(tar, ' ');
6617
7000
  }
6618
- el.setAttribute('class', cur.trim());
7001
+ cur = cur.trim();
7002
+ if (cur) {
7003
+ el.setAttribute('class', cur);
7004
+ } else {
7005
+ el.removeAttribute('class');
7006
+ }
6619
7007
  }
6620
7008
  }
6621
7009
 
@@ -6686,8 +7074,11 @@
6686
7074
  }
6687
7075
 
6688
7076
  function addTransitionClass (el, cls) {
6689
- (el._transitionClasses || (el._transitionClasses = [])).push(cls);
6690
- addClass(el, cls);
7077
+ var transitionClasses = el._transitionClasses || (el._transitionClasses = []);
7078
+ if (transitionClasses.indexOf(cls) < 0) {
7079
+ transitionClasses.push(cls);
7080
+ addClass(el, cls);
7081
+ }
6691
7082
  }
6692
7083
 
6693
7084
  function removeTransitionClass (el, cls) {
@@ -7146,15 +7537,9 @@
7146
7537
  var model$1 = {
7147
7538
  inserted: function inserted (el, binding, vnode) {
7148
7539
  if (vnode.tag === 'select') {
7149
- var cb = function () {
7150
- setSelected(el, binding, vnode.context);
7151
- };
7152
- cb();
7153
- /* istanbul ignore if */
7154
- if (isIE || isEdge) {
7155
- setTimeout(cb, 0);
7156
- }
7157
- } else if (vnode.tag === 'textarea' || el.type === 'text' || el.type === 'password') {
7540
+ setSelected(el, binding, vnode.context);
7541
+ el._vOptions = [].map.call(el.options, getValue);
7542
+ } else if (vnode.tag === 'textarea' || isTextInputType(el.type)) {
7158
7543
  el._vModifiers = binding.modifiers;
7159
7544
  if (!binding.modifiers.lazy) {
7160
7545
  // Safari < 10.2 & UIWebView doesn't fire compositionend when
@@ -7180,17 +7565,33 @@
7180
7565
  // it's possible that the value is out-of-sync with the rendered options.
7181
7566
  // detect such cases and filter out values that no longer has a matching
7182
7567
  // option in the DOM.
7183
- var needReset = el.multiple
7184
- ? binding.value.some(function (v) { return hasNoMatchingOption(v, el.options); })
7185
- : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, el.options);
7186
- if (needReset) {
7187
- trigger(el, 'change');
7568
+ var prevOptions = el._vOptions;
7569
+ var curOptions = el._vOptions = [].map.call(el.options, getValue);
7570
+ if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) {
7571
+ // trigger change event if
7572
+ // no matching option found for at least one value
7573
+ var needReset = el.multiple
7574
+ ? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); })
7575
+ : binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions);
7576
+ if (needReset) {
7577
+ trigger(el, 'change');
7578
+ }
7188
7579
  }
7189
7580
  }
7190
7581
  }
7191
7582
  };
7192
7583
 
7193
7584
  function setSelected (el, binding, vm) {
7585
+ actuallySetSelected(el, binding, vm);
7586
+ /* istanbul ignore if */
7587
+ if (isIE || isEdge) {
7588
+ setTimeout(function () {
7589
+ actuallySetSelected(el, binding, vm);
7590
+ }, 0);
7591
+ }
7592
+ }
7593
+
7594
+ function actuallySetSelected (el, binding, vm) {
7194
7595
  var value = binding.value;
7195
7596
  var isMultiple = el.multiple;
7196
7597
  if (isMultiple && !Array.isArray(value)) {
@@ -7224,12 +7625,7 @@
7224
7625
  }
7225
7626
 
7226
7627
  function hasNoMatchingOption (value, options) {
7227
- for (var i = 0, l = options.length; i < l; i++) {
7228
- if (looseEqual(getValue(options[i]), value)) {
7229
- return false
7230
- }
7231
- }
7232
- return true
7628
+ return options.every(function (o) { return !looseEqual(o, value); })
7233
7629
  }
7234
7630
 
7235
7631
  function getValue (option) {
@@ -7269,10 +7665,10 @@
7269
7665
  var value = ref.value;
7270
7666
 
7271
7667
  vnode = locateNode(vnode);
7272
- var transition = vnode.data && vnode.data.transition;
7668
+ var transition$$1 = vnode.data && vnode.data.transition;
7273
7669
  var originalDisplay = el.__vOriginalDisplay =
7274
7670
  el.style.display === 'none' ? '' : el.style.display;
7275
- if (value && transition && !isIE9) {
7671
+ if (value && transition$$1) {
7276
7672
  vnode.data.show = true;
7277
7673
  enter(vnode, function () {
7278
7674
  el.style.display = originalDisplay;
@@ -7289,8 +7685,8 @@
7289
7685
  /* istanbul ignore if */
7290
7686
  if (value === oldValue) { return }
7291
7687
  vnode = locateNode(vnode);
7292
- var transition = vnode.data && vnode.data.transition;
7293
- if (transition && !isIE9) {
7688
+ var transition$$1 = vnode.data && vnode.data.transition;
7689
+ if (transition$$1) {
7294
7690
  vnode.data.show = true;
7295
7691
  if (value) {
7296
7692
  enter(vnode, function () {
@@ -7402,13 +7798,13 @@
7402
7798
  render: function render (h) {
7403
7799
  var this$1 = this;
7404
7800
 
7405
- var children = this.$slots.default;
7801
+ var children = this.$options._renderChildren;
7406
7802
  if (!children) {
7407
7803
  return
7408
7804
  }
7409
7805
 
7410
7806
  // filter out text nodes (possible whitespaces)
7411
- children = children.filter(function (c) { return c.tag; });
7807
+ children = children.filter(function (c) { return c.tag || isAsyncPlaceholder(c); });
7412
7808
  /* istanbul ignore if */
7413
7809
  if (!children.length) {
7414
7810
  return
@@ -7460,7 +7856,9 @@
7460
7856
  // during entering.
7461
7857
  var id = "__transition-" + (this._uid) + "-";
7462
7858
  child.key = child.key == null
7463
- ? id + child.tag
7859
+ ? child.isComment
7860
+ ? id + 'comment'
7861
+ : id + child.tag
7464
7862
  : isPrimitive(child.key)
7465
7863
  ? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key)
7466
7864
  : child.key;
@@ -7475,7 +7873,12 @@
7475
7873
  child.data.show = true;
7476
7874
  }
7477
7875
 
7478
- if (oldChild && oldChild.data && !isSameChild(child, oldChild)) {
7876
+ if (
7877
+ oldChild &&
7878
+ oldChild.data &&
7879
+ !isSameChild(child, oldChild) &&
7880
+ !isAsyncPlaceholder(oldChild)
7881
+ ) {
7479
7882
  // replace old child transition data with fresh one
7480
7883
  // important for dynamic transitions!
7481
7884
  var oldData = oldChild && (oldChild.data.transition = extend({}, data));
@@ -7489,6 +7892,9 @@
7489
7892
  });
7490
7893
  return placeholder(h, rawChild)
7491
7894
  } else if (mode === 'in-out') {
7895
+ if (isAsyncPlaceholder(child)) {
7896
+ return oldRawChild
7897
+ }
7492
7898
  var delayedLeave;
7493
7899
  var performLeave = function () { delayedLeave(); };
7494
7900
  mergeVNodeHook(data, 'afterEnter', performLeave);
@@ -7618,7 +8024,8 @@
7618
8024
  if (!hasTransition) {
7619
8025
  return false
7620
8026
  }
7621
- if (this._hasMove != null) {
8027
+ /* istanbul ignore if */
8028
+ if (this._hasMove) {
7622
8029
  return this._hasMove
7623
8030
  }
7624
8031
  // Detect whether an element with the move class applied has
@@ -7728,7 +8135,7 @@
7728
8135
  // check whether current browser encodes a char inside attribute values
7729
8136
  function shouldDecode (content, encoded) {
7730
8137
  var div = document.createElement('div');
7731
- div.innerHTML = "<div a=\"" + content + "\">";
8138
+ div.innerHTML = "<div a=\"" + content + "\"/>";
7732
8139
  return div.innerHTML.indexOf(encoded) > 0
7733
8140
  }
7734
8141
 
@@ -7738,6 +8145,158 @@
7738
8145
 
7739
8146
  /* */
7740
8147
 
8148
+ var defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g;
8149
+ var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
8150
+
8151
+ var buildRegex = cached(function (delimiters) {
8152
+ var open = delimiters[0].replace(regexEscapeRE, '\\$&');
8153
+ var close = delimiters[1].replace(regexEscapeRE, '\\$&');
8154
+ return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
8155
+ });
8156
+
8157
+ function parseText (
8158
+ text,
8159
+ delimiters
8160
+ ) {
8161
+ var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
8162
+ if (!tagRE.test(text)) {
8163
+ return
8164
+ }
8165
+ var tokens = [];
8166
+ var lastIndex = tagRE.lastIndex = 0;
8167
+ var match, index;
8168
+ while ((match = tagRE.exec(text))) {
8169
+ index = match.index;
8170
+ // push text token
8171
+ if (index > lastIndex) {
8172
+ tokens.push(JSON.stringify(text.slice(lastIndex, index)));
8173
+ }
8174
+ // tag token
8175
+ var exp = parseFilters(match[1].trim());
8176
+ tokens.push(("_s(" + exp + ")"));
8177
+ lastIndex = index + match[0].length;
8178
+ }
8179
+ if (lastIndex < text.length) {
8180
+ tokens.push(JSON.stringify(text.slice(lastIndex)));
8181
+ }
8182
+ return tokens.join('+')
8183
+ }
8184
+
8185
+ /* */
8186
+
8187
+ function transformNode (el, options) {
8188
+ var warn = options.warn || baseWarn;
8189
+ var staticClass = getAndRemoveAttr(el, 'class');
8190
+ if ("development" !== 'production' && staticClass) {
8191
+ var expression = parseText(staticClass, options.delimiters);
8192
+ if (expression) {
8193
+ warn(
8194
+ "class=\"" + staticClass + "\": " +
8195
+ 'Interpolation inside attributes has been removed. ' +
8196
+ 'Use v-bind or the colon shorthand instead. For example, ' +
8197
+ 'instead of <div class="{{ val }}">, use <div :class="val">.'
8198
+ );
8199
+ }
8200
+ }
8201
+ if (staticClass) {
8202
+ el.staticClass = JSON.stringify(staticClass);
8203
+ }
8204
+ var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
8205
+ if (classBinding) {
8206
+ el.classBinding = classBinding;
8207
+ }
8208
+ }
8209
+
8210
+ function genData (el) {
8211
+ var data = '';
8212
+ if (el.staticClass) {
8213
+ data += "staticClass:" + (el.staticClass) + ",";
8214
+ }
8215
+ if (el.classBinding) {
8216
+ data += "class:" + (el.classBinding) + ",";
8217
+ }
8218
+ return data
8219
+ }
8220
+
8221
+ var klass$1 = {
8222
+ staticKeys: ['staticClass'],
8223
+ transformNode: transformNode,
8224
+ genData: genData
8225
+ };
8226
+
8227
+ /* */
8228
+
8229
+ function transformNode$1 (el, options) {
8230
+ var warn = options.warn || baseWarn;
8231
+ var staticStyle = getAndRemoveAttr(el, 'style');
8232
+ if (staticStyle) {
8233
+ /* istanbul ignore if */
8234
+ {
8235
+ var expression = parseText(staticStyle, options.delimiters);
8236
+ if (expression) {
8237
+ warn(
8238
+ "style=\"" + staticStyle + "\": " +
8239
+ 'Interpolation inside attributes has been removed. ' +
8240
+ 'Use v-bind or the colon shorthand instead. For example, ' +
8241
+ 'instead of <div style="{{ val }}">, use <div :style="val">.'
8242
+ );
8243
+ }
8244
+ }
8245
+ el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
8246
+ }
8247
+
8248
+ var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
8249
+ if (styleBinding) {
8250
+ el.styleBinding = styleBinding;
8251
+ }
8252
+ }
8253
+
8254
+ function genData$1 (el) {
8255
+ var data = '';
8256
+ if (el.staticStyle) {
8257
+ data += "staticStyle:" + (el.staticStyle) + ",";
8258
+ }
8259
+ if (el.styleBinding) {
8260
+ data += "style:(" + (el.styleBinding) + "),";
8261
+ }
8262
+ return data
8263
+ }
8264
+
8265
+ var style$1 = {
8266
+ staticKeys: ['staticStyle'],
8267
+ transformNode: transformNode$1,
8268
+ genData: genData$1
8269
+ };
8270
+
8271
+ var modules$1 = [
8272
+ klass$1,
8273
+ style$1
8274
+ ];
8275
+
8276
+ /* */
8277
+
8278
+ function text (el, dir) {
8279
+ if (dir.value) {
8280
+ addProp(el, 'textContent', ("_s(" + (dir.value) + ")"));
8281
+ }
8282
+ }
8283
+
8284
+ /* */
8285
+
8286
+ function html (el, dir) {
8287
+ if (dir.value) {
8288
+ addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"));
8289
+ }
8290
+ }
8291
+
8292
+ var directives$1 = {
8293
+ model: model,
8294
+ text: text,
8295
+ html: html
8296
+ };
8297
+
8298
+ /* */
8299
+
7741
8300
  var isUnaryTag = makeMap(
7742
8301
  'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' +
7743
8302
  'link,meta,param,source,track,wbr'
@@ -7761,13 +8320,30 @@
7761
8320
 
7762
8321
  /* */
7763
8322
 
8323
+ var baseOptions = {
8324
+ expectHTML: true,
8325
+ modules: modules$1,
8326
+ directives: directives$1,
8327
+ isPreTag: isPreTag,
8328
+ isUnaryTag: isUnaryTag,
8329
+ mustUseProp: mustUseProp,
8330
+ canBeLeftOpenTag: canBeLeftOpenTag,
8331
+ isReservedTag: isReservedTag,
8332
+ getTagNamespace: getTagNamespace,
8333
+ staticKeys: genStaticKeys(modules$1)
8334
+ };
8335
+
8336
+ /* */
8337
+
7764
8338
  var decoder;
7765
8339
 
7766
- function decode (html) {
7767
- decoder = decoder || document.createElement('div');
7768
- decoder.innerHTML = html;
7769
- return decoder.textContent
7770
- }
8340
+ var he = {
8341
+ decode: function decode (html) {
8342
+ decoder = decoder || document.createElement('div');
8343
+ decoder.innerHTML = html;
8344
+ return decoder.textContent
8345
+ }
8346
+ };
7771
8347
 
7772
8348
  /**
7773
8349
  * Not type-checking this file because it's mostly vendor code.
@@ -7781,29 +8357,14 @@
7781
8357
  */
7782
8358
 
7783
8359
  // Regular Expressions for parsing tags and attributes
7784
- var singleAttrIdentifier = /([^\s"'<>/=]+)/;
7785
- var singleAttrAssign = /(?:=)/;
7786
- var singleAttrValues = [
7787
- // attr value double quotes
7788
- /"([^"]*)"+/.source,
7789
- // attr value, single quotes
7790
- /'([^']*)'+/.source,
7791
- // attr value, no quotes
7792
- /([^\s"'=<>`]+)/.source
7793
- ];
7794
- var attribute = new RegExp(
7795
- '^\\s*' + singleAttrIdentifier.source +
7796
- '(?:\\s*(' + singleAttrAssign.source + ')' +
7797
- '\\s*(?:' + singleAttrValues.join('|') + '))?'
7798
- );
7799
-
8360
+ var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/;
7800
8361
  // could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName
7801
8362
  // but for Vue templates we can enforce a simple charset
7802
8363
  var ncname = '[a-zA-Z_][\\w\\-\\.]*';
7803
- var qnameCapture = '((?:' + ncname + '\\:)?' + ncname + ')';
7804
- var startTagOpen = new RegExp('^<' + qnameCapture);
8364
+ var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")";
8365
+ var startTagOpen = new RegExp(("^<" + qnameCapture));
7805
8366
  var startTagClose = /^\s*(\/?)>/;
7806
- var endTag = new RegExp('^<\\/' + qnameCapture + '[^>]*>');
8367
+ var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>"));
7807
8368
  var doctype = /^<!DOCTYPE [^>]+>/i;
7808
8369
  var comment = /^<!--/;
7809
8370
  var conditionalComment = /^<!\[/;
@@ -7827,6 +8388,10 @@
7827
8388
  var encodedAttr = /&(?:lt|gt|quot|amp);/g;
7828
8389
  var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10);/g;
7829
8390
 
8391
+ // #5992
8392
+ var isIgnoreNewlineTag = makeMap('pre,textarea', true);
8393
+ var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; };
8394
+
7830
8395
  function decodeAttr (value, shouldDecodeNewlines) {
7831
8396
  var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr;
7832
8397
  return value.replace(re, function (match) { return decodingMap[match]; })
@@ -7850,6 +8415,9 @@
7850
8415
  var commentEnd = html.indexOf('-->');
7851
8416
 
7852
8417
  if (commentEnd >= 0) {
8418
+ if (options.shouldKeepComment) {
8419
+ options.comment(html.substring(4, commentEnd));
8420
+ }
7853
8421
  advance(commentEnd + 3);
7854
8422
  continue
7855
8423
  }
@@ -7885,24 +8453,27 @@
7885
8453
  var startTagMatch = parseStartTag();
7886
8454
  if (startTagMatch) {
7887
8455
  handleStartTag(startTagMatch);
8456
+ if (shouldIgnoreFirstNewline(lastTag, html)) {
8457
+ advance(1);
8458
+ }
7888
8459
  continue
7889
8460
  }
7890
8461
  }
7891
8462
 
7892
- var text = (void 0), rest$1 = (void 0), next = (void 0);
8463
+ var text = (void 0), rest = (void 0), next = (void 0);
7893
8464
  if (textEnd >= 0) {
7894
- rest$1 = html.slice(textEnd);
8465
+ rest = html.slice(textEnd);
7895
8466
  while (
7896
- !endTag.test(rest$1) &&
7897
- !startTagOpen.test(rest$1) &&
7898
- !comment.test(rest$1) &&
7899
- !conditionalComment.test(rest$1)
8467
+ !endTag.test(rest) &&
8468
+ !startTagOpen.test(rest) &&
8469
+ !comment.test(rest) &&
8470
+ !conditionalComment.test(rest)
7900
8471
  ) {
7901
8472
  // < in plain text, be forgiving and treat it as text
7902
- next = rest$1.indexOf('<', 1);
8473
+ next = rest.indexOf('<', 1);
7903
8474
  if (next < 0) { break }
7904
8475
  textEnd += next;
7905
- rest$1 = html.slice(textEnd);
8476
+ rest = html.slice(textEnd);
7906
8477
  }
7907
8478
  text = html.substring(0, textEnd);
7908
8479
  advance(textEnd);
@@ -7917,23 +8488,26 @@
7917
8488
  options.chars(text);
7918
8489
  }
7919
8490
  } else {
8491
+ var endTagLength = 0;
7920
8492
  var stackedTag = lastTag.toLowerCase();
7921
8493
  var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i'));
7922
- var endTagLength = 0;
7923
- var rest = html.replace(reStackedTag, function (all, text, endTag) {
8494
+ var rest$1 = html.replace(reStackedTag, function (all, text, endTag) {
7924
8495
  endTagLength = endTag.length;
7925
8496
  if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') {
7926
8497
  text = text
7927
8498
  .replace(/<!--([\s\S]*?)-->/g, '$1')
7928
8499
  .replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1');
7929
8500
  }
8501
+ if (shouldIgnoreFirstNewline(stackedTag, text)) {
8502
+ text = text.slice(1);
8503
+ }
7930
8504
  if (options.chars) {
7931
8505
  options.chars(text);
7932
8506
  }
7933
8507
  return ''
7934
8508
  });
7935
- index += html.length - rest.length;
7936
- html = rest;
8509
+ index += html.length - rest$1.length;
8510
+ html = rest$1;
7937
8511
  parseEndTag(stackedTag, index - endTagLength, index);
7938
8512
  }
7939
8513
 
@@ -7990,7 +8564,7 @@
7990
8564
  }
7991
8565
  }
7992
8566
 
7993
- var unary = isUnaryTag$$1(tagName) || tagName === 'html' && lastTag === 'head' || !!unarySlash;
8567
+ var unary = isUnaryTag$$1(tagName) || !!unarySlash;
7994
8568
 
7995
8569
  var l = match.attrs.length;
7996
8570
  var attrs = new Array(l);
@@ -8079,45 +8653,6 @@
8079
8653
 
8080
8654
  /* */
8081
8655
 
8082
- var defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g;
8083
- var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g;
8084
-
8085
- var buildRegex = cached(function (delimiters) {
8086
- var open = delimiters[0].replace(regexEscapeRE, '\\$&');
8087
- var close = delimiters[1].replace(regexEscapeRE, '\\$&');
8088
- return new RegExp(open + '((?:.|\\n)+?)' + close, 'g')
8089
- });
8090
-
8091
- function parseText (
8092
- text,
8093
- delimiters
8094
- ) {
8095
- var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE;
8096
- if (!tagRE.test(text)) {
8097
- return
8098
- }
8099
- var tokens = [];
8100
- var lastIndex = tagRE.lastIndex = 0;
8101
- var match, index;
8102
- while ((match = tagRE.exec(text))) {
8103
- index = match.index;
8104
- // push text token
8105
- if (index > lastIndex) {
8106
- tokens.push(JSON.stringify(text.slice(lastIndex, index)));
8107
- }
8108
- // tag token
8109
- var exp = parseFilters(match[1].trim());
8110
- tokens.push(("_s(" + exp + ")"));
8111
- lastIndex = index + match[0].length;
8112
- }
8113
- if (lastIndex < text.length) {
8114
- tokens.push(JSON.stringify(text.slice(lastIndex)));
8115
- }
8116
- return tokens.join('+')
8117
- }
8118
-
8119
- /* */
8120
-
8121
8656
  var onRE = /^@|^v-on:/;
8122
8657
  var dirRE = /^v-|^@|^:/;
8123
8658
  var forAliasRE = /(.*?)\s+(?:in|of)\s+(.*)/;
@@ -8127,7 +8662,7 @@
8127
8662
  var bindRE = /^:|^v-bind:/;
8128
8663
  var modifierRE = /\.[^.]+/g;
8129
8664
 
8130
- var decodeHTMLCached = cached(decode);
8665
+ var decodeHTMLCached = cached(he.decode);
8131
8666
 
8132
8667
  // configurable state
8133
8668
  var warn$2;
@@ -8147,12 +8682,15 @@
8147
8682
  options
8148
8683
  ) {
8149
8684
  warn$2 = options.warn || baseWarn;
8150
- platformGetTagNamespace = options.getTagNamespace || no;
8151
- platformMustUseProp = options.mustUseProp || no;
8685
+
8152
8686
  platformIsPreTag = options.isPreTag || no;
8153
- preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
8687
+ platformMustUseProp = options.mustUseProp || no;
8688
+ platformGetTagNamespace = options.getTagNamespace || no;
8689
+
8154
8690
  transforms = pluckModuleFunction(options.modules, 'transformNode');
8691
+ preTransforms = pluckModuleFunction(options.modules, 'preTransformNode');
8155
8692
  postTransforms = pluckModuleFunction(options.modules, 'postTransformNode');
8693
+
8156
8694
  delimiters = options.delimiters;
8157
8695
 
8158
8696
  var stack = [];
@@ -8186,6 +8724,7 @@
8186
8724
  isUnaryTag: options.isUnaryTag,
8187
8725
  canBeLeftOpenTag: options.canBeLeftOpenTag,
8188
8726
  shouldDecodeNewlines: options.shouldDecodeNewlines,
8727
+ shouldKeepComment: options.comments,
8189
8728
  start: function start (tag, attrs, unary) {
8190
8729
  // check namespace.
8191
8730
  // inherit parent ns if there is one
@@ -8369,6 +8908,13 @@
8369
8908
  });
8370
8909
  }
8371
8910
  }
8911
+ },
8912
+ comment: function comment (text) {
8913
+ currentParent.children.push({
8914
+ type: 3,
8915
+ text: text,
8916
+ isComment: true
8917
+ });
8372
8918
  }
8373
8919
  });
8374
8920
  return root
@@ -8518,6 +9064,8 @@
8518
9064
  var slotTarget = getBindingAttr(el, 'slot');
8519
9065
  if (slotTarget) {
8520
9066
  el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget;
9067
+ // preserve slot as an attribute for native shadow DOM compat
9068
+ addAttr(el, 'slot', slotTarget);
8521
9069
  }
8522
9070
  if (el.tag === 'template') {
8523
9071
  el.slotScope = getAndRemoveAttr(el, 'scope');
@@ -8570,7 +9118,9 @@
8570
9118
  );
8571
9119
  }
8572
9120
  }
8573
- if (isProp || platformMustUseProp(el.tag, el.attrsMap.type, name)) {
9121
+ if (isProp || (
9122
+ !el.component && platformMustUseProp(el.tag, el.attrsMap.type, name)
9123
+ )) {
8574
9124
  addProp(el, name, value);
8575
9125
  } else {
8576
9126
  addAttr(el, name, value);
@@ -8745,6 +9295,15 @@
8745
9295
  node.static = false;
8746
9296
  }
8747
9297
  }
9298
+ if (node.ifConditions) {
9299
+ for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
9300
+ var block = node.ifConditions[i$1].block;
9301
+ markStatic$1(block);
9302
+ if (!block.static) {
9303
+ node.static = false;
9304
+ }
9305
+ }
9306
+ }
8748
9307
  }
8749
9308
  }
8750
9309
 
@@ -8771,17 +9330,13 @@
8771
9330
  }
8772
9331
  }
8773
9332
  if (node.ifConditions) {
8774
- walkThroughConditionsBlocks(node.ifConditions, isInFor);
9333
+ for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) {
9334
+ markStaticRoots(node.ifConditions[i$1].block, isInFor);
9335
+ }
8775
9336
  }
8776
9337
  }
8777
9338
  }
8778
9339
 
8779
- function walkThroughConditionsBlocks (conditionBlocks, isInFor) {
8780
- for (var i = 1, len = conditionBlocks.length; i < len; i++) {
8781
- markStaticRoots(conditionBlocks[i].block, isInFor);
8782
- }
8783
- }
8784
-
8785
9340
  function isStatic (node) {
8786
9341
  if (node.type === 2) { // expression
8787
9342
  return false
@@ -8936,99 +9491,101 @@
8936
9491
 
8937
9492
  /* */
8938
9493
 
9494
+ function on (el, dir) {
9495
+ if ("development" !== 'production' && dir.modifiers) {
9496
+ warn("v-on without argument does not support modifiers.");
9497
+ }
9498
+ el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); };
9499
+ }
9500
+
9501
+ /* */
9502
+
8939
9503
  function bind$1 (el, dir) {
8940
9504
  el.wrapData = function (code) {
8941
- return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + (dir.modifiers && dir.modifiers.prop ? ',true' : '') + ")")
9505
+ return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")")
8942
9506
  };
8943
9507
  }
8944
9508
 
8945
9509
  /* */
8946
9510
 
8947
9511
  var baseDirectives = {
9512
+ on: on,
8948
9513
  bind: bind$1,
8949
9514
  cloak: noop
8950
9515
  };
8951
9516
 
8952
9517
  /* */
8953
9518
 
8954
- // configurable state
8955
- var warn$3;
8956
- var transforms$1;
8957
- var dataGenFns;
8958
- var platformDirectives$1;
8959
- var isPlatformReservedTag$1;
8960
- var staticRenderFns;
8961
- var onceCount;
8962
- var currentOptions;
9519
+ var CodegenState = function CodegenState (options) {
9520
+ this.options = options;
9521
+ this.warn = options.warn || baseWarn;
9522
+ this.transforms = pluckModuleFunction(options.modules, 'transformCode');
9523
+ this.dataGenFns = pluckModuleFunction(options.modules, 'genData');
9524
+ this.directives = extend(extend({}, baseDirectives), options.directives);
9525
+ var isReservedTag = options.isReservedTag || no;
9526
+ this.maybeComponent = function (el) { return !isReservedTag(el.tag); };
9527
+ this.onceId = 0;
9528
+ this.staticRenderFns = [];
9529
+ };
9530
+
9531
+
8963
9532
 
8964
9533
  function generate (
8965
9534
  ast,
8966
9535
  options
8967
9536
  ) {
8968
- // save previous staticRenderFns so generate calls can be nested
8969
- var prevStaticRenderFns = staticRenderFns;
8970
- var currentStaticRenderFns = staticRenderFns = [];
8971
- var prevOnceCount = onceCount;
8972
- onceCount = 0;
8973
- currentOptions = options;
8974
- warn$3 = options.warn || baseWarn;
8975
- transforms$1 = pluckModuleFunction(options.modules, 'transformCode');
8976
- dataGenFns = pluckModuleFunction(options.modules, 'genData');
8977
- platformDirectives$1 = options.directives || {};
8978
- isPlatformReservedTag$1 = options.isReservedTag || no;
8979
- var code = ast ? genElement(ast) : '_c("div")';
8980
- staticRenderFns = prevStaticRenderFns;
8981
- onceCount = prevOnceCount;
9537
+ var state = new CodegenState(options);
9538
+ var code = ast ? genElement(ast, state) : '_c("div")';
8982
9539
  return {
8983
9540
  render: ("with(this){return " + code + "}"),
8984
- staticRenderFns: currentStaticRenderFns
9541
+ staticRenderFns: state.staticRenderFns
8985
9542
  }
8986
9543
  }
8987
9544
 
8988
- function genElement (el) {
9545
+ function genElement (el, state) {
8989
9546
  if (el.staticRoot && !el.staticProcessed) {
8990
- return genStatic(el)
9547
+ return genStatic(el, state)
8991
9548
  } else if (el.once && !el.onceProcessed) {
8992
- return genOnce(el)
9549
+ return genOnce(el, state)
8993
9550
  } else if (el.for && !el.forProcessed) {
8994
- return genFor(el)
9551
+ return genFor(el, state)
8995
9552
  } else if (el.if && !el.ifProcessed) {
8996
- return genIf(el)
9553
+ return genIf(el, state)
8997
9554
  } else if (el.tag === 'template' && !el.slotTarget) {
8998
- return genChildren(el) || 'void 0'
9555
+ return genChildren(el, state) || 'void 0'
8999
9556
  } else if (el.tag === 'slot') {
9000
- return genSlot(el)
9557
+ return genSlot(el, state)
9001
9558
  } else {
9002
9559
  // component or element
9003
9560
  var code;
9004
9561
  if (el.component) {
9005
- code = genComponent(el.component, el);
9562
+ code = genComponent(el.component, el, state);
9006
9563
  } else {
9007
- var data = el.plain ? undefined : genData(el);
9564
+ var data = el.plain ? undefined : genData$2(el, state);
9008
9565
 
9009
- var children = el.inlineTemplate ? null : genChildren(el, true);
9566
+ var children = el.inlineTemplate ? null : genChildren(el, state, true);
9010
9567
  code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")";
9011
9568
  }
9012
9569
  // module transforms
9013
- for (var i = 0; i < transforms$1.length; i++) {
9014
- code = transforms$1[i](el, code);
9570
+ for (var i = 0; i < state.transforms.length; i++) {
9571
+ code = state.transforms[i](el, code);
9015
9572
  }
9016
9573
  return code
9017
9574
  }
9018
9575
  }
9019
9576
 
9020
9577
  // hoist static sub-trees out
9021
- function genStatic (el) {
9578
+ function genStatic (el, state) {
9022
9579
  el.staticProcessed = true;
9023
- staticRenderFns.push(("with(this){return " + (genElement(el)) + "}"));
9024
- return ("_m(" + (staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
9580
+ state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}"));
9581
+ return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")")
9025
9582
  }
9026
9583
 
9027
9584
  // v-once
9028
- function genOnce (el) {
9585
+ function genOnce (el, state) {
9029
9586
  el.onceProcessed = true;
9030
9587
  if (el.if && !el.ifProcessed) {
9031
- return genIf(el)
9588
+ return genIf(el, state)
9032
9589
  } else if (el.staticInFor) {
9033
9590
  var key = '';
9034
9591
  var parent = el.parent;
@@ -9040,51 +9597,72 @@
9040
9597
  parent = parent.parent;
9041
9598
  }
9042
9599
  if (!key) {
9043
- "development" !== 'production' && warn$3(
9600
+ "development" !== 'production' && state.warn(
9044
9601
  "v-once can only be used inside v-for that is keyed. "
9045
9602
  );
9046
- return genElement(el)
9603
+ return genElement(el, state)
9047
9604
  }
9048
- return ("_o(" + (genElement(el)) + "," + (onceCount++) + (key ? ("," + key) : "") + ")")
9605
+ return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")")
9049
9606
  } else {
9050
- return genStatic(el)
9607
+ return genStatic(el, state)
9051
9608
  }
9052
9609
  }
9053
9610
 
9054
- function genIf (el) {
9611
+ function genIf (
9612
+ el,
9613
+ state,
9614
+ altGen,
9615
+ altEmpty
9616
+ ) {
9055
9617
  el.ifProcessed = true; // avoid recursion
9056
- return genIfConditions(el.ifConditions.slice())
9618
+ return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty)
9057
9619
  }
9058
9620
 
9059
- function genIfConditions (conditions) {
9621
+ function genIfConditions (
9622
+ conditions,
9623
+ state,
9624
+ altGen,
9625
+ altEmpty
9626
+ ) {
9060
9627
  if (!conditions.length) {
9061
- return '_e()'
9628
+ return altEmpty || '_e()'
9062
9629
  }
9063
9630
 
9064
9631
  var condition = conditions.shift();
9065
9632
  if (condition.exp) {
9066
- return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions)))
9633
+ return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty)))
9067
9634
  } else {
9068
9635
  return ("" + (genTernaryExp(condition.block)))
9069
9636
  }
9070
9637
 
9071
9638
  // v-if with v-once should generate code like (a)?_m(0):_m(1)
9072
9639
  function genTernaryExp (el) {
9073
- return el.once ? genOnce(el) : genElement(el)
9640
+ return altGen
9641
+ ? altGen(el, state)
9642
+ : el.once
9643
+ ? genOnce(el, state)
9644
+ : genElement(el, state)
9074
9645
  }
9075
9646
  }
9076
9647
 
9077
- function genFor (el) {
9648
+ function genFor (
9649
+ el,
9650
+ state,
9651
+ altGen,
9652
+ altHelper
9653
+ ) {
9078
9654
  var exp = el.for;
9079
9655
  var alias = el.alias;
9080
9656
  var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
9081
9657
  var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : '';
9082
9658
 
9083
- if (
9084
- "development" !== 'production' &&
9085
- maybeComponent(el) && el.tag !== 'slot' && el.tag !== 'template' && !el.key
9659
+ if ("development" !== 'production' &&
9660
+ state.maybeComponent(el) &&
9661
+ el.tag !== 'slot' &&
9662
+ el.tag !== 'template' &&
9663
+ !el.key
9086
9664
  ) {
9087
- warn$3(
9665
+ state.warn(
9088
9666
  "<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " +
9089
9667
  "v-for should have explicit keys. " +
9090
9668
  "See https://vuejs.org/guide/list.html#key for more info.",
@@ -9093,18 +9671,18 @@
9093
9671
  }
9094
9672
 
9095
9673
  el.forProcessed = true; // avoid recursion
9096
- return "_l((" + exp + ")," +
9674
+ return (altHelper || '_l') + "((" + exp + ")," +
9097
9675
  "function(" + alias + iterator1 + iterator2 + "){" +
9098
- "return " + (genElement(el)) +
9676
+ "return " + ((altGen || genElement)(el, state)) +
9099
9677
  '})'
9100
9678
  }
9101
9679
 
9102
- function genData (el) {
9680
+ function genData$2 (el, state) {
9103
9681
  var data = '{';
9104
9682
 
9105
9683
  // directives first.
9106
9684
  // directives may mutate the el's other properties before they are generated.
9107
- var dirs = genDirectives(el);
9685
+ var dirs = genDirectives(el, state);
9108
9686
  if (dirs) { data += dirs + ','; }
9109
9687
 
9110
9688
  // key
@@ -9127,8 +9705,8 @@
9127
9705
  data += "tag:\"" + (el.tag) + "\",";
9128
9706
  }
9129
9707
  // module data generation functions
9130
- for (var i = 0; i < dataGenFns.length; i++) {
9131
- data += dataGenFns[i](el);
9708
+ for (var i = 0; i < state.dataGenFns.length; i++) {
9709
+ data += state.dataGenFns[i](el);
9132
9710
  }
9133
9711
  // attributes
9134
9712
  if (el.attrs) {
@@ -9140,10 +9718,10 @@
9140
9718
  }
9141
9719
  // event handlers
9142
9720
  if (el.events) {
9143
- data += (genHandlers(el.events, false, warn$3)) + ",";
9721
+ data += (genHandlers(el.events, false, state.warn)) + ",";
9144
9722
  }
9145
9723
  if (el.nativeEvents) {
9146
- data += (genHandlers(el.nativeEvents, true, warn$3)) + ",";
9724
+ data += (genHandlers(el.nativeEvents, true, state.warn)) + ",";
9147
9725
  }
9148
9726
  // slot target
9149
9727
  if (el.slotTarget) {
@@ -9151,7 +9729,7 @@
9151
9729
  }
9152
9730
  // scoped slots
9153
9731
  if (el.scopedSlots) {
9154
- data += (genScopedSlots(el.scopedSlots)) + ",";
9732
+ data += (genScopedSlots(el.scopedSlots, state)) + ",";
9155
9733
  }
9156
9734
  // component v-model
9157
9735
  if (el.model) {
@@ -9159,7 +9737,7 @@
9159
9737
  }
9160
9738
  // inline-template
9161
9739
  if (el.inlineTemplate) {
9162
- var inlineTemplate = genInlineTemplate(el);
9740
+ var inlineTemplate = genInlineTemplate(el, state);
9163
9741
  if (inlineTemplate) {
9164
9742
  data += inlineTemplate + ",";
9165
9743
  }
@@ -9169,10 +9747,14 @@
9169
9747
  if (el.wrapData) {
9170
9748
  data = el.wrapData(data);
9171
9749
  }
9750
+ // v-on data wrap
9751
+ if (el.wrapListeners) {
9752
+ data = el.wrapListeners(data);
9753
+ }
9172
9754
  return data
9173
9755
  }
9174
9756
 
9175
- function genDirectives (el) {
9757
+ function genDirectives (el, state) {
9176
9758
  var dirs = el.directives;
9177
9759
  if (!dirs) { return }
9178
9760
  var res = 'directives:[';
@@ -9181,11 +9763,11 @@
9181
9763
  for (i = 0, l = dirs.length; i < l; i++) {
9182
9764
  dir = dirs[i];
9183
9765
  needRuntime = true;
9184
- var gen = platformDirectives$1[dir.name] || baseDirectives[dir.name];
9766
+ var gen = state.directives[dir.name];
9185
9767
  if (gen) {
9186
9768
  // compile-time directive that manipulates AST.
9187
9769
  // returns true if it also needs a runtime counterpart.
9188
- needRuntime = !!gen(el, dir, warn$3);
9770
+ needRuntime = !!gen(el, dir, state.warn);
9189
9771
  }
9190
9772
  if (needRuntime) {
9191
9773
  hasRuntime = true;
@@ -9197,34 +9779,47 @@
9197
9779
  }
9198
9780
  }
9199
9781
 
9200
- function genInlineTemplate (el) {
9782
+ function genInlineTemplate (el, state) {
9201
9783
  var ast = el.children[0];
9202
9784
  if ("development" !== 'production' && (
9203
9785
  el.children.length > 1 || ast.type !== 1
9204
9786
  )) {
9205
- warn$3('Inline-template components must have exactly one child element.');
9787
+ state.warn('Inline-template components must have exactly one child element.');
9206
9788
  }
9207
9789
  if (ast.type === 1) {
9208
- var inlineRenderFns = generate(ast, currentOptions);
9790
+ var inlineRenderFns = generate(ast, state.options);
9209
9791
  return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}")
9210
9792
  }
9211
9793
  }
9212
9794
 
9213
- function genScopedSlots (slots) {
9214
- return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) { return genScopedSlot(key, slots[key]); }).join(',')) + "])")
9795
+ function genScopedSlots (
9796
+ slots,
9797
+ state
9798
+ ) {
9799
+ return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) {
9800
+ return genScopedSlot(key, slots[key], state)
9801
+ }).join(',')) + "])")
9215
9802
  }
9216
9803
 
9217
- function genScopedSlot (key, el) {
9804
+ function genScopedSlot (
9805
+ key,
9806
+ el,
9807
+ state
9808
+ ) {
9218
9809
  if (el.for && !el.forProcessed) {
9219
- return genForScopedSlot(key, el)
9810
+ return genForScopedSlot(key, el, state)
9220
9811
  }
9221
9812
  return "{key:" + key + ",fn:function(" + (String(el.attrsMap.scope)) + "){" +
9222
9813
  "return " + (el.tag === 'template'
9223
- ? genChildren(el) || 'void 0'
9224
- : genElement(el)) + "}}"
9814
+ ? genChildren(el, state) || 'void 0'
9815
+ : genElement(el, state)) + "}}"
9225
9816
  }
9226
9817
 
9227
- function genForScopedSlot (key, el) {
9818
+ function genForScopedSlot (
9819
+ key,
9820
+ el,
9821
+ state
9822
+ ) {
9228
9823
  var exp = el.for;
9229
9824
  var alias = el.alias;
9230
9825
  var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : '';
@@ -9232,11 +9827,17 @@
9232
9827
  el.forProcessed = true; // avoid recursion
9233
9828
  return "_l((" + exp + ")," +
9234
9829
  "function(" + alias + iterator1 + iterator2 + "){" +
9235
- "return " + (genScopedSlot(key, el)) +
9830
+ "return " + (genScopedSlot(key, el, state)) +
9236
9831
  '})'
9237
9832
  }
9238
9833
 
9239
- function genChildren (el, checkSkip) {
9834
+ function genChildren (
9835
+ el,
9836
+ state,
9837
+ checkSkip,
9838
+ altGenElement,
9839
+ altGenNode
9840
+ ) {
9240
9841
  var children = el.children;
9241
9842
  if (children.length) {
9242
9843
  var el$1 = children[0];
@@ -9246,10 +9847,13 @@
9246
9847
  el$1.tag !== 'template' &&
9247
9848
  el$1.tag !== 'slot'
9248
9849
  ) {
9249
- return genElement(el$1)
9850
+ return (altGenElement || genElement)(el$1, state)
9250
9851
  }
9251
- var normalizationType = checkSkip ? getNormalizationType(children) : 0;
9252
- return ("[" + (children.map(genNode).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : ''))
9852
+ var normalizationType = checkSkip
9853
+ ? getNormalizationType(children, state.maybeComponent)
9854
+ : 0;
9855
+ var gen = altGenNode || genNode;
9856
+ return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : ''))
9253
9857
  }
9254
9858
  }
9255
9859
 
@@ -9257,7 +9861,10 @@
9257
9861
  // 0: no normalization needed
9258
9862
  // 1: simple normalization needed (possible 1-level deep nested array)
9259
9863
  // 2: full normalization needed
9260
- function getNormalizationType (children) {
9864
+ function getNormalizationType (
9865
+ children,
9866
+ maybeComponent
9867
+ ) {
9261
9868
  var res = 0;
9262
9869
  for (var i = 0; i < children.length; i++) {
9263
9870
  var el = children[i];
@@ -9281,13 +9888,11 @@
9281
9888
  return el.for !== undefined || el.tag === 'template' || el.tag === 'slot'
9282
9889
  }
9283
9890
 
9284
- function maybeComponent (el) {
9285
- return !isPlatformReservedTag$1(el.tag)
9286
- }
9287
-
9288
- function genNode (node) {
9891
+ function genNode (node, state) {
9289
9892
  if (node.type === 1) {
9290
- return genElement(node)
9893
+ return genElement(node, state)
9894
+ } if (node.type === 3 && node.isComment) {
9895
+ return genComment(node)
9291
9896
  } else {
9292
9897
  return genText(node)
9293
9898
  }
@@ -9299,9 +9904,13 @@
9299
9904
  : transformSpecialNewlines(JSON.stringify(text.text))) + ")")
9300
9905
  }
9301
9906
 
9302
- function genSlot (el) {
9907
+ function genComment (comment) {
9908
+ return ("_e(" + (JSON.stringify(comment.text)) + ")")
9909
+ }
9910
+
9911
+ function genSlot (el, state) {
9303
9912
  var slotName = el.slotName || '"default"';
9304
- var children = genChildren(el);
9913
+ var children = genChildren(el, state);
9305
9914
  var res = "_t(" + slotName + (children ? ("," + children) : '');
9306
9915
  var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}");
9307
9916
  var bind$$1 = el.attrsMap['v-bind'];
@@ -9318,9 +9927,13 @@
9318
9927
  }
9319
9928
 
9320
9929
  // componentName is el.component, take it as argument to shun flow's pessimistic refinement
9321
- function genComponent (componentName, el) {
9322
- var children = el.inlineTemplate ? null : genChildren(el, true);
9323
- return ("_c(" + componentName + "," + (genData(el)) + (children ? ("," + children) : '') + ")")
9930
+ function genComponent (
9931
+ componentName,
9932
+ el,
9933
+ state
9934
+ ) {
9935
+ var children = el.inlineTemplate ? null : genChildren(el, state, true);
9936
+ return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")")
9324
9937
  }
9325
9938
 
9326
9939
  function genProps (props) {
@@ -9438,21 +10051,7 @@
9438
10051
 
9439
10052
  /* */
9440
10053
 
9441
- function baseCompile (
9442
- template,
9443
- options
9444
- ) {
9445
- var ast = parse(template.trim(), options);
9446
- optimize(ast, options);
9447
- var code = generate(ast, options);
9448
- return {
9449
- ast: ast,
9450
- render: code.render,
9451
- staticRenderFns: code.staticRenderFns
9452
- }
9453
- }
9454
-
9455
- function makeFunction (code, errors) {
10054
+ function createFunction (code, errors) {
9456
10055
  try {
9457
10056
  return new Function(code)
9458
10057
  } catch (err) {
@@ -9461,50 +10060,10 @@
9461
10060
  }
9462
10061
  }
9463
10062
 
9464
- function createCompiler (baseOptions) {
9465
- var functionCompileCache = Object.create(null);
9466
-
9467
- function compile (
9468
- template,
9469
- options
9470
- ) {
9471
- var finalOptions = Object.create(baseOptions);
9472
- var errors = [];
9473
- var tips = [];
9474
- finalOptions.warn = function (msg, tip$$1) {
9475
- (tip$$1 ? tips : errors).push(msg);
9476
- };
9477
-
9478
- if (options) {
9479
- // merge custom modules
9480
- if (options.modules) {
9481
- finalOptions.modules = (baseOptions.modules || []).concat(options.modules);
9482
- }
9483
- // merge custom directives
9484
- if (options.directives) {
9485
- finalOptions.directives = extend(
9486
- Object.create(baseOptions.directives),
9487
- options.directives
9488
- );
9489
- }
9490
- // copy other options
9491
- for (var key in options) {
9492
- if (key !== 'modules' && key !== 'directives') {
9493
- finalOptions[key] = options[key];
9494
- }
9495
- }
9496
- }
9497
-
9498
- var compiled = baseCompile(template, finalOptions);
9499
- {
9500
- errors.push.apply(errors, detectErrors(compiled.ast));
9501
- }
9502
- compiled.errors = errors;
9503
- compiled.tips = tips;
9504
- return compiled
9505
- }
10063
+ function createCompileToFunctionFn (compile) {
10064
+ var cache = Object.create(null);
9506
10065
 
9507
- function compileToFunctions (
10066
+ return function compileToFunctions (
9508
10067
  template,
9509
10068
  options,
9510
10069
  vm
@@ -9533,8 +10092,8 @@
9533
10092
  var key = options.delimiters
9534
10093
  ? String(options.delimiters) + template
9535
10094
  : template;
9536
- if (functionCompileCache[key]) {
9537
- return functionCompileCache[key]
10095
+ if (cache[key]) {
10096
+ return cache[key]
9538
10097
  }
9539
10098
 
9540
10099
  // compile
@@ -9557,12 +10116,10 @@
9557
10116
  // turn code into functions
9558
10117
  var res = {};
9559
10118
  var fnGenErrors = [];
9560
- res.render = makeFunction(compiled.render, fnGenErrors);
9561
- var l = compiled.staticRenderFns.length;
9562
- res.staticRenderFns = new Array(l);
9563
- for (var i = 0; i < l; i++) {
9564
- res.staticRenderFns[i] = makeFunction(compiled.staticRenderFns[i], fnGenErrors);
9565
- }
10119
+ res.render = createFunction(compiled.render, fnGenErrors);
10120
+ res.staticRenderFns = compiled.staticRenderFns.map(function (code) {
10121
+ return createFunction(code, fnGenErrors)
10122
+ });
9566
10123
 
9567
10124
  // check function generation errors.
9568
10125
  // this should only happen if there is a bug in the compiler itself.
@@ -9583,143 +10140,83 @@
9583
10140
  }
9584
10141
  }
9585
10142
 
9586
- return (functionCompileCache[key] = res)
9587
- }
9588
-
9589
- return {
9590
- compile: compile,
9591
- compileToFunctions: compileToFunctions
10143
+ return (cache[key] = res)
9592
10144
  }
9593
10145
  }
9594
10146
 
9595
10147
  /* */
9596
10148
 
9597
- function transformNode (el, options) {
9598
- var warn = options.warn || baseWarn;
9599
- var staticClass = getAndRemoveAttr(el, 'class');
9600
- if ("development" !== 'production' && staticClass) {
9601
- var expression = parseText(staticClass, options.delimiters);
9602
- if (expression) {
9603
- warn(
9604
- "class=\"" + staticClass + "\": " +
9605
- 'Interpolation inside attributes has been removed. ' +
9606
- 'Use v-bind or the colon shorthand instead. For example, ' +
9607
- 'instead of <div class="{{ val }}">, use <div :class="val">.'
9608
- );
9609
- }
9610
- }
9611
- if (staticClass) {
9612
- el.staticClass = JSON.stringify(staticClass);
9613
- }
9614
- var classBinding = getBindingAttr(el, 'class', false /* getStatic */);
9615
- if (classBinding) {
9616
- el.classBinding = classBinding;
9617
- }
9618
- }
9619
-
9620
- function genData$1 (el) {
9621
- var data = '';
9622
- if (el.staticClass) {
9623
- data += "staticClass:" + (el.staticClass) + ",";
9624
- }
9625
- if (el.classBinding) {
9626
- data += "class:" + (el.classBinding) + ",";
9627
- }
9628
- return data
9629
- }
9630
-
9631
- var klass$1 = {
9632
- staticKeys: ['staticClass'],
9633
- transformNode: transformNode,
9634
- genData: genData$1
9635
- };
10149
+ function createCompilerCreator (baseCompile) {
10150
+ return function createCompiler (baseOptions) {
10151
+ function compile (
10152
+ template,
10153
+ options
10154
+ ) {
10155
+ var finalOptions = Object.create(baseOptions);
10156
+ var errors = [];
10157
+ var tips = [];
10158
+ finalOptions.warn = function (msg, tip) {
10159
+ (tip ? tips : errors).push(msg);
10160
+ };
9636
10161
 
9637
- /* */
10162
+ if (options) {
10163
+ // merge custom modules
10164
+ if (options.modules) {
10165
+ finalOptions.modules =
10166
+ (baseOptions.modules || []).concat(options.modules);
10167
+ }
10168
+ // merge custom directives
10169
+ if (options.directives) {
10170
+ finalOptions.directives = extend(
10171
+ Object.create(baseOptions.directives),
10172
+ options.directives
10173
+ );
10174
+ }
10175
+ // copy other options
10176
+ for (var key in options) {
10177
+ if (key !== 'modules' && key !== 'directives') {
10178
+ finalOptions[key] = options[key];
10179
+ }
10180
+ }
10181
+ }
9638
10182
 
9639
- function transformNode$1 (el, options) {
9640
- var warn = options.warn || baseWarn;
9641
- var staticStyle = getAndRemoveAttr(el, 'style');
9642
- if (staticStyle) {
9643
- /* istanbul ignore if */
9644
- {
9645
- var expression = parseText(staticStyle, options.delimiters);
9646
- if (expression) {
9647
- warn(
9648
- "style=\"" + staticStyle + "\": " +
9649
- 'Interpolation inside attributes has been removed. ' +
9650
- 'Use v-bind or the colon shorthand instead. For example, ' +
9651
- 'instead of <div style="{{ val }}">, use <div :style="val">.'
9652
- );
10183
+ var compiled = baseCompile(template, finalOptions);
10184
+ {
10185
+ errors.push.apply(errors, detectErrors(compiled.ast));
9653
10186
  }
10187
+ compiled.errors = errors;
10188
+ compiled.tips = tips;
10189
+ return compiled
9654
10190
  }
9655
- el.staticStyle = JSON.stringify(parseStyleText(staticStyle));
9656
- }
9657
10191
 
9658
- var styleBinding = getBindingAttr(el, 'style', false /* getStatic */);
9659
- if (styleBinding) {
9660
- el.styleBinding = styleBinding;
9661
- }
9662
- }
9663
-
9664
- function genData$2 (el) {
9665
- var data = '';
9666
- if (el.staticStyle) {
9667
- data += "staticStyle:" + (el.staticStyle) + ",";
9668
- }
9669
- if (el.styleBinding) {
9670
- data += "style:(" + (el.styleBinding) + "),";
9671
- }
9672
- return data
9673
- }
9674
-
9675
- var style$1 = {
9676
- staticKeys: ['staticStyle'],
9677
- transformNode: transformNode$1,
9678
- genData: genData$2
9679
- };
9680
-
9681
- var modules$1 = [
9682
- klass$1,
9683
- style$1
9684
- ];
9685
-
9686
- /* */
9687
-
9688
- function text (el, dir) {
9689
- if (dir.value) {
9690
- addProp(el, 'textContent', ("_s(" + (dir.value) + ")"));
10192
+ return {
10193
+ compile: compile,
10194
+ compileToFunctions: createCompileToFunctionFn(compile)
10195
+ }
9691
10196
  }
9692
10197
  }
9693
10198
 
9694
10199
  /* */
9695
10200
 
9696
- function html (el, dir) {
9697
- if (dir.value) {
9698
- addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")"));
10201
+ // `createCompilerCreator` allows creating compilers that use alternative
10202
+ // parser/optimizer/codegen, e.g the SSR optimizing compiler.
10203
+ // Here we just export a default compiler using the default parts.
10204
+ var createCompiler = createCompilerCreator(function baseCompile (
10205
+ template,
10206
+ options
10207
+ ) {
10208
+ var ast = parse(template.trim(), options);
10209
+ optimize(ast, options);
10210
+ var code = generate(ast, options);
10211
+ return {
10212
+ ast: ast,
10213
+ render: code.render,
10214
+ staticRenderFns: code.staticRenderFns
9699
10215
  }
9700
- }
9701
-
9702
- var directives$1 = {
9703
- model: model,
9704
- text: text,
9705
- html: html
9706
- };
10216
+ });
9707
10217
 
9708
10218
  /* */
9709
10219
 
9710
- var baseOptions = {
9711
- expectHTML: true,
9712
- modules: modules$1,
9713
- directives: directives$1,
9714
- isPreTag: isPreTag,
9715
- isUnaryTag: isUnaryTag,
9716
- mustUseProp: mustUseProp,
9717
- canBeLeftOpenTag: canBeLeftOpenTag,
9718
- isReservedTag: isReservedTag,
9719
- getTagNamespace: getTagNamespace,
9720
- staticKeys: genStaticKeys(modules$1)
9721
- };
9722
-
9723
10220
  var ref$1 = createCompiler(baseOptions);
9724
10221
  var compileToFunctions = ref$1.compileToFunctions;
9725
10222
 
@@ -9780,7 +10277,8 @@
9780
10277
 
9781
10278
  var ref = compileToFunctions(template, {
9782
10279
  shouldDecodeNewlines: shouldDecodeNewlines,
9783
- delimiters: options.delimiters
10280
+ delimiters: options.delimiters,
10281
+ comments: options.comments
9784
10282
  }, this);
9785
10283
  var render = ref.render;
9786
10284
  var staticRenderFns = ref.staticRenderFns;
@@ -11597,7 +12095,7 @@
11597
12095
  _stores2.default.dispatch('overlayStore/showProgressOverlay', false);
11598
12096
  next();
11599
12097
  }).catch(function (e) {
11600
- console.log(e);_stores2.default.dispatch('overlayStore/showProgressOverlay', false);
12098
+ _stores2.default.dispatch('overlayStore/showProgressOverlay', false);
11601
12099
  });
11602
12100
  }
11603
12101
  }, {
@@ -14155,7 +14653,7 @@
14155
14653
  /* moduleIdentifier (server only) */
14156
14654
  null
14157
14655
  )
14158
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageListing.vue"
14656
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageListing.vue"
14159
14657
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
14160
14658
  if (Component.options.functional) {console.error("[vue-loader] imageListing.vue: functional components are not supported with templates, they should use render functions.")}
14161
14659
 
@@ -14213,7 +14711,7 @@
14213
14711
 
14214
14712
 
14215
14713
  // module
14216
- exports.push([module.id, "\n.table > thead td {\n text-transform: uppercase;\n}\n.add-image-link {\n margin-bottom: 15px;\n}\n.img-options-content .btn {\n margin: 4px;\n}\n.add-image-link {\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n width: 100%;\n font-size: 50px;\n}\n.listing-element {\n margin: 10px;\n float: left;\n width: 150px;\n}\n.listing-element .btn-sm.btn {\n padding: 0 5px;\n font-size: 11px;\n}\n", ""]);
14714
+ exports.push([module.id, "\n.table > thead td {\n text-transform: uppercase;\n}\n.add-image-link {\n margin-bottom: 15px;\n}\n.img-options-content .btn {\n margin: 4px;\n}\n.add-image-link {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n font-size: 50px;\n}\n.listing-element {\n margin: 10px;\n float: left;\n width: 150px;\n}\n.listing-element .btn-sm.btn {\n padding: 0 5px;\n font-size: 11px;\n}\n", ""]);
14217
14715
 
14218
14716
  // exports
14219
14717
 
@@ -14845,7 +15343,7 @@
14845
15343
  /* moduleIdentifier (server only) */
14846
15344
  null
14847
15345
  )
14848
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageInsertButton.vue"
15346
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageInsertButton.vue"
14849
15347
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
14850
15348
  if (Component.options.functional) {console.error("[vue-loader] imageInsertButton.vue: functional components are not supported with templates, they should use render functions.")}
14851
15349
 
@@ -14962,23 +15460,18 @@
14962
15460
  /* 44 */
14963
15461
  /***/ (function(module, exports, __webpack_require__) {
14964
15462
 
14965
- /**
14966
- * vuex v2.3.0
15463
+ /* WEBPACK VAR INJECTION */(function(process) {/**
15464
+ * vuex v2.4.1
14967
15465
  * (c) 2017 Evan You
14968
15466
  * @license MIT
14969
15467
  */
14970
- (function (global, factory) {
14971
- true ? module.exports = factory() :
14972
- typeof define === 'function' && define.amd ? define(factory) :
14973
- (global.Vuex = factory());
14974
- }(this, (function () { 'use strict';
15468
+ 'use strict';
14975
15469
 
14976
15470
  var applyMixin = function (Vue) {
14977
15471
  var version = Number(Vue.version.split('.')[0]);
14978
15472
 
14979
15473
  if (version >= 2) {
14980
- var usesInit = Vue.config._lifecycleHooks.indexOf('init') > -1;
14981
- Vue.mixin(usesInit ? { init: vuexInit } : { beforeCreate: vuexInit });
15474
+ Vue.mixin({ beforeCreate: vuexInit });
14982
15475
  } else {
14983
15476
  // override init and inject vuex init procedure
14984
15477
  // for 1.x backwards compatibility.
@@ -15001,7 +15494,9 @@
15001
15494
  var options = this.$options;
15002
15495
  // store injection
15003
15496
  if (options.store) {
15004
- this.$store = options.store;
15497
+ this.$store = typeof options.store === 'function'
15498
+ ? options.store()
15499
+ : options.store;
15005
15500
  } else if (options.parent && options.parent.$store) {
15006
15501
  this.$store = options.parent.$store;
15007
15502
  }
@@ -15074,7 +15569,7 @@
15074
15569
  this.state = (typeof rawState === 'function' ? rawState() : rawState) || {};
15075
15570
  };
15076
15571
 
15077
- var prototypeAccessors$1 = { namespaced: {} };
15572
+ var prototypeAccessors$1 = { namespaced: { configurable: true } };
15078
15573
 
15079
15574
  prototypeAccessors$1.namespaced.get = function () {
15080
15575
  return !!this._rawModule.namespaced
@@ -15130,17 +15625,8 @@
15130
15625
  Object.defineProperties( Module.prototype, prototypeAccessors$1 );
15131
15626
 
15132
15627
  var ModuleCollection = function ModuleCollection (rawRootModule) {
15133
- var this$1 = this;
15134
-
15135
15628
  // register root module (Vuex.Store options)
15136
- this.root = new Module(rawRootModule, false);
15137
-
15138
- // register all nested modules
15139
- if (rawRootModule.modules) {
15140
- forEachValue(rawRootModule.modules, function (rawModule, key) {
15141
- this$1.register([key], rawModule, false);
15142
- });
15143
- }
15629
+ this.register([], rawRootModule, false);
15144
15630
  };
15145
15631
 
15146
15632
  ModuleCollection.prototype.get = function get (path) {
@@ -15158,16 +15644,24 @@
15158
15644
  };
15159
15645
 
15160
15646
  ModuleCollection.prototype.update = function update$1 (rawRootModule) {
15161
- update(this.root, rawRootModule);
15647
+ update([], this.root, rawRootModule);
15162
15648
  };
15163
15649
 
15164
15650
  ModuleCollection.prototype.register = function register (path, rawModule, runtime) {
15165
15651
  var this$1 = this;
15166
15652
  if ( runtime === void 0 ) runtime = true;
15167
15653
 
15168
- var parent = this.get(path.slice(0, -1));
15654
+ if (process.env.NODE_ENV !== 'production') {
15655
+ assertRawModule(path, rawModule);
15656
+ }
15657
+
15169
15658
  var newModule = new Module(rawModule, runtime);
15170
- parent.addChild(path[path.length - 1], newModule);
15659
+ if (path.length === 0) {
15660
+ this.root = newModule;
15661
+ } else {
15662
+ var parent = this.get(path.slice(0, -1));
15663
+ parent.addChild(path[path.length - 1], newModule);
15664
+ }
15171
15665
 
15172
15666
  // register nested modules
15173
15667
  if (rawModule.modules) {
@@ -15185,7 +15679,11 @@
15185
15679
  parent.removeChild(key);
15186
15680
  };
15187
15681
 
15188
- function update (targetModule, newModule) {
15682
+ function update (path, targetModule, newModule) {
15683
+ if (process.env.NODE_ENV !== 'production') {
15684
+ assertRawModule(path, newModule);
15685
+ }
15686
+
15189
15687
  // update target module
15190
15688
  targetModule.update(newModule);
15191
15689
 
@@ -15193,30 +15691,73 @@
15193
15691
  if (newModule.modules) {
15194
15692
  for (var key in newModule.modules) {
15195
15693
  if (!targetModule.getChild(key)) {
15196
- console.warn(
15197
- "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
15198
- 'manual reload is needed'
15199
- );
15694
+ if (process.env.NODE_ENV !== 'production') {
15695
+ console.warn(
15696
+ "[vuex] trying to add a new module '" + key + "' on hot reloading, " +
15697
+ 'manual reload is needed'
15698
+ );
15699
+ }
15200
15700
  return
15201
15701
  }
15202
- update(targetModule.getChild(key), newModule.modules[key]);
15702
+ update(
15703
+ path.concat(key),
15704
+ targetModule.getChild(key),
15705
+ newModule.modules[key]
15706
+ );
15203
15707
  }
15204
15708
  }
15205
15709
  }
15206
15710
 
15711
+ function assertRawModule (path, rawModule) {
15712
+ ['getters', 'actions', 'mutations'].forEach(function (key) {
15713
+ if (!rawModule[key]) { return }
15714
+
15715
+ forEachValue(rawModule[key], function (value, type) {
15716
+ assert(
15717
+ typeof value === 'function',
15718
+ makeAssertionMessage(path, key, type, value)
15719
+ );
15720
+ });
15721
+ });
15722
+ }
15723
+
15724
+ function makeAssertionMessage (path, key, type, value) {
15725
+ var buf = key + " should be function but \"" + key + "." + type + "\"";
15726
+ if (path.length > 0) {
15727
+ buf += " in module \"" + (path.join('.')) + "\"";
15728
+ }
15729
+ buf += " is " + (JSON.stringify(value)) + ".";
15730
+
15731
+ return buf
15732
+ }
15733
+
15207
15734
  var Vue; // bind on install
15208
15735
 
15209
15736
  var Store = function Store (options) {
15210
15737
  var this$1 = this;
15211
15738
  if ( options === void 0 ) options = {};
15212
15739
 
15213
- assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
15214
- assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
15740
+ // Auto install if it is not done yet and `window` has `Vue`.
15741
+ // To allow users to avoid auto-installation in some cases,
15742
+ // this code should be placed here. See #731
15743
+ if (!Vue && typeof window !== 'undefined' && window.Vue) {
15744
+ install(window.Vue);
15745
+ }
15746
+
15747
+ if (process.env.NODE_ENV !== 'production') {
15748
+ assert(Vue, "must call Vue.use(Vuex) before creating a store instance.");
15749
+ assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser.");
15750
+ assert(this instanceof Store, "Store must be called with the new operator.");
15751
+ }
15215
15752
 
15216
- var state = options.state; if ( state === void 0 ) state = {};
15217
15753
  var plugins = options.plugins; if ( plugins === void 0 ) plugins = [];
15218
15754
  var strict = options.strict; if ( strict === void 0 ) strict = false;
15219
15755
 
15756
+ var state = options.state; if ( state === void 0 ) state = {};
15757
+ if (typeof state === 'function') {
15758
+ state = state();
15759
+ }
15760
+
15220
15761
  // store internal state
15221
15762
  this._committing = false;
15222
15763
  this._actions = Object.create(null);
@@ -15252,17 +15793,23 @@
15252
15793
  resetStoreVM(this, state);
15253
15794
 
15254
15795
  // apply plugins
15255
- plugins.concat(devtoolPlugin).forEach(function (plugin) { return plugin(this$1); });
15796
+ plugins.forEach(function (plugin) { return plugin(this$1); });
15797
+
15798
+ if (Vue.config.devtools) {
15799
+ devtoolPlugin(this);
15800
+ }
15256
15801
  };
15257
15802
 
15258
- var prototypeAccessors = { state: {} };
15803
+ var prototypeAccessors = { state: { configurable: true } };
15259
15804
 
15260
15805
  prototypeAccessors.state.get = function () {
15261
15806
  return this._vm._data.$$state
15262
15807
  };
15263
15808
 
15264
15809
  prototypeAccessors.state.set = function (v) {
15265
- assert(false, "Use store.replaceState() to explicit replace store state.");
15810
+ if (process.env.NODE_ENV !== 'production') {
15811
+ assert(false, "Use store.replaceState() to explicit replace store state.");
15812
+ }
15266
15813
  };
15267
15814
 
15268
15815
  Store.prototype.commit = function commit (_type, _payload, _options) {
@@ -15277,7 +15824,9 @@
15277
15824
  var mutation = { type: type, payload: payload };
15278
15825
  var entry = this._mutations[type];
15279
15826
  if (!entry) {
15280
- console.error(("[vuex] unknown mutation type: " + type));
15827
+ if (process.env.NODE_ENV !== 'production') {
15828
+ console.error(("[vuex] unknown mutation type: " + type));
15829
+ }
15281
15830
  return
15282
15831
  }
15283
15832
  this._withCommit(function () {
@@ -15287,7 +15836,10 @@
15287
15836
  });
15288
15837
  this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); });
15289
15838
 
15290
- if (options && options.silent) {
15839
+ if (
15840
+ process.env.NODE_ENV !== 'production' &&
15841
+ options && options.silent
15842
+ ) {
15291
15843
  console.warn(
15292
15844
  "[vuex] mutation type: " + type + ". Silent option has been removed. " +
15293
15845
  'Use the filter functionality in the vue-devtools'
@@ -15303,7 +15855,9 @@
15303
15855
 
15304
15856
  var entry = this._actions[type];
15305
15857
  if (!entry) {
15306
- console.error(("[vuex] unknown action type: " + type));
15858
+ if (process.env.NODE_ENV !== 'production') {
15859
+ console.error(("[vuex] unknown action type: " + type));
15860
+ }
15307
15861
  return
15308
15862
  }
15309
15863
  return entry.length > 1
@@ -15327,7 +15881,9 @@
15327
15881
  Store.prototype.watch = function watch (getter, cb, options) {
15328
15882
  var this$1 = this;
15329
15883
 
15330
- assert(typeof getter === 'function', "store.watch only accepts a function.");
15884
+ if (process.env.NODE_ENV !== 'production') {
15885
+ assert(typeof getter === 'function', "store.watch only accepts a function.");
15886
+ }
15331
15887
  return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options)
15332
15888
  };
15333
15889
 
@@ -15341,7 +15897,12 @@
15341
15897
 
15342
15898
  Store.prototype.registerModule = function registerModule (path, rawModule) {
15343
15899
  if (typeof path === 'string') { path = [path]; }
15344
- assert(Array.isArray(path), "module path must be a string or an Array.");
15900
+
15901
+ if (process.env.NODE_ENV !== 'production') {
15902
+ assert(Array.isArray(path), "module path must be a string or an Array.");
15903
+ assert(path.length > 0, 'cannot register the root module by using registerModule.');
15904
+ }
15905
+
15345
15906
  this._modules.register(path, rawModule);
15346
15907
  installModule(this, this.state, path, this._modules.get(path));
15347
15908
  // reset store to update getters...
@@ -15352,7 +15913,11 @@
15352
15913
  var this$1 = this;
15353
15914
 
15354
15915
  if (typeof path === 'string') { path = [path]; }
15355
- assert(Array.isArray(path), "module path must be a string or an Array.");
15916
+
15917
+ if (process.env.NODE_ENV !== 'production') {
15918
+ assert(Array.isArray(path), "module path must be a string or an Array.");
15919
+ }
15920
+
15356
15921
  this._modules.unregister(path);
15357
15922
  this._withCommit(function () {
15358
15923
  var parentState = getNestedState(this$1.state, path.slice(0, -1));
@@ -15489,7 +16054,7 @@
15489
16054
 
15490
16055
  if (!options || !options.root) {
15491
16056
  type = namespace + type;
15492
- if (!store._actions[type]) {
16057
+ if (process.env.NODE_ENV !== 'production' && !store._actions[type]) {
15493
16058
  console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type));
15494
16059
  return
15495
16060
  }
@@ -15506,7 +16071,7 @@
15506
16071
 
15507
16072
  if (!options || !options.root) {
15508
16073
  type = namespace + type;
15509
- if (!store._mutations[type]) {
16074
+ if (process.env.NODE_ENV !== 'production' && !store._mutations[type]) {
15510
16075
  console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type));
15511
16076
  return
15512
16077
  }
@@ -15558,14 +16123,14 @@
15558
16123
  function registerMutation (store, type, handler, local) {
15559
16124
  var entry = store._mutations[type] || (store._mutations[type] = []);
15560
16125
  entry.push(function wrappedMutationHandler (payload) {
15561
- handler(local.state, payload);
16126
+ handler.call(store, local.state, payload);
15562
16127
  });
15563
16128
  }
15564
16129
 
15565
16130
  function registerAction (store, type, handler, local) {
15566
16131
  var entry = store._actions[type] || (store._actions[type] = []);
15567
16132
  entry.push(function wrappedActionHandler (payload, cb) {
15568
- var res = handler({
16133
+ var res = handler.call(store, {
15569
16134
  dispatch: local.dispatch,
15570
16135
  commit: local.commit,
15571
16136
  getters: local.getters,
@@ -15589,7 +16154,9 @@
15589
16154
 
15590
16155
  function registerGetter (store, type, rawGetter, local) {
15591
16156
  if (store._wrappedGetters[type]) {
15592
- console.error(("[vuex] duplicate getter key: " + type));
16157
+ if (process.env.NODE_ENV !== 'production') {
16158
+ console.error(("[vuex] duplicate getter key: " + type));
16159
+ }
15593
16160
  return
15594
16161
  }
15595
16162
  store._wrappedGetters[type] = function wrappedGetter (store) {
@@ -15604,7 +16171,9 @@
15604
16171
 
15605
16172
  function enableStrictMode (store) {
15606
16173
  store._vm.$watch(function () { return this._data.$$state }, function () {
15607
- assert(store._committing, "Do not mutate vuex store state outside mutation handlers.");
16174
+ if (process.env.NODE_ENV !== 'production') {
16175
+ assert(store._committing, "Do not mutate vuex store state outside mutation handlers.");
16176
+ }
15608
16177
  }, { deep: true, sync: true });
15609
16178
  }
15610
16179
 
@@ -15621,27 +16190,26 @@
15621
16190
  type = type.type;
15622
16191
  }
15623
16192
 
15624
- assert(typeof type === 'string', ("Expects string as the type, but found " + (typeof type) + "."));
16193
+ if (process.env.NODE_ENV !== 'production') {
16194
+ assert(typeof type === 'string', ("Expects string as the type, but found " + (typeof type) + "."));
16195
+ }
15625
16196
 
15626
16197
  return { type: type, payload: payload, options: options }
15627
16198
  }
15628
16199
 
15629
16200
  function install (_Vue) {
15630
- if (Vue) {
15631
- console.error(
15632
- '[vuex] already installed. Vue.use(Vuex) should be called only once.'
15633
- );
16201
+ if (Vue && _Vue === Vue) {
16202
+ if (process.env.NODE_ENV !== 'production') {
16203
+ console.error(
16204
+ '[vuex] already installed. Vue.use(Vuex) should be called only once.'
16205
+ );
16206
+ }
15634
16207
  return
15635
16208
  }
15636
16209
  Vue = _Vue;
15637
16210
  applyMixin(Vue);
15638
16211
  }
15639
16212
 
15640
- // auto install in dist mode
15641
- if (typeof window !== 'undefined' && window.Vue) {
15642
- install(window.Vue);
15643
- }
15644
-
15645
16213
  var mapState = normalizeNamespace(function (namespace, states) {
15646
16214
  var res = {};
15647
16215
  normalizeMap(states).forEach(function (ref) {
@@ -15675,15 +16243,21 @@
15675
16243
  var key = ref.key;
15676
16244
  var val = ref.val;
15677
16245
 
15678
- val = namespace + val;
15679
16246
  res[key] = function mappedMutation () {
15680
16247
  var args = [], len = arguments.length;
15681
16248
  while ( len-- ) args[ len ] = arguments[ len ];
15682
16249
 
15683
- if (namespace && !getModuleByNamespace(this.$store, 'mapMutations', namespace)) {
15684
- return
16250
+ var commit = this.$store.commit;
16251
+ if (namespace) {
16252
+ var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
16253
+ if (!module) {
16254
+ return
16255
+ }
16256
+ commit = module.context.commit;
15685
16257
  }
15686
- return this.$store.commit.apply(this.$store, [val].concat(args))
16258
+ return typeof val === 'function'
16259
+ ? val.apply(this, [commit].concat(args))
16260
+ : commit.apply(this.$store, [val].concat(args))
15687
16261
  };
15688
16262
  });
15689
16263
  return res
@@ -15700,7 +16274,7 @@
15700
16274
  if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
15701
16275
  return
15702
16276
  }
15703
- if (!(val in this.$store.getters)) {
16277
+ if (process.env.NODE_ENV !== 'production' && !(val in this.$store.getters)) {
15704
16278
  console.error(("[vuex] unknown getter: " + val));
15705
16279
  return
15706
16280
  }
@@ -15718,20 +16292,33 @@
15718
16292
  var key = ref.key;
15719
16293
  var val = ref.val;
15720
16294
 
15721
- val = namespace + val;
15722
16295
  res[key] = function mappedAction () {
15723
16296
  var args = [], len = arguments.length;
15724
16297
  while ( len-- ) args[ len ] = arguments[ len ];
15725
16298
 
15726
- if (namespace && !getModuleByNamespace(this.$store, 'mapActions', namespace)) {
15727
- return
16299
+ var dispatch = this.$store.dispatch;
16300
+ if (namespace) {
16301
+ var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
16302
+ if (!module) {
16303
+ return
16304
+ }
16305
+ dispatch = module.context.dispatch;
15728
16306
  }
15729
- return this.$store.dispatch.apply(this.$store, [val].concat(args))
16307
+ return typeof val === 'function'
16308
+ ? val.apply(this, [dispatch].concat(args))
16309
+ : dispatch.apply(this.$store, [val].concat(args))
15730
16310
  };
15731
16311
  });
15732
16312
  return res
15733
16313
  });
15734
16314
 
16315
+ var createNamespacedHelpers = function (namespace) { return ({
16316
+ mapState: mapState.bind(null, namespace),
16317
+ mapGetters: mapGetters.bind(null, namespace),
16318
+ mapMutations: mapMutations.bind(null, namespace),
16319
+ mapActions: mapActions.bind(null, namespace)
16320
+ }); };
16321
+
15735
16322
  function normalizeMap (map) {
15736
16323
  return Array.isArray(map)
15737
16324
  ? map.map(function (key) { return ({ key: key, val: key }); })
@@ -15752,7 +16339,7 @@
15752
16339
 
15753
16340
  function getModuleByNamespace (store, helper, namespace) {
15754
16341
  var module = store._modulesNamespaceMap[namespace];
15755
- if (!module) {
16342
+ if (process.env.NODE_ENV !== 'production' && !module) {
15756
16343
  console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace));
15757
16344
  }
15758
16345
  return module
@@ -15761,17 +16348,17 @@
15761
16348
  var index = {
15762
16349
  Store: Store,
15763
16350
  install: install,
15764
- version: '2.3.0',
16351
+ version: '2.4.1',
15765
16352
  mapState: mapState,
15766
16353
  mapMutations: mapMutations,
15767
16354
  mapGetters: mapGetters,
15768
- mapActions: mapActions
16355
+ mapActions: mapActions,
16356
+ createNamespacedHelpers: createNamespacedHelpers
15769
16357
  };
15770
16358
 
15771
- return index;
15772
-
15773
- })));
16359
+ module.exports = index;
15774
16360
 
16361
+ /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(9)))
15775
16362
 
15776
16363
  /***/ }),
15777
16364
  /* 45 */
@@ -15820,7 +16407,7 @@
15820
16407
  /* moduleIdentifier (server only) */
15821
16408
  null
15822
16409
  )
15823
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageTagSelector.vue"
16410
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageTagSelector.vue"
15824
16411
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
15825
16412
  if (Component.options.functional) {console.error("[vue-loader] imageTagSelector.vue: functional components are not supported with templates, they should use render functions.")}
15826
16413
 
@@ -16049,7 +16636,7 @@
16049
16636
  /* moduleIdentifier (server only) */
16050
16637
  null
16051
16638
  )
16052
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/searchAutocomplete.vue"
16639
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/searchAutocomplete.vue"
16053
16640
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
16054
16641
  if (Component.options.functional) {console.error("[vue-loader] searchAutocomplete.vue: functional components are not supported with templates, they should use render functions.")}
16055
16642
 
@@ -16107,7 +16694,7 @@
16107
16694
 
16108
16695
 
16109
16696
  // module
16110
- exports.push([module.id, "\n.search-autocomplete__selected-tag {\n display: -webkit-inline-box;\n display: -ms-inline-flexbox;\n display: inline-flex;\n margin: 3px;\n position: relative;\n cursor: pointer;\n}\n.search-autocomplete__selected-tag:first-of-type {\n margin-left: 0;\n}\n.search-autocomplete__input {\n position: relative;\n}\n.search-autocomplete {\n width: 100%;\n position: relative;\n}\n.search-autocomplete__tags-list {\n position: absolute;\n top: 100%;\n width: 100%;\n z-index: 100;\n background-color: white;\n box-shadow: 0 5px 8px rgba(0, 0, 0, 0.1);\n}\n.search-autocomplete__tag {\n display: block;\n padding: 5px;\n transition: all 200ms linear;\n cursor: pointer;\n}\n.search-autocomplete__tag:hover {\n background-color: #ededed;\n}\n.search-autocomplete__tag.active {\n background-color: #5c90d2;\n color: white;\n}\n", ""]);
16697
+ exports.push([module.id, "\n.search-autocomplete__selected-tag {\n display: inline-flex;\n margin: 3px;\n position: relative;\n cursor: pointer;\n}\n.search-autocomplete__selected-tag:first-of-type {\n margin-left: 0;\n}\n.search-autocomplete__input {\n position: relative;\n}\n.search-autocomplete {\n width: 100%;\n position: relative;\n}\n.search-autocomplete__tags-list {\n position: absolute;\n top: 100%;\n width: 100%;\n z-index: 100;\n background-color: white;\n box-shadow: 0 5px 8px rgba(0, 0, 0, 0.1);\n}\n.search-autocomplete__tag {\n display: block;\n padding: 5px;\n transition: all 200ms linear;\n cursor: pointer;\n}\n.search-autocomplete__tag:hover {\n background-color: #ededed;\n}\n.search-autocomplete__tag.active {\n background-color: #5c90d2;\n color: white;\n}\n", ""]);
16111
16698
 
16112
16699
  // exports
16113
16700
 
@@ -16652,7 +17239,7 @@
16652
17239
  /* moduleIdentifier (server only) */
16653
17240
  null
16654
17241
  )
16655
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/listingFilter.vue"
17242
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/listingFilter.vue"
16656
17243
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
16657
17244
  if (Component.options.functional) {console.error("[vue-loader] listingFilter.vue: functional components are not supported with templates, they should use render functions.")}
16658
17245
 
@@ -32879,7 +33466,7 @@
32879
33466
  /* moduleIdentifier (server only) */
32880
33467
  null
32881
33468
  )
32882
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageShow.vue"
33469
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageShow.vue"
32883
33470
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
32884
33471
  if (Component.options.functional) {console.error("[vue-loader] imageShow.vue: functional components are not supported with templates, they should use render functions.")}
32885
33472
 
@@ -33094,7 +33681,7 @@
33094
33681
  /* moduleIdentifier (server only) */
33095
33682
  null
33096
33683
  )
33097
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageUpload.vue"
33684
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageUpload.vue"
33098
33685
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
33099
33686
  if (Component.options.functional) {console.error("[vue-loader] imageUpload.vue: functional components are not supported with templates, they should use render functions.")}
33100
33687
 
@@ -33152,7 +33739,7 @@
33152
33739
 
33153
33740
 
33154
33741
  // module
33155
- exports.push([module.id, "\n.image-upload {\n position: relative;\n}\n.image-upload__img {\n width: 100%;\n}\n.image-upload__file-input {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n width: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.image-upload__content {\n position: relative;\n border: 6px dashed #fcfcfc;\n transition: all 200ms linear;\n}\n.has-error .image-upload__content {\n border-color: #d26a5c;\n}\n.image-upload__content:hover {\n border-color: #c9c9c9;\n}\n.image-upload__placeholder {\n width: 100%;\n padding: 30px 0;\n display: -webkit-box;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-pack: center;\n -ms-flex-pack: center;\n justify-content: center;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n -ms-flex-direction: column;\n flex-direction: column;\n cursor: pointer;\n opacity: 0.8;\n}\n.image-upload__placeholder i {\n font-size: 70px;\n}\n", ""]);
33742
+ exports.push([module.id, "\n.image-upload {\n position: relative;\n}\n.image-upload__img {\n width: 100%;\n}\n.image-upload__file-input {\n position: absolute;\n top: 0;\n left: 0;\n bottom: 0;\n right: 0;\n width: 100%;\n opacity: 0;\n cursor: pointer;\n}\n.image-upload__content {\n position: relative;\n border: 6px dashed #fcfcfc;\n transition: all 200ms linear;\n}\n.has-error .image-upload__content {\n border-color: #d26a5c;\n}\n.image-upload__content:hover {\n border-color: #c9c9c9;\n}\n.image-upload__placeholder {\n width: 100%;\n padding: 30px 0;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-direction: column;\n cursor: pointer;\n opacity: 0.8;\n}\n.image-upload__placeholder i {\n font-size: 70px;\n}\n", ""]);
33156
33743
 
33157
33744
  // exports
33158
33745
 
@@ -34101,7 +34688,7 @@
34101
34688
  /* moduleIdentifier (server only) */
34102
34689
  null
34103
34690
  )
34104
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageInsertOverlay.vue"
34691
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/imageInsertOverlay.vue"
34105
34692
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
34106
34693
  if (Component.options.functional) {console.error("[vue-loader] imageInsertOverlay.vue: functional components are not supported with templates, they should use render functions.")}
34107
34694
 
@@ -34159,7 +34746,7 @@
34159
34746
 
34160
34747
 
34161
34748
  // module
34162
- exports.push([module.id, "\n.image-insert-overlay {\n box-shadow: 0 0 200px rgba(0, 0, 0, 0.5);\n position: absolute;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%,-50%);\n transform: translate(-50%,-50%);\n width: 100%;\n max-width: 475px;\n z-index: 20;\n}\n.fade-enter-active, .fade-leave-active {\n transition: opacity .5s\n}\n.fade-enter, .fade-leave-to /* .fade-leave-active in <2.1.8 */ {\n opacity: 0\n}\n.image-insert-overlay__close {\n position: absolute;\n top: 0;\n right: 0;\n background-color: transparent;\n border: none;\n}\n", ""]);
34749
+ exports.push([module.id, "\n.image-insert-overlay {\n box-shadow: 0 0 200px rgba(0, 0, 0, 0.5);\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%,-50%);\n width: 100%;\n max-width: 475px;\n z-index: 20;\n}\n.fade-enter-active, .fade-leave-active {\n transition: opacity .5s\n}\n.fade-enter, .fade-leave-to /* .fade-leave-active in <2.1.8 */ {\n opacity: 0\n}\n.image-insert-overlay__close {\n position: absolute;\n top: 0;\n right: 0;\n background-color: transparent;\n border: none;\n}\n", ""]);
34163
34750
 
34164
34751
  // exports
34165
34752
 
@@ -34294,9 +34881,6 @@
34294
34881
  "input": function($event) {
34295
34882
  if ($event.target.composing) { return; }
34296
34883
  _vm.imgWidth = $event.target.value
34297
- },
34298
- "blur": function($event) {
34299
- _vm.$forceUpdate()
34300
34884
  }
34301
34885
  }
34302
34886
  }), _vm._v(" "), _c('label', {
@@ -34328,9 +34912,6 @@
34328
34912
  "input": function($event) {
34329
34913
  if ($event.target.composing) { return; }
34330
34914
  _vm.imgHeight = $event.target.value
34331
- },
34332
- "blur": function($event) {
34333
- _vm.$forceUpdate()
34334
34915
  }
34335
34916
  }
34336
34917
  }), _vm._v(" "), _c('label', {
@@ -34392,7 +34973,7 @@
34392
34973
  /* moduleIdentifier (server only) */
34393
34974
  null
34394
34975
  )
34395
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/progressOverlay.vue"
34976
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/progressOverlay.vue"
34396
34977
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
34397
34978
  if (Component.options.functional) {console.error("[vue-loader] progressOverlay.vue: functional components are not supported with templates, they should use render functions.")}
34398
34979
 
@@ -34536,7 +35117,7 @@
34536
35117
  /* moduleIdentifier (server only) */
34537
35118
  null
34538
35119
  )
34539
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue"
35120
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/notificationOverlay.vue"
34540
35121
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
34541
35122
  if (Component.options.functional) {console.error("[vue-loader] notificationOverlay.vue: functional components are not supported with templates, they should use render functions.")}
34542
35123
 
@@ -34676,7 +35257,7 @@
34676
35257
  /* moduleIdentifier (server only) */
34677
35258
  null
34678
35259
  )
34679
- Component.options.__file = "/Users/lpdumas/vm/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/confirmationOverlay.vue"
35260
+ Component.options.__file = "/var/www/rails_admin_image_manager/app/assets/javascripts/rails_admin_image_manager/components/confirmationOverlay.vue"
34680
35261
  if (Component.esModule && Object.keys(Component.esModule).some(function (key) {return key !== "default" && key.substr(0, 2) !== "__"})) {console.error("named exports are not supported in *.vue files.")}
34681
35262
  if (Component.options.functional) {console.error("[vue-loader] confirmationOverlay.vue: functional components are not supported with templates, they should use render functions.")}
34682
35263
 
@@ -34734,7 +35315,7 @@
34734
35315
 
34735
35316
 
34736
35317
  // module
34737
- exports.push([module.id, "\n.confirmation-overlay::after {\n position: fixed;\n content: \"\";\n display: block;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(255, 255, 255, 0.5);\n z-index: 10;\n}\n.confirmation-overlay__box {\n box-shadow: 0 0 200px rgba(0, 0, 0, 0.5);\n position: fixed;\n background-color: white;\n top: 50%;\n left: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n width: 100%;\n max-width: 640px;\n z-index: 20;\n}\n", ""]);
35318
+ exports.push([module.id, "\n.confirmation-overlay::after {\n position: fixed;\n content: \"\";\n display: block;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(255, 255, 255, 0.5);\n z-index: 10;\n}\n.confirmation-overlay__box {\n box-shadow: 0 0 200px rgba(0, 0, 0, 0.5);\n position: fixed;\n background-color: white;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 100%;\n max-width: 640px;\n z-index: 20;\n}\n", ""]);
34738
35319
 
34739
35320
  // exports
34740
35321