| 1 |
/******/ (function(modules) { // webpackBootstrap |
| 2 |
/******/ // The module cache |
| 3 |
/******/ var installedModules = {}; |
| 4 |
/******/ |
| 5 |
/******/ // The require function |
| 6 |
/******/ function __webpack_require__(moduleId) { |
| 7 |
/******/ |
| 8 |
/******/ // Check if module is in cache |
| 9 |
/******/ if(installedModules[moduleId]) { |
| 10 |
/******/ return installedModules[moduleId].exports; |
| 11 |
/******/ } |
| 12 |
/******/ // Create a new module (and put it into the cache) |
| 13 |
/******/ var module = installedModules[moduleId] = { |
| 14 |
/******/ i: moduleId, |
| 15 |
/******/ l: false, |
| 16 |
/******/ exports: {} |
| 17 |
/******/ }; |
| 18 |
/******/ |
| 19 |
/******/ // Execute the module function |
| 20 |
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
| 21 |
/******/ |
| 22 |
/******/ // Flag the module as loaded |
| 23 |
/******/ module.l = true; |
| 24 |
/******/ |
| 25 |
/******/ // Return the exports of the module |
| 26 |
/******/ return module.exports; |
| 27 |
/******/ } |
| 28 |
/******/ |
| 29 |
/******/ |
| 30 |
/******/ // expose the modules object (__webpack_modules__) |
| 31 |
/******/ __webpack_require__.m = modules; |
| 32 |
/******/ |
| 33 |
/******/ // expose the module cache |
| 34 |
/******/ __webpack_require__.c = installedModules; |
| 35 |
/******/ |
| 36 |
/******/ // define getter function for harmony exports |
| 37 |
/******/ __webpack_require__.d = function(exports, name, getter) { |
| 38 |
/******/ if(!__webpack_require__.o(exports, name)) { |
| 39 |
/******/ Object.defineProperty(exports, name, { |
| 40 |
/******/ configurable: false, |
| 41 |
/******/ enumerable: true, |
| 42 |
/******/ get: getter |
| 43 |
/******/ }); |
| 44 |
/******/ } |
| 45 |
/******/ }; |
| 46 |
/******/ |
| 47 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
| 48 |
/******/ __webpack_require__.n = function(module) { |
| 49 |
/******/ var getter = module && module.__esModule ? |
| 50 |
/******/ function getDefault() { return module['default']; } : |
| 51 |
/******/ function getModuleExports() { return module; }; |
| 52 |
/******/ __webpack_require__.d(getter, 'a', getter); |
| 53 |
/******/ return getter; |
| 54 |
/******/ }; |
| 55 |
/******/ |
| 56 |
/******/ // Object.prototype.hasOwnProperty.call |
| 57 |
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
| 58 |
/******/ |
| 59 |
/******/ // __webpack_public_path__ |
| 60 |
/******/ __webpack_require__.p = "/"; |
| 61 |
/******/ |
| 62 |
/******/ // Load entry module and return exports |
| 63 |
/******/ return __webpack_require__(__webpack_require__.s = 7); |
| 64 |
/******/ }) |
| 65 |
/************************************************************************/ |
| 66 |
/******/ ([ |
| 67 |
/* 0 */ |
| 68 |
/***/ (function(module, exports) { |
| 69 |
|
| 70 |
/* |
| 71 |
MIT License http://www.opensource.org/licenses/mit-license.php |
| 72 |
Author Tobias Koppers @sokra |
| 73 |
*/ |
| 74 |
// css base code, injected by the css-loader |
| 75 |
module.exports = function() { |
| 76 |
var list = []; |
| 77 |
|
| 78 |
// return the list of modules as css string |
| 79 |
list.toString = function toString() { |
| 80 |
var result = []; |
| 81 |
for(var i = 0; i < this.length; i++) { |
| 82 |
var item = this[i]; |
| 83 |
if(item[2]) { |
| 84 |
result.push("@media " + item[2] + "{" + item[1] + "}"); |
| 85 |
} else { |
| 86 |
result.push(item[1]); |
| 87 |
} |
| 88 |
} |
| 89 |
return result.join(""); |
| 90 |
}; |
| 91 |
|
| 92 |
// import a list of modules into the list |
| 93 |
list.i = function(modules, mediaQuery) { |
| 94 |
if(typeof modules === "string") |
| 95 |
modules = [[null, modules, ""]]; |
| 96 |
var alreadyImportedModules = {}; |
| 97 |
for(var i = 0; i < this.length; i++) { |
| 98 |
var id = this[i][0]; |
| 99 |
if(typeof id === "number") |
| 100 |
alreadyImportedModules[id] = true; |
| 101 |
} |
| 102 |
for(i = 0; i < modules.length; i++) { |
| 103 |
var item = modules[i]; |
| 104 |
// skip already imported module |
| 105 |
// this implementation is not 100% perfect for weird media query combinations |
| 106 |
// when a module is imported multiple times with different media queries. |
| 107 |
// I hope this will never occur (Hey this way we have smaller bundles) |
| 108 |
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { |
| 109 |
if(mediaQuery && !item[2]) { |
| 110 |
item[2] = mediaQuery; |
| 111 |
} else if(mediaQuery) { |
| 112 |
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; |
| 113 |
} |
| 114 |
list.push(item); |
| 115 |
} |
| 116 |
} |
| 117 |
}; |
| 118 |
return list; |
| 119 |
}; |
| 120 |
|
| 121 |
|
| 122 |
/***/ }), |
| 123 |
/* 1 */ |
| 124 |
/***/ (function(module, exports) { |
| 125 |
|
| 126 |
/* |
| 127 |
MIT License http://www.opensource.org/licenses/mit-license.php |
| 128 |
Author Tobias Koppers @sokra |
| 129 |
*/ |
| 130 |
var stylesInDom = {}, |
| 131 |
memoize = function(fn) { |
| 132 |
var memo; |
| 133 |
return function () { |
| 134 |
if (typeof memo === "undefined") memo = fn.apply(this, arguments); |
| 135 |
return memo; |
| 136 |
}; |
| 137 |
}, |
| 138 |
isOldIE = memoize(function() { |
| 139 |
return /msie [6-9]\b/.test(self.navigator.userAgent.toLowerCase()); |
| 140 |
}), |
| 141 |
getHeadElement = memoize(function () { |
| 142 |
return document.head || document.getElementsByTagName("head")[0]; |
| 143 |
}), |
| 144 |
singletonElement = null, |
| 145 |
singletonCounter = 0, |
| 146 |
styleElementsInsertedAtTop = []; |
| 147 |
|
| 148 |
module.exports = function(list, options) { |
| 149 |
if(typeof DEBUG !== "undefined" && DEBUG) { |
| 150 |
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); |
| 151 |
} |
| 152 |
|
| 153 |
options = options || {}; |
| 154 |
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style> |
| 155 |
// tags it will allow on a page |
| 156 |
if (typeof options.singleton === "undefined") options.singleton = isOldIE(); |
| 157 |
|
| 158 |
// By default, add <style> tags to the bottom of <head>. |
| 159 |
if (typeof options.insertAt === "undefined") options.insertAt = "bottom"; |
| 160 |
|
| 161 |
var styles = listToStyles(list); |
| 162 |
addStylesToDom(styles, options); |
| 163 |
|
| 164 |
return function update(newList) { |
| 165 |
var mayRemove = []; |
| 166 |
for(var i = 0; i < styles.length; i++) { |
| 167 |
var item = styles[i]; |
| 168 |
var domStyle = stylesInDom[item.id]; |
| 169 |
domStyle.refs--; |
| 170 |
mayRemove.push(domStyle); |
| 171 |
} |
| 172 |
if(newList) { |
| 173 |
var newStyles = listToStyles(newList); |
| 174 |
addStylesToDom(newStyles, options); |
| 175 |
} |
| 176 |
for(var i = 0; i < mayRemove.length; i++) { |
| 177 |
var domStyle = mayRemove[i]; |
| 178 |
if(domStyle.refs === 0) { |
| 179 |
for(var j = 0; j < domStyle.parts.length; j++) |
| 180 |
domStyle.parts[j](); |
| 181 |
delete stylesInDom[domStyle.id]; |
| 182 |
} |
| 183 |
} |
| 184 |
}; |
| 185 |
} |
| 186 |
|
| 187 |
function addStylesToDom(styles, options) { |
| 188 |
for(var i = 0; i < styles.length; i++) { |
| 189 |
var item = styles[i]; |
| 190 |
var domStyle = stylesInDom[item.id]; |
| 191 |
if(domStyle) { |
| 192 |
domStyle.refs++; |
| 193 |
for(var j = 0; j < domStyle.parts.length; j++) { |
| 194 |
domStyle.parts[j](item.parts[j]); |
| 195 |
} |
| 196 |
for(; j < item.parts.length; j++) { |
| 197 |
domStyle.parts.push(addStyle(item.parts[j], options)); |
| 198 |
} |
| 199 |
} else { |
| 200 |
var parts = []; |
| 201 |
for(var j = 0; j < item.parts.length; j++) { |
| 202 |
parts.push(addStyle(item.parts[j], options)); |
| 203 |
} |
| 204 |
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts}; |
| 205 |
} |
| 206 |
} |
| 207 |
} |
| 208 |
|
| 209 |
function listToStyles(list) { |
| 210 |
var styles = []; |
| 211 |
var newStyles = {}; |
| 212 |
for(var i = 0; i < list.length; i++) { |
| 213 |
var item = list[i]; |
| 214 |
var id = item[0]; |
| 215 |
var css = item[1]; |
| 216 |
var media = item[2]; |
| 217 |
var sourceMap = item[3]; |
| 218 |
var part = {css: css, media: media, sourceMap: sourceMap}; |
| 219 |
if(!newStyles[id]) |
| 220 |
styles.push(newStyles[id] = {id: id, parts: [part]}); |
| 221 |
else |
| 222 |
newStyles[id].parts.push(part); |
| 223 |
} |
| 224 |
return styles; |
| 225 |
} |
| 226 |
|
| 227 |
function insertStyleElement(options, styleElement) { |
| 228 |
var head = getHeadElement(); |
| 229 |
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1]; |
| 230 |
if (options.insertAt === "top") { |
| 231 |
if(!lastStyleElementInsertedAtTop) { |
| 232 |
head.insertBefore(styleElement, head.firstChild); |
| 233 |
} else if(lastStyleElementInsertedAtTop.nextSibling) { |
| 234 |
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling); |
| 235 |
} else { |
| 236 |
head.appendChild(styleElement); |
| 237 |
} |
| 238 |
styleElementsInsertedAtTop.push(styleElement); |
| 239 |
} else if (options.insertAt === "bottom") { |
| 240 |
head.appendChild(styleElement); |
| 241 |
} else { |
| 242 |
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'."); |
| 243 |
} |
| 244 |
} |
| 245 |
|
| 246 |
function removeStyleElement(styleElement) { |
| 247 |
styleElement.parentNode.removeChild(styleElement); |
| 248 |
var idx = styleElementsInsertedAtTop.indexOf(styleElement); |
| 249 |
if(idx >= 0) { |
| 250 |
styleElementsInsertedAtTop.splice(idx, 1); |
| 251 |
} |
| 252 |
} |
| 253 |
|
| 254 |
function createStyleElement(options) { |
| 255 |
var styleElement = document.createElement("style"); |
| 256 |
styleElement.type = "text/css"; |
| 257 |
insertStyleElement(options, styleElement); |
| 258 |
return styleElement; |
| 259 |
} |
| 260 |
|
| 261 |
function createLinkElement(options) { |
| 262 |
var linkElement = document.createElement("link"); |
| 263 |
linkElement.rel = "stylesheet"; |
| 264 |
insertStyleElement(options, linkElement); |
| 265 |
return linkElement; |
| 266 |
} |
| 267 |
|
| 268 |
function addStyle(obj, options) { |
| 269 |
var styleElement, update, remove; |
| 270 |
|
| 271 |
if (options.singleton) { |
| 272 |
var styleIndex = singletonCounter++; |
| 273 |
styleElement = singletonElement || (singletonElement = createStyleElement(options)); |
| 274 |
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false); |
| 275 |
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true); |
| 276 |
} else if(obj.sourceMap && |
| 277 |
typeof URL === "function" && |
| 278 |
typeof URL.createObjectURL === "function" && |
| 279 |
typeof URL.revokeObjectURL === "function" && |
| 280 |
typeof Blob === "function" && |
| 281 |
typeof btoa === "function") { |
| 282 |
styleElement = createLinkElement(options); |
| 283 |
update = updateLink.bind(null, styleElement); |
| 284 |
remove = function() { |
| 285 |
removeStyleElement(styleElement); |
| 286 |
if(styleElement.href) |
| 287 |
URL.revokeObjectURL(styleElement.href); |
| 288 |
}; |
| 289 |
} else { |
| 290 |
styleElement = createStyleElement(options); |
| 291 |
update = applyToTag.bind(null, styleElement); |
| 292 |
remove = function() { |
| 293 |
removeStyleElement(styleElement); |
| 294 |
}; |
| 295 |
} |
| 296 |
|
| 297 |
update(obj); |
| 298 |
|
| 299 |
return function updateStyle(newObj) { |
| 300 |
if(newObj) { |
| 301 |
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) |
| 302 |
return; |
| 303 |
update(obj = newObj); |
| 304 |
} else { |
| 305 |
remove(); |
| 306 |
} |
| 307 |
}; |
| 308 |
} |
| 309 |
|
| 310 |
var replaceText = (function () { |
| 311 |
var textStore = []; |
| 312 |
|
| 313 |
return function (index, replacement) { |
| 314 |
textStore[index] = replacement; |
| 315 |
return textStore.filter(Boolean).join('\n'); |
| 316 |
}; |
| 317 |
})(); |
| 318 |
|
| 319 |
function applyToSingletonTag(styleElement, index, remove, obj) { |
| 320 |
var css = remove ? "" : obj.css; |
| 321 |
|
| 322 |
if (styleElement.styleSheet) { |
| 323 |
styleElement.styleSheet.cssText = replaceText(index, css); |
| 324 |
} else { |
| 325 |
var cssNode = document.createTextNode(css); |
| 326 |
var childNodes = styleElement.childNodes; |
| 327 |
if (childNodes[index]) styleElement.removeChild(childNodes[index]); |
| 328 |
if (childNodes.length) { |
| 329 |
styleElement.insertBefore(cssNode, childNodes[index]); |
| 330 |
} else { |
| 331 |
styleElement.appendChild(cssNode); |
| 332 |
} |
| 333 |
} |
| 334 |
} |
| 335 |
|
| 336 |
function applyToTag(styleElement, obj) { |
| 337 |
var css = obj.css; |
| 338 |
var media = obj.media; |
| 339 |
|
| 340 |
if(media) { |
| 341 |
styleElement.setAttribute("media", media) |
| 342 |
} |
| 343 |
|
| 344 |
if(styleElement.styleSheet) { |
| 345 |
styleElement.styleSheet.cssText = css; |
| 346 |
} else { |
| 347 |
while(styleElement.firstChild) { |
| 348 |
styleElement.removeChild(styleElement.firstChild); |
| 349 |
} |
| 350 |
styleElement.appendChild(document.createTextNode(css)); |
| 351 |
} |
| 352 |
} |
| 353 |
|
| 354 |
function updateLink(linkElement, obj) { |
| 355 |
var css = obj.css; |
| 356 |
var sourceMap = obj.sourceMap; |
| 357 |
|
| 358 |
if(sourceMap) { |
| 359 |
// http://stackoverflow.com/a/26603875 |
| 360 |
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */"; |
| 361 |
} |
| 362 |
|
| 363 |
var blob = new Blob([css], { type: "text/css" }); |
| 364 |
|
| 365 |
var oldSrc = linkElement.href; |
| 366 |
|
| 367 |
linkElement.href = URL.createObjectURL(blob); |
| 368 |
|
| 369 |
if(oldSrc) |
| 370 |
URL.revokeObjectURL(oldSrc); |
| 371 |
} |
| 372 |
|
| 373 |
|
| 374 |
/***/ }), |
| 375 |
/* 2 */ |
| 376 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
| 377 |
|
| 378 |
"use strict"; |
| 379 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); |
| 380 |
/* WEBPACK VAR INJECTION */(function(process, global, setImmediate) {/*! |
| 381 |
* Vue.js v2.5.17 |
| 382 |
* (c) 2014-2018 Evan You |
| 383 |
* Released under the MIT License. |
| 384 |
*/ |
| 385 |
/* */ |
| 386 |
|
| 387 |
var emptyObject = Object.freeze({}); |
| 388 |
|
| 389 |
// these helpers produces better vm code in JS engines due to their |
| 390 |
// explicitness and function inlining |
| 391 |
function isUndef (v) { |
| 392 |
return v === undefined || v === null |
| 393 |
} |
| 394 |
|
| 395 |
function isDef (v) { |
| 396 |
return v !== undefined && v !== null |
| 397 |
} |
| 398 |
|
| 399 |
function isTrue (v) { |
| 400 |
return v === true |
| 401 |
} |
| 402 |
|
| 403 |
function isFalse (v) { |
| 404 |
return v === false |
| 405 |
} |
| 406 |
|
| 407 |
/** |
| 408 |
* Check if value is primitive |
| 409 |
*/ |
| 410 |
function isPrimitive (value) { |
| 411 |
return ( |
| 412 |
typeof value === 'string' || |
| 413 |
typeof value === 'number' || |
| 414 |
// $flow-disable-line |
| 415 |
typeof value === 'symbol' || |
| 416 |
typeof value === 'boolean' |
| 417 |
) |
| 418 |
} |
| 419 |
|
| 420 |
/** |
| 421 |
* Quick object check - this is primarily used to tell |
| 422 |
* Objects from primitive values when we know the value |
| 423 |
* is a JSON-compliant type. |
| 424 |
*/ |
| 425 |
function isObject (obj) { |
| 426 |
return obj !== null && typeof obj === 'object' |
| 427 |
} |
| 428 |
|
| 429 |
/** |
| 430 |
* Get the raw type string of a value e.g. [object Object] |
| 431 |
*/ |
| 432 |
var _toString = Object.prototype.toString; |
| 433 |
|
| 434 |
function toRawType (value) { |
| 435 |
return _toString.call(value).slice(8, -1) |
| 436 |
} |
| 437 |
|
| 438 |
/** |
| 439 |
* Strict object type check. Only returns true |
| 440 |
* for plain JavaScript objects. |
| 441 |
*/ |
| 442 |
function isPlainObject (obj) { |
| 443 |
return _toString.call(obj) === '[object Object]' |
| 444 |
} |
| 445 |
|
| 446 |
function isRegExp (v) { |
| 447 |
return _toString.call(v) === '[object RegExp]' |
| 448 |
} |
| 449 |
|
| 450 |
/** |
| 451 |
* Check if val is a valid array index. |
| 452 |
*/ |
| 453 |
function isValidArrayIndex (val) { |
| 454 |
var n = parseFloat(String(val)); |
| 455 |
return n >= 0 && Math.floor(n) === n && isFinite(val) |
| 456 |
} |
| 457 |
|
| 458 |
/** |
| 459 |
* Convert a value to a string that is actually rendered. |
| 460 |
*/ |
| 461 |
function toString (val) { |
| 462 |
return val == null |
| 463 |
? '' |
| 464 |
: typeof val === 'object' |
| 465 |
? JSON.stringify(val, null, 2) |
| 466 |
: String(val) |
| 467 |
} |
| 468 |
|
| 469 |
/** |
| 470 |
* Convert a input value to a number for persistence. |
| 471 |
* If the conversion fails, return original string. |
| 472 |
*/ |
| 473 |
function toNumber (val) { |
| 474 |
var n = parseFloat(val); |
| 475 |
return isNaN(n) ? val : n |
| 476 |
} |
| 477 |
|
| 478 |
/** |
| 479 |
* Make a map and return a function for checking if a key |
| 480 |
* is in that map. |
| 481 |
*/ |
| 482 |
function makeMap ( |
| 483 |
str, |
| 484 |
expectsLowerCase |
| 485 |
) { |
| 486 |
var map = Object.create(null); |
| 487 |
var list = str.split(','); |
| 488 |
for (var i = 0; i < list.length; i++) { |
| 489 |
map[list[i]] = true; |
| 490 |
} |
| 491 |
return expectsLowerCase |
| 492 |
? function (val) { return map[val.toLowerCase()]; } |
| 493 |
: function (val) { return map[val]; } |
| 494 |
} |
| 495 |
|
| 496 |
/** |
| 497 |
* Check if a tag is a built-in tag. |
| 498 |
*/ |
| 499 |
var isBuiltInTag = makeMap('slot,component', true); |
| 500 |
|
| 501 |
/** |
| 502 |
* Check if a attribute is a reserved attribute. |
| 503 |
*/ |
| 504 |
var isReservedAttribute = makeMap('key,ref,slot,slot-scope,is'); |
| 505 |
|
| 506 |
/** |
| 507 |
* Remove an item from an array |
| 508 |
*/ |
| 509 |
function remove (arr, item) { |
| 510 |
if (arr.length) { |
| 511 |
var index = arr.indexOf(item); |
| 512 |
if (index > -1) { |
| 513 |
return arr.splice(index, 1) |
| 514 |
} |
| 515 |
} |
| 516 |
} |
| 517 |
|
| 518 |
/** |
| 519 |
* Check whether the object has the property. |
| 520 |
*/ |
| 521 |
var hasOwnProperty = Object.prototype.hasOwnProperty; |
| 522 |
function hasOwn (obj, key) { |
| 523 |
return hasOwnProperty.call(obj, key) |
| 524 |
} |
| 525 |
|
| 526 |
/** |
| 527 |
* Create a cached version of a pure function. |
| 528 |
*/ |
| 529 |
function cached (fn) { |
| 530 |
var cache = Object.create(null); |
| 531 |
return (function cachedFn (str) { |
| 532 |
var hit = cache[str]; |
| 533 |
return hit || (cache[str] = fn(str)) |
| 534 |
}) |
| 535 |
} |
| 536 |
|
| 537 |
/** |
| 538 |
* Camelize a hyphen-delimited string. |
| 539 |
*/ |
| 540 |
var camelizeRE = /-(\w)/g; |
| 541 |
var camelize = cached(function (str) { |
| 542 |
return str.replace(camelizeRE, function (_, c) { return c ? c.toUpperCase() : ''; }) |
| 543 |
}); |
| 544 |
|
| 545 |
/** |
| 546 |
* Capitalize a string. |
| 547 |
*/ |
| 548 |
var capitalize = cached(function (str) { |
| 549 |
return str.charAt(0).toUpperCase() + str.slice(1) |
| 550 |
}); |
| 551 |
|
| 552 |
/** |
| 553 |
* Hyphenate a camelCase string. |
| 554 |
*/ |
| 555 |
var hyphenateRE = /\B([A-Z])/g; |
| 556 |
var hyphenate = cached(function (str) { |
| 557 |
return str.replace(hyphenateRE, '-$1').toLowerCase() |
| 558 |
}); |
| 559 |
|
| 560 |
/** |
| 561 |
* Simple bind polyfill for environments that do not support it... e.g. |
| 562 |
* PhantomJS 1.x. Technically we don't need this anymore since native bind is |
| 563 |
* now more performant in most browsers, but removing it would be breaking for |
| 564 |
* code that was able to run in PhantomJS 1.x, so this must be kept for |
| 565 |
* backwards compatibility. |
| 566 |
*/ |
| 567 |
|
| 568 |
/* istanbul ignore next */ |
| 569 |
function polyfillBind (fn, ctx) { |
| 570 |
function boundFn (a) { |
| 571 |
var l = arguments.length; |
| 572 |
return l |
| 573 |
? l > 1 |
| 574 |
? fn.apply(ctx, arguments) |
| 575 |
: fn.call(ctx, a) |
| 576 |
: fn.call(ctx) |
| 577 |
} |
| 578 |
|
| 579 |
boundFn._length = fn.length; |
| 580 |
return boundFn |
| 581 |
} |
| 582 |
|
| 583 |
function nativeBind (fn, ctx) { |
| 584 |
return fn.bind(ctx) |
| 585 |
} |
| 586 |
|
| 587 |
var bind = Function.prototype.bind |
| 588 |
? nativeBind |
| 589 |
: polyfillBind; |
| 590 |
|
| 591 |
/** |
| 592 |
* Convert an Array-like object to a real Array. |
| 593 |
*/ |
| 594 |
function toArray (list, start) { |
| 595 |
start = start || 0; |
| 596 |
var i = list.length - start; |
| 597 |
var ret = new Array(i); |
| 598 |
while (i--) { |
| 599 |
ret[i] = list[i + start]; |
| 600 |
} |
| 601 |
return ret |
| 602 |
} |
| 603 |
|
| 604 |
/** |
| 605 |
* Mix properties into target object. |
| 606 |
*/ |
| 607 |
function extend (to, _from) { |
| 608 |
for (var key in _from) { |
| 609 |
to[key] = _from[key]; |
| 610 |
} |
| 611 |
return to |
| 612 |
} |
| 613 |
|
| 614 |
/** |
| 615 |
* Merge an Array of Objects into a single Object. |
| 616 |
*/ |
| 617 |
function toObject (arr) { |
| 618 |
var res = {}; |
| 619 |
for (var i = 0; i < arr.length; i++) { |
| 620 |
if (arr[i]) { |
| 621 |
extend(res, arr[i]); |
| 622 |
} |
| 623 |
} |
| 624 |
return res |
| 625 |
} |
| 626 |
|
| 627 |
/** |
| 628 |
* Perform no operation. |
| 629 |
* Stubbing args to make Flow happy without leaving useless transpiled code |
| 630 |
* with ...rest (https://flow.org/blog/2017/05/07/Strict-Function-Call-Arity/) |
| 631 |
*/ |
| 632 |
function noop (a, b, c) {} |
| 633 |
|
| 634 |
/** |
| 635 |
* Always return false. |
| 636 |
*/ |
| 637 |
var no = function (a, b, c) { return false; }; |
| 638 |
|
| 639 |
/** |
| 640 |
* Return same value |
| 641 |
*/ |
| 642 |
var identity = function (_) { return _; }; |
| 643 |
|
| 644 |
/** |
| 645 |
* Generate a static keys string from compiler modules. |
| 646 |
*/ |
| 647 |
function genStaticKeys (modules) { |
| 648 |
return modules.reduce(function (keys, m) { |
| 649 |
return keys.concat(m.staticKeys || []) |
| 650 |
}, []).join(',') |
| 651 |
} |
| 652 |
|
| 653 |
/** |
| 654 |
* Check if two values are loosely equal - that is, |
| 655 |
* if they are plain objects, do they have the same shape? |
| 656 |
*/ |
| 657 |
function looseEqual (a, b) { |
| 658 |
if (a === b) { return true } |
| 659 |
var isObjectA = isObject(a); |
| 660 |
var isObjectB = isObject(b); |
| 661 |
if (isObjectA && isObjectB) { |
| 662 |
try { |
| 663 |
var isArrayA = Array.isArray(a); |
| 664 |
var isArrayB = Array.isArray(b); |
| 665 |
if (isArrayA && isArrayB) { |
| 666 |
return a.length === b.length && a.every(function (e, i) { |
| 667 |
return looseEqual(e, b[i]) |
| 668 |
}) |
| 669 |
} else if (!isArrayA && !isArrayB) { |
| 670 |
var keysA = Object.keys(a); |
| 671 |
var keysB = Object.keys(b); |
| 672 |
return keysA.length === keysB.length && keysA.every(function (key) { |
| 673 |
return looseEqual(a[key], b[key]) |
| 674 |
}) |
| 675 |
} else { |
| 676 |
/* istanbul ignore next */ |
| 677 |
return false |
| 678 |
} |
| 679 |
} catch (e) { |
| 680 |
/* istanbul ignore next */ |
| 681 |
return false |
| 682 |
} |
| 683 |
} else if (!isObjectA && !isObjectB) { |
| 684 |
return String(a) === String(b) |
| 685 |
} else { |
| 686 |
return false |
| 687 |
} |
| 688 |
} |
| 689 |
|
| 690 |
function looseIndexOf (arr, val) { |
| 691 |
for (var i = 0; i < arr.length; i++) { |
| 692 |
if (looseEqual(arr[i], val)) { return i } |
| 693 |
} |
| 694 |
return -1 |
| 695 |
} |
| 696 |
|
| 697 |
/** |
| 698 |
* Ensure a function is called only once. |
| 699 |
*/ |
| 700 |
function once (fn) { |
| 701 |
var called = false; |
| 702 |
return function () { |
| 703 |
if (!called) { |
| 704 |
called = true; |
| 705 |
fn.apply(this, arguments); |
| 706 |
} |
| 707 |
} |
| 708 |
} |
| 709 |
|
| 710 |
var SSR_ATTR = 'data-server-rendered'; |
| 711 |
|
| 712 |
var ASSET_TYPES = [ |
| 713 |
'component', |
| 714 |
'directive', |
| 715 |
'filter' |
| 716 |
]; |
| 717 |
|
| 718 |
var LIFECYCLE_HOOKS = [ |
| 719 |
'beforeCreate', |
| 720 |
'created', |
| 721 |
'beforeMount', |
| 722 |
'mounted', |
| 723 |
'beforeUpdate', |
| 724 |
'updated', |
| 725 |
'beforeDestroy', |
| 726 |
'destroyed', |
| 727 |
'activated', |
| 728 |
'deactivated', |
| 729 |
'errorCaptured' |
| 730 |
]; |
| 731 |
|
| 732 |
/* */ |
| 733 |
|
| 734 |
var config = ({ |
| 735 |
/** |
| 736 |
* Option merge strategies (used in core/util/options) |
| 737 |
*/ |
| 738 |
// $flow-disable-line |
| 739 |
optionMergeStrategies: Object.create(null), |
| 740 |
|
| 741 |
/** |
| 742 |
* Whether to suppress warnings. |
| 743 |
*/ |
| 744 |
silent: false, |
| 745 |
|
| 746 |
/** |
| 747 |
* Show production mode tip message on boot? |
| 748 |
*/ |
| 749 |
productionTip: process.env.NODE_ENV !== 'production', |
| 750 |
|
| 751 |
/** |
| 752 |
* Whether to enable devtools |
| 753 |
*/ |
| 754 |
devtools: process.env.NODE_ENV !== 'production', |
| 755 |
|
| 756 |
/** |
| 757 |
* Whether to record perf |
| 758 |
*/ |
| 759 |
performance: false, |
| 760 |
|
| 761 |
/** |
| 762 |
* Error handler for watcher errors |
| 763 |
*/ |
| 764 |
errorHandler: null, |
| 765 |
|
| 766 |
/** |
| 767 |
* Warn handler for watcher warns |
| 768 |
*/ |
| 769 |
warnHandler: null, |
| 770 |
|
| 771 |
/** |
| 772 |
* Ignore certain custom elements |
| 773 |
*/ |
| 774 |
ignoredElements: [], |
| 775 |
|
| 776 |
/** |
| 777 |
* Custom user key aliases for v-on |
| 778 |
*/ |
| 779 |
// $flow-disable-line |
| 780 |
keyCodes: Object.create(null), |
| 781 |
|
| 782 |
/** |
| 783 |
* Check if a tag is reserved so that it cannot be registered as a |
| 784 |
* component. This is platform-dependent and may be overwritten. |
| 785 |
*/ |
| 786 |
isReservedTag: no, |
| 787 |
|
| 788 |
/** |
| 789 |
* Check if an attribute is reserved so that it cannot be used as a component |
| 790 |
* prop. This is platform-dependent and may be overwritten. |
| 791 |
*/ |
| 792 |
isReservedAttr: no, |
| 793 |
|
| 794 |
/** |
| 795 |
* Check if a tag is an unknown element. |
| 796 |
* Platform-dependent. |
| 797 |
*/ |
| 798 |
isUnknownElement: no, |
| 799 |
|
| 800 |
/** |
| 801 |
* Get the namespace of an element |
| 802 |
*/ |
| 803 |
getTagNamespace: noop, |
| 804 |
|
| 805 |
/** |
| 806 |
* Parse the real tag name for the specific platform. |
| 807 |
*/ |
| 808 |
parsePlatformTagName: identity, |
| 809 |
|
| 810 |
/** |
| 811 |
* Check if an attribute must be bound using property, e.g. value |
| 812 |
* Platform-dependent. |
| 813 |
*/ |
| 814 |
mustUseProp: no, |
| 815 |
|
| 816 |
/** |
| 817 |
* Exposed for legacy reasons |
| 818 |
*/ |
| 819 |
_lifecycleHooks: LIFECYCLE_HOOKS |
| 820 |
}) |
| 821 |
|
| 822 |
/* */ |
| 823 |
|
| 824 |
/** |
| 825 |
* Check if a string starts with $ or _ |
| 826 |
*/ |
| 827 |
function isReserved (str) { |
| 828 |
var c = (str + '').charCodeAt(0); |
| 829 |
return c === 0x24 || c === 0x5F |
| 830 |
} |
| 831 |
|
| 832 |
/** |
| 833 |
* Define a property. |
| 834 |
*/ |
| 835 |
function def (obj, key, val, enumerable) { |
| 836 |
Object.defineProperty(obj, key, { |
| 837 |
value: val, |
| 838 |
enumerable: !!enumerable, |
| 839 |
writable: true, |
| 840 |
configurable: true |
| 841 |
}); |
| 842 |
} |
| 843 |
|
| 844 |
/** |
| 845 |
* Parse simple path. |
| 846 |
*/ |
| 847 |
var bailRE = /[^\w.$]/; |
| 848 |
function parsePath (path) { |
| 849 |
if (bailRE.test(path)) { |
| 850 |
return |
| 851 |
} |
| 852 |
var segments = path.split('.'); |
| 853 |
return function (obj) { |
| 854 |
for (var i = 0; i < segments.length; i++) { |
| 855 |
if (!obj) { return } |
| 856 |
obj = obj[segments[i]]; |
| 857 |
} |
| 858 |
return obj |
| 859 |
} |
| 860 |
} |
| 861 |
|
| 862 |
/* */ |
| 863 |
|
| 864 |
// can we use __proto__? |
| 865 |
var hasProto = '__proto__' in {}; |
| 866 |
|
| 867 |
// Browser environment sniffing |
| 868 |
var inBrowser = typeof window !== 'undefined'; |
| 869 |
var inWeex = typeof WXEnvironment !== 'undefined' && !!WXEnvironment.platform; |
| 870 |
var weexPlatform = inWeex && WXEnvironment.platform.toLowerCase(); |
| 871 |
var UA = inBrowser && window.navigator.userAgent.toLowerCase(); |
| 872 |
var isIE = UA && /msie|trident/.test(UA); |
| 873 |
var isIE9 = UA && UA.indexOf('msie 9.0') > 0; |
| 874 |
var isEdge = UA && UA.indexOf('edge/') > 0; |
| 875 |
var isAndroid = (UA && UA.indexOf('android') > 0) || (weexPlatform === 'android'); |
| 876 |
var isIOS = (UA && /iphone|ipad|ipod|ios/.test(UA)) || (weexPlatform === 'ios'); |
| 877 |
var isChrome = UA && /chrome\/\d+/.test(UA) && !isEdge; |
| 878 |
|
| 879 |
// Firefox has a "watch" function on Object.prototype... |
| 880 |
var nativeWatch = ({}).watch; |
| 881 |
|
| 882 |
var supportsPassive = false; |
| 883 |
if (inBrowser) { |
| 884 |
try { |
| 885 |
var opts = {}; |
| 886 |
Object.defineProperty(opts, 'passive', ({ |
| 887 |
get: function get () { |
| 888 |
/* istanbul ignore next */ |
| 889 |
supportsPassive = true; |
| 890 |
} |
| 891 |
})); // https://github.com/facebook/flow/issues/285 |
| 892 |
window.addEventListener('test-passive', null, opts); |
| 893 |
} catch (e) {} |
| 894 |
} |
| 895 |
|
| 896 |
// this needs to be lazy-evaled because vue may be required before |
| 897 |
// vue-server-renderer can set VUE_ENV |
| 898 |
var _isServer; |
| 899 |
var isServerRendering = function () { |
| 900 |
if (_isServer === undefined) { |
| 901 |
/* istanbul ignore if */ |
| 902 |
if (!inBrowser && !inWeex && typeof global !== 'undefined') { |
| 903 |
// detect presence of vue-server-renderer and avoid |
| 904 |
// Webpack shimming the process |
| 905 |
_isServer = global['process'].env.VUE_ENV === 'server'; |
| 906 |
} else { |
| 907 |
_isServer = false; |
| 908 |
} |
| 909 |
} |
| 910 |
return _isServer |
| 911 |
}; |
| 912 |
|
| 913 |
// detect devtools |
| 914 |
var devtools = inBrowser && window.__VUE_DEVTOOLS_GLOBAL_HOOK__; |
| 915 |
|
| 916 |
/* istanbul ignore next */ |
| 917 |
function isNative (Ctor) { |
| 918 |
return typeof Ctor === 'function' && /native code/.test(Ctor.toString()) |
| 919 |
} |
| 920 |
|
| 921 |
var hasSymbol = |
| 922 |
typeof Symbol !== 'undefined' && isNative(Symbol) && |
| 923 |
typeof Reflect !== 'undefined' && isNative(Reflect.ownKeys); |
| 924 |
|
| 925 |
var _Set; |
| 926 |
/* istanbul ignore if */ // $flow-disable-line |
| 927 |
if (typeof Set !== 'undefined' && isNative(Set)) { |
| 928 |
// use native Set when available. |
| 929 |
_Set = Set; |
| 930 |
} else { |
| 931 |
// a non-standard Set polyfill that only works with primitive keys. |
| 932 |
_Set = (function () { |
| 933 |
function Set () { |
| 934 |
this.set = Object.create(null); |
| 935 |
} |
| 936 |
Set.prototype.has = function has (key) { |
| 937 |
return this.set[key] === true |
| 938 |
}; |
| 939 |
Set.prototype.add = function add (key) { |
| 940 |
this.set[key] = true; |
| 941 |
}; |
| 942 |
Set.prototype.clear = function clear () { |
| 943 |
this.set = Object.create(null); |
| 944 |
}; |
| 945 |
|
| 946 |
return Set; |
| 947 |
}()); |
| 948 |
} |
| 949 |
|
| 950 |
/* */ |
| 951 |
|
| 952 |
var warn = noop; |
| 953 |
var tip = noop; |
| 954 |
var generateComponentTrace = (noop); // work around flow check |
| 955 |
var formatComponentName = (noop); |
| 956 |
|
| 957 |
if (process.env.NODE_ENV !== 'production') { |
| 958 |
var hasConsole = typeof console !== 'undefined'; |
| 959 |
var classifyRE = /(?:^|[-_])(\w)/g; |
| 960 |
var classify = function (str) { return str |
| 961 |
.replace(classifyRE, function (c) { return c.toUpperCase(); }) |
| 962 |
.replace(/[-_]/g, ''); }; |
| 963 |
|
| 964 |
warn = function (msg, vm) { |
| 965 |
var trace = vm ? generateComponentTrace(vm) : ''; |
| 966 |
|
| 967 |
if (config.warnHandler) { |
| 968 |
config.warnHandler.call(null, msg, vm, trace); |
| 969 |
} else if (hasConsole && (!config.silent)) { |
| 970 |
console.error(("[Vue warn]: " + msg + trace)); |
| 971 |
} |
| 972 |
}; |
| 973 |
|
| 974 |
tip = function (msg, vm) { |
| 975 |
if (hasConsole && (!config.silent)) { |
| 976 |
console.warn("[Vue tip]: " + msg + ( |
| 977 |
vm ? generateComponentTrace(vm) : '' |
| 978 |
)); |
| 979 |
} |
| 980 |
}; |
| 981 |
|
| 982 |
formatComponentName = function (vm, includeFile) { |
| 983 |
if (vm.$root === vm) { |
| 984 |
return '<Root>' |
| 985 |
} |
| 986 |
var options = typeof vm === 'function' && vm.cid != null |
| 987 |
? vm.options |
| 988 |
: vm._isVue |
| 989 |
? vm.$options || vm.constructor.options |
| 990 |
: vm || {}; |
| 991 |
var name = options.name || options._componentTag; |
| 992 |
var file = options.__file; |
| 993 |
if (!name && file) { |
| 994 |
var match = file.match(/([^/\\]+)\.vue$/); |
| 995 |
name = match && match[1]; |
| 996 |
} |
| 997 |
|
| 998 |
return ( |
| 999 |
(name ? ("<" + (classify(name)) + ">") : "<Anonymous>") + |
| 1000 |
(file && includeFile !== false ? (" at " + file) : '') |
| 1001 |
) |
| 1002 |
}; |
| 1003 |
|
| 1004 |
var repeat = function (str, n) { |
| 1005 |
var res = ''; |
| 1006 |
while (n) { |
| 1007 |
if (n % 2 === 1) { res += str; } |
| 1008 |
if (n > 1) { str += str; } |
| 1009 |
n >>= 1; |
| 1010 |
} |
| 1011 |
return res |
| 1012 |
}; |
| 1013 |
|
| 1014 |
generateComponentTrace = function (vm) { |
| 1015 |
if (vm._isVue && vm.$parent) { |
| 1016 |
var tree = []; |
| 1017 |
var currentRecursiveSequence = 0; |
| 1018 |
while (vm) { |
| 1019 |
if (tree.length > 0) { |
| 1020 |
var last = tree[tree.length - 1]; |
| 1021 |
if (last.constructor === vm.constructor) { |
| 1022 |
currentRecursiveSequence++; |
| 1023 |
vm = vm.$parent; |
| 1024 |
continue |
| 1025 |
} else if (currentRecursiveSequence > 0) { |
| 1026 |
tree[tree.length - 1] = [last, currentRecursiveSequence]; |
| 1027 |
currentRecursiveSequence = 0; |
| 1028 |
} |
| 1029 |
} |
| 1030 |
tree.push(vm); |
| 1031 |
vm = vm.$parent; |
| 1032 |
} |
| 1033 |
return '\n\nfound in\n\n' + tree |
| 1034 |
.map(function (vm, i) { return ("" + (i === 0 ? '---> ' : repeat(' ', 5 + i * 2)) + (Array.isArray(vm) |
| 1035 |
? ((formatComponentName(vm[0])) + "... (" + (vm[1]) + " recursive calls)") |
| 1036 |
: formatComponentName(vm))); }) |
| 1037 |
.join('\n') |
| 1038 |
} else { |
| 1039 |
return ("\n\n(found in " + (formatComponentName(vm)) + ")") |
| 1040 |
} |
| 1041 |
}; |
| 1042 |
} |
| 1043 |
|
| 1044 |
/* */ |
| 1045 |
|
| 1046 |
|
| 1047 |
var uid = 0; |
| 1048 |
|
| 1049 |
/** |
| 1050 |
* A dep is an observable that can have multiple |
| 1051 |
* directives subscribing to it. |
| 1052 |
*/ |
| 1053 |
var Dep = function Dep () { |
| 1054 |
this.id = uid++; |
| 1055 |
this.subs = []; |
| 1056 |
}; |
| 1057 |
|
| 1058 |
Dep.prototype.addSub = function addSub (sub) { |
| 1059 |
this.subs.push(sub); |
| 1060 |
}; |
| 1061 |
|
| 1062 |
Dep.prototype.removeSub = function removeSub (sub) { |
| 1063 |
remove(this.subs, sub); |
| 1064 |
}; |
| 1065 |
|
| 1066 |
Dep.prototype.depend = function depend () { |
| 1067 |
if (Dep.target) { |
| 1068 |
Dep.target.addDep(this); |
| 1069 |
} |
| 1070 |
}; |
| 1071 |
|
| 1072 |
Dep.prototype.notify = function notify () { |
| 1073 |
// stabilize the subscriber list first |
| 1074 |
var subs = this.subs.slice(); |
| 1075 |
for (var i = 0, l = subs.length; i < l; i++) { |
| 1076 |
subs[i].update(); |
| 1077 |
} |
| 1078 |
}; |
| 1079 |
|
| 1080 |
// the current target watcher being evaluated. |
| 1081 |
// this is globally unique because there could be only one |
| 1082 |
// watcher being evaluated at any time. |
| 1083 |
Dep.target = null; |
| 1084 |
var targetStack = []; |
| 1085 |
|
| 1086 |
function pushTarget (_target) { |
| 1087 |
if (Dep.target) { targetStack.push(Dep.target); } |
| 1088 |
Dep.target = _target; |
| 1089 |
} |
| 1090 |
|
| 1091 |
function popTarget () { |
| 1092 |
Dep.target = targetStack.pop(); |
| 1093 |
} |
| 1094 |
|
| 1095 |
/* */ |
| 1096 |
|
| 1097 |
var VNode = function VNode ( |
| 1098 |
tag, |
| 1099 |
data, |
| 1100 |
children, |
| 1101 |
text, |
| 1102 |
elm, |
| 1103 |
context, |
| 1104 |
componentOptions, |
| 1105 |
asyncFactory |
| 1106 |
) { |
| 1107 |
this.tag = tag; |
| 1108 |
this.data = data; |
| 1109 |
this.children = children; |
| 1110 |
this.text = text; |
| 1111 |
this.elm = elm; |
| 1112 |
this.ns = undefined; |
| 1113 |
this.context = context; |
| 1114 |
this.fnContext = undefined; |
| 1115 |
this.fnOptions = undefined; |
| 1116 |
this.fnScopeId = undefined; |
| 1117 |
this.key = data && data.key; |
| 1118 |
this.componentOptions = componentOptions; |
| 1119 |
this.componentInstance = undefined; |
| 1120 |
this.parent = undefined; |
| 1121 |
this.raw = false; |
| 1122 |
this.isStatic = false; |
| 1123 |
this.isRootInsert = true; |
| 1124 |
this.isComment = false; |
| 1125 |
this.isCloned = false; |
| 1126 |
this.isOnce = false; |
| 1127 |
this.asyncFactory = asyncFactory; |
| 1128 |
this.asyncMeta = undefined; |
| 1129 |
this.isAsyncPlaceholder = false; |
| 1130 |
}; |
| 1131 |
|
| 1132 |
var prototypeAccessors = { child: { configurable: true } }; |
| 1133 |
|
| 1134 |
// DEPRECATED: alias for componentInstance for backwards compat. |
| 1135 |
/* istanbul ignore next */ |
| 1136 |
prototypeAccessors.child.get = function () { |
| 1137 |
return this.componentInstance |
| 1138 |
}; |
| 1139 |
|
| 1140 |
Object.defineProperties( VNode.prototype, prototypeAccessors ); |
| 1141 |
|
| 1142 |
var createEmptyVNode = function (text) { |
| 1143 |
if ( text === void 0 ) text = ''; |
| 1144 |
|
| 1145 |
var node = new VNode(); |
| 1146 |
node.text = text; |
| 1147 |
node.isComment = true; |
| 1148 |
return node |
| 1149 |
}; |
| 1150 |
|
| 1151 |
function createTextVNode (val) { |
| 1152 |
return new VNode(undefined, undefined, undefined, String(val)) |
| 1153 |
} |
| 1154 |
|
| 1155 |
// optimized shallow clone |
| 1156 |
// used for static nodes and slot nodes because they may be reused across |
| 1157 |
// multiple renders, cloning them avoids errors when DOM manipulations rely |
| 1158 |
// on their elm reference. |
| 1159 |
function cloneVNode (vnode) { |
| 1160 |
var cloned = new VNode( |
| 1161 |
vnode.tag, |
| 1162 |
vnode.data, |
| 1163 |
vnode.children, |
| 1164 |
vnode.text, |
| 1165 |
vnode.elm, |
| 1166 |
vnode.context, |
| 1167 |
vnode.componentOptions, |
| 1168 |
vnode.asyncFactory |
| 1169 |
); |
| 1170 |
cloned.ns = vnode.ns; |
| 1171 |
cloned.isStatic = vnode.isStatic; |
| 1172 |
cloned.key = vnode.key; |
| 1173 |
cloned.isComment = vnode.isComment; |
| 1174 |
cloned.fnContext = vnode.fnContext; |
| 1175 |
cloned.fnOptions = vnode.fnOptions; |
| 1176 |
cloned.fnScopeId = vnode.fnScopeId; |
| 1177 |
cloned.isCloned = true; |
| 1178 |
return cloned |
| 1179 |
} |
| 1180 |
|
| 1181 |
/* |
| 1182 |
* not type checking this file because flow doesn't play well with |
| 1183 |
* dynamically accessing methods on Array prototype |
| 1184 |
*/ |
| 1185 |
|
| 1186 |
var arrayProto = Array.prototype; |
| 1187 |
var arrayMethods = Object.create(arrayProto); |
| 1188 |
|
| 1189 |
var methodsToPatch = [ |
| 1190 |
'push', |
| 1191 |
'pop', |
| 1192 |
'shift', |
| 1193 |
'unshift', |
| 1194 |
'splice', |
| 1195 |
'sort', |
| 1196 |
'reverse' |
| 1197 |
]; |
| 1198 |
|
| 1199 |
/** |
| 1200 |
* Intercept mutating methods and emit events |
| 1201 |
*/ |
| 1202 |
methodsToPatch.forEach(function (method) { |
| 1203 |
// cache original method |
| 1204 |
var original = arrayProto[method]; |
| 1205 |
def(arrayMethods, method, function mutator () { |
| 1206 |
var args = [], len = arguments.length; |
| 1207 |
while ( len-- ) args[ len ] = arguments[ len ]; |
| 1208 |
|
| 1209 |
var result = original.apply(this, args); |
| 1210 |
var ob = this.__ob__; |
| 1211 |
var inserted; |
| 1212 |
switch (method) { |
| 1213 |
case 'push': |
| 1214 |
case 'unshift': |
| 1215 |
inserted = args; |
| 1216 |
break |
| 1217 |
case 'splice': |
| 1218 |
inserted = args.slice(2); |
| 1219 |
break |
| 1220 |
} |
| 1221 |
if (inserted) { ob.observeArray(inserted); } |
| 1222 |
// notify change |
| 1223 |
ob.dep.notify(); |
| 1224 |
return result |
| 1225 |
}); |
| 1226 |
}); |
| 1227 |
|
| 1228 |
/* */ |
| 1229 |
|
| 1230 |
var arrayKeys = Object.getOwnPropertyNames(arrayMethods); |
| 1231 |
|
| 1232 |
/** |
| 1233 |
* In some cases we may want to disable observation inside a component's |
| 1234 |
* update computation. |
| 1235 |
*/ |
| 1236 |
var shouldObserve = true; |
| 1237 |
|
| 1238 |
function toggleObserving (value) { |
| 1239 |
shouldObserve = value; |
| 1240 |
} |
| 1241 |
|
| 1242 |
/** |
| 1243 |
* Observer class that is attached to each observed |
| 1244 |
* object. Once attached, the observer converts the target |
| 1245 |
* object's property keys into getter/setters that |
| 1246 |
* collect dependencies and dispatch updates. |
| 1247 |
*/ |
| 1248 |
var Observer = function Observer (value) { |
| 1249 |
this.value = value; |
| 1250 |
this.dep = new Dep(); |
| 1251 |
this.vmCount = 0; |
| 1252 |
def(value, '__ob__', this); |
| 1253 |
if (Array.isArray(value)) { |
| 1254 |
var augment = hasProto |
| 1255 |
? protoAugment |
| 1256 |
: copyAugment; |
| 1257 |
augment(value, arrayMethods, arrayKeys); |
| 1258 |
this.observeArray(value); |
| 1259 |
} else { |
| 1260 |
this.walk(value); |
| 1261 |
} |
| 1262 |
}; |
| 1263 |
|
| 1264 |
/** |
| 1265 |
* Walk through each property and convert them into |
| 1266 |
* getter/setters. This method should only be called when |
| 1267 |
* value type is Object. |
| 1268 |
*/ |
| 1269 |
Observer.prototype.walk = function walk (obj) { |
| 1270 |
var keys = Object.keys(obj); |
| 1271 |
for (var i = 0; i < keys.length; i++) { |
| 1272 |
defineReactive(obj, keys[i]); |
| 1273 |
} |
| 1274 |
}; |
| 1275 |
|
| 1276 |
/** |
| 1277 |
* Observe a list of Array items. |
| 1278 |
*/ |
| 1279 |
Observer.prototype.observeArray = function observeArray (items) { |
| 1280 |
for (var i = 0, l = items.length; i < l; i++) { |
| 1281 |
observe(items[i]); |
| 1282 |
} |
| 1283 |
}; |
| 1284 |
|
| 1285 |
// helpers |
| 1286 |
|
| 1287 |
/** |
| 1288 |
* Augment an target Object or Array by intercepting |
| 1289 |
* the prototype chain using __proto__ |
| 1290 |
*/ |
| 1291 |
function protoAugment (target, src, keys) { |
| 1292 |
/* eslint-disable no-proto */ |
| 1293 |
target.__proto__ = src; |
| 1294 |
/* eslint-enable no-proto */ |
| 1295 |
} |
| 1296 |
|
| 1297 |
/** |
| 1298 |
* Augment an target Object or Array by defining |
| 1299 |
* hidden properties. |
| 1300 |
*/ |
| 1301 |
/* istanbul ignore next */ |
| 1302 |
function copyAugment (target, src, keys) { |
| 1303 |
for (var i = 0, l = keys.length; i < l; i++) { |
| 1304 |
var key = keys[i]; |
| 1305 |
def(target, key, src[key]); |
| 1306 |
} |
| 1307 |
} |
| 1308 |
|
| 1309 |
/** |
| 1310 |
* Attempt to create an observer instance for a value, |
| 1311 |
* returns the new observer if successfully observed, |
| 1312 |
* or the existing observer if the value already has one. |
| 1313 |
*/ |
| 1314 |
function observe (value, asRootData) { |
| 1315 |
if (!isObject(value) || value instanceof VNode) { |
| 1316 |
return |
| 1317 |
} |
| 1318 |
var ob; |
| 1319 |
if (hasOwn(value, '__ob__') && value.__ob__ instanceof Observer) { |
| 1320 |
ob = value.__ob__; |
| 1321 |
} else if ( |
| 1322 |
shouldObserve && |
| 1323 |
!isServerRendering() && |
| 1324 |
(Array.isArray(value) || isPlainObject(value)) && |
| 1325 |
Object.isExtensible(value) && |
| 1326 |
!value._isVue |
| 1327 |
) { |
| 1328 |
ob = new Observer(value); |
| 1329 |
} |
| 1330 |
if (asRootData && ob) { |
| 1331 |
ob.vmCount++; |
| 1332 |
} |
| 1333 |
return ob |
| 1334 |
} |
| 1335 |
|
| 1336 |
/** |
| 1337 |
* Define a reactive property on an Object. |
| 1338 |
*/ |
| 1339 |
function defineReactive ( |
| 1340 |
obj, |
| 1341 |
key, |
| 1342 |
val, |
| 1343 |
customSetter, |
| 1344 |
shallow |
| 1345 |
) { |
| 1346 |
var dep = new Dep(); |
| 1347 |
|
| 1348 |
var property = Object.getOwnPropertyDescriptor(obj, key); |
| 1349 |
if (property && property.configurable === false) { |
| 1350 |
return |
| 1351 |
} |
| 1352 |
|
| 1353 |
// cater for pre-defined getter/setters |
| 1354 |
var getter = property && property.get; |
| 1355 |
if (!getter && arguments.length === 2) { |
| 1356 |
val = obj[key]; |
| 1357 |
} |
| 1358 |
var setter = property && property.set; |
| 1359 |
|
| 1360 |
var childOb = !shallow && observe(val); |
| 1361 |
Object.defineProperty(obj, key, { |
| 1362 |
enumerable: true, |
| 1363 |
configurable: true, |
| 1364 |
get: function reactiveGetter () { |
| 1365 |
var value = getter ? getter.call(obj) : val; |
| 1366 |
if (Dep.target) { |
| 1367 |
dep.depend(); |
| 1368 |
if (childOb) { |
| 1369 |
childOb.dep.depend(); |
| 1370 |
if (Array.isArray(value)) { |
| 1371 |
dependArray(value); |
| 1372 |
} |
| 1373 |
} |
| 1374 |
} |
| 1375 |
return value |
| 1376 |
}, |
| 1377 |
set: function reactiveSetter (newVal) { |
| 1378 |
var value = getter ? getter.call(obj) : val; |
| 1379 |
/* eslint-disable no-self-compare */ |
| 1380 |
if (newVal === value || (newVal !== newVal && value !== value)) { |
| 1381 |
return |
| 1382 |
} |
| 1383 |
/* eslint-enable no-self-compare */ |
| 1384 |
if (process.env.NODE_ENV !== 'production' && customSetter) { |
| 1385 |
customSetter(); |
| 1386 |
} |
| 1387 |
if (setter) { |
| 1388 |
setter.call(obj, newVal); |
| 1389 |
} else { |
| 1390 |
val = newVal; |
| 1391 |
} |
| 1392 |
childOb = !shallow && observe(newVal); |
| 1393 |
dep.notify(); |
| 1394 |
} |
| 1395 |
}); |
| 1396 |
} |
| 1397 |
|
| 1398 |
/** |
| 1399 |
* Set a property on an object. Adds the new property and |
| 1400 |
* triggers change notification if the property doesn't |
| 1401 |
* already exist. |
| 1402 |
*/ |
| 1403 |
function set (target, key, val) { |
| 1404 |
if (process.env.NODE_ENV !== 'production' && |
| 1405 |
(isUndef(target) || isPrimitive(target)) |
| 1406 |
) { |
| 1407 |
warn(("Cannot set reactive property on undefined, null, or primitive value: " + ((target)))); |
| 1408 |
} |
| 1409 |
if (Array.isArray(target) && isValidArrayIndex(key)) { |
| 1410 |
target.length = Math.max(target.length, key); |
| 1411 |
target.splice(key, 1, val); |
| 1412 |
return val |
| 1413 |
} |
| 1414 |
if (key in target && !(key in Object.prototype)) { |
| 1415 |
target[key] = val; |
| 1416 |
return val |
| 1417 |
} |
| 1418 |
var ob = (target).__ob__; |
| 1419 |
if (target._isVue || (ob && ob.vmCount)) { |
| 1420 |
process.env.NODE_ENV !== 'production' && warn( |
| 1421 |
'Avoid adding reactive properties to a Vue instance or its root $data ' + |
| 1422 |
'at runtime - declare it upfront in the data option.' |
| 1423 |
); |
| 1424 |
return val |
| 1425 |
} |
| 1426 |
if (!ob) { |
| 1427 |
target[key] = val; |
| 1428 |
return val |
| 1429 |
} |
| 1430 |
defineReactive(ob.value, key, val); |
| 1431 |
ob.dep.notify(); |
| 1432 |
return val |
| 1433 |
} |
| 1434 |
|
| 1435 |
/** |
| 1436 |
* Delete a property and trigger change if necessary. |
| 1437 |
*/ |
| 1438 |
function del (target, key) { |
| 1439 |
if (process.env.NODE_ENV !== 'production' && |
| 1440 |
(isUndef(target) || isPrimitive(target)) |
| 1441 |
) { |
| 1442 |
warn(("Cannot delete reactive property on undefined, null, or primitive value: " + ((target)))); |
| 1443 |
} |
| 1444 |
if (Array.isArray(target) && isValidArrayIndex(key)) { |
| 1445 |
target.splice(key, 1); |
| 1446 |
return |
| 1447 |
} |
| 1448 |
var ob = (target).__ob__; |
| 1449 |
if (target._isVue || (ob && ob.vmCount)) { |
| 1450 |
process.env.NODE_ENV !== 'production' && warn( |
| 1451 |
'Avoid deleting properties on a Vue instance or its root $data ' + |
| 1452 |
'- just set it to null.' |
| 1453 |
); |
| 1454 |
return |
| 1455 |
} |
| 1456 |
if (!hasOwn(target, key)) { |
| 1457 |
return |
| 1458 |
} |
| 1459 |
delete target[key]; |
| 1460 |
if (!ob) { |
| 1461 |
return |
| 1462 |
} |
| 1463 |
ob.dep.notify(); |
| 1464 |
} |
| 1465 |
|
| 1466 |
/** |
| 1467 |
* Collect dependencies on array elements when the array is touched, since |
| 1468 |
* we cannot intercept array element access like property getters. |
| 1469 |
*/ |
| 1470 |
function dependArray (value) { |
| 1471 |
for (var e = (void 0), i = 0, l = value.length; i < l; i++) { |
| 1472 |
e = value[i]; |
| 1473 |
e && e.__ob__ && e.__ob__.dep.depend(); |
| 1474 |
if (Array.isArray(e)) { |
| 1475 |
dependArray(e); |
| 1476 |
} |
| 1477 |
} |
| 1478 |
} |
| 1479 |
|
| 1480 |
/* */ |
| 1481 |
|
| 1482 |
/** |
| 1483 |
* Option overwriting strategies are functions that handle |
| 1484 |
* how to merge a parent option value and a child option |
| 1485 |
* value into the final value. |
| 1486 |
*/ |
| 1487 |
var strats = config.optionMergeStrategies; |
| 1488 |
|
| 1489 |
/** |
| 1490 |
* Options with restrictions |
| 1491 |
*/ |
| 1492 |
if (process.env.NODE_ENV !== 'production') { |
| 1493 |
strats.el = strats.propsData = function (parent, child, vm, key) { |
| 1494 |
if (!vm) { |
| 1495 |
warn( |
| 1496 |
"option \"" + key + "\" can only be used during instance " + |
| 1497 |
'creation with the `new` keyword.' |
| 1498 |
); |
| 1499 |
} |
| 1500 |
return defaultStrat(parent, child) |
| 1501 |
}; |
| 1502 |
} |
| 1503 |
|
| 1504 |
/** |
| 1505 |
* Helper that recursively merges two data objects together. |
| 1506 |
*/ |
| 1507 |
function mergeData (to, from) { |
| 1508 |
if (!from) { return to } |
| 1509 |
var key, toVal, fromVal; |
| 1510 |
var keys = Object.keys(from); |
| 1511 |
for (var i = 0; i < keys.length; i++) { |
| 1512 |
key = keys[i]; |
| 1513 |
toVal = to[key]; |
| 1514 |
fromVal = from[key]; |
| 1515 |
if (!hasOwn(to, key)) { |
| 1516 |
set(to, key, fromVal); |
| 1517 |
} else if (isPlainObject(toVal) && isPlainObject(fromVal)) { |
| 1518 |
mergeData(toVal, fromVal); |
| 1519 |
} |
| 1520 |
} |
| 1521 |
return to |
| 1522 |
} |
| 1523 |
|
| 1524 |
/** |
| 1525 |
* Data |
| 1526 |
*/ |
| 1527 |
function mergeDataOrFn ( |
| 1528 |
parentVal, |
| 1529 |
childVal, |
| 1530 |
vm |
| 1531 |
) { |
| 1532 |
if (!vm) { |
| 1533 |
// in a Vue.extend merge, both should be functions |
| 1534 |
if (!childVal) { |
| 1535 |
return parentVal |
| 1536 |
} |
| 1537 |
if (!parentVal) { |
| 1538 |
return childVal |
| 1539 |
} |
| 1540 |
// when parentVal & childVal are both present, |
| 1541 |
// we need to return a function that returns the |
| 1542 |
// merged result of both functions... no need to |
| 1543 |
// check if parentVal is a function here because |
| 1544 |
// it has to be a function to pass previous merges. |
| 1545 |
return function mergedDataFn () { |
| 1546 |
return mergeData( |
| 1547 |
typeof childVal === 'function' ? childVal.call(this, this) : childVal, |
| 1548 |
typeof parentVal === 'function' ? parentVal.call(this, this) : parentVal |
| 1549 |
) |
| 1550 |
} |
| 1551 |
} else { |
| 1552 |
return function mergedInstanceDataFn () { |
| 1553 |
// instance merge |
| 1554 |
var instanceData = typeof childVal === 'function' |
| 1555 |
? childVal.call(vm, vm) |
| 1556 |
: childVal; |
| 1557 |
var defaultData = typeof parentVal === 'function' |
| 1558 |
? parentVal.call(vm, vm) |
| 1559 |
: parentVal; |
| 1560 |
if (instanceData) { |
| 1561 |
return mergeData(instanceData, defaultData) |
| 1562 |
} else { |
| 1563 |
return defaultData |
| 1564 |
} |
| 1565 |
} |
| 1566 |
} |
| 1567 |
} |
| 1568 |
|
| 1569 |
strats.data = function ( |
| 1570 |
parentVal, |
| 1571 |
childVal, |
| 1572 |
vm |
| 1573 |
) { |
| 1574 |
if (!vm) { |
| 1575 |
if (childVal && typeof childVal !== 'function') { |
| 1576 |
process.env.NODE_ENV !== 'production' && warn( |
| 1577 |
'The "data" option should be a function ' + |
| 1578 |
'that returns a per-instance value in component ' + |
| 1579 |
'definitions.', |
| 1580 |
vm |
| 1581 |
); |
| 1582 |
|
| 1583 |
return parentVal |
| 1584 |
} |
| 1585 |
return mergeDataOrFn(parentVal, childVal) |
| 1586 |
} |
| 1587 |
|
| 1588 |
return mergeDataOrFn(parentVal, childVal, vm) |
| 1589 |
}; |
| 1590 |
|
| 1591 |
/** |
| 1592 |
* Hooks and props are merged as arrays. |
| 1593 |
*/ |
| 1594 |
function mergeHook ( |
| 1595 |
parentVal, |
| 1596 |
childVal |
| 1597 |
) { |
| 1598 |
return childVal |
| 1599 |
? parentVal |
| 1600 |
? parentVal.concat(childVal) |
| 1601 |
: Array.isArray(childVal) |
| 1602 |
? childVal |
| 1603 |
: [childVal] |
| 1604 |
: parentVal |
| 1605 |
} |
| 1606 |
|
| 1607 |
LIFECYCLE_HOOKS.forEach(function (hook) { |
| 1608 |
strats[hook] = mergeHook; |
| 1609 |
}); |
| 1610 |
|
| 1611 |
/** |
| 1612 |
* Assets |
| 1613 |
* |
| 1614 |
* When a vm is present (instance creation), we need to do |
| 1615 |
* a three-way merge between constructor options, instance |
| 1616 |
* options and parent options. |
| 1617 |
*/ |
| 1618 |
function mergeAssets ( |
| 1619 |
parentVal, |
| 1620 |
childVal, |
| 1621 |
vm, |
| 1622 |
key |
| 1623 |
) { |
| 1624 |
var res = Object.create(parentVal || null); |
| 1625 |
if (childVal) { |
| 1626 |
process.env.NODE_ENV !== 'production' && assertObjectType(key, childVal, vm); |
| 1627 |
return extend(res, childVal) |
| 1628 |
} else { |
| 1629 |
return res |
| 1630 |
} |
| 1631 |
} |
| 1632 |
|
| 1633 |
ASSET_TYPES.forEach(function (type) { |
| 1634 |
strats[type + 's'] = mergeAssets; |
| 1635 |
}); |
| 1636 |
|
| 1637 |
/** |
| 1638 |
* Watchers. |
| 1639 |
* |
| 1640 |
* Watchers hashes should not overwrite one |
| 1641 |
* another, so we merge them as arrays. |
| 1642 |
*/ |
| 1643 |
strats.watch = function ( |
| 1644 |
parentVal, |
| 1645 |
childVal, |
| 1646 |
vm, |
| 1647 |
key |
| 1648 |
) { |
| 1649 |
// work around Firefox's Object.prototype.watch... |
| 1650 |
if (parentVal === nativeWatch) { parentVal = undefined; } |
| 1651 |
if (childVal === nativeWatch) { childVal = undefined; } |
| 1652 |
/* istanbul ignore if */ |
| 1653 |
if (!childVal) { return Object.create(parentVal || null) } |
| 1654 |
if (process.env.NODE_ENV !== 'production') { |
| 1655 |
assertObjectType(key, childVal, vm); |
| 1656 |
} |
| 1657 |
if (!parentVal) { return childVal } |
| 1658 |
var ret = {}; |
| 1659 |
extend(ret, parentVal); |
| 1660 |
for (var key$1 in childVal) { |
| 1661 |
var parent = ret[key$1]; |
| 1662 |
var child = childVal[key$1]; |
| 1663 |
if (parent && !Array.isArray(parent)) { |
| 1664 |
parent = [parent]; |
| 1665 |
} |
| 1666 |
ret[key$1] = parent |
| 1667 |
? parent.concat(child) |
| 1668 |
: Array.isArray(child) ? child : [child]; |
| 1669 |
} |
| 1670 |
return ret |
| 1671 |
}; |
| 1672 |
|
| 1673 |
/** |
| 1674 |
* Other object hashes. |
| 1675 |
*/ |
| 1676 |
strats.props = |
| 1677 |
strats.methods = |
| 1678 |
strats.inject = |
| 1679 |
strats.computed = function ( |
| 1680 |
parentVal, |
| 1681 |
childVal, |
| 1682 |
vm, |
| 1683 |
key |
| 1684 |
) { |
| 1685 |
if (childVal && process.env.NODE_ENV !== 'production') { |
| 1686 |
assertObjectType(key, childVal, vm); |
| 1687 |
} |
| 1688 |
if (!parentVal) { return childVal } |
| 1689 |
var ret = Object.create(null); |
| 1690 |
extend(ret, parentVal); |
| 1691 |
if (childVal) { extend(ret, childVal); } |
| 1692 |
return ret |
| 1693 |
}; |
| 1694 |
strats.provide = mergeDataOrFn; |
| 1695 |
|
| 1696 |
/** |
| 1697 |
* Default strategy. |
| 1698 |
*/ |
| 1699 |
var defaultStrat = function (parentVal, childVal) { |
| 1700 |
return childVal === undefined |
| 1701 |
? parentVal |
| 1702 |
: childVal |
| 1703 |
}; |
| 1704 |
|
| 1705 |
/** |
| 1706 |
* Validate component names |
| 1707 |
*/ |
| 1708 |
function checkComponents (options) { |
| 1709 |
for (var key in options.components) { |
| 1710 |
validateComponentName(key); |
| 1711 |
} |
| 1712 |
} |
| 1713 |
|
| 1714 |
function validateComponentName (name) { |
| 1715 |
if (!/^[a-zA-Z][\w-]*$/.test(name)) { |
| 1716 |
warn( |
| 1717 |
'Invalid component name: "' + name + '". Component names ' + |
| 1718 |
'can only contain alphanumeric characters and the hyphen, ' + |
| 1719 |
'and must start with a letter.' |
| 1720 |
); |
| 1721 |
} |
| 1722 |
if (isBuiltInTag(name) || config.isReservedTag(name)) { |
| 1723 |
warn( |
| 1724 |
'Do not use built-in or reserved HTML elements as component ' + |
| 1725 |
'id: ' + name |
| 1726 |
); |
| 1727 |
} |
| 1728 |
} |
| 1729 |
|
| 1730 |
/** |
| 1731 |
* Ensure all props option syntax are normalized into the |
| 1732 |
* Object-based format. |
| 1733 |
*/ |
| 1734 |
function normalizeProps (options, vm) { |
| 1735 |
var props = options.props; |
| 1736 |
if (!props) { return } |
| 1737 |
var res = {}; |
| 1738 |
var i, val, name; |
| 1739 |
if (Array.isArray(props)) { |
| 1740 |
i = props.length; |
| 1741 |
while (i--) { |
| 1742 |
val = props[i]; |
| 1743 |
if (typeof val === 'string') { |
| 1744 |
name = camelize(val); |
| 1745 |
res[name] = { type: null }; |
| 1746 |
} else if (process.env.NODE_ENV !== 'production') { |
| 1747 |
warn('props must be strings when using array syntax.'); |
| 1748 |
} |
| 1749 |
} |
| 1750 |
} else if (isPlainObject(props)) { |
| 1751 |
for (var key in props) { |
| 1752 |
val = props[key]; |
| 1753 |
name = camelize(key); |
| 1754 |
res[name] = isPlainObject(val) |
| 1755 |
? val |
| 1756 |
: { type: val }; |
| 1757 |
} |
| 1758 |
} else if (process.env.NODE_ENV !== 'production') { |
| 1759 |
warn( |
| 1760 |
"Invalid value for option \"props\": expected an Array or an Object, " + |
| 1761 |
"but got " + (toRawType(props)) + ".", |
| 1762 |
vm |
| 1763 |
); |
| 1764 |
} |
| 1765 |
options.props = res; |
| 1766 |
} |
| 1767 |
|
| 1768 |
/** |
| 1769 |
* Normalize all injections into Object-based format |
| 1770 |
*/ |
| 1771 |
function normalizeInject (options, vm) { |
| 1772 |
var inject = options.inject; |
| 1773 |
if (!inject) { return } |
| 1774 |
var normalized = options.inject = {}; |
| 1775 |
if (Array.isArray(inject)) { |
| 1776 |
for (var i = 0; i < inject.length; i++) { |
| 1777 |
normalized[inject[i]] = { from: inject[i] }; |
| 1778 |
} |
| 1779 |
} else if (isPlainObject(inject)) { |
| 1780 |
for (var key in inject) { |
| 1781 |
var val = inject[key]; |
| 1782 |
normalized[key] = isPlainObject(val) |
| 1783 |
? extend({ from: key }, val) |
| 1784 |
: { from: val }; |
| 1785 |
} |
| 1786 |
} else if (process.env.NODE_ENV !== 'production') { |
| 1787 |
warn( |
| 1788 |
"Invalid value for option \"inject\": expected an Array or an Object, " + |
| 1789 |
"but got " + (toRawType(inject)) + ".", |
| 1790 |
vm |
| 1791 |
); |
| 1792 |
} |
| 1793 |
} |
| 1794 |
|
| 1795 |
/** |
| 1796 |
* Normalize raw function directives into object format. |
| 1797 |
*/ |
| 1798 |
function normalizeDirectives (options) { |
| 1799 |
var dirs = options.directives; |
| 1800 |
if (dirs) { |
| 1801 |
for (var key in dirs) { |
| 1802 |
var def = dirs[key]; |
| 1803 |
if (typeof def === 'function') { |
| 1804 |
dirs[key] = { bind: def, update: def }; |
| 1805 |
} |
| 1806 |
} |
| 1807 |
} |
| 1808 |
} |
| 1809 |
|
| 1810 |
function assertObjectType (name, value, vm) { |
| 1811 |
if (!isPlainObject(value)) { |
| 1812 |
warn( |
| 1813 |
"Invalid value for option \"" + name + "\": expected an Object, " + |
| 1814 |
"but got " + (toRawType(value)) + ".", |
| 1815 |
vm |
| 1816 |
); |
| 1817 |
} |
| 1818 |
} |
| 1819 |
|
| 1820 |
/** |
| 1821 |
* Merge two option objects into a new one. |
| 1822 |
* Core utility used in both instantiation and inheritance. |
| 1823 |
*/ |
| 1824 |
function mergeOptions ( |
| 1825 |
parent, |
| 1826 |
child, |
| 1827 |
vm |
| 1828 |
) { |
| 1829 |
if (process.env.NODE_ENV !== 'production') { |
| 1830 |
checkComponents(child); |
| 1831 |
} |
| 1832 |
|
| 1833 |
if (typeof child === 'function') { |
| 1834 |
child = child.options; |
| 1835 |
} |
| 1836 |
|
| 1837 |
normalizeProps(child, vm); |
| 1838 |
normalizeInject(child, vm); |
| 1839 |
normalizeDirectives(child); |
| 1840 |
var extendsFrom = child.extends; |
| 1841 |
if (extendsFrom) { |
| 1842 |
parent = mergeOptions(parent, extendsFrom, vm); |
| 1843 |
} |
| 1844 |
if (child.mixins) { |
| 1845 |
for (var i = 0, l = child.mixins.length; i < l; i++) { |
| 1846 |
parent = mergeOptions(parent, child.mixins[i], vm); |
| 1847 |
} |
| 1848 |
} |
| 1849 |
var options = {}; |
| 1850 |
var key; |
| 1851 |
for (key in parent) { |
| 1852 |
mergeField(key); |
| 1853 |
} |
| 1854 |
for (key in child) { |
| 1855 |
if (!hasOwn(parent, key)) { |
| 1856 |
mergeField(key); |
| 1857 |
} |
| 1858 |
} |
| 1859 |
function mergeField (key) { |
| 1860 |
var strat = strats[key] || defaultStrat; |
| 1861 |
options[key] = strat(parent[key], child[key], vm, key); |
| 1862 |
} |
| 1863 |
return options |
| 1864 |
} |
| 1865 |
|
| 1866 |
/** |
| 1867 |
* Resolve an asset. |
| 1868 |
* This function is used because child instances need access |
| 1869 |
* to assets defined in its ancestor chain. |
| 1870 |
*/ |
| 1871 |
function resolveAsset ( |
| 1872 |
options, |
| 1873 |
type, |
| 1874 |
id, |
| 1875 |
warnMissing |
| 1876 |
) { |
| 1877 |
/* istanbul ignore if */ |
| 1878 |
if (typeof id !== 'string') { |
| 1879 |
return |
| 1880 |
} |
| 1881 |
var assets = options[type]; |
| 1882 |
// check local registration variations first |
| 1883 |
if (hasOwn(assets, id)) { return assets[id] } |
| 1884 |
var camelizedId = camelize(id); |
| 1885 |
if (hasOwn(assets, camelizedId)) { return assets[camelizedId] } |
| 1886 |
var PascalCaseId = capitalize(camelizedId); |
| 1887 |
if (hasOwn(assets, PascalCaseId)) { return assets[PascalCaseId] } |
| 1888 |
// fallback to prototype chain |
| 1889 |
var res = assets[id] || assets[camelizedId] || assets[PascalCaseId]; |
| 1890 |
if (process.env.NODE_ENV !== 'production' && warnMissing && !res) { |
| 1891 |
warn( |
| 1892 |
'Failed to resolve ' + type.slice(0, -1) + ': ' + id, |
| 1893 |
options |
| 1894 |
); |
| 1895 |
} |
| 1896 |
return res |
| 1897 |
} |
| 1898 |
|
| 1899 |
/* */ |
| 1900 |
|
| 1901 |
function validateProp ( |
| 1902 |
key, |
| 1903 |
propOptions, |
| 1904 |
propsData, |
| 1905 |
vm |
| 1906 |
) { |
| 1907 |
var prop = propOptions[key]; |
| 1908 |
var absent = !hasOwn(propsData, key); |
| 1909 |
var value = propsData[key]; |
| 1910 |
// boolean casting |
| 1911 |
var booleanIndex = getTypeIndex(Boolean, prop.type); |
| 1912 |
if (booleanIndex > -1) { |
| 1913 |
if (absent && !hasOwn(prop, 'default')) { |
| 1914 |
value = false; |
| 1915 |
} else if (value === '' || value === hyphenate(key)) { |
| 1916 |
// only cast empty string / same name to boolean if |
| 1917 |
// boolean has higher priority |
| 1918 |
var stringIndex = getTypeIndex(String, prop.type); |
| 1919 |
if (stringIndex < 0 || booleanIndex < stringIndex) { |
| 1920 |
value = true; |
| 1921 |
} |
| 1922 |
} |
| 1923 |
} |
| 1924 |
// check default value |
| 1925 |
if (value === undefined) { |
| 1926 |
value = getPropDefaultValue(vm, prop, key); |
| 1927 |
// since the default value is a fresh copy, |
| 1928 |
// make sure to observe it. |
| 1929 |
var prevShouldObserve = shouldObserve; |
| 1930 |
toggleObserving(true); |
| 1931 |
observe(value); |
| 1932 |
toggleObserving(prevShouldObserve); |
| 1933 |
} |
| 1934 |
if ( |
| 1935 |
process.env.NODE_ENV !== 'production' && |
| 1936 |
// skip validation for weex recycle-list child component props |
| 1937 |
!(false && isObject(value) && ('@binding' in value)) |
| 1938 |
) { |
| 1939 |
assertProp(prop, key, value, vm, absent); |
| 1940 |
} |
| 1941 |
return value |
| 1942 |
} |
| 1943 |
|
| 1944 |
/** |
| 1945 |
* Get the default value of a prop. |
| 1946 |
*/ |
| 1947 |
function getPropDefaultValue (vm, prop, key) { |
| 1948 |
// no default, return undefined |
| 1949 |
if (!hasOwn(prop, 'default')) { |
| 1950 |
return undefined |
| 1951 |
} |
| 1952 |
var def = prop.default; |
| 1953 |
// warn against non-factory defaults for Object & Array |
| 1954 |
if (process.env.NODE_ENV !== 'production' && isObject(def)) { |
| 1955 |
warn( |
| 1956 |
'Invalid default value for prop "' + key + '": ' + |
| 1957 |
'Props with type Object/Array must use a factory function ' + |
| 1958 |
'to return the default value.', |
| 1959 |
vm |
| 1960 |
); |
| 1961 |
} |
| 1962 |
// the raw prop value was also undefined from previous render, |
| 1963 |
// return previous default value to avoid unnecessary watcher trigger |
| 1964 |
if (vm && vm.$options.propsData && |
| 1965 |
vm.$options.propsData[key] === undefined && |
| 1966 |
vm._props[key] !== undefined |
| 1967 |
) { |
| 1968 |
return vm._props[key] |
| 1969 |
} |
| 1970 |
// call factory function for non-Function types |
| 1971 |
// a value is Function if its prototype is function even across different execution context |
| 1972 |
return typeof def === 'function' && getType(prop.type) !== 'Function' |
| 1973 |
? def.call(vm) |
| 1974 |
: def |
| 1975 |
} |
| 1976 |
|
| 1977 |
/** |
| 1978 |
* Assert whether a prop is valid. |
| 1979 |
*/ |
| 1980 |
function assertProp ( |
| 1981 |
prop, |
| 1982 |
name, |
| 1983 |
value, |
| 1984 |
vm, |
| 1985 |
absent |
| 1986 |
) { |
| 1987 |
if (prop.required && absent) { |
| 1988 |
warn( |
| 1989 |
'Missing required prop: "' + name + '"', |
| 1990 |
vm |
| 1991 |
); |
| 1992 |
return |
| 1993 |
} |
| 1994 |
if (value == null && !prop.required) { |
| 1995 |
return |
| 1996 |
} |
| 1997 |
var type = prop.type; |
| 1998 |
var valid = !type || type === true; |
| 1999 |
var expectedTypes = []; |
| 2000 |
if (type) { |
| 2001 |
if (!Array.isArray(type)) { |
| 2002 |
type = [type]; |
| 2003 |
} |
| 2004 |
for (var i = 0; i < type.length && !valid; i++) { |
| 2005 |
var assertedType = assertType(value, type[i]); |
| 2006 |
expectedTypes.push(assertedType.expectedType || ''); |
| 2007 |
valid = assertedType.valid; |
| 2008 |
} |
| 2009 |
} |
| 2010 |
if (!valid) { |
| 2011 |
warn( |
| 2012 |
"Invalid prop: type check failed for prop \"" + name + "\"." + |
| 2013 |
" Expected " + (expectedTypes.map(capitalize).join(', ')) + |
| 2014 |
", got " + (toRawType(value)) + ".", |
| 2015 |
vm |
| 2016 |
); |
| 2017 |
return |
| 2018 |
} |
| 2019 |
var validator = prop.validator; |
| 2020 |
if (validator) { |
| 2021 |
if (!validator(value)) { |
| 2022 |
warn( |
| 2023 |
'Invalid prop: custom validator check failed for prop "' + name + '".', |
| 2024 |
vm |
| 2025 |
); |
| 2026 |
} |
| 2027 |
} |
| 2028 |
} |
| 2029 |
|
| 2030 |
var simpleCheckRE = /^(String|Number|Boolean|Function|Symbol)$/; |
| 2031 |
|
| 2032 |
function assertType (value, type) { |
| 2033 |
var valid; |
| 2034 |
var expectedType = getType(type); |
| 2035 |
if (simpleCheckRE.test(expectedType)) { |
| 2036 |
var t = typeof value; |
| 2037 |
valid = t === expectedType.toLowerCase(); |
| 2038 |
// for primitive wrapper objects |
| 2039 |
if (!valid && t === 'object') { |
| 2040 |
valid = value instanceof type; |
| 2041 |
} |
| 2042 |
} else if (expectedType === 'Object') { |
| 2043 |
valid = isPlainObject(value); |
| 2044 |
} else if (expectedType === 'Array') { |
| 2045 |
valid = Array.isArray(value); |
| 2046 |
} else { |
| 2047 |
valid = value instanceof type; |
| 2048 |
} |
| 2049 |
return { |
| 2050 |
valid: valid, |
| 2051 |
expectedType: expectedType |
| 2052 |
} |
| 2053 |
} |
| 2054 |
|
| 2055 |
/** |
| 2056 |
* Use function string name to check built-in types, |
| 2057 |
* because a simple equality check will fail when running |
| 2058 |
* across different vms / iframes. |
| 2059 |
*/ |
| 2060 |
function getType (fn) { |
| 2061 |
var match = fn && fn.toString().match(/^\s*function (\w+)/); |
| 2062 |
return match ? match[1] : '' |
| 2063 |
} |
| 2064 |
|
| 2065 |
function isSameType (a, b) { |
| 2066 |
return getType(a) === getType(b) |
| 2067 |
} |
| 2068 |
|
| 2069 |
function getTypeIndex (type, expectedTypes) { |
| 2070 |
if (!Array.isArray(expectedTypes)) { |
| 2071 |
return isSameType(expectedTypes, type) ? 0 : -1 |
| 2072 |
} |
| 2073 |
for (var i = 0, len = expectedTypes.length; i < len; i++) { |
| 2074 |
if (isSameType(expectedTypes[i], type)) { |
| 2075 |
return i |
| 2076 |
} |
| 2077 |
} |
| 2078 |
return -1 |
| 2079 |
} |
| 2080 |
|
| 2081 |
/* */ |
| 2082 |
|
| 2083 |
function handleError (err, vm, info) { |
| 2084 |
if (vm) { |
| 2085 |
var cur = vm; |
| 2086 |
while ((cur = cur.$parent)) { |
| 2087 |
var hooks = cur.$options.errorCaptured; |
| 2088 |
if (hooks) { |
| 2089 |
for (var i = 0; i < hooks.length; i++) { |
| 2090 |
try { |
| 2091 |
var capture = hooks[i].call(cur, err, vm, info) === false; |
| 2092 |
if (capture) { return } |
| 2093 |
} catch (e) { |
| 2094 |
globalHandleError(e, cur, 'errorCaptured hook'); |
| 2095 |
} |
| 2096 |
} |
| 2097 |
} |
| 2098 |
} |
| 2099 |
} |
| 2100 |
globalHandleError(err, vm, info); |
| 2101 |
} |
| 2102 |
|
| 2103 |
function globalHandleError (err, vm, info) { |
| 2104 |
if (config.errorHandler) { |
| 2105 |
try { |
| 2106 |
return config.errorHandler.call(null, err, vm, info) |
| 2107 |
} catch (e) { |
| 2108 |
logError(e, null, 'config.errorHandler'); |
| 2109 |
} |
| 2110 |
} |
| 2111 |
logError(err, vm, info); |
| 2112 |
} |
| 2113 |
|
| 2114 |
function logError (err, vm, info) { |
| 2115 |
if (process.env.NODE_ENV !== 'production') { |
| 2116 |
warn(("Error in " + info + ": \"" + (err.toString()) + "\""), vm); |
| 2117 |
} |
| 2118 |
/* istanbul ignore else */ |
| 2119 |
if ((inBrowser || inWeex) && typeof console !== 'undefined') { |
| 2120 |
console.error(err); |
| 2121 |
} else { |
| 2122 |
throw err |
| 2123 |
} |
| 2124 |
} |
| 2125 |
|
| 2126 |
/* */ |
| 2127 |
/* globals MessageChannel */ |
| 2128 |
|
| 2129 |
var callbacks = []; |
| 2130 |
var pending = false; |
| 2131 |
|
| 2132 |
function flushCallbacks () { |
| 2133 |
pending = false; |
| 2134 |
var copies = callbacks.slice(0); |
| 2135 |
callbacks.length = 0; |
| 2136 |
for (var i = 0; i < copies.length; i++) { |
| 2137 |
copies[i](); |
| 2138 |
} |
| 2139 |
} |
| 2140 |
|
| 2141 |
// Here we have async deferring wrappers using both microtasks and (macro) tasks. |
| 2142 |
// In < 2.4 we used microtasks everywhere, but there are some scenarios where |
| 2143 |
// microtasks have too high a priority and fire in between supposedly |
| 2144 |
// sequential events (e.g. #4521, #6690) or even between bubbling of the same |
| 2145 |
// event (#6566). However, using (macro) tasks everywhere also has subtle problems |
| 2146 |
// when state is changed right before repaint (e.g. #6813, out-in transitions). |
| 2147 |
// Here we use microtask by default, but expose a way to force (macro) task when |
| 2148 |
// needed (e.g. in event handlers attached by v-on). |
| 2149 |
var microTimerFunc; |
| 2150 |
var macroTimerFunc; |
| 2151 |
var useMacroTask = false; |
| 2152 |
|
| 2153 |
// Determine (macro) task defer implementation. |
| 2154 |
// Technically setImmediate should be the ideal choice, but it's only available |
| 2155 |
// in IE. The only polyfill that consistently queues the callback after all DOM |
| 2156 |
// events triggered in the same loop is by using MessageChannel. |
| 2157 |
/* istanbul ignore if */ |
| 2158 |
if (typeof setImmediate !== 'undefined' && isNative(setImmediate)) { |
| 2159 |
macroTimerFunc = function () { |
| 2160 |
setImmediate(flushCallbacks); |
| 2161 |
}; |
| 2162 |
} else if (typeof MessageChannel !== 'undefined' && ( |
| 2163 |
isNative(MessageChannel) || |
| 2164 |
// PhantomJS |
| 2165 |
MessageChannel.toString() === '[object MessageChannelConstructor]' |
| 2166 |
)) { |
| 2167 |
var channel = new MessageChannel(); |
| 2168 |
var port = channel.port2; |
| 2169 |
channel.port1.onmessage = flushCallbacks; |
| 2170 |
macroTimerFunc = function () { |
| 2171 |
port.postMessage(1); |
| 2172 |
}; |
| 2173 |
} else { |
| 2174 |
/* istanbul ignore next */ |
| 2175 |
macroTimerFunc = function () { |
| 2176 |
setTimeout(flushCallbacks, 0); |
| 2177 |
}; |
| 2178 |
} |
| 2179 |
|
| 2180 |
// Determine microtask defer implementation. |
| 2181 |
/* istanbul ignore next, $flow-disable-line */ |
| 2182 |
if (typeof Promise !== 'undefined' && isNative(Promise)) { |
| 2183 |
var p = Promise.resolve(); |
| 2184 |
microTimerFunc = function () { |
| 2185 |
p.then(flushCallbacks); |
| 2186 |
// in problematic UIWebViews, Promise.then doesn't completely break, but |
| 2187 |
// it can get stuck in a weird state where callbacks are pushed into the |
| 2188 |
// microtask queue but the queue isn't being flushed, until the browser |
| 2189 |
// needs to do some other work, e.g. handle a timer. Therefore we can |
| 2190 |
// "force" the microtask queue to be flushed by adding an empty timer. |
| 2191 |
if (isIOS) { setTimeout(noop); } |
| 2192 |
}; |
| 2193 |
} else { |
| 2194 |
// fallback to macro |
| 2195 |
microTimerFunc = macroTimerFunc; |
| 2196 |
} |
| 2197 |
|
| 2198 |
/** |
| 2199 |
* Wrap a function so that if any code inside triggers state change, |
| 2200 |
* the changes are queued using a (macro) task instead of a microtask. |
| 2201 |
*/ |
| 2202 |
function withMacroTask (fn) { |
| 2203 |
return fn._withTask || (fn._withTask = function () { |
| 2204 |
useMacroTask = true; |
| 2205 |
var res = fn.apply(null, arguments); |
| 2206 |
useMacroTask = false; |
| 2207 |
return res |
| 2208 |
}) |
| 2209 |
} |
| 2210 |
|
| 2211 |
function nextTick (cb, ctx) { |
| 2212 |
var _resolve; |
| 2213 |
callbacks.push(function () { |
| 2214 |
if (cb) { |
| 2215 |
try { |
| 2216 |
cb.call(ctx); |
| 2217 |
} catch (e) { |
| 2218 |
handleError(e, ctx, 'nextTick'); |
| 2219 |
} |
| 2220 |
} else if (_resolve) { |
| 2221 |
_resolve(ctx); |
| 2222 |
} |
| 2223 |
}); |
| 2224 |
if (!pending) { |
| 2225 |
pending = true; |
| 2226 |
if (useMacroTask) { |
| 2227 |
macroTimerFunc(); |
| 2228 |
} else { |
| 2229 |
microTimerFunc(); |
| 2230 |
} |
| 2231 |
} |
| 2232 |
// $flow-disable-line |
| 2233 |
if (!cb && typeof Promise !== 'undefined') { |
| 2234 |
return new Promise(function (resolve) { |
| 2235 |
_resolve = resolve; |
| 2236 |
}) |
| 2237 |
} |
| 2238 |
} |
| 2239 |
|
| 2240 |
/* */ |
| 2241 |
|
| 2242 |
var mark; |
| 2243 |
var measure; |
| 2244 |
|
| 2245 |
if (process.env.NODE_ENV !== 'production') { |
| 2246 |
var perf = inBrowser && window.performance; |
| 2247 |
/* istanbul ignore if */ |
| 2248 |
if ( |
| 2249 |
perf && |
| 2250 |
perf.mark && |
| 2251 |
perf.measure && |
| 2252 |
perf.clearMarks && |
| 2253 |
perf.clearMeasures |
| 2254 |
) { |
| 2255 |
mark = function (tag) { return perf.mark(tag); }; |
| 2256 |
measure = function (name, startTag, endTag) { |
| 2257 |
perf.measure(name, startTag, endTag); |
| 2258 |
perf.clearMarks(startTag); |
| 2259 |
perf.clearMarks(endTag); |
| 2260 |
perf.clearMeasures(name); |
| 2261 |
}; |
| 2262 |
} |
| 2263 |
} |
| 2264 |
|
| 2265 |
/* not type checking this file because flow doesn't play well with Proxy */ |
| 2266 |
|
| 2267 |
var initProxy; |
| 2268 |
|
| 2269 |
if (process.env.NODE_ENV !== 'production') { |
| 2270 |
var allowedGlobals = makeMap( |
| 2271 |
'Infinity,undefined,NaN,isFinite,isNaN,' + |
| 2272 |
'parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,' + |
| 2273 |
'Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,' + |
| 2274 |
'require' // for Webpack/Browserify |
| 2275 |
); |
| 2276 |
|
| 2277 |
var warnNonPresent = function (target, key) { |
| 2278 |
warn( |
| 2279 |
"Property or method \"" + key + "\" is not defined on the instance but " + |
| 2280 |
'referenced during render. Make sure that this property is reactive, ' + |
| 2281 |
'either in the data option, or for class-based components, by ' + |
| 2282 |
'initializing the property. ' + |
| 2283 |
'See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.', |
| 2284 |
target |
| 2285 |
); |
| 2286 |
}; |
| 2287 |
|
| 2288 |
var hasProxy = |
| 2289 |
typeof Proxy !== 'undefined' && isNative(Proxy); |
| 2290 |
|
| 2291 |
if (hasProxy) { |
| 2292 |
var isBuiltInModifier = makeMap('stop,prevent,self,ctrl,shift,alt,meta,exact'); |
| 2293 |
config.keyCodes = new Proxy(config.keyCodes, { |
| 2294 |
set: function set (target, key, value) { |
| 2295 |
if (isBuiltInModifier(key)) { |
| 2296 |
warn(("Avoid overwriting built-in modifier in config.keyCodes: ." + key)); |
| 2297 |
return false |
| 2298 |
} else { |
| 2299 |
target[key] = value; |
| 2300 |
return true |
| 2301 |
} |
| 2302 |
} |
| 2303 |
}); |
| 2304 |
} |
| 2305 |
|
| 2306 |
var hasHandler = { |
| 2307 |
has: function has (target, key) { |
| 2308 |
var has = key in target; |
| 2309 |
var isAllowed = allowedGlobals(key) || key.charAt(0) === '_'; |
| 2310 |
if (!has && !isAllowed) { |
| 2311 |
warnNonPresent(target, key); |
| 2312 |
} |
| 2313 |
return has || !isAllowed |
| 2314 |
} |
| 2315 |
}; |
| 2316 |
|
| 2317 |
var getHandler = { |
| 2318 |
get: function get (target, key) { |
| 2319 |
if (typeof key === 'string' && !(key in target)) { |
| 2320 |
warnNonPresent(target, key); |
| 2321 |
} |
| 2322 |
return target[key] |
| 2323 |
} |
| 2324 |
}; |
| 2325 |
|
| 2326 |
initProxy = function initProxy (vm) { |
| 2327 |
if (hasProxy) { |
| 2328 |
// determine which proxy handler to use |
| 2329 |
var options = vm.$options; |
| 2330 |
var handlers = options.render && options.render._withStripped |
| 2331 |
? getHandler |
| 2332 |
: hasHandler; |
| 2333 |
vm._renderProxy = new Proxy(vm, handlers); |
| 2334 |
} else { |
| 2335 |
vm._renderProxy = vm; |
| 2336 |
} |
| 2337 |
}; |
| 2338 |
} |
| 2339 |
|
| 2340 |
/* */ |
| 2341 |
|
| 2342 |
var seenObjects = new _Set(); |
| 2343 |
|
| 2344 |
/** |
| 2345 |
* Recursively traverse an object to evoke all converted |
| 2346 |
* getters, so that every nested property inside the object |
| 2347 |
* is collected as a "deep" dependency. |
| 2348 |
*/ |
| 2349 |
function traverse (val) { |
| 2350 |
_traverse(val, seenObjects); |
| 2351 |
seenObjects.clear(); |
| 2352 |
} |
| 2353 |
|
| 2354 |
function _traverse (val, seen) { |
| 2355 |
var i, keys; |
| 2356 |
var isA = Array.isArray(val); |
| 2357 |
if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) { |
| 2358 |
return |
| 2359 |
} |
| 2360 |
if (val.__ob__) { |
| 2361 |
var depId = val.__ob__.dep.id; |
| 2362 |
if (seen.has(depId)) { |
| 2363 |
return |
| 2364 |
} |
| 2365 |
seen.add(depId); |
| 2366 |
} |
| 2367 |
if (isA) { |
| 2368 |
i = val.length; |
| 2369 |
while (i--) { _traverse(val[i], seen); } |
| 2370 |
} else { |
| 2371 |
keys = Object.keys(val); |
| 2372 |
i = keys.length; |
| 2373 |
while (i--) { _traverse(val[keys[i]], seen); } |
| 2374 |
} |
| 2375 |
} |
| 2376 |
|
| 2377 |
/* */ |
| 2378 |
|
| 2379 |
var normalizeEvent = cached(function (name) { |
| 2380 |
var passive = name.charAt(0) === '&'; |
| 2381 |
name = passive ? name.slice(1) : name; |
| 2382 |
var once$$1 = name.charAt(0) === '~'; // Prefixed last, checked first |
| 2383 |
name = once$$1 ? name.slice(1) : name; |
| 2384 |
var capture = name.charAt(0) === '!'; |
| 2385 |
name = capture ? name.slice(1) : name; |
| 2386 |
return { |
| 2387 |
name: name, |
| 2388 |
once: once$$1, |
| 2389 |
capture: capture, |
| 2390 |
passive: passive |
| 2391 |
} |
| 2392 |
}); |
| 2393 |
|
| 2394 |
function createFnInvoker (fns) { |
| 2395 |
function invoker () { |
| 2396 |
var arguments$1 = arguments; |
| 2397 |
|
| 2398 |
var fns = invoker.fns; |
| 2399 |
if (Array.isArray(fns)) { |
| 2400 |
var cloned = fns.slice(); |
| 2401 |
for (var i = 0; i < cloned.length; i++) { |
| 2402 |
cloned[i].apply(null, arguments$1); |
| 2403 |
} |
| 2404 |
} else { |
| 2405 |
// return handler return value for single handlers |
| 2406 |
return fns.apply(null, arguments) |
| 2407 |
} |
| 2408 |
} |
| 2409 |
invoker.fns = fns; |
| 2410 |
return invoker |
| 2411 |
} |
| 2412 |
|
| 2413 |
function updateListeners ( |
| 2414 |
on, |
| 2415 |
oldOn, |
| 2416 |
add, |
| 2417 |
remove$$1, |
| 2418 |
vm |
| 2419 |
) { |
| 2420 |
var name, def, cur, old, event; |
| 2421 |
for (name in on) { |
| 2422 |
def = cur = on[name]; |
| 2423 |
old = oldOn[name]; |
| 2424 |
event = normalizeEvent(name); |
| 2425 |
/* istanbul ignore if */ |
| 2426 |
if (isUndef(cur)) { |
| 2427 |
process.env.NODE_ENV !== 'production' && warn( |
| 2428 |
"Invalid handler for event \"" + (event.name) + "\": got " + String(cur), |
| 2429 |
vm |
| 2430 |
); |
| 2431 |
} else if (isUndef(old)) { |
| 2432 |
if (isUndef(cur.fns)) { |
| 2433 |
cur = on[name] = createFnInvoker(cur); |
| 2434 |
} |
| 2435 |
add(event.name, cur, event.once, event.capture, event.passive, event.params); |
| 2436 |
} else if (cur !== old) { |
| 2437 |
old.fns = cur; |
| 2438 |
on[name] = old; |
| 2439 |
} |
| 2440 |
} |
| 2441 |
for (name in oldOn) { |
| 2442 |
if (isUndef(on[name])) { |
| 2443 |
event = normalizeEvent(name); |
| 2444 |
remove$$1(event.name, oldOn[name], event.capture); |
| 2445 |
} |
| 2446 |
} |
| 2447 |
} |
| 2448 |
|
| 2449 |
/* */ |
| 2450 |
|
| 2451 |
function mergeVNodeHook (def, hookKey, hook) { |
| 2452 |
if (def instanceof VNode) { |
| 2453 |
def = def.data.hook || (def.data.hook = {}); |
| 2454 |
} |
| 2455 |
var invoker; |
| 2456 |
var oldHook = def[hookKey]; |
| 2457 |
|
| 2458 |
function wrappedHook () { |
| 2459 |
hook.apply(this, arguments); |
| 2460 |
// important: remove merged hook to ensure it's called only once |
| 2461 |
// and prevent memory leak |
| 2462 |
remove(invoker.fns, wrappedHook); |
| 2463 |
} |
| 2464 |
|
| 2465 |
if (isUndef(oldHook)) { |
| 2466 |
// no existing hook |
| 2467 |
invoker = createFnInvoker([wrappedHook]); |
| 2468 |
} else { |
| 2469 |
/* istanbul ignore if */ |
| 2470 |
if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { |
| 2471 |
// already a merged invoker |
| 2472 |
invoker = oldHook; |
| 2473 |
invoker.fns.push(wrappedHook); |
| 2474 |
} else { |
| 2475 |
// existing plain hook |
| 2476 |
invoker = createFnInvoker([oldHook, wrappedHook]); |
| 2477 |
} |
| 2478 |
} |
| 2479 |
|
| 2480 |
invoker.merged = true; |
| 2481 |
def[hookKey] = invoker; |
| 2482 |
} |
| 2483 |
|
| 2484 |
/* */ |
| 2485 |
|
| 2486 |
function extractPropsFromVNodeData ( |
| 2487 |
data, |
| 2488 |
Ctor, |
| 2489 |
tag |
| 2490 |
) { |
| 2491 |
// we are only extracting raw values here. |
| 2492 |
// validation and default values are handled in the child |
| 2493 |
// component itself. |
| 2494 |
var propOptions = Ctor.options.props; |
| 2495 |
if (isUndef(propOptions)) { |
| 2496 |
return |
| 2497 |
} |
| 2498 |
var res = {}; |
| 2499 |
var attrs = data.attrs; |
| 2500 |
var props = data.props; |
| 2501 |
if (isDef(attrs) || isDef(props)) { |
| 2502 |
for (var key in propOptions) { |
| 2503 |
var altKey = hyphenate(key); |
| 2504 |
if (process.env.NODE_ENV !== 'production') { |
| 2505 |
var keyInLowerCase = key.toLowerCase(); |
| 2506 |
if ( |
| 2507 |
key !== keyInLowerCase && |
| 2508 |
attrs && hasOwn(attrs, keyInLowerCase) |
| 2509 |
) { |
| 2510 |
tip( |
| 2511 |
"Prop \"" + keyInLowerCase + "\" is passed to component " + |
| 2512 |
(formatComponentName(tag || Ctor)) + ", but the declared prop name is" + |
| 2513 |
" \"" + key + "\". " + |
| 2514 |
"Note that HTML attributes are case-insensitive and camelCased " + |
| 2515 |
"props need to use their kebab-case equivalents when using in-DOM " + |
| 2516 |
"templates. You should probably use \"" + altKey + "\" instead of \"" + key + "\"." |
| 2517 |
); |
| 2518 |
} |
| 2519 |
} |
| 2520 |
checkProp(res, props, key, altKey, true) || |
| 2521 |
checkProp(res, attrs, key, altKey, false); |
| 2522 |
} |
| 2523 |
} |
| 2524 |
return res |
| 2525 |
} |
| 2526 |
|
| 2527 |
function checkProp ( |
| 2528 |
res, |
| 2529 |
hash, |
| 2530 |
key, |
| 2531 |
altKey, |
| 2532 |
preserve |
| 2533 |
) { |
| 2534 |
if (isDef(hash)) { |
| 2535 |
if (hasOwn(hash, key)) { |
| 2536 |
res[key] = hash[key]; |
| 2537 |
if (!preserve) { |
| 2538 |
delete hash[key]; |
| 2539 |
} |
| 2540 |
return true |
| 2541 |
} else if (hasOwn(hash, altKey)) { |
| 2542 |
res[key] = hash[altKey]; |
| 2543 |
if (!preserve) { |
| 2544 |
delete hash[altKey]; |
| 2545 |
} |
| 2546 |
return true |
| 2547 |
} |
| 2548 |
} |
| 2549 |
return false |
| 2550 |
} |
| 2551 |
|
| 2552 |
/* */ |
| 2553 |
|
| 2554 |
// The template compiler attempts to minimize the need for normalization by |
| 2555 |
// statically analyzing the template at compile time. |
| 2556 |
// |
| 2557 |
// For plain HTML markup, normalization can be completely skipped because the |
| 2558 |
// generated render function is guaranteed to return Array<VNode>. There are |
| 2559 |
// two cases where extra normalization is needed: |
| 2560 |
|
| 2561 |
// 1. When the children contains components - because a functional component |
| 2562 |
// may return an Array instead of a single root. In this case, just a simple |
| 2563 |
// normalization is needed - if any child is an Array, we flatten the whole |
| 2564 |
// thing with Array.prototype.concat. It is guaranteed to be only 1-level deep |
| 2565 |
// because functional components already normalize their own children. |
| 2566 |
function simpleNormalizeChildren (children) { |
| 2567 |
for (var i = 0; i < children.length; i++) { |
| 2568 |
if (Array.isArray(children[i])) { |
| 2569 |
return Array.prototype.concat.apply([], children) |
| 2570 |
} |
| 2571 |
} |
| 2572 |
return children |
| 2573 |
} |
| 2574 |
|
| 2575 |
// 2. When the children contains constructs that always generated nested Arrays, |
| 2576 |
// e.g. <template>, <slot>, v-for, or when the children is provided by user |
| 2577 |
// with hand-written render functions / JSX. In such cases a full normalization |
| 2578 |
// is needed to cater to all possible types of children values. |
| 2579 |
function normalizeChildren (children) { |
| 2580 |
return isPrimitive(children) |
| 2581 |
? [createTextVNode(children)] |
| 2582 |
: Array.isArray(children) |
| 2583 |
? normalizeArrayChildren(children) |
| 2584 |
: undefined |
| 2585 |
} |
| 2586 |
|
| 2587 |
function isTextNode (node) { |
| 2588 |
return isDef(node) && isDef(node.text) && isFalse(node.isComment) |
| 2589 |
} |
| 2590 |
|
| 2591 |
function normalizeArrayChildren (children, nestedIndex) { |
| 2592 |
var res = []; |
| 2593 |
var i, c, lastIndex, last; |
| 2594 |
for (i = 0; i < children.length; i++) { |
| 2595 |
c = children[i]; |
| 2596 |
if (isUndef(c) || typeof c === 'boolean') { continue } |
| 2597 |
lastIndex = res.length - 1; |
| 2598 |
last = res[lastIndex]; |
| 2599 |
// nested |
| 2600 |
if (Array.isArray(c)) { |
| 2601 |
if (c.length > 0) { |
| 2602 |
c = normalizeArrayChildren(c, ((nestedIndex || '') + "_" + i)); |
| 2603 |
// merge adjacent text nodes |
| 2604 |
if (isTextNode(c[0]) && isTextNode(last)) { |
| 2605 |
res[lastIndex] = createTextVNode(last.text + (c[0]).text); |
| 2606 |
c.shift(); |
| 2607 |
} |
| 2608 |
res.push.apply(res, c); |
| 2609 |
} |
| 2610 |
} else if (isPrimitive(c)) { |
| 2611 |
if (isTextNode(last)) { |
| 2612 |
// merge adjacent text nodes |
| 2613 |
// this is necessary for SSR hydration because text nodes are |
| 2614 |
// essentially merged when rendered to HTML strings |
| 2615 |
res[lastIndex] = createTextVNode(last.text + c); |
| 2616 |
} else if (c !== '') { |
| 2617 |
// convert primitive to vnode |
| 2618 |
res.push(createTextVNode(c)); |
| 2619 |
} |
| 2620 |
} else { |
| 2621 |
if (isTextNode(c) && isTextNode(last)) { |
| 2622 |
// merge adjacent text nodes |
| 2623 |
res[lastIndex] = createTextVNode(last.text + c.text); |
| 2624 |
} else { |
| 2625 |
// default key for nested array children (likely generated by v-for) |
| 2626 |
if (isTrue(children._isVList) && |
| 2627 |
isDef(c.tag) && |
| 2628 |
isUndef(c.key) && |
| 2629 |
isDef(nestedIndex)) { |
| 2630 |
c.key = "__vlist" + nestedIndex + "_" + i + "__"; |
| 2631 |
} |
| 2632 |
res.push(c); |
| 2633 |
} |
| 2634 |
} |
| 2635 |
} |
| 2636 |
return res |
| 2637 |
} |
| 2638 |
|
| 2639 |
/* */ |
| 2640 |
|
| 2641 |
function ensureCtor (comp, base) { |
| 2642 |
if ( |
| 2643 |
comp.__esModule || |
| 2644 |
(hasSymbol && comp[Symbol.toStringTag] === 'Module') |
| 2645 |
) { |
| 2646 |
comp = comp.default; |
| 2647 |
} |
| 2648 |
return isObject(comp) |
| 2649 |
? base.extend(comp) |
| 2650 |
: comp |
| 2651 |
} |
| 2652 |
|
| 2653 |
function createAsyncPlaceholder ( |
| 2654 |
factory, |
| 2655 |
data, |
| 2656 |
context, |
| 2657 |
children, |
| 2658 |
tag |
| 2659 |
) { |
| 2660 |
var node = createEmptyVNode(); |
| 2661 |
node.asyncFactory = factory; |
| 2662 |
node.asyncMeta = { data: data, context: context, children: children, tag: tag }; |
| 2663 |
return node |
| 2664 |
} |
| 2665 |
|
| 2666 |
function resolveAsyncComponent ( |
| 2667 |
factory, |
| 2668 |
baseCtor, |
| 2669 |
context |
| 2670 |
) { |
| 2671 |
if (isTrue(factory.error) && isDef(factory.errorComp)) { |
| 2672 |
return factory.errorComp |
| 2673 |
} |
| 2674 |
|
| 2675 |
if (isDef(factory.resolved)) { |
| 2676 |
return factory.resolved |
| 2677 |
} |
| 2678 |
|
| 2679 |
if (isTrue(factory.loading) && isDef(factory.loadingComp)) { |
| 2680 |
return factory.loadingComp |
| 2681 |
} |
| 2682 |
|
| 2683 |
if (isDef(factory.contexts)) { |
| 2684 |
// already pending |
| 2685 |
factory.contexts.push(context); |
| 2686 |
} else { |
| 2687 |
var contexts = factory.contexts = [context]; |
| 2688 |
var sync = true; |
| 2689 |
|
| 2690 |
var forceRender = function () { |
| 2691 |
for (var i = 0, l = contexts.length; i < l; i++) { |
| 2692 |
contexts[i].$forceUpdate(); |
| 2693 |
} |
| 2694 |
}; |
| 2695 |
|
| 2696 |
var resolve = once(function (res) { |
| 2697 |
// cache resolved |
| 2698 |
factory.resolved = ensureCtor(res, baseCtor); |
| 2699 |
// invoke callbacks only if this is not a synchronous resolve |
| 2700 |
// (async resolves are shimmed as synchronous during SSR) |
| 2701 |
if (!sync) { |
| 2702 |
forceRender(); |
| 2703 |
} |
| 2704 |
}); |
| 2705 |
|
| 2706 |
var reject = once(function (reason) { |
| 2707 |
process.env.NODE_ENV !== 'production' && warn( |
| 2708 |
"Failed to resolve async component: " + (String(factory)) + |
| 2709 |
(reason ? ("\nReason: " + reason) : '') |
| 2710 |
); |
| 2711 |
if (isDef(factory.errorComp)) { |
| 2712 |
factory.error = true; |
| 2713 |
forceRender(); |
| 2714 |
} |
| 2715 |
}); |
| 2716 |
|
| 2717 |
var res = factory(resolve, reject); |
| 2718 |
|
| 2719 |
if (isObject(res)) { |
| 2720 |
if (typeof res.then === 'function') { |
| 2721 |
// () => Promise |
| 2722 |
if (isUndef(factory.resolved)) { |
| 2723 |
res.then(resolve, reject); |
| 2724 |
} |
| 2725 |
} else if (isDef(res.component) && typeof res.component.then === 'function') { |
| 2726 |
res.component.then(resolve, reject); |
| 2727 |
|
| 2728 |
if (isDef(res.error)) { |
| 2729 |
factory.errorComp = ensureCtor(res.error, baseCtor); |
| 2730 |
} |
| 2731 |
|
| 2732 |
if (isDef(res.loading)) { |
| 2733 |
factory.loadingComp = ensureCtor(res.loading, baseCtor); |
| 2734 |
if (res.delay === 0) { |
| 2735 |
factory.loading = true; |
| 2736 |
} else { |
| 2737 |
setTimeout(function () { |
| 2738 |
if (isUndef(factory.resolved) && isUndef(factory.error)) { |
| 2739 |
factory.loading = true; |
| 2740 |
forceRender(); |
| 2741 |
} |
| 2742 |
}, res.delay || 200); |
| 2743 |
} |
| 2744 |
} |
| 2745 |
|
| 2746 |
if (isDef(res.timeout)) { |
| 2747 |
setTimeout(function () { |
| 2748 |
if (isUndef(factory.resolved)) { |
| 2749 |
reject( |
| 2750 |
process.env.NODE_ENV !== 'production' |
| 2751 |
? ("timeout (" + (res.timeout) + "ms)") |
| 2752 |
: null |
| 2753 |
); |
| 2754 |
} |
| 2755 |
}, res.timeout); |
| 2756 |
} |
| 2757 |
} |
| 2758 |
} |
| 2759 |
|
| 2760 |
sync = false; |
| 2761 |
// return in case resolved synchronously |
| 2762 |
return factory.loading |
| 2763 |
? factory.loadingComp |
| 2764 |
: factory.resolved |
| 2765 |
} |
| 2766 |
} |
| 2767 |
|
| 2768 |
/* */ |
| 2769 |
|
| 2770 |
function isAsyncPlaceholder (node) { |
| 2771 |
return node.isComment && node.asyncFactory |
| 2772 |
} |
| 2773 |
|
| 2774 |
/* */ |
| 2775 |
|
| 2776 |
function getFirstComponentChild (children) { |
| 2777 |
if (Array.isArray(children)) { |
| 2778 |
for (var i = 0; i < children.length; i++) { |
| 2779 |
var c = children[i]; |
| 2780 |
if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { |
| 2781 |
return c |
| 2782 |
} |
| 2783 |
} |
| 2784 |
} |
| 2785 |
} |
| 2786 |
|
| 2787 |
/* */ |
| 2788 |
|
| 2789 |
/* */ |
| 2790 |
|
| 2791 |
function initEvents (vm) { |
| 2792 |
vm._events = Object.create(null); |
| 2793 |
vm._hasHookEvent = false; |
| 2794 |
// init parent attached events |
| 2795 |
var listeners = vm.$options._parentListeners; |
| 2796 |
if (listeners) { |
| 2797 |
updateComponentListeners(vm, listeners); |
| 2798 |
} |
| 2799 |
} |
| 2800 |
|
| 2801 |
var target; |
| 2802 |
|
| 2803 |
function add (event, fn, once) { |
| 2804 |
if (once) { |
| 2805 |
target.$once(event, fn); |
| 2806 |
} else { |
| 2807 |
target.$on(event, fn); |
| 2808 |
} |
| 2809 |
} |
| 2810 |
|
| 2811 |
function remove$1 (event, fn) { |
| 2812 |
target.$off(event, fn); |
| 2813 |
} |
| 2814 |
|
| 2815 |
function updateComponentListeners ( |
| 2816 |
vm, |
| 2817 |
listeners, |
| 2818 |
oldListeners |
| 2819 |
) { |
| 2820 |
target = vm; |
| 2821 |
updateListeners(listeners, oldListeners || {}, add, remove$1, vm); |
| 2822 |
target = undefined; |
| 2823 |
} |
| 2824 |
|
| 2825 |
function eventsMixin (Vue) { |
| 2826 |
var hookRE = /^hook:/; |
| 2827 |
Vue.prototype.$on = function (event, fn) { |
| 2828 |
var this$1 = this; |
| 2829 |
|
| 2830 |
var vm = this; |
| 2831 |
if (Array.isArray(event)) { |
| 2832 |
for (var i = 0, l = event.length; i < l; i++) { |
| 2833 |
this$1.$on(event[i], fn); |
| 2834 |
} |
| 2835 |
} else { |
| 2836 |
(vm._events[event] || (vm._events[event] = [])).push(fn); |
| 2837 |
// optimize hook:event cost by using a boolean flag marked at registration |
| 2838 |
// instead of a hash lookup |
| 2839 |
if (hookRE.test(event)) { |
| 2840 |
vm._hasHookEvent = true; |
| 2841 |
} |
| 2842 |
} |
| 2843 |
return vm |
| 2844 |
}; |
| 2845 |
|
| 2846 |
Vue.prototype.$once = function (event, fn) { |
| 2847 |
var vm = this; |
| 2848 |
function on () { |
| 2849 |
vm.$off(event, on); |
| 2850 |
fn.apply(vm, arguments); |
| 2851 |
} |
| 2852 |
on.fn = fn; |
| 2853 |
vm.$on(event, on); |
| 2854 |
return vm |
| 2855 |
}; |
| 2856 |
|
| 2857 |
Vue.prototype.$off = function (event, fn) { |
| 2858 |
var this$1 = this; |
| 2859 |
|
| 2860 |
var vm = this; |
| 2861 |
// all |
| 2862 |
if (!arguments.length) { |
| 2863 |
vm._events = Object.create(null); |
| 2864 |
return vm |
| 2865 |
} |
| 2866 |
// array of events |
| 2867 |
if (Array.isArray(event)) { |
| 2868 |
for (var i = 0, l = event.length; i < l; i++) { |
| 2869 |
this$1.$off(event[i], fn); |
| 2870 |
} |
| 2871 |
return vm |
| 2872 |
} |
| 2873 |
// specific event |
| 2874 |
var cbs = vm._events[event]; |
| 2875 |
if (!cbs) { |
| 2876 |
return vm |
| 2877 |
} |
| 2878 |
if (!fn) { |
| 2879 |
vm._events[event] = null; |
| 2880 |
return vm |
| 2881 |
} |
| 2882 |
if (fn) { |
| 2883 |
// specific handler |
| 2884 |
var cb; |
| 2885 |
var i$1 = cbs.length; |
| 2886 |
while (i$1--) { |
| 2887 |
cb = cbs[i$1]; |
| 2888 |
if (cb === fn || cb.fn === fn) { |
| 2889 |
cbs.splice(i$1, 1); |
| 2890 |
break |
| 2891 |
} |
| 2892 |
} |
| 2893 |
} |
| 2894 |
return vm |
| 2895 |
}; |
| 2896 |
|
| 2897 |
Vue.prototype.$emit = function (event) { |
| 2898 |
var vm = this; |
| 2899 |
if (process.env.NODE_ENV !== 'production') { |
| 2900 |
var lowerCaseEvent = event.toLowerCase(); |
| 2901 |
if (lowerCaseEvent !== event && vm._events[lowerCaseEvent]) { |
| 2902 |
tip( |
| 2903 |
"Event \"" + lowerCaseEvent + "\" is emitted in component " + |
| 2904 |
(formatComponentName(vm)) + " but the handler is registered for \"" + event + "\". " + |
| 2905 |
"Note that HTML attributes are case-insensitive and you cannot use " + |
| 2906 |
"v-on to listen to camelCase events when using in-DOM templates. " + |
| 2907 |
"You should probably use \"" + (hyphenate(event)) + "\" instead of \"" + event + "\"." |
| 2908 |
); |
| 2909 |
} |
| 2910 |
} |
| 2911 |
var cbs = vm._events[event]; |
| 2912 |
if (cbs) { |
| 2913 |
cbs = cbs.length > 1 ? toArray(cbs) : cbs; |
| 2914 |
var args = toArray(arguments, 1); |
| 2915 |
for (var i = 0, l = cbs.length; i < l; i++) { |
| 2916 |
try { |
| 2917 |
cbs[i].apply(vm, args); |
| 2918 |
} catch (e) { |
| 2919 |
handleError(e, vm, ("event handler for \"" + event + "\"")); |
| 2920 |
} |
| 2921 |
} |
| 2922 |
} |
| 2923 |
return vm |
| 2924 |
}; |
| 2925 |
} |
| 2926 |
|
| 2927 |
/* */ |
| 2928 |
|
| 2929 |
|
| 2930 |
|
| 2931 |
/** |
| 2932 |
* Runtime helper for resolving raw children VNodes into a slot object. |
| 2933 |
*/ |
| 2934 |
function resolveSlots ( |
| 2935 |
children, |
| 2936 |
context |
| 2937 |
) { |
| 2938 |
var slots = {}; |
| 2939 |
if (!children) { |
| 2940 |
return slots |
| 2941 |
} |
| 2942 |
for (var i = 0, l = children.length; i < l; i++) { |
| 2943 |
var child = children[i]; |
| 2944 |
var data = child.data; |
| 2945 |
// remove slot attribute if the node is resolved as a Vue slot node |
| 2946 |
if (data && data.attrs && data.attrs.slot) { |
| 2947 |
delete data.attrs.slot; |
| 2948 |
} |
| 2949 |
// named slots should only be respected if the vnode was rendered in the |
| 2950 |
// same context. |
| 2951 |
if ((child.context === context || child.fnContext === context) && |
| 2952 |
data && data.slot != null |
| 2953 |
) { |
| 2954 |
var name = data.slot; |
| 2955 |
var slot = (slots[name] || (slots[name] = [])); |
| 2956 |
if (child.tag === 'template') { |
| 2957 |
slot.push.apply(slot, child.children || []); |
| 2958 |
} else { |
| 2959 |
slot.push(child); |
| 2960 |
} |
| 2961 |
} else { |
| 2962 |
(slots.default || (slots.default = [])).push(child); |
| 2963 |
} |
| 2964 |
} |
| 2965 |
// ignore slots that contains only whitespace |
| 2966 |
for (var name$1 in slots) { |
| 2967 |
if (slots[name$1].every(isWhitespace)) { |
| 2968 |
delete slots[name$1]; |
| 2969 |
} |
| 2970 |
} |
| 2971 |
return slots |
| 2972 |
} |
| 2973 |
|
| 2974 |
function isWhitespace (node) { |
| 2975 |
return (node.isComment && !node.asyncFactory) || node.text === ' ' |
| 2976 |
} |
| 2977 |
|
| 2978 |
function resolveScopedSlots ( |
| 2979 |
fns, // see flow/vnode |
| 2980 |
res |
| 2981 |
) { |
| 2982 |
res = res || {}; |
| 2983 |
for (var i = 0; i < fns.length; i++) { |
| 2984 |
if (Array.isArray(fns[i])) { |
| 2985 |
resolveScopedSlots(fns[i], res); |
| 2986 |
} else { |
| 2987 |
res[fns[i].key] = fns[i].fn; |
| 2988 |
} |
| 2989 |
} |
| 2990 |
return res |
| 2991 |
} |
| 2992 |
|
| 2993 |
/* */ |
| 2994 |
|
| 2995 |
var activeInstance = null; |
| 2996 |
var isUpdatingChildComponent = false; |
| 2997 |
|
| 2998 |
function initLifecycle (vm) { |
| 2999 |
var options = vm.$options; |
| 3000 |
|
| 3001 |
// locate first non-abstract parent |
| 3002 |
var parent = options.parent; |
| 3003 |
if (parent && !options.abstract) { |
| 3004 |
while (parent.$options.abstract && parent.$parent) { |
| 3005 |
parent = parent.$parent; |
| 3006 |
} |
| 3007 |
parent.$children.push(vm); |
| 3008 |
} |
| 3009 |
|
| 3010 |
vm.$parent = parent; |
| 3011 |
vm.$root = parent ? parent.$root : vm; |
| 3012 |
|
| 3013 |
vm.$children = []; |
| 3014 |
vm.$refs = {}; |
| 3015 |
|
| 3016 |
vm._watcher = null; |
| 3017 |
vm._inactive = null; |
| 3018 |
vm._directInactive = false; |
| 3019 |
vm._isMounted = false; |
| 3020 |
vm._isDestroyed = false; |
| 3021 |
vm._isBeingDestroyed = false; |
| 3022 |
} |
| 3023 |
|
| 3024 |
function lifecycleMixin (Vue) { |
| 3025 |
Vue.prototype._update = function (vnode, hydrating) { |
| 3026 |
var vm = this; |
| 3027 |
if (vm._isMounted) { |
| 3028 |
callHook(vm, 'beforeUpdate'); |
| 3029 |
} |
| 3030 |
var prevEl = vm.$el; |
| 3031 |
var prevVnode = vm._vnode; |
| 3032 |
var prevActiveInstance = activeInstance; |
| 3033 |
activeInstance = vm; |
| 3034 |
vm._vnode = vnode; |
| 3035 |
// Vue.prototype.__patch__ is injected in entry points |
| 3036 |
// based on the rendering backend used. |
| 3037 |
if (!prevVnode) { |
| 3038 |
// initial render |
| 3039 |
vm.$el = vm.__patch__( |
| 3040 |
vm.$el, vnode, hydrating, false /* removeOnly */, |
| 3041 |
vm.$options._parentElm, |
| 3042 |
vm.$options._refElm |
| 3043 |
); |
| 3044 |
// no need for the ref nodes after initial patch |
| 3045 |
// this prevents keeping a detached DOM tree in memory (#5851) |
| 3046 |
vm.$options._parentElm = vm.$options._refElm = null; |
| 3047 |
} else { |
| 3048 |
// updates |
| 3049 |
vm.$el = vm.__patch__(prevVnode, vnode); |
| 3050 |
} |
| 3051 |
activeInstance = prevActiveInstance; |
| 3052 |
// update __vue__ reference |
| 3053 |
if (prevEl) { |
| 3054 |
prevEl.__vue__ = null; |
| 3055 |
} |
| 3056 |
if (vm.$el) { |
| 3057 |
vm.$el.__vue__ = vm; |
| 3058 |
} |
| 3059 |
// if parent is an HOC, update its $el as well |
| 3060 |
if (vm.$vnode && vm.$parent && vm.$vnode === vm.$parent._vnode) { |
| 3061 |
vm.$parent.$el = vm.$el; |
| 3062 |
} |
| 3063 |
// updated hook is called by the scheduler to ensure that children are |
| 3064 |
// updated in a parent's updated hook. |
| 3065 |
}; |
| 3066 |
|
| 3067 |
Vue.prototype.$forceUpdate = function () { |
| 3068 |
var vm = this; |
| 3069 |
if (vm._watcher) { |
| 3070 |
vm._watcher.update(); |
| 3071 |
} |
| 3072 |
}; |
| 3073 |
|
| 3074 |
Vue.prototype.$destroy = function () { |
| 3075 |
var vm = this; |
| 3076 |
if (vm._isBeingDestroyed) { |
| 3077 |
return |
| 3078 |
} |
| 3079 |
callHook(vm, 'beforeDestroy'); |
| 3080 |
vm._isBeingDestroyed = true; |
| 3081 |
// remove self from parent |
| 3082 |
var parent = vm.$parent; |
| 3083 |
if (parent && !parent._isBeingDestroyed && !vm.$options.abstract) { |
| 3084 |
remove(parent.$children, vm); |
| 3085 |
} |
| 3086 |
// teardown watchers |
| 3087 |
if (vm._watcher) { |
| 3088 |
vm._watcher.teardown(); |
| 3089 |
} |
| 3090 |
var i = vm._watchers.length; |
| 3091 |
while (i--) { |
| 3092 |
vm._watchers[i].teardown(); |
| 3093 |
} |
| 3094 |
// remove reference from data ob |
| 3095 |
// frozen object may not have observer. |
| 3096 |
if (vm._data.__ob__) { |
| 3097 |
vm._data.__ob__.vmCount--; |
| 3098 |
} |
| 3099 |
// call the last hook... |
| 3100 |
vm._isDestroyed = true; |
| 3101 |
// invoke destroy hooks on current rendered tree |
| 3102 |
vm.__patch__(vm._vnode, null); |
| 3103 |
// fire destroyed hook |
| 3104 |
callHook(vm, 'destroyed'); |
| 3105 |
// turn off all instance listeners. |
| 3106 |
vm.$off(); |
| 3107 |
// remove __vue__ reference |
| 3108 |
if (vm.$el) { |
| 3109 |
vm.$el.__vue__ = null; |
| 3110 |
} |
| 3111 |
// release circular reference (#6759) |
| 3112 |
if (vm.$vnode) { |
| 3113 |
vm.$vnode.parent = null; |
| 3114 |
} |
| 3115 |
}; |
| 3116 |
} |
| 3117 |
|
| 3118 |
function mountComponent ( |
| 3119 |
vm, |
| 3120 |
el, |
| 3121 |
hydrating |
| 3122 |
) { |
| 3123 |
vm.$el = el; |
| 3124 |
if (!vm.$options.render) { |
| 3125 |
vm.$options.render = createEmptyVNode; |
| 3126 |
if (process.env.NODE_ENV !== 'production') { |
| 3127 |
/* istanbul ignore if */ |
| 3128 |
if ((vm.$options.template && vm.$options.template.charAt(0) !== '#') || |
| 3129 |
vm.$options.el || el) { |
| 3130 |
warn( |
| 3131 |
'You are using the runtime-only build of Vue where the template ' + |
| 3132 |
'compiler is not available. Either pre-compile the templates into ' + |
| 3133 |
'render functions, or use the compiler-included build.', |
| 3134 |
vm |
| 3135 |
); |
| 3136 |
} else { |
| 3137 |
warn( |
| 3138 |
'Failed to mount component: template or render function not defined.', |
| 3139 |
vm |
| 3140 |
); |
| 3141 |
} |
| 3142 |
} |
| 3143 |
} |
| 3144 |
callHook(vm, 'beforeMount'); |
| 3145 |
|
| 3146 |
var updateComponent; |
| 3147 |
/* istanbul ignore if */ |
| 3148 |
if (process.env.NODE_ENV !== 'production' && config.performance && mark) { |
| 3149 |
updateComponent = function () { |
| 3150 |
var name = vm._name; |
| 3151 |
var id = vm._uid; |
| 3152 |
var startTag = "vue-perf-start:" + id; |
| 3153 |
var endTag = "vue-perf-end:" + id; |
| 3154 |
|
| 3155 |
mark(startTag); |
| 3156 |
var vnode = vm._render(); |
| 3157 |
mark(endTag); |
| 3158 |
measure(("vue " + name + " render"), startTag, endTag); |
| 3159 |
|
| 3160 |
mark(startTag); |
| 3161 |
vm._update(vnode, hydrating); |
| 3162 |
mark(endTag); |
| 3163 |
measure(("vue " + name + " patch"), startTag, endTag); |
| 3164 |
}; |
| 3165 |
} else { |
| 3166 |
updateComponent = function () { |
| 3167 |
vm._update(vm._render(), hydrating); |
| 3168 |
}; |
| 3169 |
} |
| 3170 |
|
| 3171 |
// we set this to vm._watcher inside the watcher's constructor |
| 3172 |
// since the watcher's initial patch may call $forceUpdate (e.g. inside child |
| 3173 |
// component's mounted hook), which relies on vm._watcher being already defined |
| 3174 |
new Watcher(vm, updateComponent, noop, null, true /* isRenderWatcher */); |
| 3175 |
hydrating = false; |
| 3176 |
|
| 3177 |
// manually mounted instance, call mounted on self |
| 3178 |
// mounted is called for render-created child components in its inserted hook |
| 3179 |
if (vm.$vnode == null) { |
| 3180 |
vm._isMounted = true; |
| 3181 |
callHook(vm, 'mounted'); |
| 3182 |
} |
| 3183 |
return vm |
| 3184 |
} |
| 3185 |
|
| 3186 |
function updateChildComponent ( |
| 3187 |
vm, |
| 3188 |
propsData, |
| 3189 |
listeners, |
| 3190 |
parentVnode, |
| 3191 |
renderChildren |
| 3192 |
) { |
| 3193 |
if (process.env.NODE_ENV !== 'production') { |
| 3194 |
isUpdatingChildComponent = true; |
| 3195 |
} |
| 3196 |
|
| 3197 |
// determine whether component has slot children |
| 3198 |
// we need to do this before overwriting $options._renderChildren |
| 3199 |
var hasChildren = !!( |
| 3200 |
renderChildren || // has new static slots |
| 3201 |
vm.$options._renderChildren || // has old static slots |
| 3202 |
parentVnode.data.scopedSlots || // has new scoped slots |
| 3203 |
vm.$scopedSlots !== emptyObject // has old scoped slots |
| 3204 |
); |
| 3205 |
|
| 3206 |
vm.$options._parentVnode = parentVnode; |
| 3207 |
vm.$vnode = parentVnode; // update vm's placeholder node without re-render |
| 3208 |
|
| 3209 |
if (vm._vnode) { // update child tree's parent |
| 3210 |
vm._vnode.parent = parentVnode; |
| 3211 |
} |
| 3212 |
vm.$options._renderChildren = renderChildren; |
| 3213 |
|
| 3214 |
// update $attrs and $listeners hash |
| 3215 |
// these are also reactive so they may trigger child update if the child |
| 3216 |
// used them during render |
| 3217 |
vm.$attrs = parentVnode.data.attrs || emptyObject; |
| 3218 |
vm.$listeners = listeners || emptyObject; |
| 3219 |
|
| 3220 |
// update props |
| 3221 |
if (propsData && vm.$options.props) { |
| 3222 |
toggleObserving(false); |
| 3223 |
var props = vm._props; |
| 3224 |
var propKeys = vm.$options._propKeys || []; |
| 3225 |
for (var i = 0; i < propKeys.length; i++) { |
| 3226 |
var key = propKeys[i]; |
| 3227 |
var propOptions = vm.$options.props; // wtf flow? |
| 3228 |
props[key] = validateProp(key, propOptions, propsData, vm); |
| 3229 |
} |
| 3230 |
toggleObserving(true); |
| 3231 |
// keep a copy of raw propsData |
| 3232 |
vm.$options.propsData = propsData; |
| 3233 |
} |
| 3234 |
|
| 3235 |
// update listeners |
| 3236 |
listeners = listeners || emptyObject; |
| 3237 |
var oldListeners = vm.$options._parentListeners; |
| 3238 |
vm.$options._parentListeners = listeners; |
| 3239 |
updateComponentListeners(vm, listeners, oldListeners); |
| 3240 |
|
| 3241 |
// resolve slots + force update if has children |
| 3242 |
if (hasChildren) { |
| 3243 |
vm.$slots = resolveSlots(renderChildren, parentVnode.context); |
| 3244 |
vm.$forceUpdate(); |
| 3245 |
} |
| 3246 |
|
| 3247 |
if (process.env.NODE_ENV !== 'production') { |
| 3248 |
isUpdatingChildComponent = false; |
| 3249 |
} |
| 3250 |
} |
| 3251 |
|
| 3252 |
function isInInactiveTree (vm) { |
| 3253 |
while (vm && (vm = vm.$parent)) { |
| 3254 |
if (vm._inactive) { return true } |
| 3255 |
} |
| 3256 |
return false |
| 3257 |
} |
| 3258 |
|
| 3259 |
function activateChildComponent (vm, direct) { |
| 3260 |
if (direct) { |
| 3261 |
vm._directInactive = false; |
| 3262 |
if (isInInactiveTree(vm)) { |
| 3263 |
return |
| 3264 |
} |
| 3265 |
} else if (vm._directInactive) { |
| 3266 |
return |
| 3267 |
} |
| 3268 |
if (vm._inactive || vm._inactive === null) { |
| 3269 |
vm._inactive = false; |
| 3270 |
for (var i = 0; i < vm.$children.length; i++) { |
| 3271 |
activateChildComponent(vm.$children[i]); |
| 3272 |
} |
| 3273 |
callHook(vm, 'activated'); |
| 3274 |
} |
| 3275 |
} |
| 3276 |
|
| 3277 |
function deactivateChildComponent (vm, direct) { |
| 3278 |
if (direct) { |
| 3279 |
vm._directInactive = true; |
| 3280 |
if (isInInactiveTree(vm)) { |
| 3281 |
return |
| 3282 |
} |
| 3283 |
} |
| 3284 |
if (!vm._inactive) { |
| 3285 |
vm._inactive = true; |
| 3286 |
for (var i = 0; i < vm.$children.length; i++) { |
| 3287 |
deactivateChildComponent(vm.$children[i]); |
| 3288 |
} |
| 3289 |
callHook(vm, 'deactivated'); |
| 3290 |
} |
| 3291 |
} |
| 3292 |
|
| 3293 |
function callHook (vm, hook) { |
| 3294 |
// #7573 disable dep collection when invoking lifecycle hooks |
| 3295 |
pushTarget(); |
| 3296 |
var handlers = vm.$options[hook]; |
| 3297 |
if (handlers) { |
| 3298 |
for (var i = 0, j = handlers.length; i < j; i++) { |
| 3299 |
try { |
| 3300 |
handlers[i].call(vm); |
| 3301 |
} catch (e) { |
| 3302 |
handleError(e, vm, (hook + " hook")); |
| 3303 |
} |
| 3304 |
} |
| 3305 |
} |
| 3306 |
if (vm._hasHookEvent) { |
| 3307 |
vm.$emit('hook:' + hook); |
| 3308 |
} |
| 3309 |
popTarget(); |
| 3310 |
} |
| 3311 |
|
| 3312 |
/* */ |
| 3313 |
|
| 3314 |
|
| 3315 |
var MAX_UPDATE_COUNT = 100; |
| 3316 |
|
| 3317 |
var queue = []; |
| 3318 |
var activatedChildren = []; |
| 3319 |
var has = {}; |
| 3320 |
var circular = {}; |
| 3321 |
var waiting = false; |
| 3322 |
var flushing = false; |
| 3323 |
var index = 0; |
| 3324 |
|
| 3325 |
/** |
| 3326 |
* Reset the scheduler's state. |
| 3327 |
*/ |
| 3328 |
function resetSchedulerState () { |
| 3329 |
index = queue.length = activatedChildren.length = 0; |
| 3330 |
has = {}; |
| 3331 |
if (process.env.NODE_ENV !== 'production') { |
| 3332 |
circular = {}; |
| 3333 |
} |
| 3334 |
waiting = flushing = false; |
| 3335 |
} |
| 3336 |
|
| 3337 |
/** |
| 3338 |
* Flush both queues and run the watchers. |
| 3339 |
*/ |
| 3340 |
function flushSchedulerQueue () { |
| 3341 |
flushing = true; |
| 3342 |
var watcher, id; |
| 3343 |
|
| 3344 |
// Sort queue before flush. |
| 3345 |
// This ensures that: |
| 3346 |
// 1. Components are updated from parent to child. (because parent is always |
| 3347 |
// created before the child) |
| 3348 |
// 2. A component's user watchers are run before its render watcher (because |
| 3349 |
// user watchers are created before the render watcher) |
| 3350 |
// 3. If a component is destroyed during a parent component's watcher run, |
| 3351 |
// its watchers can be skipped. |
| 3352 |
queue.sort(function (a, b) { return a.id - b.id; }); |
| 3353 |
|
| 3354 |
// do not cache length because more watchers might be pushed |
| 3355 |
// as we run existing watchers |
| 3356 |
for (index = 0; index < queue.length; index++) { |
| 3357 |
watcher = queue[index]; |
| 3358 |
id = watcher.id; |
| 3359 |
has[id] = null; |
| 3360 |
watcher.run(); |
| 3361 |
// in dev build, check and stop circular updates. |
| 3362 |
if (process.env.NODE_ENV !== 'production' && has[id] != null) { |
| 3363 |
circular[id] = (circular[id] || 0) + 1; |
| 3364 |
if (circular[id] > MAX_UPDATE_COUNT) { |
| 3365 |
warn( |
| 3366 |
'You may have an infinite update loop ' + ( |
| 3367 |
watcher.user |
| 3368 |
? ("in watcher with expression \"" + (watcher.expression) + "\"") |
| 3369 |
: "in a component render function." |
| 3370 |
), |
| 3371 |
watcher.vm |
| 3372 |
); |
| 3373 |
break |
| 3374 |
} |
| 3375 |
} |
| 3376 |
} |
| 3377 |
|
| 3378 |
// keep copies of post queues before resetting state |
| 3379 |
var activatedQueue = activatedChildren.slice(); |
| 3380 |
var updatedQueue = queue.slice(); |
| 3381 |
|
| 3382 |
resetSchedulerState(); |
| 3383 |
|
| 3384 |
// call component updated and activated hooks |
| 3385 |
callActivatedHooks(activatedQueue); |
| 3386 |
callUpdatedHooks(updatedQueue); |
| 3387 |
|
| 3388 |
// devtool hook |
| 3389 |
/* istanbul ignore if */ |
| 3390 |
if (devtools && config.devtools) { |
| 3391 |
devtools.emit('flush'); |
| 3392 |
} |
| 3393 |
} |
| 3394 |
|
| 3395 |
function callUpdatedHooks (queue) { |
| 3396 |
var i = queue.length; |
| 3397 |
while (i--) { |
| 3398 |
var watcher = queue[i]; |
| 3399 |
var vm = watcher.vm; |
| 3400 |
if (vm._watcher === watcher && vm._isMounted) { |
| 3401 |
callHook(vm, 'updated'); |
| 3402 |
} |
| 3403 |
} |
| 3404 |
} |
| 3405 |
|
| 3406 |
/** |
| 3407 |
* Queue a kept-alive component that was activated during patch. |
| 3408 |
* The queue will be processed after the entire tree has been patched. |
| 3409 |
*/ |
| 3410 |
function queueActivatedComponent (vm) { |
| 3411 |
// setting _inactive to false here so that a render function can |
| 3412 |
// rely on checking whether it's in an inactive tree (e.g. router-view) |
| 3413 |
vm._inactive = false; |
| 3414 |
activatedChildren.push(vm); |
| 3415 |
} |
| 3416 |
|
| 3417 |
function callActivatedHooks (queue) { |
| 3418 |
for (var i = 0; i < queue.length; i++) { |
| 3419 |
queue[i]._inactive = true; |
| 3420 |
activateChildComponent(queue[i], true /* true */); |
| 3421 |
} |
| 3422 |
} |
| 3423 |
|
| 3424 |
/** |
| 3425 |
* Push a watcher into the watcher queue. |
| 3426 |
* Jobs with duplicate IDs will be skipped unless it's |
| 3427 |
* pushed when the queue is being flushed. |
| 3428 |
*/ |
| 3429 |
function queueWatcher (watcher) { |
| 3430 |
var id = watcher.id; |
| 3431 |
if (has[id] == null) { |
| 3432 |
has[id] = true; |
| 3433 |
if (!flushing) { |
| 3434 |
queue.push(watcher); |
| 3435 |
} else { |
| 3436 |
// if already flushing, splice the watcher based on its id |
| 3437 |
// if already past its id, it will be run next immediately. |
| 3438 |
var i = queue.length - 1; |
| 3439 |
while (i > index && queue[i].id > watcher.id) { |
| 3440 |
i--; |
| 3441 |
} |
| 3442 |
queue.splice(i + 1, 0, watcher); |
| 3443 |
} |
| 3444 |
// queue the flush |
| 3445 |
if (!waiting) { |
| 3446 |
waiting = true; |
| 3447 |
nextTick(flushSchedulerQueue); |
| 3448 |
} |
| 3449 |
} |
| 3450 |
} |
| 3451 |
|
| 3452 |
/* */ |
| 3453 |
|
| 3454 |
var uid$1 = 0; |
| 3455 |
|
| 3456 |
/** |
| 3457 |
* A watcher parses an expression, collects dependencies, |
| 3458 |
* and fires callback when the expression value changes. |
| 3459 |
* This is used for both the $watch() api and directives. |
| 3460 |
*/ |
| 3461 |
var Watcher = function Watcher ( |
| 3462 |
vm, |
| 3463 |
expOrFn, |
| 3464 |
cb, |
| 3465 |
options, |
| 3466 |
isRenderWatcher |
| 3467 |
) { |
| 3468 |
this.vm = vm; |
| 3469 |
if (isRenderWatcher) { |
| 3470 |
vm._watcher = this; |
| 3471 |
} |
| 3472 |
vm._watchers.push(this); |
| 3473 |
// options |
| 3474 |
if (options) { |
| 3475 |
this.deep = !!options.deep; |
| 3476 |
this.user = !!options.user; |
| 3477 |
this.lazy = !!options.lazy; |
| 3478 |
this.sync = !!options.sync; |
| 3479 |
} else { |
| 3480 |
this.deep = this.user = this.lazy = this.sync = false; |
| 3481 |
} |
| 3482 |
this.cb = cb; |
| 3483 |
this.id = ++uid$1; // uid for batching |
| 3484 |
this.active = true; |
| 3485 |
this.dirty = this.lazy; // for lazy watchers |
| 3486 |
this.deps = []; |
| 3487 |
this.newDeps = []; |
| 3488 |
this.depIds = new _Set(); |
| 3489 |
this.newDepIds = new _Set(); |
| 3490 |
this.expression = process.env.NODE_ENV !== 'production' |
| 3491 |
? expOrFn.toString() |
| 3492 |
: ''; |
| 3493 |
// parse expression for getter |
| 3494 |
if (typeof expOrFn === 'function') { |
| 3495 |
this.getter = expOrFn; |
| 3496 |
} else { |
| 3497 |
this.getter = parsePath(expOrFn); |
| 3498 |
if (!this.getter) { |
| 3499 |
this.getter = function () {}; |
| 3500 |
process.env.NODE_ENV !== 'production' && warn( |
| 3501 |
"Failed watching path: \"" + expOrFn + "\" " + |
| 3502 |
'Watcher only accepts simple dot-delimited paths. ' + |
| 3503 |
'For full control, use a function instead.', |
| 3504 |
vm |
| 3505 |
); |
| 3506 |
} |
| 3507 |
} |
| 3508 |
this.value = this.lazy |
| 3509 |
? undefined |
| 3510 |
: this.get(); |
| 3511 |
}; |
| 3512 |
|
| 3513 |
/** |
| 3514 |
* Evaluate the getter, and re-collect dependencies. |
| 3515 |
*/ |
| 3516 |
Watcher.prototype.get = function get () { |
| 3517 |
pushTarget(this); |
| 3518 |
var value; |
| 3519 |
var vm = this.vm; |
| 3520 |
try { |
| 3521 |
value = this.getter.call(vm, vm); |
| 3522 |
} catch (e) { |
| 3523 |
if (this.user) { |
| 3524 |
handleError(e, vm, ("getter for watcher \"" + (this.expression) + "\"")); |
| 3525 |
} else { |
| 3526 |
throw e |
| 3527 |
} |
| 3528 |
} finally { |
| 3529 |
// "touch" every property so they are all tracked as |
| 3530 |
// dependencies for deep watching |
| 3531 |
if (this.deep) { |
| 3532 |
traverse(value); |
| 3533 |
} |
| 3534 |
popTarget(); |
| 3535 |
this.cleanupDeps(); |
| 3536 |
} |
| 3537 |
return value |
| 3538 |
}; |
| 3539 |
|
| 3540 |
/** |
| 3541 |
* Add a dependency to this directive. |
| 3542 |
*/ |
| 3543 |
Watcher.prototype.addDep = function addDep (dep) { |
| 3544 |
var id = dep.id; |
| 3545 |
if (!this.newDepIds.has(id)) { |
| 3546 |
this.newDepIds.add(id); |
| 3547 |
this.newDeps.push(dep); |
| 3548 |
if (!this.depIds.has(id)) { |
| 3549 |
dep.addSub(this); |
| 3550 |
} |
| 3551 |
} |
| 3552 |
}; |
| 3553 |
|
| 3554 |
/** |
| 3555 |
* Clean up for dependency collection. |
| 3556 |
*/ |
| 3557 |
Watcher.prototype.cleanupDeps = function cleanupDeps () { |
| 3558 |
var this$1 = this; |
| 3559 |
|
| 3560 |
var i = this.deps.length; |
| 3561 |
while (i--) { |
| 3562 |
var dep = this$1.deps[i]; |
| 3563 |
if (!this$1.newDepIds.has(dep.id)) { |
| 3564 |
dep.removeSub(this$1); |
| 3565 |
} |
| 3566 |
} |
| 3567 |
var tmp = this.depIds; |
| 3568 |
this.depIds = this.newDepIds; |
| 3569 |
this.newDepIds = tmp; |
| 3570 |
this.newDepIds.clear(); |
| 3571 |
tmp = this.deps; |
| 3572 |
this.deps = this.newDeps; |
| 3573 |
this.newDeps = tmp; |
| 3574 |
this.newDeps.length = 0; |
| 3575 |
}; |
| 3576 |
|
| 3577 |
/** |
| 3578 |
* Subscriber interface. |
| 3579 |
* Will be called when a dependency changes. |
| 3580 |
*/ |
| 3581 |
Watcher.prototype.update = function update () { |
| 3582 |
/* istanbul ignore else */ |
| 3583 |
if (this.lazy) { |
| 3584 |
this.dirty = true; |
| 3585 |
} else if (this.sync) { |
| 3586 |
this.run(); |
| 3587 |
} else { |
| 3588 |
queueWatcher(this); |
| 3589 |
} |
| 3590 |
}; |
| 3591 |
|
| 3592 |
/** |
| 3593 |
* Scheduler job interface. |
| 3594 |
* Will be called by the scheduler. |
| 3595 |
*/ |
| 3596 |
Watcher.prototype.run = function run () { |
| 3597 |
if (this.active) { |
| 3598 |
var value = this.get(); |
| 3599 |
if ( |
| 3600 |
value !== this.value || |
| 3601 |
// Deep watchers and watchers on Object/Arrays should fire even |
| 3602 |
// when the value is the same, because the value may |
| 3603 |
// have mutated. |
| 3604 |
isObject(value) || |
| 3605 |
this.deep |
| 3606 |
) { |
| 3607 |
// set new value |
| 3608 |
var oldValue = this.value; |
| 3609 |
this.value = value; |
| 3610 |
if (this.user) { |
| 3611 |
try { |
| 3612 |
this.cb.call(this.vm, value, oldValue); |
| 3613 |
} catch (e) { |
| 3614 |
handleError(e, this.vm, ("callback for watcher \"" + (this.expression) + "\"")); |
| 3615 |
} |
| 3616 |
} else { |
| 3617 |
this.cb.call(this.vm, value, oldValue); |
| 3618 |
} |
| 3619 |
} |
| 3620 |
} |
| 3621 |
}; |
| 3622 |
|
| 3623 |
/** |
| 3624 |
* Evaluate the value of the watcher. |
| 3625 |
* This only gets called for lazy watchers. |
| 3626 |
*/ |
| 3627 |
Watcher.prototype.evaluate = function evaluate () { |
| 3628 |
this.value = this.get(); |
| 3629 |
this.dirty = false; |
| 3630 |
}; |
| 3631 |
|
| 3632 |
/** |
| 3633 |
* Depend on all deps collected by this watcher. |
| 3634 |
*/ |
| 3635 |
Watcher.prototype.depend = function depend () { |
| 3636 |
var this$1 = this; |
| 3637 |
|
| 3638 |
var i = this.deps.length; |
| 3639 |
while (i--) { |
| 3640 |
this$1.deps[i].depend(); |
| 3641 |
} |
| 3642 |
}; |
| 3643 |
|
| 3644 |
/** |
| 3645 |
* Remove self from all dependencies' subscriber list. |
| 3646 |
*/ |
| 3647 |
Watcher.prototype.teardown = function teardown () { |
| 3648 |
var this$1 = this; |
| 3649 |
|
| 3650 |
if (this.active) { |
| 3651 |
// remove self from vm's watcher list |
| 3652 |
// this is a somewhat expensive operation so we skip it |
| 3653 |
// if the vm is being destroyed. |
| 3654 |
if (!this.vm._isBeingDestroyed) { |
| 3655 |
remove(this.vm._watchers, this); |
| 3656 |
} |
| 3657 |
var i = this.deps.length; |
| 3658 |
while (i--) { |
| 3659 |
this$1.deps[i].removeSub(this$1); |
| 3660 |
} |
| 3661 |
this.active = false; |
| 3662 |
} |
| 3663 |
}; |
| 3664 |
|
| 3665 |
/* */ |
| 3666 |
|
| 3667 |
var sharedPropertyDefinition = { |
| 3668 |
enumerable: true, |
| 3669 |
configurable: true, |
| 3670 |
get: noop, |
| 3671 |
set: noop |
| 3672 |
}; |
| 3673 |
|
| 3674 |
function proxy (target, sourceKey, key) { |
| 3675 |
sharedPropertyDefinition.get = function proxyGetter () { |
| 3676 |
return this[sourceKey][key] |
| 3677 |
}; |
| 3678 |
sharedPropertyDefinition.set = function proxySetter (val) { |
| 3679 |
this[sourceKey][key] = val; |
| 3680 |
}; |
| 3681 |
Object.defineProperty(target, key, sharedPropertyDefinition); |
| 3682 |
} |
| 3683 |
|
| 3684 |
function initState (vm) { |
| 3685 |
vm._watchers = []; |
| 3686 |
var opts = vm.$options; |
| 3687 |
if (opts.props) { initProps(vm, opts.props); } |
| 3688 |
if (opts.methods) { initMethods(vm, opts.methods); } |
| 3689 |
if (opts.data) { |
| 3690 |
initData(vm); |
| 3691 |
} else { |
| 3692 |
observe(vm._data = {}, true /* asRootData */); |
| 3693 |
} |
| 3694 |
if (opts.computed) { initComputed(vm, opts.computed); } |
| 3695 |
if (opts.watch && opts.watch !== nativeWatch) { |
| 3696 |
initWatch(vm, opts.watch); |
| 3697 |
} |
| 3698 |
} |
| 3699 |
|
| 3700 |
function initProps (vm, propsOptions) { |
| 3701 |
var propsData = vm.$options.propsData || {}; |
| 3702 |
var props = vm._props = {}; |
| 3703 |
// cache prop keys so that future props updates can iterate using Array |
| 3704 |
// instead of dynamic object key enumeration. |
| 3705 |
var keys = vm.$options._propKeys = []; |
| 3706 |
var isRoot = !vm.$parent; |
| 3707 |
// root instance props should be converted |
| 3708 |
if (!isRoot) { |
| 3709 |
toggleObserving(false); |
| 3710 |
} |
| 3711 |
var loop = function ( key ) { |
| 3712 |
keys.push(key); |
| 3713 |
var value = validateProp(key, propsOptions, propsData, vm); |
| 3714 |
/* istanbul ignore else */ |
| 3715 |
if (process.env.NODE_ENV !== 'production') { |
| 3716 |
var hyphenatedKey = hyphenate(key); |
| 3717 |
if (isReservedAttribute(hyphenatedKey) || |
| 3718 |
config.isReservedAttr(hyphenatedKey)) { |
| 3719 |
warn( |
| 3720 |
("\"" + hyphenatedKey + "\" is a reserved attribute and cannot be used as component prop."), |
| 3721 |
vm |
| 3722 |
); |
| 3723 |
} |
| 3724 |
defineReactive(props, key, value, function () { |
| 3725 |
if (vm.$parent && !isUpdatingChildComponent) { |
| 3726 |
warn( |
| 3727 |
"Avoid mutating a prop directly since the value will be " + |
| 3728 |
"overwritten whenever the parent component re-renders. " + |
| 3729 |
"Instead, use a data or computed property based on the prop's " + |
| 3730 |
"value. Prop being mutated: \"" + key + "\"", |
| 3731 |
vm |
| 3732 |
); |
| 3733 |
} |
| 3734 |
}); |
| 3735 |
} else { |
| 3736 |
defineReactive(props, key, value); |
| 3737 |
} |
| 3738 |
// static props are already proxied on the component's prototype |
| 3739 |
// during Vue.extend(). We only need to proxy props defined at |
| 3740 |
// instantiation here. |
| 3741 |
if (!(key in vm)) { |
| 3742 |
proxy(vm, "_props", key); |
| 3743 |
} |
| 3744 |
}; |
| 3745 |
|
| 3746 |
for (var key in propsOptions) loop( key ); |
| 3747 |
toggleObserving(true); |
| 3748 |
} |
| 3749 |
|
| 3750 |
function initData (vm) { |
| 3751 |
var data = vm.$options.data; |
| 3752 |
data = vm._data = typeof data === 'function' |
| 3753 |
? getData(data, vm) |
| 3754 |
: data || {}; |
| 3755 |
if (!isPlainObject(data)) { |
| 3756 |
data = {}; |
| 3757 |
process.env.NODE_ENV !== 'production' && warn( |
| 3758 |
'data functions should return an object:\n' + |
| 3759 |
'https://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function', |
| 3760 |
vm |
| 3761 |
); |
| 3762 |
} |
| 3763 |
// proxy data on instance |
| 3764 |
var keys = Object.keys(data); |
| 3765 |
var props = vm.$options.props; |
| 3766 |
var methods = vm.$options.methods; |
| 3767 |
var i = keys.length; |
| 3768 |
while (i--) { |
| 3769 |
var key = keys[i]; |
| 3770 |
if (process.env.NODE_ENV !== 'production') { |
| 3771 |
if (methods && hasOwn(methods, key)) { |
| 3772 |
warn( |
| 3773 |
("Method \"" + key + "\" has already been defined as a data property."), |
| 3774 |
vm |
| 3775 |
); |
| 3776 |
} |
| 3777 |
} |
| 3778 |
if (props && hasOwn(props, key)) { |
| 3779 |
process.env.NODE_ENV !== 'production' && warn( |
| 3780 |
"The data property \"" + key + "\" is already declared as a prop. " + |
| 3781 |
"Use prop default value instead.", |
| 3782 |
vm |
| 3783 |
); |
| 3784 |
} else if (!isReserved(key)) { |
| 3785 |
proxy(vm, "_data", key); |
| 3786 |
} |
| 3787 |
} |
| 3788 |
// observe data |
| 3789 |
observe(data, true /* asRootData */); |
| 3790 |
} |
| 3791 |
|
| 3792 |
function getData (data, vm) { |
| 3793 |
// #7573 disable dep collection when invoking data getters |
| 3794 |
pushTarget(); |
| 3795 |
try { |
| 3796 |
return data.call(vm, vm) |
| 3797 |
} catch (e) { |
| 3798 |
handleError(e, vm, "data()"); |
| 3799 |
return {} |
| 3800 |
} finally { |
| 3801 |
popTarget(); |
| 3802 |
} |
| 3803 |
} |
| 3804 |
|
| 3805 |
var computedWatcherOptions = { lazy: true }; |
| 3806 |
|
| 3807 |
function initComputed (vm, computed) { |
| 3808 |
// $flow-disable-line |
| 3809 |
var watchers = vm._computedWatchers = Object.create(null); |
| 3810 |
// computed properties are just getters during SSR |
| 3811 |
var isSSR = isServerRendering(); |
| 3812 |
|
| 3813 |
for (var key in computed) { |
| 3814 |
var userDef = computed[key]; |
| 3815 |
var getter = typeof userDef === 'function' ? userDef : userDef.get; |
| 3816 |
if (process.env.NODE_ENV !== 'production' && getter == null) { |
| 3817 |
warn( |
| 3818 |
("Getter is missing for computed property \"" + key + "\"."), |
| 3819 |
vm |
| 3820 |
); |
| 3821 |
} |
| 3822 |
|
| 3823 |
if (!isSSR) { |
| 3824 |
// create internal watcher for the computed property. |
| 3825 |
watchers[key] = new Watcher( |
| 3826 |
vm, |
| 3827 |
getter || noop, |
| 3828 |
noop, |
| 3829 |
computedWatcherOptions |
| 3830 |
); |
| 3831 |
} |
| 3832 |
|
| 3833 |
// component-defined computed properties are already defined on the |
| 3834 |
// component prototype. We only need to define computed properties defined |
| 3835 |
// at instantiation here. |
| 3836 |
if (!(key in vm)) { |
| 3837 |
defineComputed(vm, key, userDef); |
| 3838 |
} else if (process.env.NODE_ENV !== 'production') { |
| 3839 |
if (key in vm.$data) { |
| 3840 |
warn(("The computed property \"" + key + "\" is already defined in data."), vm); |
| 3841 |
} else if (vm.$options.props && key in vm.$options.props) { |
| 3842 |
warn(("The computed property \"" + key + "\" is already defined as a prop."), vm); |
| 3843 |
} |
| 3844 |
} |
| 3845 |
} |
| 3846 |
} |
| 3847 |
|
| 3848 |
function defineComputed ( |
| 3849 |
target, |
| 3850 |
key, |
| 3851 |
userDef |
| 3852 |
) { |
| 3853 |
var shouldCache = !isServerRendering(); |
| 3854 |
if (typeof userDef === 'function') { |
| 3855 |
sharedPropertyDefinition.get = shouldCache |
| 3856 |
? createComputedGetter(key) |
| 3857 |
: userDef; |
| 3858 |
sharedPropertyDefinition.set = noop; |
| 3859 |
} else { |
| 3860 |
sharedPropertyDefinition.get = userDef.get |
| 3861 |
? shouldCache && userDef.cache !== false |
| 3862 |
? createComputedGetter(key) |
| 3863 |
: userDef.get |
| 3864 |
: noop; |
| 3865 |
sharedPropertyDefinition.set = userDef.set |
| 3866 |
? userDef.set |
| 3867 |
: noop; |
| 3868 |
} |
| 3869 |
if (process.env.NODE_ENV !== 'production' && |
| 3870 |
sharedPropertyDefinition.set === noop) { |
| 3871 |
sharedPropertyDefinition.set = function () { |
| 3872 |
warn( |
| 3873 |
("Computed property \"" + key + "\" was assigned to but it has no setter."), |
| 3874 |
this |
| 3875 |
); |
| 3876 |
}; |
| 3877 |
} |
| 3878 |
Object.defineProperty(target, key, sharedPropertyDefinition); |
| 3879 |
} |
| 3880 |
|
| 3881 |
function createComputedGetter (key) { |
| 3882 |
return function computedGetter () { |
| 3883 |
var watcher = this._computedWatchers && this._computedWatchers[key]; |
| 3884 |
if (watcher) { |
| 3885 |
if (watcher.dirty) { |
| 3886 |
watcher.evaluate(); |
| 3887 |
} |
| 3888 |
if (Dep.target) { |
| 3889 |
watcher.depend(); |
| 3890 |
} |
| 3891 |
return watcher.value |
| 3892 |
} |
| 3893 |
} |
| 3894 |
} |
| 3895 |
|
| 3896 |
function initMethods (vm, methods) { |
| 3897 |
var props = vm.$options.props; |
| 3898 |
for (var key in methods) { |
| 3899 |
if (process.env.NODE_ENV !== 'production') { |
| 3900 |
if (methods[key] == null) { |
| 3901 |
warn( |
| 3902 |
"Method \"" + key + "\" has an undefined value in the component definition. " + |
| 3903 |
"Did you reference the function correctly?", |
| 3904 |
vm |
| 3905 |
); |
| 3906 |
} |
| 3907 |
if (props && hasOwn(props, key)) { |
| 3908 |
warn( |
| 3909 |
("Method \"" + key + "\" has already been defined as a prop."), |
| 3910 |
vm |
| 3911 |
); |
| 3912 |
} |
| 3913 |
if ((key in vm) && isReserved(key)) { |
| 3914 |
warn( |
| 3915 |
"Method \"" + key + "\" conflicts with an existing Vue instance method. " + |
| 3916 |
"Avoid defining component methods that start with _ or $." |
| 3917 |
); |
| 3918 |
} |
| 3919 |
} |
| 3920 |
vm[key] = methods[key] == null ? noop : bind(methods[key], vm); |
| 3921 |
} |
| 3922 |
} |
| 3923 |
|
| 3924 |
function initWatch (vm, watch) { |
| 3925 |
for (var key in watch) { |
| 3926 |
var handler = watch[key]; |
| 3927 |
if (Array.isArray(handler)) { |
| 3928 |
for (var i = 0; i < handler.length; i++) { |
| 3929 |
createWatcher(vm, key, handler[i]); |
| 3930 |
} |
| 3931 |
} else { |
| 3932 |
createWatcher(vm, key, handler); |
| 3933 |
} |
| 3934 |
} |
| 3935 |
} |
| 3936 |
|
| 3937 |
function createWatcher ( |
| 3938 |
vm, |
| 3939 |
expOrFn, |
| 3940 |
handler, |
| 3941 |
options |
| 3942 |
) { |
| 3943 |
if (isPlainObject(handler)) { |
| 3944 |
options = handler; |
| 3945 |
handler = handler.handler; |
| 3946 |
} |
| 3947 |
if (typeof handler === 'string') { |
| 3948 |
handler = vm[handler]; |
| 3949 |
} |
| 3950 |
return vm.$watch(expOrFn, handler, options) |
| 3951 |
} |
| 3952 |
|
| 3953 |
function stateMixin (Vue) { |
| 3954 |
// flow somehow has problems with directly declared definition object |
| 3955 |
// when using Object.defineProperty, so we have to procedurally build up |
| 3956 |
// the object here. |
| 3957 |
var dataDef = {}; |
| 3958 |
dataDef.get = function () { return this._data }; |
| 3959 |
var propsDef = {}; |
| 3960 |
propsDef.get = function () { return this._props }; |
| 3961 |
if (process.env.NODE_ENV !== 'production') { |
| 3962 |
dataDef.set = function (newData) { |
| 3963 |
warn( |
| 3964 |
'Avoid replacing instance root $data. ' + |
| 3965 |
'Use nested data properties instead.', |
| 3966 |
this |
| 3967 |
); |
| 3968 |
}; |
| 3969 |
propsDef.set = function () { |
| 3970 |
warn("$props is readonly.", this); |
| 3971 |
}; |
| 3972 |
} |
| 3973 |
Object.defineProperty(Vue.prototype, '$data', dataDef); |
| 3974 |
Object.defineProperty(Vue.prototype, '$props', propsDef); |
| 3975 |
|
| 3976 |
Vue.prototype.$set = set; |
| 3977 |
Vue.prototype.$delete = del; |
| 3978 |
|
| 3979 |
Vue.prototype.$watch = function ( |
| 3980 |
expOrFn, |
| 3981 |
cb, |
| 3982 |
options |
| 3983 |
) { |
| 3984 |
var vm = this; |
| 3985 |
if (isPlainObject(cb)) { |
| 3986 |
return createWatcher(vm, expOrFn, cb, options) |
| 3987 |
} |
| 3988 |
options = options || {}; |
| 3989 |
options.user = true; |
| 3990 |
var watcher = new Watcher(vm, expOrFn, cb, options); |
| 3991 |
if (options.immediate) { |
| 3992 |
cb.call(vm, watcher.value); |
| 3993 |
} |
| 3994 |
return function unwatchFn () { |
| 3995 |
watcher.teardown(); |
| 3996 |
} |
| 3997 |
}; |
| 3998 |
} |
| 3999 |
|
| 4000 |
/* */ |
| 4001 |
|
| 4002 |
function initProvide (vm) { |
| 4003 |
var provide = vm.$options.provide; |
| 4004 |
if (provide) { |
| 4005 |
vm._provided = typeof provide === 'function' |
| 4006 |
? provide.call(vm) |
| 4007 |
: provide; |
| 4008 |
} |
| 4009 |
} |
| 4010 |
|
| 4011 |
function initInjections (vm) { |
| 4012 |
var result = resolveInject(vm.$options.inject, vm); |
| 4013 |
if (result) { |
| 4014 |
toggleObserving(false); |
| 4015 |
Object.keys(result).forEach(function (key) { |
| 4016 |
/* istanbul ignore else */ |
| 4017 |
if (process.env.NODE_ENV !== 'production') { |
| 4018 |
defineReactive(vm, key, result[key], function () { |
| 4019 |
warn( |
| 4020 |
"Avoid mutating an injected value directly since the changes will be " + |
| 4021 |
"overwritten whenever the provided component re-renders. " + |
| 4022 |
"injection being mutated: \"" + key + "\"", |
| 4023 |
vm |
| 4024 |
); |
| 4025 |
}); |
| 4026 |
} else { |
| 4027 |
defineReactive(vm, key, result[key]); |
| 4028 |
} |
| 4029 |
}); |
| 4030 |
toggleObserving(true); |
| 4031 |
} |
| 4032 |
} |
| 4033 |
|
| 4034 |
function resolveInject (inject, vm) { |
| 4035 |
if (inject) { |
| 4036 |
// inject is :any because flow is not smart enough to figure out cached |
| 4037 |
var result = Object.create(null); |
| 4038 |
var keys = hasSymbol |
| 4039 |
? Reflect.ownKeys(inject).filter(function (key) { |
| 4040 |
/* istanbul ignore next */ |
| 4041 |
return Object.getOwnPropertyDescriptor(inject, key).enumerable |
| 4042 |
}) |
| 4043 |
: Object.keys(inject); |
| 4044 |
|
| 4045 |
for (var i = 0; i < keys.length; i++) { |
| 4046 |
var key = keys[i]; |
| 4047 |
var provideKey = inject[key].from; |
| 4048 |
var source = vm; |
| 4049 |
while (source) { |
| 4050 |
if (source._provided && hasOwn(source._provided, provideKey)) { |
| 4051 |
result[key] = source._provided[provideKey]; |
| 4052 |
break |
| 4053 |
} |
| 4054 |
source = source.$parent; |
| 4055 |
} |
| 4056 |
if (!source) { |
| 4057 |
if ('default' in inject[key]) { |
| 4058 |
var provideDefault = inject[key].default; |
| 4059 |
result[key] = typeof provideDefault === 'function' |
| 4060 |
? provideDefault.call(vm) |
| 4061 |
: provideDefault; |
| 4062 |
} else if (process.env.NODE_ENV !== 'production') { |
| 4063 |
warn(("Injection \"" + key + "\" not found"), vm); |
| 4064 |
} |
| 4065 |
} |
| 4066 |
} |
| 4067 |
return result |
| 4068 |
} |
| 4069 |
} |
| 4070 |
|
| 4071 |
/* */ |
| 4072 |
|
| 4073 |
/** |
| 4074 |
* Runtime helper for rendering v-for lists. |
| 4075 |
*/ |
| 4076 |
function renderList ( |
| 4077 |
val, |
| 4078 |
render |
| 4079 |
) { |
| 4080 |
var ret, i, l, keys, key; |
| 4081 |
if (Array.isArray(val) || typeof val === 'string') { |
| 4082 |
ret = new Array(val.length); |
| 4083 |
for (i = 0, l = val.length; i < l; i++) { |
| 4084 |
ret[i] = render(val[i], i); |
| 4085 |
} |
| 4086 |
} else if (typeof val === 'number') { |
| 4087 |
ret = new Array(val); |
| 4088 |
for (i = 0; i < val; i++) { |
| 4089 |
ret[i] = render(i + 1, i); |
| 4090 |
} |
| 4091 |
} else if (isObject(val)) { |
| 4092 |
keys = Object.keys(val); |
| 4093 |
ret = new Array(keys.length); |
| 4094 |
for (i = 0, l = keys.length; i < l; i++) { |
| 4095 |
key = keys[i]; |
| 4096 |
ret[i] = render(val[key], key, i); |
| 4097 |
} |
| 4098 |
} |
| 4099 |
if (isDef(ret)) { |
| 4100 |
(ret)._isVList = true; |
| 4101 |
} |
| 4102 |
return ret |
| 4103 |
} |
| 4104 |
|
| 4105 |
/* */ |
| 4106 |
|
| 4107 |
/** |
| 4108 |
* Runtime helper for rendering <slot> |
| 4109 |
*/ |
| 4110 |
function renderSlot ( |
| 4111 |
name, |
| 4112 |
fallback, |
| 4113 |
props, |
| 4114 |
bindObject |
| 4115 |
) { |
| 4116 |
var scopedSlotFn = this.$scopedSlots[name]; |
| 4117 |
var nodes; |
| 4118 |
if (scopedSlotFn) { // scoped slot |
| 4119 |
props = props || {}; |
| 4120 |
if (bindObject) { |
| 4121 |
if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) { |
| 4122 |
warn( |
| 4123 |
'slot v-bind without argument expects an Object', |
| 4124 |
this |
| 4125 |
); |
| 4126 |
} |
| 4127 |
props = extend(extend({}, bindObject), props); |
| 4128 |
} |
| 4129 |
nodes = scopedSlotFn(props) || fallback; |
| 4130 |
} else { |
| 4131 |
var slotNodes = this.$slots[name]; |
| 4132 |
// warn duplicate slot usage |
| 4133 |
if (slotNodes) { |
| 4134 |
if (process.env.NODE_ENV !== 'production' && slotNodes._rendered) { |
| 4135 |
warn( |
| 4136 |
"Duplicate presence of slot \"" + name + "\" found in the same render tree " + |
| 4137 |
"- this will likely cause render errors.", |
| 4138 |
this |
| 4139 |
); |
| 4140 |
} |
| 4141 |
slotNodes._rendered = true; |
| 4142 |
} |
| 4143 |
nodes = slotNodes || fallback; |
| 4144 |
} |
| 4145 |
|
| 4146 |
var target = props && props.slot; |
| 4147 |
if (target) { |
| 4148 |
return this.$createElement('template', { slot: target }, nodes) |
| 4149 |
} else { |
| 4150 |
return nodes |
| 4151 |
} |
| 4152 |
} |
| 4153 |
|
| 4154 |
/* */ |
| 4155 |
|
| 4156 |
/** |
| 4157 |
* Runtime helper for resolving filters |
| 4158 |
*/ |
| 4159 |
function resolveFilter (id) { |
| 4160 |
return resolveAsset(this.$options, 'filters', id, true) || identity |
| 4161 |
} |
| 4162 |
|
| 4163 |
/* */ |
| 4164 |
|
| 4165 |
function isKeyNotMatch (expect, actual) { |
| 4166 |
if (Array.isArray(expect)) { |
| 4167 |
return expect.indexOf(actual) === -1 |
| 4168 |
} else { |
| 4169 |
return expect !== actual |
| 4170 |
} |
| 4171 |
} |
| 4172 |
|
| 4173 |
/** |
| 4174 |
* Runtime helper for checking keyCodes from config. |
| 4175 |
* exposed as Vue.prototype._k |
| 4176 |
* passing in eventKeyName as last argument separately for backwards compat |
| 4177 |
*/ |
| 4178 |
function checkKeyCodes ( |
| 4179 |
eventKeyCode, |
| 4180 |
key, |
| 4181 |
builtInKeyCode, |
| 4182 |
eventKeyName, |
| 4183 |
builtInKeyName |
| 4184 |
) { |
| 4185 |
var mappedKeyCode = config.keyCodes[key] || builtInKeyCode; |
| 4186 |
if (builtInKeyName && eventKeyName && !config.keyCodes[key]) { |
| 4187 |
return isKeyNotMatch(builtInKeyName, eventKeyName) |
| 4188 |
} else if (mappedKeyCode) { |
| 4189 |
return isKeyNotMatch(mappedKeyCode, eventKeyCode) |
| 4190 |
} else if (eventKeyName) { |
| 4191 |
return hyphenate(eventKeyName) !== key |
| 4192 |
} |
| 4193 |
} |
| 4194 |
|
| 4195 |
/* */ |
| 4196 |
|
| 4197 |
/** |
| 4198 |
* Runtime helper for merging v-bind="object" into a VNode's data. |
| 4199 |
*/ |
| 4200 |
function bindObjectProps ( |
| 4201 |
data, |
| 4202 |
tag, |
| 4203 |
value, |
| 4204 |
asProp, |
| 4205 |
isSync |
| 4206 |
) { |
| 4207 |
if (value) { |
| 4208 |
if (!isObject(value)) { |
| 4209 |
process.env.NODE_ENV !== 'production' && warn( |
| 4210 |
'v-bind without argument expects an Object or Array value', |
| 4211 |
this |
| 4212 |
); |
| 4213 |
} else { |
| 4214 |
if (Array.isArray(value)) { |
| 4215 |
value = toObject(value); |
| 4216 |
} |
| 4217 |
var hash; |
| 4218 |
var loop = function ( key ) { |
| 4219 |
if ( |
| 4220 |
key === 'class' || |
| 4221 |
key === 'style' || |
| 4222 |
isReservedAttribute(key) |
| 4223 |
) { |
| 4224 |
hash = data; |
| 4225 |
} else { |
| 4226 |
var type = data.attrs && data.attrs.type; |
| 4227 |
hash = asProp || config.mustUseProp(tag, type, key) |
| 4228 |
? data.domProps || (data.domProps = {}) |
| 4229 |
: data.attrs || (data.attrs = {}); |
| 4230 |
} |
| 4231 |
if (!(key in hash)) { |
| 4232 |
hash[key] = value[key]; |
| 4233 |
|
| 4234 |
if (isSync) { |
| 4235 |
var on = data.on || (data.on = {}); |
| 4236 |
on[("update:" + key)] = function ($event) { |
| 4237 |
value[key] = $event; |
| 4238 |
}; |
| 4239 |
} |
| 4240 |
} |
| 4241 |
}; |
| 4242 |
|
| 4243 |
for (var key in value) loop( key ); |
| 4244 |
} |
| 4245 |
} |
| 4246 |
return data |
| 4247 |
} |
| 4248 |
|
| 4249 |
/* */ |
| 4250 |
|
| 4251 |
/** |
| 4252 |
* Runtime helper for rendering static trees. |
| 4253 |
*/ |
| 4254 |
function renderStatic ( |
| 4255 |
index, |
| 4256 |
isInFor |
| 4257 |
) { |
| 4258 |
var cached = this._staticTrees || (this._staticTrees = []); |
| 4259 |
var tree = cached[index]; |
| 4260 |
// if has already-rendered static tree and not inside v-for, |
| 4261 |
// we can reuse the same tree. |
| 4262 |
if (tree && !isInFor) { |
| 4263 |
return tree |
| 4264 |
} |
| 4265 |
// otherwise, render a fresh tree. |
| 4266 |
tree = cached[index] = this.$options.staticRenderFns[index].call( |
| 4267 |
this._renderProxy, |
| 4268 |
null, |
| 4269 |
this // for render fns generated for functional component templates |
| 4270 |
); |
| 4271 |
markStatic(tree, ("__static__" + index), false); |
| 4272 |
return tree |
| 4273 |
} |
| 4274 |
|
| 4275 |
/** |
| 4276 |
* Runtime helper for v-once. |
| 4277 |
* Effectively it means marking the node as static with a unique key. |
| 4278 |
*/ |
| 4279 |
function markOnce ( |
| 4280 |
tree, |
| 4281 |
index, |
| 4282 |
key |
| 4283 |
) { |
| 4284 |
markStatic(tree, ("__once__" + index + (key ? ("_" + key) : "")), true); |
| 4285 |
return tree |
| 4286 |
} |
| 4287 |
|
| 4288 |
function markStatic ( |
| 4289 |
tree, |
| 4290 |
key, |
| 4291 |
isOnce |
| 4292 |
) { |
| 4293 |
if (Array.isArray(tree)) { |
| 4294 |
for (var i = 0; i < tree.length; i++) { |
| 4295 |
if (tree[i] && typeof tree[i] !== 'string') { |
| 4296 |
markStaticNode(tree[i], (key + "_" + i), isOnce); |
| 4297 |
} |
| 4298 |
} |
| 4299 |
} else { |
| 4300 |
markStaticNode(tree, key, isOnce); |
| 4301 |
} |
| 4302 |
} |
| 4303 |
|
| 4304 |
function markStaticNode (node, key, isOnce) { |
| 4305 |
node.isStatic = true; |
| 4306 |
node.key = key; |
| 4307 |
node.isOnce = isOnce; |
| 4308 |
} |
| 4309 |
|
| 4310 |
/* */ |
| 4311 |
|
| 4312 |
function bindObjectListeners (data, value) { |
| 4313 |
if (value) { |
| 4314 |
if (!isPlainObject(value)) { |
| 4315 |
process.env.NODE_ENV !== 'production' && warn( |
| 4316 |
'v-on without argument expects an Object value', |
| 4317 |
this |
| 4318 |
); |
| 4319 |
} else { |
| 4320 |
var on = data.on = data.on ? extend({}, data.on) : {}; |
| 4321 |
for (var key in value) { |
| 4322 |
var existing = on[key]; |
| 4323 |
var ours = value[key]; |
| 4324 |
on[key] = existing ? [].concat(existing, ours) : ours; |
| 4325 |
} |
| 4326 |
} |
| 4327 |
} |
| 4328 |
return data |
| 4329 |
} |
| 4330 |
|
| 4331 |
/* */ |
| 4332 |
|
| 4333 |
function installRenderHelpers (target) { |
| 4334 |
target._o = markOnce; |
| 4335 |
target._n = toNumber; |
| 4336 |
target._s = toString; |
| 4337 |
target._l = renderList; |
| 4338 |
target._t = renderSlot; |
| 4339 |
target._q = looseEqual; |
| 4340 |
target._i = looseIndexOf; |
| 4341 |
target._m = renderStatic; |
| 4342 |
target._f = resolveFilter; |
| 4343 |
target._k = checkKeyCodes; |
| 4344 |
target._b = bindObjectProps; |
| 4345 |
target._v = createTextVNode; |
| 4346 |
target._e = createEmptyVNode; |
| 4347 |
target._u = resolveScopedSlots; |
| 4348 |
target._g = bindObjectListeners; |
| 4349 |
} |
| 4350 |
|
| 4351 |
/* */ |
| 4352 |
|
| 4353 |
function FunctionalRenderContext ( |
| 4354 |
data, |
| 4355 |
props, |
| 4356 |
children, |
| 4357 |
parent, |
| 4358 |
Ctor |
| 4359 |
) { |
| 4360 |
var options = Ctor.options; |
| 4361 |
// ensure the createElement function in functional components |
| 4362 |
// gets a unique context - this is necessary for correct named slot check |
| 4363 |
var contextVm; |
| 4364 |
if (hasOwn(parent, '_uid')) { |
| 4365 |
contextVm = Object.create(parent); |
| 4366 |
// $flow-disable-line |
| 4367 |
contextVm._original = parent; |
| 4368 |
} else { |
| 4369 |
// the context vm passed in is a functional context as well. |
| 4370 |
// in this case we want to make sure we are able to get a hold to the |
| 4371 |
// real context instance. |
| 4372 |
contextVm = parent; |
| 4373 |
// $flow-disable-line |
| 4374 |
parent = parent._original; |
| 4375 |
} |
| 4376 |
var isCompiled = isTrue(options._compiled); |
| 4377 |
var needNormalization = !isCompiled; |
| 4378 |
|
| 4379 |
this.data = data; |
| 4380 |
this.props = props; |
| 4381 |
this.children = children; |
| 4382 |
this.parent = parent; |
| 4383 |
this.listeners = data.on || emptyObject; |
| 4384 |
this.injections = resolveInject(options.inject, parent); |
| 4385 |
this.slots = function () { return resolveSlots(children, parent); }; |
| 4386 |
|
| 4387 |
// support for compiled functional template |
| 4388 |
if (isCompiled) { |
| 4389 |
// exposing $options for renderStatic() |
| 4390 |
this.$options = options; |
| 4391 |
// pre-resolve slots for renderSlot() |
| 4392 |
this.$slots = this.slots(); |
| 4393 |
this.$scopedSlots = data.scopedSlots || emptyObject; |
| 4394 |
} |
| 4395 |
|
| 4396 |
if (options._scopeId) { |
| 4397 |
this._c = function (a, b, c, d) { |
| 4398 |
var vnode = createElement(contextVm, a, b, c, d, needNormalization); |
| 4399 |
if (vnode && !Array.isArray(vnode)) { |
| 4400 |
vnode.fnScopeId = options._scopeId; |
| 4401 |
vnode.fnContext = parent; |
| 4402 |
} |
| 4403 |
return vnode |
| 4404 |
}; |
| 4405 |
} else { |
| 4406 |
this._c = function (a, b, c, d) { return createElement(contextVm, a, b, c, d, needNormalization); }; |
| 4407 |
} |
| 4408 |
} |
| 4409 |
|
| 4410 |
installRenderHelpers(FunctionalRenderContext.prototype); |
| 4411 |
|
| 4412 |
function createFunctionalComponent ( |
| 4413 |
Ctor, |
| 4414 |
propsData, |
| 4415 |
data, |
| 4416 |
contextVm, |
| 4417 |
children |
| 4418 |
) { |
| 4419 |
var options = Ctor.options; |
| 4420 |
var props = {}; |
| 4421 |
var propOptions = options.props; |
| 4422 |
if (isDef(propOptions)) { |
| 4423 |
for (var key in propOptions) { |
| 4424 |
props[key] = validateProp(key, propOptions, propsData || emptyObject); |
| 4425 |
} |
| 4426 |
} else { |
| 4427 |
if (isDef(data.attrs)) { mergeProps(props, data.attrs); } |
| 4428 |
if (isDef(data.props)) { mergeProps(props, data.props); } |
| 4429 |
} |
| 4430 |
|
| 4431 |
var renderContext = new FunctionalRenderContext( |
| 4432 |
data, |
| 4433 |
props, |
| 4434 |
children, |
| 4435 |
contextVm, |
| 4436 |
Ctor |
| 4437 |
); |
| 4438 |
|
| 4439 |
var vnode = options.render.call(null, renderContext._c, renderContext); |
| 4440 |
|
| 4441 |
if (vnode instanceof VNode) { |
| 4442 |
return cloneAndMarkFunctionalResult(vnode, data, renderContext.parent, options) |
| 4443 |
} else if (Array.isArray(vnode)) { |
| 4444 |
var vnodes = normalizeChildren(vnode) || []; |
| 4445 |
var res = new Array(vnodes.length); |
| 4446 |
for (var i = 0; i < vnodes.length; i++) { |
| 4447 |
res[i] = cloneAndMarkFunctionalResult(vnodes[i], data, renderContext.parent, options); |
| 4448 |
} |
| 4449 |
return res |
| 4450 |
} |
| 4451 |
} |
| 4452 |
|
| 4453 |
function cloneAndMarkFunctionalResult (vnode, data, contextVm, options) { |
| 4454 |
// #7817 clone node before setting fnContext, otherwise if the node is reused |
| 4455 |
// (e.g. it was from a cached normal slot) the fnContext causes named slots |
| 4456 |
// that should not be matched to match. |
| 4457 |
var clone = cloneVNode(vnode); |
| 4458 |
clone.fnContext = contextVm; |
| 4459 |
clone.fnOptions = options; |
| 4460 |
if (data.slot) { |
| 4461 |
(clone.data || (clone.data = {})).slot = data.slot; |
| 4462 |
} |
| 4463 |
return clone |
| 4464 |
} |
| 4465 |
|
| 4466 |
function mergeProps (to, from) { |
| 4467 |
for (var key in from) { |
| 4468 |
to[camelize(key)] = from[key]; |
| 4469 |
} |
| 4470 |
} |
| 4471 |
|
| 4472 |
/* */ |
| 4473 |
|
| 4474 |
|
| 4475 |
|
| 4476 |
|
| 4477 |
// Register the component hook to weex native render engine. |
| 4478 |
// The hook will be triggered by native, not javascript. |
| 4479 |
|
| 4480 |
|
| 4481 |
// Updates the state of the component to weex native render engine. |
| 4482 |
|
| 4483 |
/* */ |
| 4484 |
|
| 4485 |
// https://github.com/Hanks10100/weex-native-directive/tree/master/component |
| 4486 |
|
| 4487 |
// listening on native callback |
| 4488 |
|
| 4489 |
/* */ |
| 4490 |
|
| 4491 |
/* */ |
| 4492 |
|
| 4493 |
// inline hooks to be invoked on component VNodes during patch |
| 4494 |
var componentVNodeHooks = { |
| 4495 |
init: function init ( |
| 4496 |
vnode, |
| 4497 |
hydrating, |
| 4498 |
parentElm, |
| 4499 |
refElm |
| 4500 |
) { |
| 4501 |
if ( |
| 4502 |
vnode.componentInstance && |
| 4503 |
!vnode.componentInstance._isDestroyed && |
| 4504 |
vnode.data.keepAlive |
| 4505 |
) { |
| 4506 |
// kept-alive components, treat as a patch |
| 4507 |
var mountedNode = vnode; // work around flow |
| 4508 |
componentVNodeHooks.prepatch(mountedNode, mountedNode); |
| 4509 |
} else { |
| 4510 |
var child = vnode.componentInstance = createComponentInstanceForVnode( |
| 4511 |
vnode, |
| 4512 |
activeInstance, |
| 4513 |
parentElm, |
| 4514 |
refElm |
| 4515 |
); |
| 4516 |
child.$mount(hydrating ? vnode.elm : undefined, hydrating); |
| 4517 |
} |
| 4518 |
}, |
| 4519 |
|
| 4520 |
prepatch: function prepatch (oldVnode, vnode) { |
| 4521 |
var options = vnode.componentOptions; |
| 4522 |
var child = vnode.componentInstance = oldVnode.componentInstance; |
| 4523 |
updateChildComponent( |
| 4524 |
child, |
| 4525 |
options.propsData, // updated props |
| 4526 |
options.listeners, // updated listeners |
| 4527 |
vnode, // new parent vnode |
| 4528 |
options.children // new children |
| 4529 |
); |
| 4530 |
}, |
| 4531 |
|
| 4532 |
insert: function insert (vnode) { |
| 4533 |
var context = vnode.context; |
| 4534 |
var componentInstance = vnode.componentInstance; |
| 4535 |
if (!componentInstance._isMounted) { |
| 4536 |
componentInstance._isMounted = true; |
| 4537 |
callHook(componentInstance, 'mounted'); |
| 4538 |
} |
| 4539 |
if (vnode.data.keepAlive) { |
| 4540 |
if (context._isMounted) { |
| 4541 |
// vue-router#1212 |
| 4542 |
// During updates, a kept-alive component's child components may |
| 4543 |
// change, so directly walking the tree here may call activated hooks |
| 4544 |
// on incorrect children. Instead we push them into a queue which will |
| 4545 |
// be processed after the whole patch process ended. |
| 4546 |
queueActivatedComponent(componentInstance); |
| 4547 |
} else { |
| 4548 |
activateChildComponent(componentInstance, true /* direct */); |
| 4549 |
} |
| 4550 |
} |
| 4551 |
}, |
| 4552 |
|
| 4553 |
destroy: function destroy (vnode) { |
| 4554 |
var componentInstance = vnode.componentInstance; |
| 4555 |
if (!componentInstance._isDestroyed) { |
| 4556 |
if (!vnode.data.keepAlive) { |
| 4557 |
componentInstance.$destroy(); |
| 4558 |
} else { |
| 4559 |
deactivateChildComponent(componentInstance, true /* direct */); |
| 4560 |
} |
| 4561 |
} |
| 4562 |
} |
| 4563 |
}; |
| 4564 |
|
| 4565 |
var hooksToMerge = Object.keys(componentVNodeHooks); |
| 4566 |
|
| 4567 |
function createComponent ( |
| 4568 |
Ctor, |
| 4569 |
data, |
| 4570 |
context, |
| 4571 |
children, |
| 4572 |
tag |
| 4573 |
) { |
| 4574 |
if (isUndef(Ctor)) { |
| 4575 |
return |
| 4576 |
} |
| 4577 |
|
| 4578 |
var baseCtor = context.$options._base; |
| 4579 |
|
| 4580 |
// plain options object: turn it into a constructor |
| 4581 |
if (isObject(Ctor)) { |
| 4582 |
Ctor = baseCtor.extend(Ctor); |
| 4583 |
} |
| 4584 |
|
| 4585 |
// if at this stage it's not a constructor or an async component factory, |
| 4586 |
// reject. |
| 4587 |
if (typeof Ctor !== 'function') { |
| 4588 |
if (process.env.NODE_ENV !== 'production') { |
| 4589 |
warn(("Invalid Component definition: " + (String(Ctor))), context); |
| 4590 |
} |
| 4591 |
return |
| 4592 |
} |
| 4593 |
|
| 4594 |
// async component |
| 4595 |
var asyncFactory; |
| 4596 |
if (isUndef(Ctor.cid)) { |
| 4597 |
asyncFactory = Ctor; |
| 4598 |
Ctor = resolveAsyncComponent(asyncFactory, baseCtor, context); |
| 4599 |
if (Ctor === undefined) { |
| 4600 |
// return a placeholder node for async component, which is rendered |
| 4601 |
// as a comment node but preserves all the raw information for the node. |
| 4602 |
// the information will be used for async server-rendering and hydration. |
| 4603 |
return createAsyncPlaceholder( |
| 4604 |
asyncFactory, |
| 4605 |
data, |
| 4606 |
context, |
| 4607 |
children, |
| 4608 |
tag |
| 4609 |
) |
| 4610 |
} |
| 4611 |
} |
| 4612 |
|
| 4613 |
data = data || {}; |
| 4614 |
|
| 4615 |
// resolve constructor options in case global mixins are applied after |
| 4616 |
// component constructor creation |
| 4617 |
resolveConstructorOptions(Ctor); |
| 4618 |
|
| 4619 |
// transform component v-model data into props & events |
| 4620 |
if (isDef(data.model)) { |
| 4621 |
transformModel(Ctor.options, data); |
| 4622 |
} |
| 4623 |
|
| 4624 |
// extract props |
| 4625 |
var propsData = extractPropsFromVNodeData(data, Ctor, tag); |
| 4626 |
|
| 4627 |
// functional component |
| 4628 |
if (isTrue(Ctor.options.functional)) { |
| 4629 |
return createFunctionalComponent(Ctor, propsData, data, context, children) |
| 4630 |
} |
| 4631 |
|
| 4632 |
// extract listeners, since these needs to be treated as |
| 4633 |
// child component listeners instead of DOM listeners |
| 4634 |
var listeners = data.on; |
| 4635 |
// replace with listeners with .native modifier |
| 4636 |
// so it gets processed during parent component patch. |
| 4637 |
data.on = data.nativeOn; |
| 4638 |
|
| 4639 |
if (isTrue(Ctor.options.abstract)) { |
| 4640 |
// abstract components do not keep anything |
| 4641 |
// other than props & listeners & slot |
| 4642 |
|
| 4643 |
// work around flow |
| 4644 |
var slot = data.slot; |
| 4645 |
data = {}; |
| 4646 |
if (slot) { |
| 4647 |
data.slot = slot; |
| 4648 |
} |
| 4649 |
} |
| 4650 |
|
| 4651 |
// install component management hooks onto the placeholder node |
| 4652 |
installComponentHooks(data); |
| 4653 |
|
| 4654 |
// return a placeholder vnode |
| 4655 |
var name = Ctor.options.name || tag; |
| 4656 |
var vnode = new VNode( |
| 4657 |
("vue-component-" + (Ctor.cid) + (name ? ("-" + name) : '')), |
| 4658 |
data, undefined, undefined, undefined, context, |
| 4659 |
{ Ctor: Ctor, propsData: propsData, listeners: listeners, tag: tag, children: children }, |
| 4660 |
asyncFactory |
| 4661 |
); |
| 4662 |
|
| 4663 |
// Weex specific: invoke recycle-list optimized @render function for |
| 4664 |
// extracting cell-slot template. |
| 4665 |
// https://github.com/Hanks10100/weex-native-directive/tree/master/component |
| 4666 |
/* istanbul ignore if */ |
| 4667 |
return vnode |
| 4668 |
} |
| 4669 |
|
| 4670 |
function createComponentInstanceForVnode ( |
| 4671 |
vnode, // we know it's MountedComponentVNode but flow doesn't |
| 4672 |
parent, // activeInstance in lifecycle state |
| 4673 |
parentElm, |
| 4674 |
refElm |
| 4675 |
) { |
| 4676 |
var options = { |
| 4677 |
_isComponent: true, |
| 4678 |
parent: parent, |
| 4679 |
_parentVnode: vnode, |
| 4680 |
_parentElm: parentElm || null, |
| 4681 |
_refElm: refElm || null |
| 4682 |
}; |
| 4683 |
// check inline-template render functions |
| 4684 |
var inlineTemplate = vnode.data.inlineTemplate; |
| 4685 |
if (isDef(inlineTemplate)) { |
| 4686 |
options.render = inlineTemplate.render; |
| 4687 |
options.staticRenderFns = inlineTemplate.staticRenderFns; |
| 4688 |
} |
| 4689 |
return new vnode.componentOptions.Ctor(options) |
| 4690 |
} |
| 4691 |
|
| 4692 |
function installComponentHooks (data) { |
| 4693 |
var hooks = data.hook || (data.hook = {}); |
| 4694 |
for (var i = 0; i < hooksToMerge.length; i++) { |
| 4695 |
var key = hooksToMerge[i]; |
| 4696 |
hooks[key] = componentVNodeHooks[key]; |
| 4697 |
} |
| 4698 |
} |
| 4699 |
|
| 4700 |
// transform component v-model info (value and callback) into |
| 4701 |
// prop and event handler respectively. |
| 4702 |
function transformModel (options, data) { |
| 4703 |
var prop = (options.model && options.model.prop) || 'value'; |
| 4704 |
var event = (options.model && options.model.event) || 'input';(data.props || (data.props = {}))[prop] = data.model.value; |
| 4705 |
var on = data.on || (data.on = {}); |
| 4706 |
if (isDef(on[event])) { |
| 4707 |
on[event] = [data.model.callback].concat(on[event]); |
| 4708 |
} else { |
| 4709 |
on[event] = data.model.callback; |
| 4710 |
} |
| 4711 |
} |
| 4712 |
|
| 4713 |
/* */ |
| 4714 |
|
| 4715 |
var SIMPLE_NORMALIZE = 1; |
| 4716 |
var ALWAYS_NORMALIZE = 2; |
| 4717 |
|
| 4718 |
// wrapper function for providing a more flexible interface |
| 4719 |
// without getting yelled at by flow |
| 4720 |
function createElement ( |
| 4721 |
context, |
| 4722 |
tag, |
| 4723 |
data, |
| 4724 |
children, |
| 4725 |
normalizationType, |
| 4726 |
alwaysNormalize |
| 4727 |
) { |
| 4728 |
if (Array.isArray(data) || isPrimitive(data)) { |
| 4729 |
normalizationType = children; |
| 4730 |
children = data; |
| 4731 |
data = undefined; |
| 4732 |
} |
| 4733 |
if (isTrue(alwaysNormalize)) { |
| 4734 |
normalizationType = ALWAYS_NORMALIZE; |
| 4735 |
} |
| 4736 |
return _createElement(context, tag, data, children, normalizationType) |
| 4737 |
} |
| 4738 |
|
| 4739 |
function _createElement ( |
| 4740 |
context, |
| 4741 |
tag, |
| 4742 |
data, |
| 4743 |
children, |
| 4744 |
normalizationType |
| 4745 |
) { |
| 4746 |
if (isDef(data) && isDef((data).__ob__)) { |
| 4747 |
process.env.NODE_ENV !== 'production' && warn( |
| 4748 |
"Avoid using observed data object as vnode data: " + (JSON.stringify(data)) + "\n" + |
| 4749 |
'Always create fresh vnode data objects in each render!', |
| 4750 |
context |
| 4751 |
); |
| 4752 |
return createEmptyVNode() |
| 4753 |
} |
| 4754 |
// object syntax in v-bind |
| 4755 |
if (isDef(data) && isDef(data.is)) { |
| 4756 |
tag = data.is; |
| 4757 |
} |
| 4758 |
if (!tag) { |
| 4759 |
// in case of component :is set to falsy value |
| 4760 |
return createEmptyVNode() |
| 4761 |
} |
| 4762 |
// warn against non-primitive key |
| 4763 |
if (process.env.NODE_ENV !== 'production' && |
| 4764 |
isDef(data) && isDef(data.key) && !isPrimitive(data.key) |
| 4765 |
) { |
| 4766 |
{ |
| 4767 |
warn( |
| 4768 |
'Avoid using non-primitive value as key, ' + |
| 4769 |
'use string/number value instead.', |
| 4770 |
context |
| 4771 |
); |
| 4772 |
} |
| 4773 |
} |
| 4774 |
// support single function children as default scoped slot |
| 4775 |
if (Array.isArray(children) && |
| 4776 |
typeof children[0] === 'function' |
| 4777 |
) { |
| 4778 |
data = data || {}; |
| 4779 |
data.scopedSlots = { default: children[0] }; |
| 4780 |
children.length = 0; |
| 4781 |
} |
| 4782 |
if (normalizationType === ALWAYS_NORMALIZE) { |
| 4783 |
children = normalizeChildren(children); |
| 4784 |
} else if (normalizationType === SIMPLE_NORMALIZE) { |
| 4785 |
children = simpleNormalizeChildren(children); |
| 4786 |
} |
| 4787 |
var vnode, ns; |
| 4788 |
if (typeof tag === 'string') { |
| 4789 |
var Ctor; |
| 4790 |
ns = (context.$vnode && context.$vnode.ns) || config.getTagNamespace(tag); |
| 4791 |
if (config.isReservedTag(tag)) { |
| 4792 |
// platform built-in elements |
| 4793 |
vnode = new VNode( |
| 4794 |
config.parsePlatformTagName(tag), data, children, |
| 4795 |
undefined, undefined, context |
| 4796 |
); |
| 4797 |
} else if (isDef(Ctor = resolveAsset(context.$options, 'components', tag))) { |
| 4798 |
// component |
| 4799 |
vnode = createComponent(Ctor, data, context, children, tag); |
| 4800 |
} else { |
| 4801 |
// unknown or unlisted namespaced elements |
| 4802 |
// check at runtime because it may get assigned a namespace when its |
| 4803 |
// parent normalizes children |
| 4804 |
vnode = new VNode( |
| 4805 |
tag, data, children, |
| 4806 |
undefined, undefined, context |
| 4807 |
); |
| 4808 |
} |
| 4809 |
} else { |
| 4810 |
// direct component options / constructor |
| 4811 |
vnode = createComponent(tag, data, context, children); |
| 4812 |
} |
| 4813 |
if (Array.isArray(vnode)) { |
| 4814 |
return vnode |
| 4815 |
} else if (isDef(vnode)) { |
| 4816 |
if (isDef(ns)) { applyNS(vnode, ns); } |
| 4817 |
if (isDef(data)) { registerDeepBindings(data); } |
| 4818 |
return vnode |
| 4819 |
} else { |
| 4820 |
return createEmptyVNode() |
| 4821 |
} |
| 4822 |
} |
| 4823 |
|
| 4824 |
function applyNS (vnode, ns, force) { |
| 4825 |
vnode.ns = ns; |
| 4826 |
if (vnode.tag === 'foreignObject') { |
| 4827 |
// use default namespace inside foreignObject |
| 4828 |
ns = undefined; |
| 4829 |
force = true; |
| 4830 |
} |
| 4831 |
if (isDef(vnode.children)) { |
| 4832 |
for (var i = 0, l = vnode.children.length; i < l; i++) { |
| 4833 |
var child = vnode.children[i]; |
| 4834 |
if (isDef(child.tag) && ( |
| 4835 |
isUndef(child.ns) || (isTrue(force) && child.tag !== 'svg'))) { |
| 4836 |
applyNS(child, ns, force); |
| 4837 |
} |
| 4838 |
} |
| 4839 |
} |
| 4840 |
} |
| 4841 |
|
| 4842 |
// ref #5318 |
| 4843 |
// necessary to ensure parent re-render when deep bindings like :style and |
| 4844 |
// :class are used on slot nodes |
| 4845 |
function registerDeepBindings (data) { |
| 4846 |
if (isObject(data.style)) { |
| 4847 |
traverse(data.style); |
| 4848 |
} |
| 4849 |
if (isObject(data.class)) { |
| 4850 |
traverse(data.class); |
| 4851 |
} |
| 4852 |
} |
| 4853 |
|
| 4854 |
/* */ |
| 4855 |
|
| 4856 |
function initRender (vm) { |
| 4857 |
vm._vnode = null; // the root of the child tree |
| 4858 |
vm._staticTrees = null; // v-once cached trees |
| 4859 |
var options = vm.$options; |
| 4860 |
var parentVnode = vm.$vnode = options._parentVnode; // the placeholder node in parent tree |
| 4861 |
var renderContext = parentVnode && parentVnode.context; |
| 4862 |
vm.$slots = resolveSlots(options._renderChildren, renderContext); |
| 4863 |
vm.$scopedSlots = emptyObject; |
| 4864 |
// bind the createElement fn to this instance |
| 4865 |
// so that we get proper render context inside it. |
| 4866 |
// args order: tag, data, children, normalizationType, alwaysNormalize |
| 4867 |
// internal version is used by render functions compiled from templates |
| 4868 |
vm._c = function (a, b, c, d) { return createElement(vm, a, b, c, d, false); }; |
| 4869 |
// normalization is always applied for the public version, used in |
| 4870 |
// user-written render functions. |
| 4871 |
vm.$createElement = function (a, b, c, d) { return createElement(vm, a, b, c, d, true); }; |
| 4872 |
|
| 4873 |
// $attrs & $listeners are exposed for easier HOC creation. |
| 4874 |
// they need to be reactive so that HOCs using them are always updated |
| 4875 |
var parentData = parentVnode && parentVnode.data; |
| 4876 |
|
| 4877 |
/* istanbul ignore else */ |
| 4878 |
if (process.env.NODE_ENV !== 'production') { |
| 4879 |
defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, function () { |
| 4880 |
!isUpdatingChildComponent && warn("$attrs is readonly.", vm); |
| 4881 |
}, true); |
| 4882 |
defineReactive(vm, '$listeners', options._parentListeners || emptyObject, function () { |
| 4883 |
!isUpdatingChildComponent && warn("$listeners is readonly.", vm); |
| 4884 |
}, true); |
| 4885 |
} else { |
| 4886 |
defineReactive(vm, '$attrs', parentData && parentData.attrs || emptyObject, null, true); |
| 4887 |
defineReactive(vm, '$listeners', options._parentListeners || emptyObject, null, true); |
| 4888 |
} |
| 4889 |
} |
| 4890 |
|
| 4891 |
function renderMixin (Vue) { |
| 4892 |
// install runtime convenience helpers |
| 4893 |
installRenderHelpers(Vue.prototype); |
| 4894 |
|
| 4895 |
Vue.prototype.$nextTick = function (fn) { |
| 4896 |
return nextTick(fn, this) |
| 4897 |
}; |
| 4898 |
|
| 4899 |
Vue.prototype._render = function () { |
| 4900 |
var vm = this; |
| 4901 |
var ref = vm.$options; |
| 4902 |
var render = ref.render; |
| 4903 |
var _parentVnode = ref._parentVnode; |
| 4904 |
|
| 4905 |
// reset _rendered flag on slots for duplicate slot check |
| 4906 |
if (process.env.NODE_ENV !== 'production') { |
| 4907 |
for (var key in vm.$slots) { |
| 4908 |
// $flow-disable-line |
| 4909 |
vm.$slots[key]._rendered = false; |
| 4910 |
} |
| 4911 |
} |
| 4912 |
|
| 4913 |
if (_parentVnode) { |
| 4914 |
vm.$scopedSlots = _parentVnode.data.scopedSlots || emptyObject; |
| 4915 |
} |
| 4916 |
|
| 4917 |
// set parent vnode. this allows render functions to have access |
| 4918 |
// to the data on the placeholder node. |
| 4919 |
vm.$vnode = _parentVnode; |
| 4920 |
// render self |
| 4921 |
var vnode; |
| 4922 |
try { |
| 4923 |
vnode = render.call(vm._renderProxy, vm.$createElement); |
| 4924 |
} catch (e) { |
| 4925 |
handleError(e, vm, "render"); |
| 4926 |
// return error render result, |
| 4927 |
// or previous vnode to prevent render error causing blank component |
| 4928 |
/* istanbul ignore else */ |
| 4929 |
if (process.env.NODE_ENV !== 'production') { |
| 4930 |
if (vm.$options.renderError) { |
| 4931 |
try { |
| 4932 |
vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e); |
| 4933 |
} catch (e) { |
| 4934 |
handleError(e, vm, "renderError"); |
| 4935 |
vnode = vm._vnode; |
| 4936 |
} |
| 4937 |
} else { |
| 4938 |
vnode = vm._vnode; |
| 4939 |
} |
| 4940 |
} else { |
| 4941 |
vnode = vm._vnode; |
| 4942 |
} |
| 4943 |
} |
| 4944 |
// return empty vnode in case the render function errored out |
| 4945 |
if (!(vnode instanceof VNode)) { |
| 4946 |
if (process.env.NODE_ENV !== 'production' && Array.isArray(vnode)) { |
| 4947 |
warn( |
| 4948 |
'Multiple root nodes returned from render function. Render function ' + |
| 4949 |
'should return a single root node.', |
| 4950 |
vm |
| 4951 |
); |
| 4952 |
} |
| 4953 |
vnode = createEmptyVNode(); |
| 4954 |
} |
| 4955 |
// set parent |
| 4956 |
vnode.parent = _parentVnode; |
| 4957 |
return vnode |
| 4958 |
}; |
| 4959 |
} |
| 4960 |
|
| 4961 |
/* */ |
| 4962 |
|
| 4963 |
var uid$3 = 0; |
| 4964 |
|
| 4965 |
function initMixin (Vue) { |
| 4966 |
Vue.prototype._init = function (options) { |
| 4967 |
var vm = this; |
| 4968 |
// a uid |
| 4969 |
vm._uid = uid$3++; |
| 4970 |
|
| 4971 |
var startTag, endTag; |
| 4972 |
/* istanbul ignore if */ |
| 4973 |
if (process.env.NODE_ENV !== 'production' && config.performance && mark) { |
| 4974 |
startTag = "vue-perf-start:" + (vm._uid); |
| 4975 |
endTag = "vue-perf-end:" + (vm._uid); |
| 4976 |
mark(startTag); |
| 4977 |
} |
| 4978 |
|
| 4979 |
// a flag to avoid this being observed |
| 4980 |
vm._isVue = true; |
| 4981 |
// merge options |
| 4982 |
if (options && options._isComponent) { |
| 4983 |
// optimize internal component instantiation |
| 4984 |
// since dynamic options merging is pretty slow, and none of the |
| 4985 |
// internal component options needs special treatment. |
| 4986 |
initInternalComponent(vm, options); |
| 4987 |
} else { |
| 4988 |
vm.$options = mergeOptions( |
| 4989 |
resolveConstructorOptions(vm.constructor), |
| 4990 |
options || {}, |
| 4991 |
vm |
| 4992 |
); |
| 4993 |
} |
| 4994 |
/* istanbul ignore else */ |
| 4995 |
if (process.env.NODE_ENV !== 'production') { |
| 4996 |
initProxy(vm); |
| 4997 |
} else { |
| 4998 |
vm._renderProxy = vm; |
| 4999 |
} |
| 5000 |
// expose real self |
| 5001 |
vm._self = vm; |
| 5002 |
initLifecycle(vm); |
| 5003 |
initEvents(vm); |
| 5004 |
initRender(vm); |
| 5005 |
callHook(vm, 'beforeCreate'); |
| 5006 |
initInjections(vm); // resolve injections before data/props |
| 5007 |
initState(vm); |
| 5008 |
initProvide(vm); // resolve provide after data/props |
| 5009 |
callHook(vm, 'created'); |
| 5010 |
|
| 5011 |
/* istanbul ignore if */ |
| 5012 |
if (process.env.NODE_ENV !== 'production' && config.performance && mark) { |
| 5013 |
vm._name = formatComponentName(vm, false); |
| 5014 |
mark(endTag); |
| 5015 |
measure(("vue " + (vm._name) + " init"), startTag, endTag); |
| 5016 |
} |
| 5017 |
|
| 5018 |
if (vm.$options.el) { |
| 5019 |
vm.$mount(vm.$options.el); |
| 5020 |
} |
| 5021 |
}; |
| 5022 |
} |
| 5023 |
|
| 5024 |
function initInternalComponent (vm, options) { |
| 5025 |
var opts = vm.$options = Object.create(vm.constructor.options); |
| 5026 |
// doing this because it's faster than dynamic enumeration. |
| 5027 |
var parentVnode = options._parentVnode; |
| 5028 |
opts.parent = options.parent; |
| 5029 |
opts._parentVnode = parentVnode; |
| 5030 |
opts._parentElm = options._parentElm; |
| 5031 |
opts._refElm = options._refElm; |
| 5032 |
|
| 5033 |
var vnodeComponentOptions = parentVnode.componentOptions; |
| 5034 |
opts.propsData = vnodeComponentOptions.propsData; |
| 5035 |
opts._parentListeners = vnodeComponentOptions.listeners; |
| 5036 |
opts._renderChildren = vnodeComponentOptions.children; |
| 5037 |
opts._componentTag = vnodeComponentOptions.tag; |
| 5038 |
|
| 5039 |
if (options.render) { |
| 5040 |
opts.render = options.render; |
| 5041 |
opts.staticRenderFns = options.staticRenderFns; |
| 5042 |
} |
| 5043 |
} |
| 5044 |
|
| 5045 |
function resolveConstructorOptions (Ctor) { |
| 5046 |
var options = Ctor.options; |
| 5047 |
if (Ctor.super) { |
| 5048 |
var superOptions = resolveConstructorOptions(Ctor.super); |
| 5049 |
var cachedSuperOptions = Ctor.superOptions; |
| 5050 |
if (superOptions !== cachedSuperOptions) { |
| 5051 |
// super option changed, |
| 5052 |
// need to resolve new options. |
| 5053 |
Ctor.superOptions = superOptions; |
| 5054 |
// check if there are any late-modified/attached options (#4976) |
| 5055 |
var modifiedOptions = resolveModifiedOptions(Ctor); |
| 5056 |
// update base extend options |
| 5057 |
if (modifiedOptions) { |
| 5058 |
extend(Ctor.extendOptions, modifiedOptions); |
| 5059 |
} |
| 5060 |
options = Ctor.options = mergeOptions(superOptions, Ctor.extendOptions); |
| 5061 |
if (options.name) { |
| 5062 |
options.components[options.name] = Ctor; |
| 5063 |
} |
| 5064 |
} |
| 5065 |
} |
| 5066 |
return options |
| 5067 |
} |
| 5068 |
|
| 5069 |
function resolveModifiedOptions (Ctor) { |
| 5070 |
var modified; |
| 5071 |
var latest = Ctor.options; |
| 5072 |
var extended = Ctor.extendOptions; |
| 5073 |
var sealed = Ctor.sealedOptions; |
| 5074 |
for (var key in latest) { |
| 5075 |
if (latest[key] !== sealed[key]) { |
| 5076 |
if (!modified) { modified = {}; } |
| 5077 |
modified[key] = dedupe(latest[key], extended[key], sealed[key]); |
| 5078 |
} |
| 5079 |
} |
| 5080 |
return modified |
| 5081 |
} |
| 5082 |
|
| 5083 |
function dedupe (latest, extended, sealed) { |
| 5084 |
// compare latest and sealed to ensure lifecycle hooks won't be duplicated |
| 5085 |
// between merges |
| 5086 |
if (Array.isArray(latest)) { |
| 5087 |
var res = []; |
| 5088 |
sealed = Array.isArray(sealed) ? sealed : [sealed]; |
| 5089 |
extended = Array.isArray(extended) ? extended : [extended]; |
| 5090 |
for (var i = 0; i < latest.length; i++) { |
| 5091 |
// push original options and not sealed options to exclude duplicated options |
| 5092 |
if (extended.indexOf(latest[i]) >= 0 || sealed.indexOf(latest[i]) < 0) { |
| 5093 |
res.push(latest[i]); |
| 5094 |
} |
| 5095 |
} |
| 5096 |
return res |
| 5097 |
} else { |
| 5098 |
return latest |
| 5099 |
} |
| 5100 |
} |
| 5101 |
|
| 5102 |
function Vue (options) { |
| 5103 |
if (process.env.NODE_ENV !== 'production' && |
| 5104 |
!(this instanceof Vue) |
| 5105 |
) { |
| 5106 |
warn('Vue is a constructor and should be called with the `new` keyword'); |
| 5107 |
} |
| 5108 |
this._init(options); |
| 5109 |
} |
| 5110 |
|
| 5111 |
initMixin(Vue); |
| 5112 |
stateMixin(Vue); |
| 5113 |
eventsMixin(Vue); |
| 5114 |
lifecycleMixin(Vue); |
| 5115 |
renderMixin(Vue); |
| 5116 |
|
| 5117 |
/* */ |
| 5118 |
|
| 5119 |
function initUse (Vue) { |
| 5120 |
Vue.use = function (plugin) { |
| 5121 |
var installedPlugins = (this._installedPlugins || (this._installedPlugins = [])); |
| 5122 |
if (installedPlugins.indexOf(plugin) > -1) { |
| 5123 |
return this |
| 5124 |
} |
| 5125 |
|
| 5126 |
// additional parameters |
| 5127 |
var args = toArray(arguments, 1); |
| 5128 |
args.unshift(this); |
| 5129 |
if (typeof plugin.install === 'function') { |
| 5130 |
plugin.install.apply(plugin, args); |
| 5131 |
} else if (typeof plugin === 'function') { |
| 5132 |
plugin.apply(null, args); |
| 5133 |
} |
| 5134 |
installedPlugins.push(plugin); |
| 5135 |
return this |
| 5136 |
}; |
| 5137 |
} |
| 5138 |
|
| 5139 |
/* */ |
| 5140 |
|
| 5141 |
function initMixin$1 (Vue) { |
| 5142 |
Vue.mixin = function (mixin) { |
| 5143 |
this.options = mergeOptions(this.options, mixin); |
| 5144 |
return this |
| 5145 |
}; |
| 5146 |
} |
| 5147 |
|
| 5148 |
/* */ |
| 5149 |
|
| 5150 |
function initExtend (Vue) { |
| 5151 |
/** |
| 5152 |
* Each instance constructor, including Vue, has a unique |
| 5153 |
* cid. This enables us to create wrapped "child |
| 5154 |
* constructors" for prototypal inheritance and cache them. |
| 5155 |
*/ |
| 5156 |
Vue.cid = 0; |
| 5157 |
var cid = 1; |
| 5158 |
|
| 5159 |
/** |
| 5160 |
* Class inheritance |
| 5161 |
*/ |
| 5162 |
Vue.extend = function (extendOptions) { |
| 5163 |
extendOptions = extendOptions || {}; |
| 5164 |
var Super = this; |
| 5165 |
var SuperId = Super.cid; |
| 5166 |
var cachedCtors = extendOptions._Ctor || (extendOptions._Ctor = {}); |
| 5167 |
if (cachedCtors[SuperId]) { |
| 5168 |
return cachedCtors[SuperId] |
| 5169 |
} |
| 5170 |
|
| 5171 |
var name = extendOptions.name || Super.options.name; |
| 5172 |
if (process.env.NODE_ENV !== 'production' && name) { |
| 5173 |
validateComponentName(name); |
| 5174 |
} |
| 5175 |
|
| 5176 |
var Sub = function VueComponent (options) { |
| 5177 |
this._init(options); |
| 5178 |
}; |
| 5179 |
Sub.prototype = Object.create(Super.prototype); |
| 5180 |
Sub.prototype.constructor = Sub; |
| 5181 |
Sub.cid = cid++; |
| 5182 |
Sub.options = mergeOptions( |
| 5183 |
Super.options, |
| 5184 |
extendOptions |
| 5185 |
); |
| 5186 |
Sub['super'] = Super; |
| 5187 |
|
| 5188 |
// For props and computed properties, we define the proxy getters on |
| 5189 |
// the Vue instances at extension time, on the extended prototype. This |
| 5190 |
// avoids Object.defineProperty calls for each instance created. |
| 5191 |
if (Sub.options.props) { |
| 5192 |
initProps$1(Sub); |
| 5193 |
} |
| 5194 |
if (Sub.options.computed) { |
| 5195 |
initComputed$1(Sub); |
| 5196 |
} |
| 5197 |
|
| 5198 |
// allow further extension/mixin/plugin usage |
| 5199 |
Sub.extend = Super.extend; |
| 5200 |
Sub.mixin = Super.mixin; |
| 5201 |
Sub.use = Super.use; |
| 5202 |
|
| 5203 |
// create asset registers, so extended classes |
| 5204 |
// can have their private assets too. |
| 5205 |
ASSET_TYPES.forEach(function (type) { |
| 5206 |
Sub[type] = Super[type]; |
| 5207 |
}); |
| 5208 |
// enable recursive self-lookup |
| 5209 |
if (name) { |
| 5210 |
Sub.options.components[name] = Sub; |
| 5211 |
} |
| 5212 |
|
| 5213 |
// keep a reference to the super options at extension time. |
| 5214 |
// later at instantiation we can check if Super's options have |
| 5215 |
// been updated. |
| 5216 |
Sub.superOptions = Super.options; |
| 5217 |
Sub.extendOptions = extendOptions; |
| 5218 |
Sub.sealedOptions = extend({}, Sub.options); |
| 5219 |
|
| 5220 |
// cache constructor |
| 5221 |
cachedCtors[SuperId] = Sub; |
| 5222 |
return Sub |
| 5223 |
}; |
| 5224 |
} |
| 5225 |
|
| 5226 |
function initProps$1 (Comp) { |
| 5227 |
var props = Comp.options.props; |
| 5228 |
for (var key in props) { |
| 5229 |
proxy(Comp.prototype, "_props", key); |
| 5230 |
} |
| 5231 |
} |
| 5232 |
|
| 5233 |
function initComputed$1 (Comp) { |
| 5234 |
var computed = Comp.options.computed; |
| 5235 |
for (var key in computed) { |
| 5236 |
defineComputed(Comp.prototype, key, computed[key]); |
| 5237 |
} |
| 5238 |
} |
| 5239 |
|
| 5240 |
/* */ |
| 5241 |
|
| 5242 |
function initAssetRegisters (Vue) { |
| 5243 |
/** |
| 5244 |
* Create asset registration methods. |
| 5245 |
*/ |
| 5246 |
ASSET_TYPES.forEach(function (type) { |
| 5247 |
Vue[type] = function ( |
| 5248 |
id, |
| 5249 |
definition |
| 5250 |
) { |
| 5251 |
if (!definition) { |
| 5252 |
return this.options[type + 's'][id] |
| 5253 |
} else { |
| 5254 |
/* istanbul ignore if */ |
| 5255 |
if (process.env.NODE_ENV !== 'production' && type === 'component') { |
| 5256 |
validateComponentName(id); |
| 5257 |
} |
| 5258 |
if (type === 'component' && isPlainObject(definition)) { |
| 5259 |
definition.name = definition.name || id; |
| 5260 |
definition = this.options._base.extend(definition); |
| 5261 |
} |
| 5262 |
if (type === 'directive' && typeof definition === 'function') { |
| 5263 |
definition = { bind: definition, update: definition }; |
| 5264 |
} |
| 5265 |
this.options[type + 's'][id] = definition; |
| 5266 |
return definition |
| 5267 |
} |
| 5268 |
}; |
| 5269 |
}); |
| 5270 |
} |
| 5271 |
|
| 5272 |
/* */ |
| 5273 |
|
| 5274 |
function getComponentName (opts) { |
| 5275 |
return opts && (opts.Ctor.options.name || opts.tag) |
| 5276 |
} |
| 5277 |
|
| 5278 |
function matches (pattern, name) { |
| 5279 |
if (Array.isArray(pattern)) { |
| 5280 |
return pattern.indexOf(name) > -1 |
| 5281 |
} else if (typeof pattern === 'string') { |
| 5282 |
return pattern.split(',').indexOf(name) > -1 |
| 5283 |
} else if (isRegExp(pattern)) { |
| 5284 |
return pattern.test(name) |
| 5285 |
} |
| 5286 |
/* istanbul ignore next */ |
| 5287 |
return false |
| 5288 |
} |
| 5289 |
|
| 5290 |
function pruneCache (keepAliveInstance, filter) { |
| 5291 |
var cache = keepAliveInstance.cache; |
| 5292 |
var keys = keepAliveInstance.keys; |
| 5293 |
var _vnode = keepAliveInstance._vnode; |
| 5294 |
for (var key in cache) { |
| 5295 |
var cachedNode = cache[key]; |
| 5296 |
if (cachedNode) { |
| 5297 |
var name = getComponentName(cachedNode.componentOptions); |
| 5298 |
if (name && !filter(name)) { |
| 5299 |
pruneCacheEntry(cache, key, keys, _vnode); |
| 5300 |
} |
| 5301 |
} |
| 5302 |
} |
| 5303 |
} |
| 5304 |
|
| 5305 |
function pruneCacheEntry ( |
| 5306 |
cache, |
| 5307 |
key, |
| 5308 |
keys, |
| 5309 |
current |
| 5310 |
) { |
| 5311 |
var cached$$1 = cache[key]; |
| 5312 |
if (cached$$1 && (!current || cached$$1.tag !== current.tag)) { |
| 5313 |
cached$$1.componentInstance.$destroy(); |
| 5314 |
} |
| 5315 |
cache[key] = null; |
| 5316 |
remove(keys, key); |
| 5317 |
} |
| 5318 |
|
| 5319 |
var patternTypes = [String, RegExp, Array]; |
| 5320 |
|
| 5321 |
var KeepAlive = { |
| 5322 |
name: 'keep-alive', |
| 5323 |
abstract: true, |
| 5324 |
|
| 5325 |
props: { |
| 5326 |
include: patternTypes, |
| 5327 |
exclude: patternTypes, |
| 5328 |
max: [String, Number] |
| 5329 |
}, |
| 5330 |
|
| 5331 |
created: function created () { |
| 5332 |
this.cache = Object.create(null); |
| 5333 |
this.keys = []; |
| 5334 |
}, |
| 5335 |
|
| 5336 |
destroyed: function destroyed () { |
| 5337 |
var this$1 = this; |
| 5338 |
|
| 5339 |
for (var key in this$1.cache) { |
| 5340 |
pruneCacheEntry(this$1.cache, key, this$1.keys); |
| 5341 |
} |
| 5342 |
}, |
| 5343 |
|
| 5344 |
mounted: function mounted () { |
| 5345 |
var this$1 = this; |
| 5346 |
|
| 5347 |
this.$watch('include', function (val) { |
| 5348 |
pruneCache(this$1, function (name) { return matches(val, name); }); |
| 5349 |
}); |
| 5350 |
this.$watch('exclude', function (val) { |
| 5351 |
pruneCache(this$1, function (name) { return !matches(val, name); }); |
| 5352 |
}); |
| 5353 |
}, |
| 5354 |
|
| 5355 |
render: function render () { |
| 5356 |
var slot = this.$slots.default; |
| 5357 |
var vnode = getFirstComponentChild(slot); |
| 5358 |
var componentOptions = vnode && vnode.componentOptions; |
| 5359 |
if (componentOptions) { |
| 5360 |
// check pattern |
| 5361 |
var name = getComponentName(componentOptions); |
| 5362 |
var ref = this; |
| 5363 |
var include = ref.include; |
| 5364 |
var exclude = ref.exclude; |
| 5365 |
if ( |
| 5366 |
// not included |
| 5367 |
(include && (!name || !matches(include, name))) || |
| 5368 |
// excluded |
| 5369 |
(exclude && name && matches(exclude, name)) |
| 5370 |
) { |
| 5371 |
return vnode |
| 5372 |
} |
| 5373 |
|
| 5374 |
var ref$1 = this; |
| 5375 |
var cache = ref$1.cache; |
| 5376 |
var keys = ref$1.keys; |
| 5377 |
var key = vnode.key == null |
| 5378 |
// same constructor may get registered as different local components |
| 5379 |
// so cid alone is not enough (#3269) |
| 5380 |
? componentOptions.Ctor.cid + (componentOptions.tag ? ("::" + (componentOptions.tag)) : '') |
| 5381 |
: vnode.key; |
| 5382 |
if (cache[key]) { |
| 5383 |
vnode.componentInstance = cache[key].componentInstance; |
| 5384 |
// make current key freshest |
| 5385 |
remove(keys, key); |
| 5386 |
keys.push(key); |
| 5387 |
} else { |
| 5388 |
cache[key] = vnode; |
| 5389 |
keys.push(key); |
| 5390 |
// prune oldest entry |
| 5391 |
if (this.max && keys.length > parseInt(this.max)) { |
| 5392 |
pruneCacheEntry(cache, keys[0], keys, this._vnode); |
| 5393 |
} |
| 5394 |
} |
| 5395 |
|
| 5396 |
vnode.data.keepAlive = true; |
| 5397 |
} |
| 5398 |
return vnode || (slot && slot[0]) |
| 5399 |
} |
| 5400 |
} |
| 5401 |
|
| 5402 |
var builtInComponents = { |
| 5403 |
KeepAlive: KeepAlive |
| 5404 |
} |
| 5405 |
|
| 5406 |
/* */ |
| 5407 |
|
| 5408 |
function initGlobalAPI (Vue) { |
| 5409 |
// config |
| 5410 |
var configDef = {}; |
| 5411 |
configDef.get = function () { return config; }; |
| 5412 |
if (process.env.NODE_ENV !== 'production') { |
| 5413 |
configDef.set = function () { |
| 5414 |
warn( |
| 5415 |
'Do not replace the Vue.config object, set individual fields instead.' |
| 5416 |
); |
| 5417 |
}; |
| 5418 |
} |
| 5419 |
Object.defineProperty(Vue, 'config', configDef); |
| 5420 |
|
| 5421 |
// exposed util methods. |
| 5422 |
// NOTE: these are not considered part of the public API - avoid relying on |
| 5423 |
// them unless you are aware of the risk. |
| 5424 |
Vue.util = { |
| 5425 |
warn: warn, |
| 5426 |
extend: extend, |
| 5427 |
mergeOptions: mergeOptions, |
| 5428 |
defineReactive: defineReactive |
| 5429 |
}; |
| 5430 |
|
| 5431 |
Vue.set = set; |
| 5432 |
Vue.delete = del; |
| 5433 |
Vue.nextTick = nextTick; |
| 5434 |
|
| 5435 |
Vue.options = Object.create(null); |
| 5436 |
ASSET_TYPES.forEach(function (type) { |
| 5437 |
Vue.options[type + 's'] = Object.create(null); |
| 5438 |
}); |
| 5439 |
|
| 5440 |
// this is used to identify the "base" constructor to extend all plain-object |
| 5441 |
// components with in Weex's multi-instance scenarios. |
| 5442 |
Vue.options._base = Vue; |
| 5443 |
|
| 5444 |
extend(Vue.options.components, builtInComponents); |
| 5445 |
|
| 5446 |
initUse(Vue); |
| 5447 |
initMixin$1(Vue); |
| 5448 |
initExtend(Vue); |
| 5449 |
initAssetRegisters(Vue); |
| 5450 |
} |
| 5451 |
|
| 5452 |
initGlobalAPI(Vue); |
| 5453 |
|
| 5454 |
Object.defineProperty(Vue.prototype, '$isServer', { |
| 5455 |
get: isServerRendering |
| 5456 |
}); |
| 5457 |
|
| 5458 |
Object.defineProperty(Vue.prototype, '$ssrContext', { |
| 5459 |
get: function get () { |
| 5460 |
/* istanbul ignore next */ |
| 5461 |
return this.$vnode && this.$vnode.ssrContext |
| 5462 |
} |
| 5463 |
}); |
| 5464 |
|
| 5465 |
// expose FunctionalRenderContext for ssr runtime helper installation |
| 5466 |
Object.defineProperty(Vue, 'FunctionalRenderContext', { |
| 5467 |
value: FunctionalRenderContext |
| 5468 |
}); |
| 5469 |
|
| 5470 |
Vue.version = '2.5.17'; |
| 5471 |
|
| 5472 |
/* */ |
| 5473 |
|
| 5474 |
// these are reserved for web because they are directly compiled away |
| 5475 |
// during template compilation |
| 5476 |
var isReservedAttr = makeMap('style,class'); |
| 5477 |
|
| 5478 |
// attributes that should be using props for binding |
| 5479 |
var acceptValue = makeMap('input,textarea,option,select,progress'); |
| 5480 |
var mustUseProp = function (tag, type, attr) { |
| 5481 |
return ( |
| 5482 |
(attr === 'value' && acceptValue(tag)) && type !== 'button' || |
| 5483 |
(attr === 'selected' && tag === 'option') || |
| 5484 |
(attr === 'checked' && tag === 'input') || |
| 5485 |
(attr === 'muted' && tag === 'video') |
| 5486 |
) |
| 5487 |
}; |
| 5488 |
|
| 5489 |
var isEnumeratedAttr = makeMap('contenteditable,draggable,spellcheck'); |
| 5490 |
|
| 5491 |
var isBooleanAttr = makeMap( |
| 5492 |
'allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,' + |
| 5493 |
'default,defaultchecked,defaultmuted,defaultselected,defer,disabled,' + |
| 5494 |
'enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,' + |
| 5495 |
'muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,' + |
| 5496 |
'required,reversed,scoped,seamless,selected,sortable,translate,' + |
| 5497 |
'truespeed,typemustmatch,visible' |
| 5498 |
); |
| 5499 |
|
| 5500 |
var xlinkNS = 'http://www.w3.org/1999/xlink'; |
| 5501 |
|
| 5502 |
var isXlink = function (name) { |
| 5503 |
return name.charAt(5) === ':' && name.slice(0, 5) === 'xlink' |
| 5504 |
}; |
| 5505 |
|
| 5506 |
var getXlinkProp = function (name) { |
| 5507 |
return isXlink(name) ? name.slice(6, name.length) : '' |
| 5508 |
}; |
| 5509 |
|
| 5510 |
var isFalsyAttrValue = function (val) { |
| 5511 |
return val == null || val === false |
| 5512 |
}; |
| 5513 |
|
| 5514 |
/* */ |
| 5515 |
|
| 5516 |
function genClassForVnode (vnode) { |
| 5517 |
var data = vnode.data; |
| 5518 |
var parentNode = vnode; |
| 5519 |
var childNode = vnode; |
| 5520 |
while (isDef(childNode.componentInstance)) { |
| 5521 |
childNode = childNode.componentInstance._vnode; |
| 5522 |
if (childNode && childNode.data) { |
| 5523 |
data = mergeClassData(childNode.data, data); |
| 5524 |
} |
| 5525 |
} |
| 5526 |
while (isDef(parentNode = parentNode.parent)) { |
| 5527 |
if (parentNode && parentNode.data) { |
| 5528 |
data = mergeClassData(data, parentNode.data); |
| 5529 |
} |
| 5530 |
} |
| 5531 |
return renderClass(data.staticClass, data.class) |
| 5532 |
} |
| 5533 |
|
| 5534 |
function mergeClassData (child, parent) { |
| 5535 |
return { |
| 5536 |
staticClass: concat(child.staticClass, parent.staticClass), |
| 5537 |
class: isDef(child.class) |
| 5538 |
? [child.class, parent.class] |
| 5539 |
: parent.class |
| 5540 |
} |
| 5541 |
} |
| 5542 |
|
| 5543 |
function renderClass ( |
| 5544 |
staticClass, |
| 5545 |
dynamicClass |
| 5546 |
) { |
| 5547 |
if (isDef(staticClass) || isDef(dynamicClass)) { |
| 5548 |
return concat(staticClass, stringifyClass(dynamicClass)) |
| 5549 |
} |
| 5550 |
/* istanbul ignore next */ |
| 5551 |
return '' |
| 5552 |
} |
| 5553 |
|
| 5554 |
function concat (a, b) { |
| 5555 |
return a ? b ? (a + ' ' + b) : a : (b || '') |
| 5556 |
} |
| 5557 |
|
| 5558 |
function stringifyClass (value) { |
| 5559 |
if (Array.isArray(value)) { |
| 5560 |
return stringifyArray(value) |
| 5561 |
} |
| 5562 |
if (isObject(value)) { |
| 5563 |
return stringifyObject(value) |
| 5564 |
} |
| 5565 |
if (typeof value === 'string') { |
| 5566 |
return value |
| 5567 |
} |
| 5568 |
/* istanbul ignore next */ |
| 5569 |
return '' |
| 5570 |
} |
| 5571 |
|
| 5572 |
function stringifyArray (value) { |
| 5573 |
var res = ''; |
| 5574 |
var stringified; |
| 5575 |
for (var i = 0, l = value.length; i < l; i++) { |
| 5576 |
if (isDef(stringified = stringifyClass(value[i])) && stringified !== '') { |
| 5577 |
if (res) { res += ' '; } |
| 5578 |
res += stringified; |
| 5579 |
} |
| 5580 |
} |
| 5581 |
return res |
| 5582 |
} |
| 5583 |
|
| 5584 |
function stringifyObject (value) { |
| 5585 |
var res = ''; |
| 5586 |
for (var key in value) { |
| 5587 |
if (value[key]) { |
| 5588 |
if (res) { res += ' '; } |
| 5589 |
res += key; |
| 5590 |
} |
| 5591 |
} |
| 5592 |
return res |
| 5593 |
} |
| 5594 |
|
| 5595 |
/* */ |
| 5596 |
|
| 5597 |
var namespaceMap = { |
| 5598 |
svg: 'http://www.w3.org/2000/svg', |
| 5599 |
math: 'http://www.w3.org/1998/Math/MathML' |
| 5600 |
}; |
| 5601 |
|
| 5602 |
var isHTMLTag = makeMap( |
| 5603 |
'html,body,base,head,link,meta,style,title,' + |
| 5604 |
'address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,' + |
| 5605 |
'div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,' + |
| 5606 |
'a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,' + |
| 5607 |
's,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,' + |
| 5608 |
'embed,object,param,source,canvas,script,noscript,del,ins,' + |
| 5609 |
'caption,col,colgroup,table,thead,tbody,td,th,tr,' + |
| 5610 |
'button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,' + |
| 5611 |
'output,progress,select,textarea,' + |
| 5612 |
'details,dialog,menu,menuitem,summary,' + |
| 5613 |
'content,element,shadow,template,blockquote,iframe,tfoot' |
| 5614 |
); |
| 5615 |
|
| 5616 |
// this map is intentionally selective, only covering SVG elements that may |
| 5617 |
// contain child elements. |
| 5618 |
var isSVG = makeMap( |
| 5619 |
'svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,' + |
| 5620 |
'foreignObject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,' + |
| 5621 |
'polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view', |
| 5622 |
true |
| 5623 |
); |
| 5624 |
|
| 5625 |
var isPreTag = function (tag) { return tag === 'pre'; }; |
| 5626 |
|
| 5627 |
var isReservedTag = function (tag) { |
| 5628 |
return isHTMLTag(tag) || isSVG(tag) |
| 5629 |
}; |
| 5630 |
|
| 5631 |
function getTagNamespace (tag) { |
| 5632 |
if (isSVG(tag)) { |
| 5633 |
return 'svg' |
| 5634 |
} |
| 5635 |
// basic support for MathML |
| 5636 |
// note it doesn't support other MathML elements being component roots |
| 5637 |
if (tag === 'math') { |
| 5638 |
return 'math' |
| 5639 |
} |
| 5640 |
} |
| 5641 |
|
| 5642 |
var unknownElementCache = Object.create(null); |
| 5643 |
function isUnknownElement (tag) { |
| 5644 |
/* istanbul ignore if */ |
| 5645 |
if (!inBrowser) { |
| 5646 |
return true |
| 5647 |
} |
| 5648 |
if (isReservedTag(tag)) { |
| 5649 |
return false |
| 5650 |
} |
| 5651 |
tag = tag.toLowerCase(); |
| 5652 |
/* istanbul ignore if */ |
| 5653 |
if (unknownElementCache[tag] != null) { |
| 5654 |
return unknownElementCache[tag] |
| 5655 |
} |
| 5656 |
var el = document.createElement(tag); |
| 5657 |
if (tag.indexOf('-') > -1) { |
| 5658 |
// http://stackoverflow.com/a/28210364/1070244 |
| 5659 |
return (unknownElementCache[tag] = ( |
| 5660 |
el.constructor === window.HTMLUnknownElement || |
| 5661 |
el.constructor === window.HTMLElement |
| 5662 |
)) |
| 5663 |
} else { |
| 5664 |
return (unknownElementCache[tag] = /HTMLUnknownElement/.test(el.toString())) |
| 5665 |
} |
| 5666 |
} |
| 5667 |
|
| 5668 |
var isTextInputType = makeMap('text,number,password,search,email,tel,url'); |
| 5669 |
|
| 5670 |
/* */ |
| 5671 |
|
| 5672 |
/** |
| 5673 |
* Query an element selector if it's not an element already. |
| 5674 |
*/ |
| 5675 |
function query (el) { |
| 5676 |
if (typeof el === 'string') { |
| 5677 |
var selected = document.querySelector(el); |
| 5678 |
if (!selected) { |
| 5679 |
process.env.NODE_ENV !== 'production' && warn( |
| 5680 |
'Cannot find element: ' + el |
| 5681 |
); |
| 5682 |
return document.createElement('div') |
| 5683 |
} |
| 5684 |
return selected |
| 5685 |
} else { |
| 5686 |
return el |
| 5687 |
} |
| 5688 |
} |
| 5689 |
|
| 5690 |
/* */ |
| 5691 |
|
| 5692 |
function createElement$1 (tagName, vnode) { |
| 5693 |
var elm = document.createElement(tagName); |
| 5694 |
if (tagName !== 'select') { |
| 5695 |
return elm |
| 5696 |
} |
| 5697 |
// false or null will remove the attribute but undefined will not |
| 5698 |
if (vnode.data && vnode.data.attrs && vnode.data.attrs.multiple !== undefined) { |
| 5699 |
elm.setAttribute('multiple', 'multiple'); |
| 5700 |
} |
| 5701 |
return elm |
| 5702 |
} |
| 5703 |
|
| 5704 |
function createElementNS (namespace, tagName) { |
| 5705 |
return document.createElementNS(namespaceMap[namespace], tagName) |
| 5706 |
} |
| 5707 |
|
| 5708 |
function createTextNode (text) { |
| 5709 |
return document.createTextNode(text) |
| 5710 |
} |
| 5711 |
|
| 5712 |
function createComment (text) { |
| 5713 |
return document.createComment(text) |
| 5714 |
} |
| 5715 |
|
| 5716 |
function insertBefore (parentNode, newNode, referenceNode) { |
| 5717 |
parentNode.insertBefore(newNode, referenceNode); |
| 5718 |
} |
| 5719 |
|
| 5720 |
function removeChild (node, child) { |
| 5721 |
node.removeChild(child); |
| 5722 |
} |
| 5723 |
|
| 5724 |
function appendChild (node, child) { |
| 5725 |
node.appendChild(child); |
| 5726 |
} |
| 5727 |
|
| 5728 |
function parentNode (node) { |
| 5729 |
return node.parentNode |
| 5730 |
} |
| 5731 |
|
| 5732 |
function nextSibling (node) { |
| 5733 |
return node.nextSibling |
| 5734 |
} |
| 5735 |
|
| 5736 |
function tagName (node) { |
| 5737 |
return node.tagName |
| 5738 |
} |
| 5739 |
|
| 5740 |
function setTextContent (node, text) { |
| 5741 |
node.textContent = text; |
| 5742 |
} |
| 5743 |
|
| 5744 |
function setStyleScope (node, scopeId) { |
| 5745 |
node.setAttribute(scopeId, ''); |
| 5746 |
} |
| 5747 |
|
| 5748 |
|
| 5749 |
var nodeOps = Object.freeze({ |
| 5750 |
createElement: createElement$1, |
| 5751 |
createElementNS: createElementNS, |
| 5752 |
createTextNode: createTextNode, |
| 5753 |
createComment: createComment, |
| 5754 |
insertBefore: insertBefore, |
| 5755 |
removeChild: removeChild, |
| 5756 |
appendChild: appendChild, |
| 5757 |
parentNode: parentNode, |
| 5758 |
nextSibling: nextSibling, |
| 5759 |
tagName: tagName, |
| 5760 |
setTextContent: setTextContent, |
| 5761 |
setStyleScope: setStyleScope |
| 5762 |
}); |
| 5763 |
|
| 5764 |
/* */ |
| 5765 |
|
| 5766 |
var ref = { |
| 5767 |
create: function create (_, vnode) { |
| 5768 |
registerRef(vnode); |
| 5769 |
}, |
| 5770 |
update: function update (oldVnode, vnode) { |
| 5771 |
if (oldVnode.data.ref !== vnode.data.ref) { |
| 5772 |
registerRef(oldVnode, true); |
| 5773 |
registerRef(vnode); |
| 5774 |
} |
| 5775 |
}, |
| 5776 |
destroy: function destroy (vnode) { |
| 5777 |
registerRef(vnode, true); |
| 5778 |
} |
| 5779 |
} |
| 5780 |
|
| 5781 |
function registerRef (vnode, isRemoval) { |
| 5782 |
var key = vnode.data.ref; |
| 5783 |
if (!isDef(key)) { return } |
| 5784 |
|
| 5785 |
var vm = vnode.context; |
| 5786 |
var ref = vnode.componentInstance || vnode.elm; |
| 5787 |
var refs = vm.$refs; |
| 5788 |
if (isRemoval) { |
| 5789 |
if (Array.isArray(refs[key])) { |
| 5790 |
remove(refs[key], ref); |
| 5791 |
} else if (refs[key] === ref) { |
| 5792 |
refs[key] = undefined; |
| 5793 |
} |
| 5794 |
} else { |
| 5795 |
if (vnode.data.refInFor) { |
| 5796 |
if (!Array.isArray(refs[key])) { |
| 5797 |
refs[key] = [ref]; |
| 5798 |
} else if (refs[key].indexOf(ref) < 0) { |
| 5799 |
// $flow-disable-line |
| 5800 |
refs[key].push(ref); |
| 5801 |
} |
| 5802 |
} else { |
| 5803 |
refs[key] = ref; |
| 5804 |
} |
| 5805 |
} |
| 5806 |
} |
| 5807 |
|
| 5808 |
/** |
| 5809 |
* Virtual DOM patching algorithm based on Snabbdom by |
| 5810 |
* Simon Friis Vindum (@paldepind) |
| 5811 |
* Licensed under the MIT License |
| 5812 |
* https://github.com/paldepind/snabbdom/blob/master/LICENSE |
| 5813 |
* |
| 5814 |
* modified by Evan You (@yyx990803) |
| 5815 |
* |
| 5816 |
* Not type-checking this because this file is perf-critical and the cost |
| 5817 |
* of making flow understand it is not worth it. |
| 5818 |
*/ |
| 5819 |
|
| 5820 |
var emptyNode = new VNode('', {}, []); |
| 5821 |
|
| 5822 |
var hooks = ['create', 'activate', 'update', 'remove', 'destroy']; |
| 5823 |
|
| 5824 |
function sameVnode (a, b) { |
| 5825 |
return ( |
| 5826 |
a.key === b.key && ( |
| 5827 |
( |
| 5828 |
a.tag === b.tag && |
| 5829 |
a.isComment === b.isComment && |
| 5830 |
isDef(a.data) === isDef(b.data) && |
| 5831 |
sameInputType(a, b) |
| 5832 |
) || ( |
| 5833 |
isTrue(a.isAsyncPlaceholder) && |
| 5834 |
a.asyncFactory === b.asyncFactory && |
| 5835 |
isUndef(b.asyncFactory.error) |
| 5836 |
) |
| 5837 |
) |
| 5838 |
) |
| 5839 |
} |
| 5840 |
|
| 5841 |
function sameInputType (a, b) { |
| 5842 |
if (a.tag !== 'input') { return true } |
| 5843 |
var i; |
| 5844 |
var typeA = isDef(i = a.data) && isDef(i = i.attrs) && i.type; |
| 5845 |
var typeB = isDef(i = b.data) && isDef(i = i.attrs) && i.type; |
| 5846 |
return typeA === typeB || isTextInputType(typeA) && isTextInputType(typeB) |
| 5847 |
} |
| 5848 |
|
| 5849 |
function createKeyToOldIdx (children, beginIdx, endIdx) { |
| 5850 |
var i, key; |
| 5851 |
var map = {}; |
| 5852 |
for (i = beginIdx; i <= endIdx; ++i) { |
| 5853 |
key = children[i].key; |
| 5854 |
if (isDef(key)) { map[key] = i; } |
| 5855 |
} |
| 5856 |
return map |
| 5857 |
} |
| 5858 |
|
| 5859 |
function createPatchFunction (backend) { |
| 5860 |
var i, j; |
| 5861 |
var cbs = {}; |
| 5862 |
|
| 5863 |
var modules = backend.modules; |
| 5864 |
var nodeOps = backend.nodeOps; |
| 5865 |
|
| 5866 |
for (i = 0; i < hooks.length; ++i) { |
| 5867 |
cbs[hooks[i]] = []; |
| 5868 |
for (j = 0; j < modules.length; ++j) { |
| 5869 |
if (isDef(modules[j][hooks[i]])) { |
| 5870 |
cbs[hooks[i]].push(modules[j][hooks[i]]); |
| 5871 |
} |
| 5872 |
} |
| 5873 |
} |
| 5874 |
|
| 5875 |
function emptyNodeAt (elm) { |
| 5876 |
return new VNode(nodeOps.tagName(elm).toLowerCase(), {}, [], undefined, elm) |
| 5877 |
} |
| 5878 |
|
| 5879 |
function createRmCb (childElm, listeners) { |
| 5880 |
function remove () { |
| 5881 |
if (--remove.listeners === 0) { |
| 5882 |
removeNode(childElm); |
| 5883 |
} |
| 5884 |
} |
| 5885 |
remove.listeners = listeners; |
| 5886 |
return remove |
| 5887 |
} |
| 5888 |
|
| 5889 |
function removeNode (el) { |
| 5890 |
var parent = nodeOps.parentNode(el); |
| 5891 |
// element may have already been removed due to v-html / v-text |
| 5892 |
if (isDef(parent)) { |
| 5893 |
nodeOps.removeChild(parent, el); |
| 5894 |
} |
| 5895 |
} |
| 5896 |
|
| 5897 |
function isUnknownElement$$1 (vnode, inVPre) { |
| 5898 |
return ( |
| 5899 |
!inVPre && |
| 5900 |
!vnode.ns && |
| 5901 |
!( |
| 5902 |
config.ignoredElements.length && |
| 5903 |
config.ignoredElements.some(function (ignore) { |
| 5904 |
return isRegExp(ignore) |
| 5905 |
? ignore.test(vnode.tag) |
| 5906 |
: ignore === vnode.tag |
| 5907 |
}) |
| 5908 |
) && |
| 5909 |
config.isUnknownElement(vnode.tag) |
| 5910 |
) |
| 5911 |
} |
| 5912 |
|
| 5913 |
var creatingElmInVPre = 0; |
| 5914 |
|
| 5915 |
function createElm ( |
| 5916 |
vnode, |
| 5917 |
insertedVnodeQueue, |
| 5918 |
parentElm, |
| 5919 |
refElm, |
| 5920 |
nested, |
| 5921 |
ownerArray, |
| 5922 |
index |
| 5923 |
) { |
| 5924 |
if (isDef(vnode.elm) && isDef(ownerArray)) { |
| 5925 |
// This vnode was used in a previous render! |
| 5926 |
// now it's used as a new node, overwriting its elm would cause |
| 5927 |
// potential patch errors down the road when it's used as an insertion |
| 5928 |
// reference node. Instead, we clone the node on-demand before creating |
| 5929 |
// associated DOM element for it. |
| 5930 |
vnode = ownerArray[index] = cloneVNode(vnode); |
| 5931 |
} |
| 5932 |
|
| 5933 |
vnode.isRootInsert = !nested; // for transition enter check |
| 5934 |
if (createComponent(vnode, insertedVnodeQueue, parentElm, refElm)) { |
| 5935 |
return |
| 5936 |
} |
| 5937 |
|
| 5938 |
var data = vnode.data; |
| 5939 |
var children = vnode.children; |
| 5940 |
var tag = vnode.tag; |
| 5941 |
if (isDef(tag)) { |
| 5942 |
if (process.env.NODE_ENV !== 'production') { |
| 5943 |
if (data && data.pre) { |
| 5944 |
creatingElmInVPre++; |
| 5945 |
} |
| 5946 |
if (isUnknownElement$$1(vnode, creatingElmInVPre)) { |
| 5947 |
warn( |
| 5948 |
'Unknown custom element: <' + tag + '> - did you ' + |
| 5949 |
'register the component correctly? For recursive components, ' + |
| 5950 |
'make sure to provide the "name" option.', |
| 5951 |
vnode.context |
| 5952 |
); |
| 5953 |
} |
| 5954 |
} |
| 5955 |
|
| 5956 |
vnode.elm = vnode.ns |
| 5957 |
? nodeOps.createElementNS(vnode.ns, tag) |
| 5958 |
: nodeOps.createElement(tag, vnode); |
| 5959 |
setScope(vnode); |
| 5960 |
|
| 5961 |
/* istanbul ignore if */ |
| 5962 |
{ |
| 5963 |
createChildren(vnode, children, insertedVnodeQueue); |
| 5964 |
if (isDef(data)) { |
| 5965 |
invokeCreateHooks(vnode, insertedVnodeQueue); |
| 5966 |
} |
| 5967 |
insert(parentElm, vnode.elm, refElm); |
| 5968 |
} |
| 5969 |
|
| 5970 |
if (process.env.NODE_ENV !== 'production' && data && data.pre) { |
| 5971 |
creatingElmInVPre--; |
| 5972 |
} |
| 5973 |
} else if (isTrue(vnode.isComment)) { |
| 5974 |
vnode.elm = nodeOps.createComment(vnode.text); |
| 5975 |
insert(parentElm, vnode.elm, refElm); |
| 5976 |
} else { |
| 5977 |
vnode.elm = nodeOps.createTextNode(vnode.text); |
| 5978 |
insert(parentElm, vnode.elm, refElm); |
| 5979 |
} |
| 5980 |
} |
| 5981 |
|
| 5982 |
function createComponent (vnode, insertedVnodeQueue, parentElm, refElm) { |
| 5983 |
var i = vnode.data; |
| 5984 |
if (isDef(i)) { |
| 5985 |
var isReactivated = isDef(vnode.componentInstance) && i.keepAlive; |
| 5986 |
if (isDef(i = i.hook) && isDef(i = i.init)) { |
| 5987 |
i(vnode, false /* hydrating */, parentElm, refElm); |
| 5988 |
} |
| 5989 |
// after calling the init hook, if the vnode is a child component |
| 5990 |
// it should've created a child instance and mounted it. the child |
| 5991 |
// component also has set the placeholder vnode's elm. |
| 5992 |
// in that case we can just return the element and be done. |
| 5993 |
if (isDef(vnode.componentInstance)) { |
| 5994 |
initComponent(vnode, insertedVnodeQueue); |
| 5995 |
if (isTrue(isReactivated)) { |
| 5996 |
reactivateComponent(vnode, insertedVnodeQueue, parentElm, refElm); |
| 5997 |
} |
| 5998 |
return true |
| 5999 |
} |
| 6000 |
} |
| 6001 |
} |
| 6002 |
|
| 6003 |
function initComponent (vnode, insertedVnodeQueue) { |
| 6004 |
if (isDef(vnode.data.pendingInsert)) { |
| 6005 |
insertedVnodeQueue.push.apply(insertedVnodeQueue, vnode.data.pendingInsert); |
| 6006 |
vnode.data.pendingInsert = null; |
| 6007 |
} |
| 6008 |
vnode.elm = vnode.componentInstance.$el; |
| 6009 |
if (isPatchable(vnode)) { |
| 6010 |
invokeCreateHooks(vnode, insertedVnodeQueue); |
| 6011 |
setScope(vnode); |
| 6012 |
} else { |
| 6013 |
// empty component root. |
| 6014 |
// skip all element-related modules except for ref (#3455) |
| 6015 |
registerRef(vnode); |
| 6016 |
// make sure to invoke the insert hook |
| 6017 |
insertedVnodeQueue.push(vnode); |
| 6018 |
} |
| 6019 |
} |
| 6020 |
|
| 6021 |
function reactivateComponent (vnode, insertedVnodeQueue, parentElm, refElm) { |
| 6022 |
var i; |
| 6023 |
// hack for #4339: a reactivated component with inner transition |
| 6024 |
// does not trigger because the inner node's created hooks are not called |
| 6025 |
// again. It's not ideal to involve module-specific logic in here but |
| 6026 |
// there doesn't seem to be a better way to do it. |
| 6027 |
var innerNode = vnode; |
| 6028 |
while (innerNode.componentInstance) { |
| 6029 |
innerNode = innerNode.componentInstance._vnode; |
| 6030 |
if (isDef(i = innerNode.data) && isDef(i = i.transition)) { |
| 6031 |
for (i = 0; i < cbs.activate.length; ++i) { |
| 6032 |
cbs.activate[i](emptyNode, innerNode); |
| 6033 |
} |
| 6034 |
insertedVnodeQueue.push(innerNode); |
| 6035 |
break |
| 6036 |
} |
| 6037 |
} |
| 6038 |
// unlike a newly created component, |
| 6039 |
// a reactivated keep-alive component doesn't insert itself |
| 6040 |
insert(parentElm, vnode.elm, refElm); |
| 6041 |
} |
| 6042 |
|
| 6043 |
function insert (parent, elm, ref$$1) { |
| 6044 |
if (isDef(parent)) { |
| 6045 |
if (isDef(ref$$1)) { |
| 6046 |
if (ref$$1.parentNode === parent) { |
| 6047 |
nodeOps.insertBefore(parent, elm, ref$$1); |
| 6048 |
} |
| 6049 |
} else { |
| 6050 |
nodeOps.appendChild(parent, elm); |
| 6051 |
} |
| 6052 |
} |
| 6053 |
} |
| 6054 |
|
| 6055 |
function createChildren (vnode, children, insertedVnodeQueue) { |
| 6056 |
if (Array.isArray(children)) { |
| 6057 |
if (process.env.NODE_ENV !== 'production') { |
| 6058 |
checkDuplicateKeys(children); |
| 6059 |
} |
| 6060 |
for (var i = 0; i < children.length; ++i) { |
| 6061 |
createElm(children[i], insertedVnodeQueue, vnode.elm, null, true, children, i); |
| 6062 |
} |
| 6063 |
} else if (isPrimitive(vnode.text)) { |
| 6064 |
nodeOps.appendChild(vnode.elm, nodeOps.createTextNode(String(vnode.text))); |
| 6065 |
} |
| 6066 |
} |
| 6067 |
|
| 6068 |
function isPatchable (vnode) { |
| 6069 |
while (vnode.componentInstance) { |
| 6070 |
vnode = vnode.componentInstance._vnode; |
| 6071 |
} |
| 6072 |
return isDef(vnode.tag) |
| 6073 |
} |
| 6074 |
|
| 6075 |
function invokeCreateHooks (vnode, insertedVnodeQueue) { |
| 6076 |
for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { |
| 6077 |
cbs.create[i$1](emptyNode, vnode); |
| 6078 |
} |
| 6079 |
i = vnode.data.hook; // Reuse variable |
| 6080 |
if (isDef(i)) { |
| 6081 |
if (isDef(i.create)) { i.create(emptyNode, vnode); } |
| 6082 |
if (isDef(i.insert)) { insertedVnodeQueue.push(vnode); } |
| 6083 |
} |
| 6084 |
} |
| 6085 |
|
| 6086 |
// set scope id attribute for scoped CSS. |
| 6087 |
// this is implemented as a special case to avoid the overhead |
| 6088 |
// of going through the normal attribute patching process. |
| 6089 |
function setScope (vnode) { |
| 6090 |
var i; |
| 6091 |
if (isDef(i = vnode.fnScopeId)) { |
| 6092 |
nodeOps.setStyleScope(vnode.elm, i); |
| 6093 |
} else { |
| 6094 |
var ancestor = vnode; |
| 6095 |
while (ancestor) { |
| 6096 |
if (isDef(i = ancestor.context) && isDef(i = i.$options._scopeId)) { |
| 6097 |
nodeOps.setStyleScope(vnode.elm, i); |
| 6098 |
} |
| 6099 |
ancestor = ancestor.parent; |
| 6100 |
} |
| 6101 |
} |
| 6102 |
// for slot content they should also get the scopeId from the host instance. |
| 6103 |
if (isDef(i = activeInstance) && |
| 6104 |
i !== vnode.context && |
| 6105 |
i !== vnode.fnContext && |
| 6106 |
isDef(i = i.$options._scopeId) |
| 6107 |
) { |
| 6108 |
nodeOps.setStyleScope(vnode.elm, i); |
| 6109 |
} |
| 6110 |
} |
| 6111 |
|
| 6112 |
function addVnodes (parentElm, refElm, vnodes, startIdx, endIdx, insertedVnodeQueue) { |
| 6113 |
for (; startIdx <= endIdx; ++startIdx) { |
| 6114 |
createElm(vnodes[startIdx], insertedVnodeQueue, parentElm, refElm, false, vnodes, startIdx); |
| 6115 |
} |
| 6116 |
} |
| 6117 |
|
| 6118 |
function invokeDestroyHook (vnode) { |
| 6119 |
var i, j; |
| 6120 |
var data = vnode.data; |
| 6121 |
if (isDef(data)) { |
| 6122 |
if (isDef(i = data.hook) && isDef(i = i.destroy)) { i(vnode); } |
| 6123 |
for (i = 0; i < cbs.destroy.length; ++i) { cbs.destroy[i](vnode); } |
| 6124 |
} |
| 6125 |
if (isDef(i = vnode.children)) { |
| 6126 |
for (j = 0; j < vnode.children.length; ++j) { |
| 6127 |
invokeDestroyHook(vnode.children[j]); |
| 6128 |
} |
| 6129 |
} |
| 6130 |
} |
| 6131 |
|
| 6132 |
function removeVnodes (parentElm, vnodes, startIdx, endIdx) { |
| 6133 |
for (; startIdx <= endIdx; ++startIdx) { |
| 6134 |
var ch = vnodes[startIdx]; |
| 6135 |
if (isDef(ch)) { |
| 6136 |
if (isDef(ch.tag)) { |
| 6137 |
removeAndInvokeRemoveHook(ch); |
| 6138 |
invokeDestroyHook(ch); |
| 6139 |
} else { // Text node |
| 6140 |
removeNode(ch.elm); |
| 6141 |
} |
| 6142 |
} |
| 6143 |
} |
| 6144 |
} |
| 6145 |
|
| 6146 |
function removeAndInvokeRemoveHook (vnode, rm) { |
| 6147 |
if (isDef(rm) || isDef(vnode.data)) { |
| 6148 |
var i; |
| 6149 |
var listeners = cbs.remove.length + 1; |
| 6150 |
if (isDef(rm)) { |
| 6151 |
// we have a recursively passed down rm callback |
| 6152 |
// increase the listeners count |
| 6153 |
rm.listeners += listeners; |
| 6154 |
} else { |
| 6155 |
// directly removing |
| 6156 |
rm = createRmCb(vnode.elm, listeners); |
| 6157 |
} |
| 6158 |
// recursively invoke hooks on child component root node |
| 6159 |
if (isDef(i = vnode.componentInstance) && isDef(i = i._vnode) && isDef(i.data)) { |
| 6160 |
removeAndInvokeRemoveHook(i, rm); |
| 6161 |
} |
| 6162 |
for (i = 0; i < cbs.remove.length; ++i) { |
| 6163 |
cbs.remove[i](vnode, rm); |
| 6164 |
} |
| 6165 |
if (isDef(i = vnode.data.hook) && isDef(i = i.remove)) { |
| 6166 |
i(vnode, rm); |
| 6167 |
} else { |
| 6168 |
rm(); |
| 6169 |
} |
| 6170 |
} else { |
| 6171 |
removeNode(vnode.elm); |
| 6172 |
} |
| 6173 |
} |
| 6174 |
|
| 6175 |
function updateChildren (parentElm, oldCh, newCh, insertedVnodeQueue, removeOnly) { |
| 6176 |
var oldStartIdx = 0; |
| 6177 |
var newStartIdx = 0; |
| 6178 |
var oldEndIdx = oldCh.length - 1; |
| 6179 |
var oldStartVnode = oldCh[0]; |
| 6180 |
var oldEndVnode = oldCh[oldEndIdx]; |
| 6181 |
var newEndIdx = newCh.length - 1; |
| 6182 |
var newStartVnode = newCh[0]; |
| 6183 |
var newEndVnode = newCh[newEndIdx]; |
| 6184 |
var oldKeyToIdx, idxInOld, vnodeToMove, refElm; |
| 6185 |
|
| 6186 |
// removeOnly is a special flag used only by <transition-group> |
| 6187 |
// to ensure removed elements stay in correct relative positions |
| 6188 |
// during leaving transitions |
| 6189 |
var canMove = !removeOnly; |
| 6190 |
|
| 6191 |
if (process.env.NODE_ENV !== 'production') { |
| 6192 |
checkDuplicateKeys(newCh); |
| 6193 |
} |
| 6194 |
|
| 6195 |
while (oldStartIdx <= oldEndIdx && newStartIdx <= newEndIdx) { |
| 6196 |
if (isUndef(oldStartVnode)) { |
| 6197 |
oldStartVnode = oldCh[++oldStartIdx]; // Vnode has been moved left |
| 6198 |
} else if (isUndef(oldEndVnode)) { |
| 6199 |
oldEndVnode = oldCh[--oldEndIdx]; |
| 6200 |
} else if (sameVnode(oldStartVnode, newStartVnode)) { |
| 6201 |
patchVnode(oldStartVnode, newStartVnode, insertedVnodeQueue); |
| 6202 |
oldStartVnode = oldCh[++oldStartIdx]; |
| 6203 |
newStartVnode = newCh[++newStartIdx]; |
| 6204 |
} else if (sameVnode(oldEndVnode, newEndVnode)) { |
| 6205 |
patchVnode(oldEndVnode, newEndVnode, insertedVnodeQueue); |
| 6206 |
oldEndVnode = oldCh[--oldEndIdx]; |
| 6207 |
newEndVnode = newCh[--newEndIdx]; |
| 6208 |
} else if (sameVnode(oldStartVnode, newEndVnode)) { // Vnode moved right |
| 6209 |
patchVnode(oldStartVnode, newEndVnode, insertedVnodeQueue); |
| 6210 |
canMove && nodeOps.insertBefore(parentElm, oldStartVnode.elm, nodeOps.nextSibling(oldEndVnode.elm)); |
| 6211 |
oldStartVnode = oldCh[++oldStartIdx]; |
| 6212 |
newEndVnode = newCh[--newEndIdx]; |
| 6213 |
} else if (sameVnode(oldEndVnode, newStartVnode)) { // Vnode moved left |
| 6214 |
patchVnode(oldEndVnode, newStartVnode, insertedVnodeQueue); |
| 6215 |
canMove && nodeOps.insertBefore(parentElm, oldEndVnode.elm, oldStartVnode.elm); |
| 6216 |
oldEndVnode = oldCh[--oldEndIdx]; |
| 6217 |
newStartVnode = newCh[++newStartIdx]; |
| 6218 |
} else { |
| 6219 |
if (isUndef(oldKeyToIdx)) { oldKeyToIdx = createKeyToOldIdx(oldCh, oldStartIdx, oldEndIdx); } |
| 6220 |
idxInOld = isDef(newStartVnode.key) |
| 6221 |
? oldKeyToIdx[newStartVnode.key] |
| 6222 |
: findIdxInOld(newStartVnode, oldCh, oldStartIdx, oldEndIdx); |
| 6223 |
if (isUndef(idxInOld)) { // New element |
| 6224 |
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx); |
| 6225 |
} else { |
| 6226 |
vnodeToMove = oldCh[idxInOld]; |
| 6227 |
if (sameVnode(vnodeToMove, newStartVnode)) { |
| 6228 |
patchVnode(vnodeToMove, newStartVnode, insertedVnodeQueue); |
| 6229 |
oldCh[idxInOld] = undefined; |
| 6230 |
canMove && nodeOps.insertBefore(parentElm, vnodeToMove.elm, oldStartVnode.elm); |
| 6231 |
} else { |
| 6232 |
// same key but different element. treat as new element |
| 6233 |
createElm(newStartVnode, insertedVnodeQueue, parentElm, oldStartVnode.elm, false, newCh, newStartIdx); |
| 6234 |
} |
| 6235 |
} |
| 6236 |
newStartVnode = newCh[++newStartIdx]; |
| 6237 |
} |
| 6238 |
} |
| 6239 |
if (oldStartIdx > oldEndIdx) { |
| 6240 |
refElm = isUndef(newCh[newEndIdx + 1]) ? null : newCh[newEndIdx + 1].elm; |
| 6241 |
addVnodes(parentElm, refElm, newCh, newStartIdx, newEndIdx, insertedVnodeQueue); |
| 6242 |
} else if (newStartIdx > newEndIdx) { |
| 6243 |
removeVnodes(parentElm, oldCh, oldStartIdx, oldEndIdx); |
| 6244 |
} |
| 6245 |
} |
| 6246 |
|
| 6247 |
function checkDuplicateKeys (children) { |
| 6248 |
var seenKeys = {}; |
| 6249 |
for (var i = 0; i < children.length; i++) { |
| 6250 |
var vnode = children[i]; |
| 6251 |
var key = vnode.key; |
| 6252 |
if (isDef(key)) { |
| 6253 |
if (seenKeys[key]) { |
| 6254 |
warn( |
| 6255 |
("Duplicate keys detected: '" + key + "'. This may cause an update error."), |
| 6256 |
vnode.context |
| 6257 |
); |
| 6258 |
} else { |
| 6259 |
seenKeys[key] = true; |
| 6260 |
} |
| 6261 |
} |
| 6262 |
} |
| 6263 |
} |
| 6264 |
|
| 6265 |
function findIdxInOld (node, oldCh, start, end) { |
| 6266 |
for (var i = start; i < end; i++) { |
| 6267 |
var c = oldCh[i]; |
| 6268 |
if (isDef(c) && sameVnode(node, c)) { return i } |
| 6269 |
} |
| 6270 |
} |
| 6271 |
|
| 6272 |
function patchVnode (oldVnode, vnode, insertedVnodeQueue, removeOnly) { |
| 6273 |
if (oldVnode === vnode) { |
| 6274 |
return |
| 6275 |
} |
| 6276 |
|
| 6277 |
var elm = vnode.elm = oldVnode.elm; |
| 6278 |
|
| 6279 |
if (isTrue(oldVnode.isAsyncPlaceholder)) { |
| 6280 |
if (isDef(vnode.asyncFactory.resolved)) { |
| 6281 |
hydrate(oldVnode.elm, vnode, insertedVnodeQueue); |
| 6282 |
} else { |
| 6283 |
vnode.isAsyncPlaceholder = true; |
| 6284 |
} |
| 6285 |
return |
| 6286 |
} |
| 6287 |
|
| 6288 |
// reuse element for static trees. |
| 6289 |
// note we only do this if the vnode is cloned - |
| 6290 |
// if the new node is not cloned it means the render functions have been |
| 6291 |
// reset by the hot-reload-api and we need to do a proper re-render. |
| 6292 |
if (isTrue(vnode.isStatic) && |
| 6293 |
isTrue(oldVnode.isStatic) && |
| 6294 |
vnode.key === oldVnode.key && |
| 6295 |
(isTrue(vnode.isCloned) || isTrue(vnode.isOnce)) |
| 6296 |
) { |
| 6297 |
vnode.componentInstance = oldVnode.componentInstance; |
| 6298 |
return |
| 6299 |
} |
| 6300 |
|
| 6301 |
var i; |
| 6302 |
var data = vnode.data; |
| 6303 |
if (isDef(data) && isDef(i = data.hook) && isDef(i = i.prepatch)) { |
| 6304 |
i(oldVnode, vnode); |
| 6305 |
} |
| 6306 |
|
| 6307 |
var oldCh = oldVnode.children; |
| 6308 |
var ch = vnode.children; |
| 6309 |
if (isDef(data) && isPatchable(vnode)) { |
| 6310 |
for (i = 0; i < cbs.update.length; ++i) { cbs.update[i](oldVnode, vnode); } |
| 6311 |
if (isDef(i = data.hook) && isDef(i = i.update)) { i(oldVnode, vnode); } |
| 6312 |
} |
| 6313 |
if (isUndef(vnode.text)) { |
| 6314 |
if (isDef(oldCh) && isDef(ch)) { |
| 6315 |
if (oldCh !== ch) { updateChildren(elm, oldCh, ch, insertedVnodeQueue, removeOnly); } |
| 6316 |
} else if (isDef(ch)) { |
| 6317 |
if (isDef(oldVnode.text)) { nodeOps.setTextContent(elm, ''); } |
| 6318 |
addVnodes(elm, null, ch, 0, ch.length - 1, insertedVnodeQueue); |
| 6319 |
} else if (isDef(oldCh)) { |
| 6320 |
removeVnodes(elm, oldCh, 0, oldCh.length - 1); |
| 6321 |
} else if (isDef(oldVnode.text)) { |
| 6322 |
nodeOps.setTextContent(elm, ''); |
| 6323 |
} |
| 6324 |
} else if (oldVnode.text !== vnode.text) { |
| 6325 |
nodeOps.setTextContent(elm, vnode.text); |
| 6326 |
} |
| 6327 |
if (isDef(data)) { |
| 6328 |
if (isDef(i = data.hook) && isDef(i = i.postpatch)) { i(oldVnode, vnode); } |
| 6329 |
} |
| 6330 |
} |
| 6331 |
|
| 6332 |
function invokeInsertHook (vnode, queue, initial) { |
| 6333 |
// delay insert hooks for component root nodes, invoke them after the |
| 6334 |
// element is really inserted |
| 6335 |
if (isTrue(initial) && isDef(vnode.parent)) { |
| 6336 |
vnode.parent.data.pendingInsert = queue; |
| 6337 |
} else { |
| 6338 |
for (var i = 0; i < queue.length; ++i) { |
| 6339 |
queue[i].data.hook.insert(queue[i]); |
| 6340 |
} |
| 6341 |
} |
| 6342 |
} |
| 6343 |
|
| 6344 |
var hydrationBailed = false; |
| 6345 |
// list of modules that can skip create hook during hydration because they |
| 6346 |
// are already rendered on the client or has no need for initialization |
| 6347 |
// Note: style is excluded because it relies on initial clone for future |
| 6348 |
// deep updates (#7063). |
| 6349 |
var isRenderedModule = makeMap('attrs,class,staticClass,staticStyle,key'); |
| 6350 |
|
| 6351 |
// Note: this is a browser-only function so we can assume elms are DOM nodes. |
| 6352 |
function hydrate (elm, vnode, insertedVnodeQueue, inVPre) { |
| 6353 |
var i; |
| 6354 |
var tag = vnode.tag; |
| 6355 |
var data = vnode.data; |
| 6356 |
var children = vnode.children; |
| 6357 |
inVPre = inVPre || (data && data.pre); |
| 6358 |
vnode.elm = elm; |
| 6359 |
|
| 6360 |
if (isTrue(vnode.isComment) && isDef(vnode.asyncFactory)) { |
| 6361 |
vnode.isAsyncPlaceholder = true; |
| 6362 |
return true |
| 6363 |
} |
| 6364 |
// assert node match |
| 6365 |
if (process.env.NODE_ENV !== 'production') { |
| 6366 |
if (!assertNodeMatch(elm, vnode, inVPre)) { |
| 6367 |
return false |
| 6368 |
} |
| 6369 |
} |
| 6370 |
if (isDef(data)) { |
| 6371 |
if (isDef(i = data.hook) && isDef(i = i.init)) { i(vnode, true /* hydrating */); } |
| 6372 |
if (isDef(i = vnode.componentInstance)) { |
| 6373 |
// child component. it should have hydrated its own tree. |
| 6374 |
initComponent(vnode, insertedVnodeQueue); |
| 6375 |
return true |
| 6376 |
} |
| 6377 |
} |
| 6378 |
if (isDef(tag)) { |
| 6379 |
if (isDef(children)) { |
| 6380 |
// empty element, allow client to pick up and populate children |
| 6381 |
if (!elm.hasChildNodes()) { |
| 6382 |
createChildren(vnode, children, insertedVnodeQueue); |
| 6383 |
} else { |
| 6384 |
// v-html and domProps: innerHTML |
| 6385 |
if (isDef(i = data) && isDef(i = i.domProps) && isDef(i = i.innerHTML)) { |
| 6386 |
if (i !== elm.innerHTML) { |
| 6387 |
/* istanbul ignore if */ |
| 6388 |
if (process.env.NODE_ENV !== 'production' && |
| 6389 |
typeof console !== 'undefined' && |
| 6390 |
!hydrationBailed |
| 6391 |
) { |
| 6392 |
hydrationBailed = true; |
| 6393 |
console.warn('Parent: ', elm); |
| 6394 |
console.warn('server innerHTML: ', i); |
| 6395 |
console.warn('client innerHTML: ', elm.innerHTML); |
| 6396 |
} |
| 6397 |
return false |
| 6398 |
} |
| 6399 |
} else { |
| 6400 |
// iterate and compare children lists |
| 6401 |
var childrenMatch = true; |
| 6402 |
var childNode = elm.firstChild; |
| 6403 |
for (var i$1 = 0; i$1 < children.length; i$1++) { |
| 6404 |
if (!childNode || !hydrate(childNode, children[i$1], insertedVnodeQueue, inVPre)) { |
| 6405 |
childrenMatch = false; |
| 6406 |
break |
| 6407 |
} |
| 6408 |
childNode = childNode.nextSibling; |
| 6409 |
} |
| 6410 |
// if childNode is not null, it means the actual childNodes list is |
| 6411 |
// longer than the virtual children list. |
| 6412 |
if (!childrenMatch || childNode) { |
| 6413 |
/* istanbul ignore if */ |
| 6414 |
if (process.env.NODE_ENV !== 'production' && |
| 6415 |
typeof console !== 'undefined' && |
| 6416 |
!hydrationBailed |
| 6417 |
) { |
| 6418 |
hydrationBailed = true; |
| 6419 |
console.warn('Parent: ', elm); |
| 6420 |
console.warn('Mismatching childNodes vs. VNodes: ', elm.childNodes, children); |
| 6421 |
} |
| 6422 |
return false |
| 6423 |
} |
| 6424 |
} |
| 6425 |
} |
| 6426 |
} |
| 6427 |
if (isDef(data)) { |
| 6428 |
var fullInvoke = false; |
| 6429 |
for (var key in data) { |
| 6430 |
if (!isRenderedModule(key)) { |
| 6431 |
fullInvoke = true; |
| 6432 |
invokeCreateHooks(vnode, insertedVnodeQueue); |
| 6433 |
break |
| 6434 |
} |
| 6435 |
} |
| 6436 |
if (!fullInvoke && data['class']) { |
| 6437 |
// ensure collecting deps for deep class bindings for future updates |
| 6438 |
traverse(data['class']); |
| 6439 |
} |
| 6440 |
} |
| 6441 |
} else if (elm.data !== vnode.text) { |
| 6442 |
elm.data = vnode.text; |
| 6443 |
} |
| 6444 |
return true |
| 6445 |
} |
| 6446 |
|
| 6447 |
function assertNodeMatch (node, vnode, inVPre) { |
| 6448 |
if (isDef(vnode.tag)) { |
| 6449 |
return vnode.tag.indexOf('vue-component') === 0 || ( |
| 6450 |
!isUnknownElement$$1(vnode, inVPre) && |
| 6451 |
vnode.tag.toLowerCase() === (node.tagName && node.tagName.toLowerCase()) |
| 6452 |
) |
| 6453 |
} else { |
| 6454 |
return node.nodeType === (vnode.isComment ? 8 : 3) |
| 6455 |
} |
| 6456 |
} |
| 6457 |
|
| 6458 |
return function patch (oldVnode, vnode, hydrating, removeOnly, parentElm, refElm) { |
| 6459 |
if (isUndef(vnode)) { |
| 6460 |
if (isDef(oldVnode)) { invokeDestroyHook(oldVnode); } |
| 6461 |
return |
| 6462 |
} |
| 6463 |
|
| 6464 |
var isInitialPatch = false; |
| 6465 |
var insertedVnodeQueue = []; |
| 6466 |
|
| 6467 |
if (isUndef(oldVnode)) { |
| 6468 |
// empty mount (likely as component), create new root element |
| 6469 |
isInitialPatch = true; |
| 6470 |
createElm(vnode, insertedVnodeQueue, parentElm, refElm); |
| 6471 |
} else { |
| 6472 |
var isRealElement = isDef(oldVnode.nodeType); |
| 6473 |
if (!isRealElement && sameVnode(oldVnode, vnode)) { |
| 6474 |
// patch existing root node |
| 6475 |
patchVnode(oldVnode, vnode, insertedVnodeQueue, removeOnly); |
| 6476 |
} else { |
| 6477 |
if (isRealElement) { |
| 6478 |
// mounting to a real element |
| 6479 |
// check if this is server-rendered content and if we can perform |
| 6480 |
// a successful hydration. |
| 6481 |
if (oldVnode.nodeType === 1 && oldVnode.hasAttribute(SSR_ATTR)) { |
| 6482 |
oldVnode.removeAttribute(SSR_ATTR); |
| 6483 |
hydrating = true; |
| 6484 |
} |
| 6485 |
if (isTrue(hydrating)) { |
| 6486 |
if (hydrate(oldVnode, vnode, insertedVnodeQueue)) { |
| 6487 |
invokeInsertHook(vnode, insertedVnodeQueue, true); |
| 6488 |
return oldVnode |
| 6489 |
} else if (process.env.NODE_ENV !== 'production') { |
| 6490 |
warn( |
| 6491 |
'The client-side rendered virtual DOM tree is not matching ' + |
| 6492 |
'server-rendered content. This is likely caused by incorrect ' + |
| 6493 |
'HTML markup, for example nesting block-level elements inside ' + |
| 6494 |
'<p>, or missing <tbody>. Bailing hydration and performing ' + |
| 6495 |
'full client-side render.' |
| 6496 |
); |
| 6497 |
} |
| 6498 |
} |
| 6499 |
// either not server-rendered, or hydration failed. |
| 6500 |
// create an empty node and replace it |
| 6501 |
oldVnode = emptyNodeAt(oldVnode); |
| 6502 |
} |
| 6503 |
|
| 6504 |
// replacing existing element |
| 6505 |
var oldElm = oldVnode.elm; |
| 6506 |
var parentElm$1 = nodeOps.parentNode(oldElm); |
| 6507 |
|
| 6508 |
// create new node |
| 6509 |
createElm( |
| 6510 |
vnode, |
| 6511 |
insertedVnodeQueue, |
| 6512 |
// extremely rare edge case: do not insert if old element is in a |
| 6513 |
// leaving transition. Only happens when combining transition + |
| 6514 |
// keep-alive + HOCs. (#4590) |
| 6515 |
oldElm._leaveCb ? null : parentElm$1, |
| 6516 |
nodeOps.nextSibling(oldElm) |
| 6517 |
); |
| 6518 |
|
| 6519 |
// update parent placeholder node element, recursively |
| 6520 |
if (isDef(vnode.parent)) { |
| 6521 |
var ancestor = vnode.parent; |
| 6522 |
var patchable = isPatchable(vnode); |
| 6523 |
while (ancestor) { |
| 6524 |
for (var i = 0; i < cbs.destroy.length; ++i) { |
| 6525 |
cbs.destroy[i](ancestor); |
| 6526 |
} |
| 6527 |
ancestor.elm = vnode.elm; |
| 6528 |
if (patchable) { |
| 6529 |
for (var i$1 = 0; i$1 < cbs.create.length; ++i$1) { |
| 6530 |
cbs.create[i$1](emptyNode, ancestor); |
| 6531 |
} |
| 6532 |
// #6513 |
| 6533 |
// invoke insert hooks that may have been merged by create hooks. |
| 6534 |
// e.g. for directives that uses the "inserted" hook. |
| 6535 |
var insert = ancestor.data.hook.insert; |
| 6536 |
if (insert.merged) { |
| 6537 |
// start at index 1 to avoid re-invoking component mounted hook |
| 6538 |
for (var i$2 = 1; i$2 < insert.fns.length; i$2++) { |
| 6539 |
insert.fns[i$2](); |
| 6540 |
} |
| 6541 |
} |
| 6542 |
} else { |
| 6543 |
registerRef(ancestor); |
| 6544 |
} |
| 6545 |
ancestor = ancestor.parent; |
| 6546 |
} |
| 6547 |
} |
| 6548 |
|
| 6549 |
// destroy old node |
| 6550 |
if (isDef(parentElm$1)) { |
| 6551 |
removeVnodes(parentElm$1, [oldVnode], 0, 0); |
| 6552 |
} else if (isDef(oldVnode.tag)) { |
| 6553 |
invokeDestroyHook(oldVnode); |
| 6554 |
} |
| 6555 |
} |
| 6556 |
} |
| 6557 |
|
| 6558 |
invokeInsertHook(vnode, insertedVnodeQueue, isInitialPatch); |
| 6559 |
return vnode.elm |
| 6560 |
} |
| 6561 |
} |
| 6562 |
|
| 6563 |
/* */ |
| 6564 |
|
| 6565 |
var directives = { |
| 6566 |
create: updateDirectives, |
| 6567 |
update: updateDirectives, |
| 6568 |
destroy: function unbindDirectives (vnode) { |
| 6569 |
updateDirectives(vnode, emptyNode); |
| 6570 |
} |
| 6571 |
} |
| 6572 |
|
| 6573 |
function updateDirectives (oldVnode, vnode) { |
| 6574 |
if (oldVnode.data.directives || vnode.data.directives) { |
| 6575 |
_update(oldVnode, vnode); |
| 6576 |
} |
| 6577 |
} |
| 6578 |
|
| 6579 |
function _update (oldVnode, vnode) { |
| 6580 |
var isCreate = oldVnode === emptyNode; |
| 6581 |
var isDestroy = vnode === emptyNode; |
| 6582 |
var oldDirs = normalizeDirectives$1(oldVnode.data.directives, oldVnode.context); |
| 6583 |
var newDirs = normalizeDirectives$1(vnode.data.directives, vnode.context); |
| 6584 |
|
| 6585 |
var dirsWithInsert = []; |
| 6586 |
var dirsWithPostpatch = []; |
| 6587 |
|
| 6588 |
var key, oldDir, dir; |
| 6589 |
for (key in newDirs) { |
| 6590 |
oldDir = oldDirs[key]; |
| 6591 |
dir = newDirs[key]; |
| 6592 |
if (!oldDir) { |
| 6593 |
// new directive, bind |
| 6594 |
callHook$1(dir, 'bind', vnode, oldVnode); |
| 6595 |
if (dir.def && dir.def.inserted) { |
| 6596 |
dirsWithInsert.push(dir); |
| 6597 |
} |
| 6598 |
} else { |
| 6599 |
// existing directive, update |
| 6600 |
dir.oldValue = oldDir.value; |
| 6601 |
callHook$1(dir, 'update', vnode, oldVnode); |
| 6602 |
if (dir.def && dir.def.componentUpdated) { |
| 6603 |
dirsWithPostpatch.push(dir); |
| 6604 |
} |
| 6605 |
} |
| 6606 |
} |
| 6607 |
|
| 6608 |
if (dirsWithInsert.length) { |
| 6609 |
var callInsert = function () { |
| 6610 |
for (var i = 0; i < dirsWithInsert.length; i++) { |
| 6611 |
callHook$1(dirsWithInsert[i], 'inserted', vnode, oldVnode); |
| 6612 |
} |
| 6613 |
}; |
| 6614 |
if (isCreate) { |
| 6615 |
mergeVNodeHook(vnode, 'insert', callInsert); |
| 6616 |
} else { |
| 6617 |
callInsert(); |
| 6618 |
} |
| 6619 |
} |
| 6620 |
|
| 6621 |
if (dirsWithPostpatch.length) { |
| 6622 |
mergeVNodeHook(vnode, 'postpatch', function () { |
| 6623 |
for (var i = 0; i < dirsWithPostpatch.length; i++) { |
| 6624 |
callHook$1(dirsWithPostpatch[i], 'componentUpdated', vnode, oldVnode); |
| 6625 |
} |
| 6626 |
}); |
| 6627 |
} |
| 6628 |
|
| 6629 |
if (!isCreate) { |
| 6630 |
for (key in oldDirs) { |
| 6631 |
if (!newDirs[key]) { |
| 6632 |
// no longer present, unbind |
| 6633 |
callHook$1(oldDirs[key], 'unbind', oldVnode, oldVnode, isDestroy); |
| 6634 |
} |
| 6635 |
} |
| 6636 |
} |
| 6637 |
} |
| 6638 |
|
| 6639 |
var emptyModifiers = Object.create(null); |
| 6640 |
|
| 6641 |
function normalizeDirectives$1 ( |
| 6642 |
dirs, |
| 6643 |
vm |
| 6644 |
) { |
| 6645 |
var res = Object.create(null); |
| 6646 |
if (!dirs) { |
| 6647 |
// $flow-disable-line |
| 6648 |
return res |
| 6649 |
} |
| 6650 |
var i, dir; |
| 6651 |
for (i = 0; i < dirs.length; i++) { |
| 6652 |
dir = dirs[i]; |
| 6653 |
if (!dir.modifiers) { |
| 6654 |
// $flow-disable-line |
| 6655 |
dir.modifiers = emptyModifiers; |
| 6656 |
} |
| 6657 |
res[getRawDirName(dir)] = dir; |
| 6658 |
dir.def = resolveAsset(vm.$options, 'directives', dir.name, true); |
| 6659 |
} |
| 6660 |
// $flow-disable-line |
| 6661 |
return res |
| 6662 |
} |
| 6663 |
|
| 6664 |
function getRawDirName (dir) { |
| 6665 |
return dir.rawName || ((dir.name) + "." + (Object.keys(dir.modifiers || {}).join('.'))) |
| 6666 |
} |
| 6667 |
|
| 6668 |
function callHook$1 (dir, hook, vnode, oldVnode, isDestroy) { |
| 6669 |
var fn = dir.def && dir.def[hook]; |
| 6670 |
if (fn) { |
| 6671 |
try { |
| 6672 |
fn(vnode.elm, dir, vnode, oldVnode, isDestroy); |
| 6673 |
} catch (e) { |
| 6674 |
handleError(e, vnode.context, ("directive " + (dir.name) + " " + hook + " hook")); |
| 6675 |
} |
| 6676 |
} |
| 6677 |
} |
| 6678 |
|
| 6679 |
var baseModules = [ |
| 6680 |
ref, |
| 6681 |
directives |
| 6682 |
] |
| 6683 |
|
| 6684 |
/* */ |
| 6685 |
|
| 6686 |
function updateAttrs (oldVnode, vnode) { |
| 6687 |
var opts = vnode.componentOptions; |
| 6688 |
if (isDef(opts) && opts.Ctor.options.inheritAttrs === false) { |
| 6689 |
return |
| 6690 |
} |
| 6691 |
if (isUndef(oldVnode.data.attrs) && isUndef(vnode.data.attrs)) { |
| 6692 |
return |
| 6693 |
} |
| 6694 |
var key, cur, old; |
| 6695 |
var elm = vnode.elm; |
| 6696 |
var oldAttrs = oldVnode.data.attrs || {}; |
| 6697 |
var attrs = vnode.data.attrs || {}; |
| 6698 |
// clone observed objects, as the user probably wants to mutate it |
| 6699 |
if (isDef(attrs.__ob__)) { |
| 6700 |
attrs = vnode.data.attrs = extend({}, attrs); |
| 6701 |
} |
| 6702 |
|
| 6703 |
for (key in attrs) { |
| 6704 |
cur = attrs[key]; |
| 6705 |
old = oldAttrs[key]; |
| 6706 |
if (old !== cur) { |
| 6707 |
setAttr(elm, key, cur); |
| 6708 |
} |
| 6709 |
} |
| 6710 |
// #4391: in IE9, setting type can reset value for input[type=radio] |
| 6711 |
// #6666: IE/Edge forces progress value down to 1 before setting a max |
| 6712 |
/* istanbul ignore if */ |
| 6713 |
if ((isIE || isEdge) && attrs.value !== oldAttrs.value) { |
| 6714 |
setAttr(elm, 'value', attrs.value); |
| 6715 |
} |
| 6716 |
for (key in oldAttrs) { |
| 6717 |
if (isUndef(attrs[key])) { |
| 6718 |
if (isXlink(key)) { |
| 6719 |
elm.removeAttributeNS(xlinkNS, getXlinkProp(key)); |
| 6720 |
} else if (!isEnumeratedAttr(key)) { |
| 6721 |
elm.removeAttribute(key); |
| 6722 |
} |
| 6723 |
} |
| 6724 |
} |
| 6725 |
} |
| 6726 |
|
| 6727 |
function setAttr (el, key, value) { |
| 6728 |
if (el.tagName.indexOf('-') > -1) { |
| 6729 |
baseSetAttr(el, key, value); |
| 6730 |
} else if (isBooleanAttr(key)) { |
| 6731 |
// set attribute for blank value |
| 6732 |
// e.g. <option disabled>Select one</option> |
| 6733 |
if (isFalsyAttrValue(value)) { |
| 6734 |
el.removeAttribute(key); |
| 6735 |
} else { |
| 6736 |
// technically allowfullscreen is a boolean attribute for <iframe>, |
| 6737 |
// but Flash expects a value of "true" when used on <embed> tag |
| 6738 |
value = key === 'allowfullscreen' && el.tagName === 'EMBED' |
| 6739 |
? 'true' |
| 6740 |
: key; |
| 6741 |
el.setAttribute(key, value); |
| 6742 |
} |
| 6743 |
} else if (isEnumeratedAttr(key)) { |
| 6744 |
el.setAttribute(key, isFalsyAttrValue(value) || value === 'false' ? 'false' : 'true'); |
| 6745 |
} else if (isXlink(key)) { |
| 6746 |
if (isFalsyAttrValue(value)) { |
| 6747 |
el.removeAttributeNS(xlinkNS, getXlinkProp(key)); |
| 6748 |
} else { |
| 6749 |
el.setAttributeNS(xlinkNS, key, value); |
| 6750 |
} |
| 6751 |
} else { |
| 6752 |
baseSetAttr(el, key, value); |
| 6753 |
} |
| 6754 |
} |
| 6755 |
|
| 6756 |
function baseSetAttr (el, key, value) { |
| 6757 |
if (isFalsyAttrValue(value)) { |
| 6758 |
el.removeAttribute(key); |
| 6759 |
} else { |
| 6760 |
// #7138: IE10 & 11 fires input event when setting placeholder on |
| 6761 |
// <textarea>... block the first input event and remove the blocker |
| 6762 |
// immediately. |
| 6763 |
/* istanbul ignore if */ |
| 6764 |
if ( |
| 6765 |
isIE && !isIE9 && |
| 6766 |
el.tagName === 'TEXTAREA' && |
| 6767 |
key === 'placeholder' && !el.__ieph |
| 6768 |
) { |
| 6769 |
var blocker = function (e) { |
| 6770 |
e.stopImmediatePropagation(); |
| 6771 |
el.removeEventListener('input', blocker); |
| 6772 |
}; |
| 6773 |
el.addEventListener('input', blocker); |
| 6774 |
// $flow-disable-line |
| 6775 |
el.__ieph = true; /* IE placeholder patched */ |
| 6776 |
} |
| 6777 |
el.setAttribute(key, value); |
| 6778 |
} |
| 6779 |
} |
| 6780 |
|
| 6781 |
var attrs = { |
| 6782 |
create: updateAttrs, |
| 6783 |
update: updateAttrs |
| 6784 |
} |
| 6785 |
|
| 6786 |
/* */ |
| 6787 |
|
| 6788 |
function updateClass (oldVnode, vnode) { |
| 6789 |
var el = vnode.elm; |
| 6790 |
var data = vnode.data; |
| 6791 |
var oldData = oldVnode.data; |
| 6792 |
if ( |
| 6793 |
isUndef(data.staticClass) && |
| 6794 |
isUndef(data.class) && ( |
| 6795 |
isUndef(oldData) || ( |
| 6796 |
isUndef(oldData.staticClass) && |
| 6797 |
isUndef(oldData.class) |
| 6798 |
) |
| 6799 |
) |
| 6800 |
) { |
| 6801 |
return |
| 6802 |
} |
| 6803 |
|
| 6804 |
var cls = genClassForVnode(vnode); |
| 6805 |
|
| 6806 |
// handle transition classes |
| 6807 |
var transitionClass = el._transitionClasses; |
| 6808 |
if (isDef(transitionClass)) { |
| 6809 |
cls = concat(cls, stringifyClass(transitionClass)); |
| 6810 |
} |
| 6811 |
|
| 6812 |
// set the class |
| 6813 |
if (cls !== el._prevClass) { |
| 6814 |
el.setAttribute('class', cls); |
| 6815 |
el._prevClass = cls; |
| 6816 |
} |
| 6817 |
} |
| 6818 |
|
| 6819 |
var klass = { |
| 6820 |
create: updateClass, |
| 6821 |
update: updateClass |
| 6822 |
} |
| 6823 |
|
| 6824 |
/* */ |
| 6825 |
|
| 6826 |
var validDivisionCharRE = /[\w).+\-_$\]]/; |
| 6827 |
|
| 6828 |
function parseFilters (exp) { |
| 6829 |
var inSingle = false; |
| 6830 |
var inDouble = false; |
| 6831 |
var inTemplateString = false; |
| 6832 |
var inRegex = false; |
| 6833 |
var curly = 0; |
| 6834 |
var square = 0; |
| 6835 |
var paren = 0; |
| 6836 |
var lastFilterIndex = 0; |
| 6837 |
var c, prev, i, expression, filters; |
| 6838 |
|
| 6839 |
for (i = 0; i < exp.length; i++) { |
| 6840 |
prev = c; |
| 6841 |
c = exp.charCodeAt(i); |
| 6842 |
if (inSingle) { |
| 6843 |
if (c === 0x27 && prev !== 0x5C) { inSingle = false; } |
| 6844 |
} else if (inDouble) { |
| 6845 |
if (c === 0x22 && prev !== 0x5C) { inDouble = false; } |
| 6846 |
} else if (inTemplateString) { |
| 6847 |
if (c === 0x60 && prev !== 0x5C) { inTemplateString = false; } |
| 6848 |
} else if (inRegex) { |
| 6849 |
if (c === 0x2f && prev !== 0x5C) { inRegex = false; } |
| 6850 |
} else if ( |
| 6851 |
c === 0x7C && // pipe |
| 6852 |
exp.charCodeAt(i + 1) !== 0x7C && |
| 6853 |
exp.charCodeAt(i - 1) !== 0x7C && |
| 6854 |
!curly && !square && !paren |
| 6855 |
) { |
| 6856 |
if (expression === undefined) { |
| 6857 |
// first filter, end of expression |
| 6858 |
lastFilterIndex = i + 1; |
| 6859 |
expression = exp.slice(0, i).trim(); |
| 6860 |
} else { |
| 6861 |
pushFilter(); |
| 6862 |
} |
| 6863 |
} else { |
| 6864 |
switch (c) { |
| 6865 |
case 0x22: inDouble = true; break // " |
| 6866 |
case 0x27: inSingle = true; break // ' |
| 6867 |
case 0x60: inTemplateString = true; break // ` |
| 6868 |
case 0x28: paren++; break // ( |
| 6869 |
case 0x29: paren--; break // ) |
| 6870 |
case 0x5B: square++; break // [ |
| 6871 |
case 0x5D: square--; break // ] |
| 6872 |
case 0x7B: curly++; break // { |
| 6873 |
case 0x7D: curly--; break // } |
| 6874 |
} |
| 6875 |
if (c === 0x2f) { // / |
| 6876 |
var j = i - 1; |
| 6877 |
var p = (void 0); |
| 6878 |
// find first non-whitespace prev char |
| 6879 |
for (; j >= 0; j--) { |
| 6880 |
p = exp.charAt(j); |
| 6881 |
if (p !== ' ') { break } |
| 6882 |
} |
| 6883 |
if (!p || !validDivisionCharRE.test(p)) { |
| 6884 |
inRegex = true; |
| 6885 |
} |
| 6886 |
} |
| 6887 |
} |
| 6888 |
} |
| 6889 |
|
| 6890 |
if (expression === undefined) { |
| 6891 |
expression = exp.slice(0, i).trim(); |
| 6892 |
} else if (lastFilterIndex !== 0) { |
| 6893 |
pushFilter(); |
| 6894 |
} |
| 6895 |
|
| 6896 |
function pushFilter () { |
| 6897 |
(filters || (filters = [])).push(exp.slice(lastFilterIndex, i).trim()); |
| 6898 |
lastFilterIndex = i + 1; |
| 6899 |
} |
| 6900 |
|
| 6901 |
if (filters) { |
| 6902 |
for (i = 0; i < filters.length; i++) { |
| 6903 |
expression = wrapFilter(expression, filters[i]); |
| 6904 |
} |
| 6905 |
} |
| 6906 |
|
| 6907 |
return expression |
| 6908 |
} |
| 6909 |
|
| 6910 |
function wrapFilter (exp, filter) { |
| 6911 |
var i = filter.indexOf('('); |
| 6912 |
if (i < 0) { |
| 6913 |
// _f: resolveFilter |
| 6914 |
return ("_f(\"" + filter + "\")(" + exp + ")") |
| 6915 |
} else { |
| 6916 |
var name = filter.slice(0, i); |
| 6917 |
var args = filter.slice(i + 1); |
| 6918 |
return ("_f(\"" + name + "\")(" + exp + (args !== ')' ? ',' + args : args)) |
| 6919 |
} |
| 6920 |
} |
| 6921 |
|
| 6922 |
/* */ |
| 6923 |
|
| 6924 |
function baseWarn (msg) { |
| 6925 |
console.error(("[Vue compiler]: " + msg)); |
| 6926 |
} |
| 6927 |
|
| 6928 |
function pluckModuleFunction ( |
| 6929 |
modules, |
| 6930 |
key |
| 6931 |
) { |
| 6932 |
return modules |
| 6933 |
? modules.map(function (m) { return m[key]; }).filter(function (_) { return _; }) |
| 6934 |
: [] |
| 6935 |
} |
| 6936 |
|
| 6937 |
function addProp (el, name, value) { |
| 6938 |
(el.props || (el.props = [])).push({ name: name, value: value }); |
| 6939 |
el.plain = false; |
| 6940 |
} |
| 6941 |
|
| 6942 |
function addAttr (el, name, value) { |
| 6943 |
(el.attrs || (el.attrs = [])).push({ name: name, value: value }); |
| 6944 |
el.plain = false; |
| 6945 |
} |
| 6946 |
|
| 6947 |
// add a raw attr (use this in preTransforms) |
| 6948 |
function addRawAttr (el, name, value) { |
| 6949 |
el.attrsMap[name] = value; |
| 6950 |
el.attrsList.push({ name: name, value: value }); |
| 6951 |
} |
| 6952 |
|
| 6953 |
function addDirective ( |
| 6954 |
el, |
| 6955 |
name, |
| 6956 |
rawName, |
| 6957 |
value, |
| 6958 |
arg, |
| 6959 |
modifiers |
| 6960 |
) { |
| 6961 |
(el.directives || (el.directives = [])).push({ name: name, rawName: rawName, value: value, arg: arg, modifiers: modifiers }); |
| 6962 |
el.plain = false; |
| 6963 |
} |
| 6964 |
|
| 6965 |
function addHandler ( |
| 6966 |
el, |
| 6967 |
name, |
| 6968 |
value, |
| 6969 |
modifiers, |
| 6970 |
important, |
| 6971 |
warn |
| 6972 |
) { |
| 6973 |
modifiers = modifiers || emptyObject; |
| 6974 |
// warn prevent and passive modifier |
| 6975 |
/* istanbul ignore if */ |
| 6976 |
if ( |
| 6977 |
process.env.NODE_ENV !== 'production' && warn && |
| 6978 |
modifiers.prevent && modifiers.passive |
| 6979 |
) { |
| 6980 |
warn( |
| 6981 |
'passive and prevent can\'t be used together. ' + |
| 6982 |
'Passive handler can\'t prevent default event.' |
| 6983 |
); |
| 6984 |
} |
| 6985 |
|
| 6986 |
// check capture modifier |
| 6987 |
if (modifiers.capture) { |
| 6988 |
delete modifiers.capture; |
| 6989 |
name = '!' + name; // mark the event as captured |
| 6990 |
} |
| 6991 |
if (modifiers.once) { |
| 6992 |
delete modifiers.once; |
| 6993 |
name = '~' + name; // mark the event as once |
| 6994 |
} |
| 6995 |
/* istanbul ignore if */ |
| 6996 |
if (modifiers.passive) { |
| 6997 |
delete modifiers.passive; |
| 6998 |
name = '&' + name; // mark the event as passive |
| 6999 |
} |
| 7000 |
|
| 7001 |
// normalize click.right and click.middle since they don't actually fire |
| 7002 |
// this is technically browser-specific, but at least for now browsers are |
| 7003 |
// the only target envs that have right/middle clicks. |
| 7004 |
if (name === 'click') { |
| 7005 |
if (modifiers.right) { |
| 7006 |
name = 'contextmenu'; |
| 7007 |
delete modifiers.right; |
| 7008 |
} else if (modifiers.middle) { |
| 7009 |
name = 'mouseup'; |
| 7010 |
} |
| 7011 |
} |
| 7012 |
|
| 7013 |
var events; |
| 7014 |
if (modifiers.native) { |
| 7015 |
delete modifiers.native; |
| 7016 |
events = el.nativeEvents || (el.nativeEvents = {}); |
| 7017 |
} else { |
| 7018 |
events = el.events || (el.events = {}); |
| 7019 |
} |
| 7020 |
|
| 7021 |
var newHandler = { |
| 7022 |
value: value.trim() |
| 7023 |
}; |
| 7024 |
if (modifiers !== emptyObject) { |
| 7025 |
newHandler.modifiers = modifiers; |
| 7026 |
} |
| 7027 |
|
| 7028 |
var handlers = events[name]; |
| 7029 |
/* istanbul ignore if */ |
| 7030 |
if (Array.isArray(handlers)) { |
| 7031 |
important ? handlers.unshift(newHandler) : handlers.push(newHandler); |
| 7032 |
} else if (handlers) { |
| 7033 |
events[name] = important ? [newHandler, handlers] : [handlers, newHandler]; |
| 7034 |
} else { |
| 7035 |
events[name] = newHandler; |
| 7036 |
} |
| 7037 |
|
| 7038 |
el.plain = false; |
| 7039 |
} |
| 7040 |
|
| 7041 |
function getBindingAttr ( |
| 7042 |
el, |
| 7043 |
name, |
| 7044 |
getStatic |
| 7045 |
) { |
| 7046 |
var dynamicValue = |
| 7047 |
getAndRemoveAttr(el, ':' + name) || |
| 7048 |
getAndRemoveAttr(el, 'v-bind:' + name); |
| 7049 |
if (dynamicValue != null) { |
| 7050 |
return parseFilters(dynamicValue) |
| 7051 |
} else if (getStatic !== false) { |
| 7052 |
var staticValue = getAndRemoveAttr(el, name); |
| 7053 |
if (staticValue != null) { |
| 7054 |
return JSON.stringify(staticValue) |
| 7055 |
} |
| 7056 |
} |
| 7057 |
} |
| 7058 |
|
| 7059 |
// note: this only removes the attr from the Array (attrsList) so that it |
| 7060 |
// doesn't get processed by processAttrs. |
| 7061 |
// By default it does NOT remove it from the map (attrsMap) because the map is |
| 7062 |
// needed during codegen. |
| 7063 |
function getAndRemoveAttr ( |
| 7064 |
el, |
| 7065 |
name, |
| 7066 |
removeFromMap |
| 7067 |
) { |
| 7068 |
var val; |
| 7069 |
if ((val = el.attrsMap[name]) != null) { |
| 7070 |
var list = el.attrsList; |
| 7071 |
for (var i = 0, l = list.length; i < l; i++) { |
| 7072 |
if (list[i].name === name) { |
| 7073 |
list.splice(i, 1); |
| 7074 |
break |
| 7075 |
} |
| 7076 |
} |
| 7077 |
} |
| 7078 |
if (removeFromMap) { |
| 7079 |
delete el.attrsMap[name]; |
| 7080 |
} |
| 7081 |
return val |
| 7082 |
} |
| 7083 |
|
| 7084 |
/* */ |
| 7085 |
|
| 7086 |
/** |
| 7087 |
* Cross-platform code generation for component v-model |
| 7088 |
*/ |
| 7089 |
function genComponentModel ( |
| 7090 |
el, |
| 7091 |
value, |
| 7092 |
modifiers |
| 7093 |
) { |
| 7094 |
var ref = modifiers || {}; |
| 7095 |
var number = ref.number; |
| 7096 |
var trim = ref.trim; |
| 7097 |
|
| 7098 |
var baseValueExpression = '$$v'; |
| 7099 |
var valueExpression = baseValueExpression; |
| 7100 |
if (trim) { |
| 7101 |
valueExpression = |
| 7102 |
"(typeof " + baseValueExpression + " === 'string'" + |
| 7103 |
"? " + baseValueExpression + ".trim()" + |
| 7104 |
": " + baseValueExpression + ")"; |
| 7105 |
} |
| 7106 |
if (number) { |
| 7107 |
valueExpression = "_n(" + valueExpression + ")"; |
| 7108 |
} |
| 7109 |
var assignment = genAssignmentCode(value, valueExpression); |
| 7110 |
|
| 7111 |
el.model = { |
| 7112 |
value: ("(" + value + ")"), |
| 7113 |
expression: ("\"" + value + "\""), |
| 7114 |
callback: ("function (" + baseValueExpression + ") {" + assignment + "}") |
| 7115 |
}; |
| 7116 |
} |
| 7117 |
|
| 7118 |
/** |
| 7119 |
* Cross-platform codegen helper for generating v-model value assignment code. |
| 7120 |
*/ |
| 7121 |
function genAssignmentCode ( |
| 7122 |
value, |
| 7123 |
assignment |
| 7124 |
) { |
| 7125 |
var res = parseModel(value); |
| 7126 |
if (res.key === null) { |
| 7127 |
return (value + "=" + assignment) |
| 7128 |
} else { |
| 7129 |
return ("$set(" + (res.exp) + ", " + (res.key) + ", " + assignment + ")") |
| 7130 |
} |
| 7131 |
} |
| 7132 |
|
| 7133 |
/** |
| 7134 |
* Parse a v-model expression into a base path and a final key segment. |
| 7135 |
* Handles both dot-path and possible square brackets. |
| 7136 |
* |
| 7137 |
* Possible cases: |
| 7138 |
* |
| 7139 |
* - test |
| 7140 |
* - test[key] |
| 7141 |
* - test[test1[key]] |
| 7142 |
* - test["a"][key] |
| 7143 |
* - xxx.test[a[a].test1[key]] |
| 7144 |
* - test.xxx.a["asa"][test1[key]] |
| 7145 |
* |
| 7146 |
*/ |
| 7147 |
|
| 7148 |
var len; |
| 7149 |
var str; |
| 7150 |
var chr; |
| 7151 |
var index$1; |
| 7152 |
var expressionPos; |
| 7153 |
var expressionEndPos; |
| 7154 |
|
| 7155 |
|
| 7156 |
|
| 7157 |
function parseModel (val) { |
| 7158 |
// Fix https://github.com/vuejs/vue/pull/7730 |
| 7159 |
// allow v-model="obj.val " (trailing whitespace) |
| 7160 |
val = val.trim(); |
| 7161 |
len = val.length; |
| 7162 |
|
| 7163 |
if (val.indexOf('[') < 0 || val.lastIndexOf(']') < len - 1) { |
| 7164 |
index$1 = val.lastIndexOf('.'); |
| 7165 |
if (index$1 > -1) { |
| 7166 |
return { |
| 7167 |
exp: val.slice(0, index$1), |
| 7168 |
key: '"' + val.slice(index$1 + 1) + '"' |
| 7169 |
} |
| 7170 |
} else { |
| 7171 |
return { |
| 7172 |
exp: val, |
| 7173 |
key: null |
| 7174 |
} |
| 7175 |
} |
| 7176 |
} |
| 7177 |
|
| 7178 |
str = val; |
| 7179 |
index$1 = expressionPos = expressionEndPos = 0; |
| 7180 |
|
| 7181 |
while (!eof()) { |
| 7182 |
chr = next(); |
| 7183 |
/* istanbul ignore if */ |
| 7184 |
if (isStringStart(chr)) { |
| 7185 |
parseString(chr); |
| 7186 |
} else if (chr === 0x5B) { |
| 7187 |
parseBracket(chr); |
| 7188 |
} |
| 7189 |
} |
| 7190 |
|
| 7191 |
return { |
| 7192 |
exp: val.slice(0, expressionPos), |
| 7193 |
key: val.slice(expressionPos + 1, expressionEndPos) |
| 7194 |
} |
| 7195 |
} |
| 7196 |
|
| 7197 |
function next () { |
| 7198 |
return str.charCodeAt(++index$1) |
| 7199 |
} |
| 7200 |
|
| 7201 |
function eof () { |
| 7202 |
return index$1 >= len |
| 7203 |
} |
| 7204 |
|
| 7205 |
function isStringStart (chr) { |
| 7206 |
return chr === 0x22 || chr === 0x27 |
| 7207 |
} |
| 7208 |
|
| 7209 |
function parseBracket (chr) { |
| 7210 |
var inBracket = 1; |
| 7211 |
expressionPos = index$1; |
| 7212 |
while (!eof()) { |
| 7213 |
chr = next(); |
| 7214 |
if (isStringStart(chr)) { |
| 7215 |
parseString(chr); |
| 7216 |
continue |
| 7217 |
} |
| 7218 |
if (chr === 0x5B) { inBracket++; } |
| 7219 |
if (chr === 0x5D) { inBracket--; } |
| 7220 |
if (inBracket === 0) { |
| 7221 |
expressionEndPos = index$1; |
| 7222 |
break |
| 7223 |
} |
| 7224 |
} |
| 7225 |
} |
| 7226 |
|
| 7227 |
function parseString (chr) { |
| 7228 |
var stringQuote = chr; |
| 7229 |
while (!eof()) { |
| 7230 |
chr = next(); |
| 7231 |
if (chr === stringQuote) { |
| 7232 |
break |
| 7233 |
} |
| 7234 |
} |
| 7235 |
} |
| 7236 |
|
| 7237 |
/* */ |
| 7238 |
|
| 7239 |
var warn$1; |
| 7240 |
|
| 7241 |
// in some cases, the event used has to be determined at runtime |
| 7242 |
// so we used some reserved tokens during compile. |
| 7243 |
var RANGE_TOKEN = '__r'; |
| 7244 |
var CHECKBOX_RADIO_TOKEN = '__c'; |
| 7245 |
|
| 7246 |
function model ( |
| 7247 |
el, |
| 7248 |
dir, |
| 7249 |
_warn |
| 7250 |
) { |
| 7251 |
warn$1 = _warn; |
| 7252 |
var value = dir.value; |
| 7253 |
var modifiers = dir.modifiers; |
| 7254 |
var tag = el.tag; |
| 7255 |
var type = el.attrsMap.type; |
| 7256 |
|
| 7257 |
if (process.env.NODE_ENV !== 'production') { |
| 7258 |
// inputs with type="file" are read only and setting the input's |
| 7259 |
// value will throw an error. |
| 7260 |
if (tag === 'input' && type === 'file') { |
| 7261 |
warn$1( |
| 7262 |
"<" + (el.tag) + " v-model=\"" + value + "\" type=\"file\">:\n" + |
| 7263 |
"File inputs are read only. Use a v-on:change listener instead." |
| 7264 |
); |
| 7265 |
} |
| 7266 |
} |
| 7267 |
|
| 7268 |
if (el.component) { |
| 7269 |
genComponentModel(el, value, modifiers); |
| 7270 |
// component v-model doesn't need extra runtime |
| 7271 |
return false |
| 7272 |
} else if (tag === 'select') { |
| 7273 |
genSelect(el, value, modifiers); |
| 7274 |
} else if (tag === 'input' && type === 'checkbox') { |
| 7275 |
genCheckboxModel(el, value, modifiers); |
| 7276 |
} else if (tag === 'input' && type === 'radio') { |
| 7277 |
genRadioModel(el, value, modifiers); |
| 7278 |
} else if (tag === 'input' || tag === 'textarea') { |
| 7279 |
genDefaultModel(el, value, modifiers); |
| 7280 |
} else if (!config.isReservedTag(tag)) { |
| 7281 |
genComponentModel(el, value, modifiers); |
| 7282 |
// component v-model doesn't need extra runtime |
| 7283 |
return false |
| 7284 |
} else if (process.env.NODE_ENV !== 'production') { |
| 7285 |
warn$1( |
| 7286 |
"<" + (el.tag) + " v-model=\"" + value + "\">: " + |
| 7287 |
"v-model is not supported on this element type. " + |
| 7288 |
'If you are working with contenteditable, it\'s recommended to ' + |
| 7289 |
'wrap a library dedicated for that purpose inside a custom component.' |
| 7290 |
); |
| 7291 |
} |
| 7292 |
|
| 7293 |
// ensure runtime directive metadata |
| 7294 |
return true |
| 7295 |
} |
| 7296 |
|
| 7297 |
function genCheckboxModel ( |
| 7298 |
el, |
| 7299 |
value, |
| 7300 |
modifiers |
| 7301 |
) { |
| 7302 |
var number = modifiers && modifiers.number; |
| 7303 |
var valueBinding = getBindingAttr(el, 'value') || 'null'; |
| 7304 |
var trueValueBinding = getBindingAttr(el, 'true-value') || 'true'; |
| 7305 |
var falseValueBinding = getBindingAttr(el, 'false-value') || 'false'; |
| 7306 |
addProp(el, 'checked', |
| 7307 |
"Array.isArray(" + value + ")" + |
| 7308 |
"?_i(" + value + "," + valueBinding + ")>-1" + ( |
| 7309 |
trueValueBinding === 'true' |
| 7310 |
? (":(" + value + ")") |
| 7311 |
: (":_q(" + value + "," + trueValueBinding + ")") |
| 7312 |
) |
| 7313 |
); |
| 7314 |
addHandler(el, 'change', |
| 7315 |
"var $$a=" + value + "," + |
| 7316 |
'$$el=$event.target,' + |
| 7317 |
"$$c=$$el.checked?(" + trueValueBinding + "):(" + falseValueBinding + ");" + |
| 7318 |
'if(Array.isArray($$a)){' + |
| 7319 |
"var $$v=" + (number ? '_n(' + valueBinding + ')' : valueBinding) + "," + |
| 7320 |
'$$i=_i($$a,$$v);' + |
| 7321 |
"if($$el.checked){$$i<0&&(" + (genAssignmentCode(value, '$$a.concat([$$v])')) + ")}" + |
| 7322 |
"else{$$i>-1&&(" + (genAssignmentCode(value, '$$a.slice(0,$$i).concat($$a.slice($$i+1))')) + ")}" + |
| 7323 |
"}else{" + (genAssignmentCode(value, '$$c')) + "}", |
| 7324 |
null, true |
| 7325 |
); |
| 7326 |
} |
| 7327 |
|
| 7328 |
function genRadioModel ( |
| 7329 |
el, |
| 7330 |
value, |
| 7331 |
modifiers |
| 7332 |
) { |
| 7333 |
var number = modifiers && modifiers.number; |
| 7334 |
var valueBinding = getBindingAttr(el, 'value') || 'null'; |
| 7335 |
valueBinding = number ? ("_n(" + valueBinding + ")") : valueBinding; |
| 7336 |
addProp(el, 'checked', ("_q(" + value + "," + valueBinding + ")")); |
| 7337 |
addHandler(el, 'change', genAssignmentCode(value, valueBinding), null, true); |
| 7338 |
} |
| 7339 |
|
| 7340 |
function genSelect ( |
| 7341 |
el, |
| 7342 |
value, |
| 7343 |
modifiers |
| 7344 |
) { |
| 7345 |
var number = modifiers && modifiers.number; |
| 7346 |
var selectedVal = "Array.prototype.filter" + |
| 7347 |
".call($event.target.options,function(o){return o.selected})" + |
| 7348 |
".map(function(o){var val = \"_value\" in o ? o._value : o.value;" + |
| 7349 |
"return " + (number ? '_n(val)' : 'val') + "})"; |
| 7350 |
|
| 7351 |
var assignment = '$event.target.multiple ? $$selectedVal : $$selectedVal[0]'; |
| 7352 |
var code = "var $$selectedVal = " + selectedVal + ";"; |
| 7353 |
code = code + " " + (genAssignmentCode(value, assignment)); |
| 7354 |
addHandler(el, 'change', code, null, true); |
| 7355 |
} |
| 7356 |
|
| 7357 |
function genDefaultModel ( |
| 7358 |
el, |
| 7359 |
value, |
| 7360 |
modifiers |
| 7361 |
) { |
| 7362 |
var type = el.attrsMap.type; |
| 7363 |
|
| 7364 |
// warn if v-bind:value conflicts with v-model |
| 7365 |
// except for inputs with v-bind:type |
| 7366 |
if (process.env.NODE_ENV !== 'production') { |
| 7367 |
var value$1 = el.attrsMap['v-bind:value'] || el.attrsMap[':value']; |
| 7368 |
var typeBinding = el.attrsMap['v-bind:type'] || el.attrsMap[':type']; |
| 7369 |
if (value$1 && !typeBinding) { |
| 7370 |
var binding = el.attrsMap['v-bind:value'] ? 'v-bind:value' : ':value'; |
| 7371 |
warn$1( |
| 7372 |
binding + "=\"" + value$1 + "\" conflicts with v-model on the same element " + |
| 7373 |
'because the latter already expands to a value binding internally' |
| 7374 |
); |
| 7375 |
} |
| 7376 |
} |
| 7377 |
|
| 7378 |
var ref = modifiers || {}; |
| 7379 |
var lazy = ref.lazy; |
| 7380 |
var number = ref.number; |
| 7381 |
var trim = ref.trim; |
| 7382 |
var needCompositionGuard = !lazy && type !== 'range'; |
| 7383 |
var event = lazy |
| 7384 |
? 'change' |
| 7385 |
: type === 'range' |
| 7386 |
? RANGE_TOKEN |
| 7387 |
: 'input'; |
| 7388 |
|
| 7389 |
var valueExpression = '$event.target.value'; |
| 7390 |
if (trim) { |
| 7391 |
valueExpression = "$event.target.value.trim()"; |
| 7392 |
} |
| 7393 |
if (number) { |
| 7394 |
valueExpression = "_n(" + valueExpression + ")"; |
| 7395 |
} |
| 7396 |
|
| 7397 |
var code = genAssignmentCode(value, valueExpression); |
| 7398 |
if (needCompositionGuard) { |
| 7399 |
code = "if($event.target.composing)return;" + code; |
| 7400 |
} |
| 7401 |
|
| 7402 |
addProp(el, 'value', ("(" + value + ")")); |
| 7403 |
addHandler(el, event, code, null, true); |
| 7404 |
if (trim || number) { |
| 7405 |
addHandler(el, 'blur', '$forceUpdate()'); |
| 7406 |
} |
| 7407 |
} |
| 7408 |
|
| 7409 |
/* */ |
| 7410 |
|
| 7411 |
// normalize v-model event tokens that can only be determined at runtime. |
| 7412 |
// it's important to place the event as the first in the array because |
| 7413 |
// the whole point is ensuring the v-model callback gets called before |
| 7414 |
// user-attached handlers. |
| 7415 |
function normalizeEvents (on) { |
| 7416 |
/* istanbul ignore if */ |
| 7417 |
if (isDef(on[RANGE_TOKEN])) { |
| 7418 |
// IE input[type=range] only supports `change` event |
| 7419 |
var event = isIE ? 'change' : 'input'; |
| 7420 |
on[event] = [].concat(on[RANGE_TOKEN], on[event] || []); |
| 7421 |
delete on[RANGE_TOKEN]; |
| 7422 |
} |
| 7423 |
// This was originally intended to fix #4521 but no longer necessary |
| 7424 |
// after 2.5. Keeping it for backwards compat with generated code from < 2.4 |
| 7425 |
/* istanbul ignore if */ |
| 7426 |
if (isDef(on[CHECKBOX_RADIO_TOKEN])) { |
| 7427 |
on.change = [].concat(on[CHECKBOX_RADIO_TOKEN], on.change || []); |
| 7428 |
delete on[CHECKBOX_RADIO_TOKEN]; |
| 7429 |
} |
| 7430 |
} |
| 7431 |
|
| 7432 |
var target$1; |
| 7433 |
|
| 7434 |
function createOnceHandler (handler, event, capture) { |
| 7435 |
var _target = target$1; // save current target element in closure |
| 7436 |
return function onceHandler () { |
| 7437 |
var res = handler.apply(null, arguments); |
| 7438 |
if (res !== null) { |
| 7439 |
remove$2(event, onceHandler, capture, _target); |
| 7440 |
} |
| 7441 |
} |
| 7442 |
} |
| 7443 |
|
| 7444 |
function add$1 ( |
| 7445 |
event, |
| 7446 |
handler, |
| 7447 |
once$$1, |
| 7448 |
capture, |
| 7449 |
passive |
| 7450 |
) { |
| 7451 |
handler = withMacroTask(handler); |
| 7452 |
if (once$$1) { handler = createOnceHandler(handler, event, capture); } |
| 7453 |
target$1.addEventListener( |
| 7454 |
event, |
| 7455 |
handler, |
| 7456 |
supportsPassive |
| 7457 |
? { capture: capture, passive: passive } |
| 7458 |
: capture |
| 7459 |
); |
| 7460 |
} |
| 7461 |
|
| 7462 |
function remove$2 ( |
| 7463 |
event, |
| 7464 |
handler, |
| 7465 |
capture, |
| 7466 |
_target |
| 7467 |
) { |
| 7468 |
(_target || target$1).removeEventListener( |
| 7469 |
event, |
| 7470 |
handler._withTask || handler, |
| 7471 |
capture |
| 7472 |
); |
| 7473 |
} |
| 7474 |
|
| 7475 |
function updateDOMListeners (oldVnode, vnode) { |
| 7476 |
if (isUndef(oldVnode.data.on) && isUndef(vnode.data.on)) { |
| 7477 |
return |
| 7478 |
} |
| 7479 |
var on = vnode.data.on || {}; |
| 7480 |
var oldOn = oldVnode.data.on || {}; |
| 7481 |
target$1 = vnode.elm; |
| 7482 |
normalizeEvents(on); |
| 7483 |
updateListeners(on, oldOn, add$1, remove$2, vnode.context); |
| 7484 |
target$1 = undefined; |
| 7485 |
} |
| 7486 |
|
| 7487 |
var events = { |
| 7488 |
create: updateDOMListeners, |
| 7489 |
update: updateDOMListeners |
| 7490 |
} |
| 7491 |
|
| 7492 |
/* */ |
| 7493 |
|
| 7494 |
function updateDOMProps (oldVnode, vnode) { |
| 7495 |
if (isUndef(oldVnode.data.domProps) && isUndef(vnode.data.domProps)) { |
| 7496 |
return |
| 7497 |
} |
| 7498 |
var key, cur; |
| 7499 |
var elm = vnode.elm; |
| 7500 |
var oldProps = oldVnode.data.domProps || {}; |
| 7501 |
var props = vnode.data.domProps || {}; |
| 7502 |
// clone observed objects, as the user probably wants to mutate it |
| 7503 |
if (isDef(props.__ob__)) { |
| 7504 |
props = vnode.data.domProps = extend({}, props); |
| 7505 |
} |
| 7506 |
|
| 7507 |
for (key in oldProps) { |
| 7508 |
if (isUndef(props[key])) { |
| 7509 |
elm[key] = ''; |
| 7510 |
} |
| 7511 |
} |
| 7512 |
for (key in props) { |
| 7513 |
cur = props[key]; |
| 7514 |
// ignore children if the node has textContent or innerHTML, |
| 7515 |
// as these will throw away existing DOM nodes and cause removal errors |
| 7516 |
// on subsequent patches (#3360) |
| 7517 |
if (key === 'textContent' || key === 'innerHTML') { |
| 7518 |
if (vnode.children) { vnode.children.length = 0; } |
| 7519 |
if (cur === oldProps[key]) { continue } |
| 7520 |
// #6601 work around Chrome version <= 55 bug where single textNode |
| 7521 |
// replaced by innerHTML/textContent retains its parentNode property |
| 7522 |
if (elm.childNodes.length === 1) { |
| 7523 |
elm.removeChild(elm.childNodes[0]); |
| 7524 |
} |
| 7525 |
} |
| 7526 |
|
| 7527 |
if (key === 'value') { |
| 7528 |
// store value as _value as well since |
| 7529 |
// non-string values will be stringified |
| 7530 |
elm._value = cur; |
| 7531 |
// avoid resetting cursor position when value is the same |
| 7532 |
var strCur = isUndef(cur) ? '' : String(cur); |
| 7533 |
if (shouldUpdateValue(elm, strCur)) { |
| 7534 |
elm.value = strCur; |
| 7535 |
} |
| 7536 |
} else { |
| 7537 |
elm[key] = cur; |
| 7538 |
} |
| 7539 |
} |
| 7540 |
} |
| 7541 |
|
| 7542 |
// check platforms/web/util/attrs.js acceptValue |
| 7543 |
|
| 7544 |
|
| 7545 |
function shouldUpdateValue (elm, checkVal) { |
| 7546 |
return (!elm.composing && ( |
| 7547 |
elm.tagName === 'OPTION' || |
| 7548 |
isNotInFocusAndDirty(elm, checkVal) || |
| 7549 |
isDirtyWithModifiers(elm, checkVal) |
| 7550 |
)) |
| 7551 |
} |
| 7552 |
|
| 7553 |
function isNotInFocusAndDirty (elm, checkVal) { |
| 7554 |
// return true when textbox (.number and .trim) loses focus and its value is |
| 7555 |
// not equal to the updated value |
| 7556 |
var notInFocus = true; |
| 7557 |
// #6157 |
| 7558 |
// work around IE bug when accessing document.activeElement in an iframe |
| 7559 |
try { notInFocus = document.activeElement !== elm; } catch (e) {} |
| 7560 |
return notInFocus && elm.value !== checkVal |
| 7561 |
} |
| 7562 |
|
| 7563 |
function isDirtyWithModifiers (elm, newVal) { |
| 7564 |
var value = elm.value; |
| 7565 |
var modifiers = elm._vModifiers; // injected by v-model runtime |
| 7566 |
if (isDef(modifiers)) { |
| 7567 |
if (modifiers.lazy) { |
| 7568 |
// inputs with lazy should only be updated when not in focus |
| 7569 |
return false |
| 7570 |
} |
| 7571 |
if (modifiers.number) { |
| 7572 |
return toNumber(value) !== toNumber(newVal) |
| 7573 |
} |
| 7574 |
if (modifiers.trim) { |
| 7575 |
return value.trim() !== newVal.trim() |
| 7576 |
} |
| 7577 |
} |
| 7578 |
return value !== newVal |
| 7579 |
} |
| 7580 |
|
| 7581 |
var domProps = { |
| 7582 |
create: updateDOMProps, |
| 7583 |
update: updateDOMProps |
| 7584 |
} |
| 7585 |
|
| 7586 |
/* */ |
| 7587 |
|
| 7588 |
var parseStyleText = cached(function (cssText) { |
| 7589 |
var res = {}; |
| 7590 |
var listDelimiter = /;(?![^(]*\))/g; |
| 7591 |
var propertyDelimiter = /:(.+)/; |
| 7592 |
cssText.split(listDelimiter).forEach(function (item) { |
| 7593 |
if (item) { |
| 7594 |
var tmp = item.split(propertyDelimiter); |
| 7595 |
tmp.length > 1 && (res[tmp[0].trim()] = tmp[1].trim()); |
| 7596 |
} |
| 7597 |
}); |
| 7598 |
return res |
| 7599 |
}); |
| 7600 |
|
| 7601 |
// merge static and dynamic style data on the same vnode |
| 7602 |
function normalizeStyleData (data) { |
| 7603 |
var style = normalizeStyleBinding(data.style); |
| 7604 |
// static style is pre-processed into an object during compilation |
| 7605 |
// and is always a fresh object, so it's safe to merge into it |
| 7606 |
return data.staticStyle |
| 7607 |
? extend(data.staticStyle, style) |
| 7608 |
: style |
| 7609 |
} |
| 7610 |
|
| 7611 |
// normalize possible array / string values into Object |
| 7612 |
function normalizeStyleBinding (bindingStyle) { |
| 7613 |
if (Array.isArray(bindingStyle)) { |
| 7614 |
return toObject(bindingStyle) |
| 7615 |
} |
| 7616 |
if (typeof bindingStyle === 'string') { |
| 7617 |
return parseStyleText(bindingStyle) |
| 7618 |
} |
| 7619 |
return bindingStyle |
| 7620 |
} |
| 7621 |
|
| 7622 |
/** |
| 7623 |
* parent component style should be after child's |
| 7624 |
* so that parent component's style could override it |
| 7625 |
*/ |
| 7626 |
function getStyle (vnode, checkChild) { |
| 7627 |
var res = {}; |
| 7628 |
var styleData; |
| 7629 |
|
| 7630 |
if (checkChild) { |
| 7631 |
var childNode = vnode; |
| 7632 |
while (childNode.componentInstance) { |
| 7633 |
childNode = childNode.componentInstance._vnode; |
| 7634 |
if ( |
| 7635 |
childNode && childNode.data && |
| 7636 |
(styleData = normalizeStyleData(childNode.data)) |
| 7637 |
) { |
| 7638 |
extend(res, styleData); |
| 7639 |
} |
| 7640 |
} |
| 7641 |
} |
| 7642 |
|
| 7643 |
if ((styleData = normalizeStyleData(vnode.data))) { |
| 7644 |
extend(res, styleData); |
| 7645 |
} |
| 7646 |
|
| 7647 |
var parentNode = vnode; |
| 7648 |
while ((parentNode = parentNode.parent)) { |
| 7649 |
if (parentNode.data && (styleData = normalizeStyleData(parentNode.data))) { |
| 7650 |
extend(res, styleData); |
| 7651 |
} |
| 7652 |
} |
| 7653 |
return res |
| 7654 |
} |
| 7655 |
|
| 7656 |
/* */ |
| 7657 |
|
| 7658 |
var cssVarRE = /^--/; |
| 7659 |
var importantRE = /\s*!important$/; |
| 7660 |
var setProp = function (el, name, val) { |
| 7661 |
/* istanbul ignore if */ |
| 7662 |
if (cssVarRE.test(name)) { |
| 7663 |
el.style.setProperty(name, val); |
| 7664 |
} else if (importantRE.test(val)) { |
| 7665 |
el.style.setProperty(name, val.replace(importantRE, ''), 'important'); |
| 7666 |
} else { |
| 7667 |
var normalizedName = normalize(name); |
| 7668 |
if (Array.isArray(val)) { |
| 7669 |
// Support values array created by autoprefixer, e.g. |
| 7670 |
// {display: ["-webkit-box", "-ms-flexbox", "flex"]} |
| 7671 |
// Set them one by one, and the browser will only set those it can recognize |
| 7672 |
for (var i = 0, len = val.length; i < len; i++) { |
| 7673 |
el.style[normalizedName] = val[i]; |
| 7674 |
} |
| 7675 |
} else { |
| 7676 |
el.style[normalizedName] = val; |
| 7677 |
} |
| 7678 |
} |
| 7679 |
}; |
| 7680 |
|
| 7681 |
var vendorNames = ['Webkit', 'Moz', 'ms']; |
| 7682 |
|
| 7683 |
var emptyStyle; |
| 7684 |
var normalize = cached(function (prop) { |
| 7685 |
emptyStyle = emptyStyle || document.createElement('div').style; |
| 7686 |
prop = camelize(prop); |
| 7687 |
if (prop !== 'filter' && (prop in emptyStyle)) { |
| 7688 |
return prop |
| 7689 |
} |
| 7690 |
var capName = prop.charAt(0).toUpperCase() + prop.slice(1); |
| 7691 |
for (var i = 0; i < vendorNames.length; i++) { |
| 7692 |
var name = vendorNames[i] + capName; |
| 7693 |
if (name in emptyStyle) { |
| 7694 |
return name |
| 7695 |
} |
| 7696 |
} |
| 7697 |
}); |
| 7698 |
|
| 7699 |
function updateStyle (oldVnode, vnode) { |
| 7700 |
var data = vnode.data; |
| 7701 |
var oldData = oldVnode.data; |
| 7702 |
|
| 7703 |
if (isUndef(data.staticStyle) && isUndef(data.style) && |
| 7704 |
isUndef(oldData.staticStyle) && isUndef(oldData.style) |
| 7705 |
) { |
| 7706 |
return |
| 7707 |
} |
| 7708 |
|
| 7709 |
var cur, name; |
| 7710 |
var el = vnode.elm; |
| 7711 |
var oldStaticStyle = oldData.staticStyle; |
| 7712 |
var oldStyleBinding = oldData.normalizedStyle || oldData.style || {}; |
| 7713 |
|
| 7714 |
// if static style exists, stylebinding already merged into it when doing normalizeStyleData |
| 7715 |
var oldStyle = oldStaticStyle || oldStyleBinding; |
| 7716 |
|
| 7717 |
var style = normalizeStyleBinding(vnode.data.style) || {}; |
| 7718 |
|
| 7719 |
// store normalized style under a different key for next diff |
| 7720 |
// make sure to clone it if it's reactive, since the user likely wants |
| 7721 |
// to mutate it. |
| 7722 |
vnode.data.normalizedStyle = isDef(style.__ob__) |
| 7723 |
? extend({}, style) |
| 7724 |
: style; |
| 7725 |
|
| 7726 |
var newStyle = getStyle(vnode, true); |
| 7727 |
|
| 7728 |
for (name in oldStyle) { |
| 7729 |
if (isUndef(newStyle[name])) { |
| 7730 |
setProp(el, name, ''); |
| 7731 |
} |
| 7732 |
} |
| 7733 |
for (name in newStyle) { |
| 7734 |
cur = newStyle[name]; |
| 7735 |
if (cur !== oldStyle[name]) { |
| 7736 |
// ie9 setting to null has no effect, must use empty string |
| 7737 |
setProp(el, name, cur == null ? '' : cur); |
| 7738 |
} |
| 7739 |
} |
| 7740 |
} |
| 7741 |
|
| 7742 |
var style = { |
| 7743 |
create: updateStyle, |
| 7744 |
update: updateStyle |
| 7745 |
} |
| 7746 |
|
| 7747 |
/* */ |
| 7748 |
|
| 7749 |
/** |
| 7750 |
* Add class with compatibility for SVG since classList is not supported on |
| 7751 |
* SVG elements in IE |
| 7752 |
*/ |
| 7753 |
function addClass (el, cls) { |
| 7754 |
/* istanbul ignore if */ |
| 7755 |
if (!cls || !(cls = cls.trim())) { |
| 7756 |
return |
| 7757 |
} |
| 7758 |
|
| 7759 |
/* istanbul ignore else */ |
| 7760 |
if (el.classList) { |
| 7761 |
if (cls.indexOf(' ') > -1) { |
| 7762 |
cls.split(/\s+/).forEach(function (c) { return el.classList.add(c); }); |
| 7763 |
} else { |
| 7764 |
el.classList.add(cls); |
| 7765 |
} |
| 7766 |
} else { |
| 7767 |
var cur = " " + (el.getAttribute('class') || '') + " "; |
| 7768 |
if (cur.indexOf(' ' + cls + ' ') < 0) { |
| 7769 |
el.setAttribute('class', (cur + cls).trim()); |
| 7770 |
} |
| 7771 |
} |
| 7772 |
} |
| 7773 |
|
| 7774 |
/** |
| 7775 |
* Remove class with compatibility for SVG since classList is not supported on |
| 7776 |
* SVG elements in IE |
| 7777 |
*/ |
| 7778 |
function removeClass (el, cls) { |
| 7779 |
/* istanbul ignore if */ |
| 7780 |
if (!cls || !(cls = cls.trim())) { |
| 7781 |
return |
| 7782 |
} |
| 7783 |
|
| 7784 |
/* istanbul ignore else */ |
| 7785 |
if (el.classList) { |
| 7786 |
if (cls.indexOf(' ') > -1) { |
| 7787 |
cls.split(/\s+/).forEach(function (c) { return el.classList.remove(c); }); |
| 7788 |
} else { |
| 7789 |
el.classList.remove(cls); |
| 7790 |
} |
| 7791 |
if (!el.classList.length) { |
| 7792 |
el.removeAttribute('class'); |
| 7793 |
} |
| 7794 |
} else { |
| 7795 |
var cur = " " + (el.getAttribute('class') || '') + " "; |
| 7796 |
var tar = ' ' + cls + ' '; |
| 7797 |
while (cur.indexOf(tar) >= 0) { |
| 7798 |
cur = cur.replace(tar, ' '); |
| 7799 |
} |
| 7800 |
cur = cur.trim(); |
| 7801 |
if (cur) { |
| 7802 |
el.setAttribute('class', cur); |
| 7803 |
} else { |
| 7804 |
el.removeAttribute('class'); |
| 7805 |
} |
| 7806 |
} |
| 7807 |
} |
| 7808 |
|
| 7809 |
/* */ |
| 7810 |
|
| 7811 |
function resolveTransition (def) { |
| 7812 |
if (!def) { |
| 7813 |
return |
| 7814 |
} |
| 7815 |
/* istanbul ignore else */ |
| 7816 |
if (typeof def === 'object') { |
| 7817 |
var res = {}; |
| 7818 |
if (def.css !== false) { |
| 7819 |
extend(res, autoCssTransition(def.name || 'v')); |
| 7820 |
} |
| 7821 |
extend(res, def); |
| 7822 |
return res |
| 7823 |
} else if (typeof def === 'string') { |
| 7824 |
return autoCssTransition(def) |
| 7825 |
} |
| 7826 |
} |
| 7827 |
|
| 7828 |
var autoCssTransition = cached(function (name) { |
| 7829 |
return { |
| 7830 |
enterClass: (name + "-enter"), |
| 7831 |
enterToClass: (name + "-enter-to"), |
| 7832 |
enterActiveClass: (name + "-enter-active"), |
| 7833 |
leaveClass: (name + "-leave"), |
| 7834 |
leaveToClass: (name + "-leave-to"), |
| 7835 |
leaveActiveClass: (name + "-leave-active") |
| 7836 |
} |
| 7837 |
}); |
| 7838 |
|
| 7839 |
var hasTransition = inBrowser && !isIE9; |
| 7840 |
var TRANSITION = 'transition'; |
| 7841 |
var ANIMATION = 'animation'; |
| 7842 |
|
| 7843 |
// Transition property/event sniffing |
| 7844 |
var transitionProp = 'transition'; |
| 7845 |
var transitionEndEvent = 'transitionend'; |
| 7846 |
var animationProp = 'animation'; |
| 7847 |
var animationEndEvent = 'animationend'; |
| 7848 |
if (hasTransition) { |
| 7849 |
/* istanbul ignore if */ |
| 7850 |
if (window.ontransitionend === undefined && |
| 7851 |
window.onwebkittransitionend !== undefined |
| 7852 |
) { |
| 7853 |
transitionProp = 'WebkitTransition'; |
| 7854 |
transitionEndEvent = 'webkitTransitionEnd'; |
| 7855 |
} |
| 7856 |
if (window.onanimationend === undefined && |
| 7857 |
window.onwebkitanimationend !== undefined |
| 7858 |
) { |
| 7859 |
animationProp = 'WebkitAnimation'; |
| 7860 |
animationEndEvent = 'webkitAnimationEnd'; |
| 7861 |
} |
| 7862 |
} |
| 7863 |
|
| 7864 |
// binding to window is necessary to make hot reload work in IE in strict mode |
| 7865 |
var raf = inBrowser |
| 7866 |
? window.requestAnimationFrame |
| 7867 |
? window.requestAnimationFrame.bind(window) |
| 7868 |
: setTimeout |
| 7869 |
: /* istanbul ignore next */ function (fn) { return fn(); }; |
| 7870 |
|
| 7871 |
function nextFrame (fn) { |
| 7872 |
raf(function () { |
| 7873 |
raf(fn); |
| 7874 |
}); |
| 7875 |
} |
| 7876 |
|
| 7877 |
function addTransitionClass (el, cls) { |
| 7878 |
var transitionClasses = el._transitionClasses || (el._transitionClasses = []); |
| 7879 |
if (transitionClasses.indexOf(cls) < 0) { |
| 7880 |
transitionClasses.push(cls); |
| 7881 |
addClass(el, cls); |
| 7882 |
} |
| 7883 |
} |
| 7884 |
|
| 7885 |
function removeTransitionClass (el, cls) { |
| 7886 |
if (el._transitionClasses) { |
| 7887 |
remove(el._transitionClasses, cls); |
| 7888 |
} |
| 7889 |
removeClass(el, cls); |
| 7890 |
} |
| 7891 |
|
| 7892 |
function whenTransitionEnds ( |
| 7893 |
el, |
| 7894 |
expectedType, |
| 7895 |
cb |
| 7896 |
) { |
| 7897 |
var ref = getTransitionInfo(el, expectedType); |
| 7898 |
var type = ref.type; |
| 7899 |
var timeout = ref.timeout; |
| 7900 |
var propCount = ref.propCount; |
| 7901 |
if (!type) { return cb() } |
| 7902 |
var event = type === TRANSITION ? transitionEndEvent : animationEndEvent; |
| 7903 |
var ended = 0; |
| 7904 |
var end = function () { |
| 7905 |
el.removeEventListener(event, onEnd); |
| 7906 |
cb(); |
| 7907 |
}; |
| 7908 |
var onEnd = function (e) { |
| 7909 |
if (e.target === el) { |
| 7910 |
if (++ended >= propCount) { |
| 7911 |
end(); |
| 7912 |
} |
| 7913 |
} |
| 7914 |
}; |
| 7915 |
setTimeout(function () { |
| 7916 |
if (ended < propCount) { |
| 7917 |
end(); |
| 7918 |
} |
| 7919 |
}, timeout + 1); |
| 7920 |
el.addEventListener(event, onEnd); |
| 7921 |
} |
| 7922 |
|
| 7923 |
var transformRE = /\b(transform|all)(,|$)/; |
| 7924 |
|
| 7925 |
function getTransitionInfo (el, expectedType) { |
| 7926 |
var styles = window.getComputedStyle(el); |
| 7927 |
var transitionDelays = styles[transitionProp + 'Delay'].split(', '); |
| 7928 |
var transitionDurations = styles[transitionProp + 'Duration'].split(', '); |
| 7929 |
var transitionTimeout = getTimeout(transitionDelays, transitionDurations); |
| 7930 |
var animationDelays = styles[animationProp + 'Delay'].split(', '); |
| 7931 |
var animationDurations = styles[animationProp + 'Duration'].split(', '); |
| 7932 |
var animationTimeout = getTimeout(animationDelays, animationDurations); |
| 7933 |
|
| 7934 |
var type; |
| 7935 |
var timeout = 0; |
| 7936 |
var propCount = 0; |
| 7937 |
/* istanbul ignore if */ |
| 7938 |
if (expectedType === TRANSITION) { |
| 7939 |
if (transitionTimeout > 0) { |
| 7940 |
type = TRANSITION; |
| 7941 |
timeout = transitionTimeout; |
| 7942 |
propCount = transitionDurations.length; |
| 7943 |
} |
| 7944 |
} else if (expectedType === ANIMATION) { |
| 7945 |
if (animationTimeout > 0) { |
| 7946 |
type = ANIMATION; |
| 7947 |
timeout = animationTimeout; |
| 7948 |
propCount = animationDurations.length; |
| 7949 |
} |
| 7950 |
} else { |
| 7951 |
timeout = Math.max(transitionTimeout, animationTimeout); |
| 7952 |
type = timeout > 0 |
| 7953 |
? transitionTimeout > animationTimeout |
| 7954 |
? TRANSITION |
| 7955 |
: ANIMATION |
| 7956 |
: null; |
| 7957 |
propCount = type |
| 7958 |
? type === TRANSITION |
| 7959 |
? transitionDurations.length |
| 7960 |
: animationDurations.length |
| 7961 |
: 0; |
| 7962 |
} |
| 7963 |
var hasTransform = |
| 7964 |
type === TRANSITION && |
| 7965 |
transformRE.test(styles[transitionProp + 'Property']); |
| 7966 |
return { |
| 7967 |
type: type, |
| 7968 |
timeout: timeout, |
| 7969 |
propCount: propCount, |
| 7970 |
hasTransform: hasTransform |
| 7971 |
} |
| 7972 |
} |
| 7973 |
|
| 7974 |
function getTimeout (delays, durations) { |
| 7975 |
/* istanbul ignore next */ |
| 7976 |
while (delays.length < durations.length) { |
| 7977 |
delays = delays.concat(delays); |
| 7978 |
} |
| 7979 |
|
| 7980 |
return Math.max.apply(null, durations.map(function (d, i) { |
| 7981 |
return toMs(d) + toMs(delays[i]) |
| 7982 |
})) |
| 7983 |
} |
| 7984 |
|
| 7985 |
function toMs (s) { |
| 7986 |
return Number(s.slice(0, -1)) * 1000 |
| 7987 |
} |
| 7988 |
|
| 7989 |
/* */ |
| 7990 |
|
| 7991 |
function enter (vnode, toggleDisplay) { |
| 7992 |
var el = vnode.elm; |
| 7993 |
|
| 7994 |
// call leave callback now |
| 7995 |
if (isDef(el._leaveCb)) { |
| 7996 |
el._leaveCb.cancelled = true; |
| 7997 |
el._leaveCb(); |
| 7998 |
} |
| 7999 |
|
| 8000 |
var data = resolveTransition(vnode.data.transition); |
| 8001 |
if (isUndef(data)) { |
| 8002 |
return |
| 8003 |
} |
| 8004 |
|
| 8005 |
/* istanbul ignore if */ |
| 8006 |
if (isDef(el._enterCb) || el.nodeType !== 1) { |
| 8007 |
return |
| 8008 |
} |
| 8009 |
|
| 8010 |
var css = data.css; |
| 8011 |
var type = data.type; |
| 8012 |
var enterClass = data.enterClass; |
| 8013 |
var enterToClass = data.enterToClass; |
| 8014 |
var enterActiveClass = data.enterActiveClass; |
| 8015 |
var appearClass = data.appearClass; |
| 8016 |
var appearToClass = data.appearToClass; |
| 8017 |
var appearActiveClass = data.appearActiveClass; |
| 8018 |
var beforeEnter = data.beforeEnter; |
| 8019 |
var enter = data.enter; |
| 8020 |
var afterEnter = data.afterEnter; |
| 8021 |
var enterCancelled = data.enterCancelled; |
| 8022 |
var beforeAppear = data.beforeAppear; |
| 8023 |
var appear = data.appear; |
| 8024 |
var afterAppear = data.afterAppear; |
| 8025 |
var appearCancelled = data.appearCancelled; |
| 8026 |
var duration = data.duration; |
| 8027 |
|
| 8028 |
// activeInstance will always be the <transition> component managing this |
| 8029 |
// transition. One edge case to check is when the <transition> is placed |
| 8030 |
// as the root node of a child component. In that case we need to check |
| 8031 |
// <transition>'s parent for appear check. |
| 8032 |
var context = activeInstance; |
| 8033 |
var transitionNode = activeInstance.$vnode; |
| 8034 |
while (transitionNode && transitionNode.parent) { |
| 8035 |
transitionNode = transitionNode.parent; |
| 8036 |
context = transitionNode.context; |
| 8037 |
} |
| 8038 |
|
| 8039 |
var isAppear = !context._isMounted || !vnode.isRootInsert; |
| 8040 |
|
| 8041 |
if (isAppear && !appear && appear !== '') { |
| 8042 |
return |
| 8043 |
} |
| 8044 |
|
| 8045 |
var startClass = isAppear && appearClass |
| 8046 |
? appearClass |
| 8047 |
: enterClass; |
| 8048 |
var activeClass = isAppear && appearActiveClass |
| 8049 |
? appearActiveClass |
| 8050 |
: enterActiveClass; |
| 8051 |
var toClass = isAppear && appearToClass |
| 8052 |
? appearToClass |
| 8053 |
: enterToClass; |
| 8054 |
|
| 8055 |
var beforeEnterHook = isAppear |
| 8056 |
? (beforeAppear || beforeEnter) |
| 8057 |
: beforeEnter; |
| 8058 |
var enterHook = isAppear |
| 8059 |
? (typeof appear === 'function' ? appear : enter) |
| 8060 |
: enter; |
| 8061 |
var afterEnterHook = isAppear |
| 8062 |
? (afterAppear || afterEnter) |
| 8063 |
: afterEnter; |
| 8064 |
var enterCancelledHook = isAppear |
| 8065 |
? (appearCancelled || enterCancelled) |
| 8066 |
: enterCancelled; |
| 8067 |
|
| 8068 |
var explicitEnterDuration = toNumber( |
| 8069 |
isObject(duration) |
| 8070 |
? duration.enter |
| 8071 |
: duration |
| 8072 |
); |
| 8073 |
|
| 8074 |
if (process.env.NODE_ENV !== 'production' && explicitEnterDuration != null) { |
| 8075 |
checkDuration(explicitEnterDuration, 'enter', vnode); |
| 8076 |
} |
| 8077 |
|
| 8078 |
var expectsCSS = css !== false && !isIE9; |
| 8079 |
var userWantsControl = getHookArgumentsLength(enterHook); |
| 8080 |
|
| 8081 |
var cb = el._enterCb = once(function () { |
| 8082 |
if (expectsCSS) { |
| 8083 |
removeTransitionClass(el, toClass); |
| 8084 |
removeTransitionClass(el, activeClass); |
| 8085 |
} |
| 8086 |
if (cb.cancelled) { |
| 8087 |
if (expectsCSS) { |
| 8088 |
removeTransitionClass(el, startClass); |
| 8089 |
} |
| 8090 |
enterCancelledHook && enterCancelledHook(el); |
| 8091 |
} else { |
| 8092 |
afterEnterHook && afterEnterHook(el); |
| 8093 |
} |
| 8094 |
el._enterCb = null; |
| 8095 |
}); |
| 8096 |
|
| 8097 |
if (!vnode.data.show) { |
| 8098 |
// remove pending leave element on enter by injecting an insert hook |
| 8099 |
mergeVNodeHook(vnode, 'insert', function () { |
| 8100 |
var parent = el.parentNode; |
| 8101 |
var pendingNode = parent && parent._pending && parent._pending[vnode.key]; |
| 8102 |
if (pendingNode && |
| 8103 |
pendingNode.tag === vnode.tag && |
| 8104 |
pendingNode.elm._leaveCb |
| 8105 |
) { |
| 8106 |
pendingNode.elm._leaveCb(); |
| 8107 |
} |
| 8108 |
enterHook && enterHook(el, cb); |
| 8109 |
}); |
| 8110 |
} |
| 8111 |
|
| 8112 |
// start enter transition |
| 8113 |
beforeEnterHook && beforeEnterHook(el); |
| 8114 |
if (expectsCSS) { |
| 8115 |
addTransitionClass(el, startClass); |
| 8116 |
addTransitionClass(el, activeClass); |
| 8117 |
nextFrame(function () { |
| 8118 |
removeTransitionClass(el, startClass); |
| 8119 |
if (!cb.cancelled) { |
| 8120 |
addTransitionClass(el, toClass); |
| 8121 |
if (!userWantsControl) { |
| 8122 |
if (isValidDuration(explicitEnterDuration)) { |
| 8123 |
setTimeout(cb, explicitEnterDuration); |
| 8124 |
} else { |
| 8125 |
whenTransitionEnds(el, type, cb); |
| 8126 |
} |
| 8127 |
} |
| 8128 |
} |
| 8129 |
}); |
| 8130 |
} |
| 8131 |
|
| 8132 |
if (vnode.data.show) { |
| 8133 |
toggleDisplay && toggleDisplay(); |
| 8134 |
enterHook && enterHook(el, cb); |
| 8135 |
} |
| 8136 |
|
| 8137 |
if (!expectsCSS && !userWantsControl) { |
| 8138 |
cb(); |
| 8139 |
} |
| 8140 |
} |
| 8141 |
|
| 8142 |
function leave (vnode, rm) { |
| 8143 |
var el = vnode.elm; |
| 8144 |
|
| 8145 |
// call enter callback now |
| 8146 |
if (isDef(el._enterCb)) { |
| 8147 |
el._enterCb.cancelled = true; |
| 8148 |
el._enterCb(); |
| 8149 |
} |
| 8150 |
|
| 8151 |
var data = resolveTransition(vnode.data.transition); |
| 8152 |
if (isUndef(data) || el.nodeType !== 1) { |
| 8153 |
return rm() |
| 8154 |
} |
| 8155 |
|
| 8156 |
/* istanbul ignore if */ |
| 8157 |
if (isDef(el._leaveCb)) { |
| 8158 |
return |
| 8159 |
} |
| 8160 |
|
| 8161 |
var css = data.css; |
| 8162 |
var type = data.type; |
| 8163 |
var leaveClass = data.leaveClass; |
| 8164 |
var leaveToClass = data.leaveToClass; |
| 8165 |
var leaveActiveClass = data.leaveActiveClass; |
| 8166 |
var beforeLeave = data.beforeLeave; |
| 8167 |
var leave = data.leave; |
| 8168 |
var afterLeave = data.afterLeave; |
| 8169 |
var leaveCancelled = data.leaveCancelled; |
| 8170 |
var delayLeave = data.delayLeave; |
| 8171 |
var duration = data.duration; |
| 8172 |
|
| 8173 |
var expectsCSS = css !== false && !isIE9; |
| 8174 |
var userWantsControl = getHookArgumentsLength(leave); |
| 8175 |
|
| 8176 |
var explicitLeaveDuration = toNumber( |
| 8177 |
isObject(duration) |
| 8178 |
? duration.leave |
| 8179 |
: duration |
| 8180 |
); |
| 8181 |
|
| 8182 |
if (process.env.NODE_ENV !== 'production' && isDef(explicitLeaveDuration)) { |
| 8183 |
checkDuration(explicitLeaveDuration, 'leave', vnode); |
| 8184 |
} |
| 8185 |
|
| 8186 |
var cb = el._leaveCb = once(function () { |
| 8187 |
if (el.parentNode && el.parentNode._pending) { |
| 8188 |
el.parentNode._pending[vnode.key] = null; |
| 8189 |
} |
| 8190 |
if (expectsCSS) { |
| 8191 |
removeTransitionClass(el, leaveToClass); |
| 8192 |
removeTransitionClass(el, leaveActiveClass); |
| 8193 |
} |
| 8194 |
if (cb.cancelled) { |
| 8195 |
if (expectsCSS) { |
| 8196 |
removeTransitionClass(el, leaveClass); |
| 8197 |
} |
| 8198 |
leaveCancelled && leaveCancelled(el); |
| 8199 |
} else { |
| 8200 |
rm(); |
| 8201 |
afterLeave && afterLeave(el); |
| 8202 |
} |
| 8203 |
el._leaveCb = null; |
| 8204 |
}); |
| 8205 |
|
| 8206 |
if (delayLeave) { |
| 8207 |
delayLeave(performLeave); |
| 8208 |
} else { |
| 8209 |
performLeave(); |
| 8210 |
} |
| 8211 |
|
| 8212 |
function performLeave () { |
| 8213 |
// the delayed leave may have already been cancelled |
| 8214 |
if (cb.cancelled) { |
| 8215 |
return |
| 8216 |
} |
| 8217 |
// record leaving element |
| 8218 |
if (!vnode.data.show) { |
| 8219 |
(el.parentNode._pending || (el.parentNode._pending = {}))[(vnode.key)] = vnode; |
| 8220 |
} |
| 8221 |
beforeLeave && beforeLeave(el); |
| 8222 |
if (expectsCSS) { |
| 8223 |
addTransitionClass(el, leaveClass); |
| 8224 |
addTransitionClass(el, leaveActiveClass); |
| 8225 |
nextFrame(function () { |
| 8226 |
removeTransitionClass(el, leaveClass); |
| 8227 |
if (!cb.cancelled) { |
| 8228 |
addTransitionClass(el, leaveToClass); |
| 8229 |
if (!userWantsControl) { |
| 8230 |
if (isValidDuration(explicitLeaveDuration)) { |
| 8231 |
setTimeout(cb, explicitLeaveDuration); |
| 8232 |
} else { |
| 8233 |
whenTransitionEnds(el, type, cb); |
| 8234 |
} |
| 8235 |
} |
| 8236 |
} |
| 8237 |
}); |
| 8238 |
} |
| 8239 |
leave && leave(el, cb); |
| 8240 |
if (!expectsCSS && !userWantsControl) { |
| 8241 |
cb(); |
| 8242 |
} |
| 8243 |
} |
| 8244 |
} |
| 8245 |
|
| 8246 |
// only used in dev mode |
| 8247 |
function checkDuration (val, name, vnode) { |
| 8248 |
if (typeof val !== 'number') { |
| 8249 |
warn( |
| 8250 |
"<transition> explicit " + name + " duration is not a valid number - " + |
| 8251 |
"got " + (JSON.stringify(val)) + ".", |
| 8252 |
vnode.context |
| 8253 |
); |
| 8254 |
} else if (isNaN(val)) { |
| 8255 |
warn( |
| 8256 |
"<transition> explicit " + name + " duration is NaN - " + |
| 8257 |
'the duration expression might be incorrect.', |
| 8258 |
vnode.context |
| 8259 |
); |
| 8260 |
} |
| 8261 |
} |
| 8262 |
|
| 8263 |
function isValidDuration (val) { |
| 8264 |
return typeof val === 'number' && !isNaN(val) |
| 8265 |
} |
| 8266 |
|
| 8267 |
/** |
| 8268 |
* Normalize a transition hook's argument length. The hook may be: |
| 8269 |
* - a merged hook (invoker) with the original in .fns |
| 8270 |
* - a wrapped component method (check ._length) |
| 8271 |
* - a plain function (.length) |
| 8272 |
*/ |
| 8273 |
function getHookArgumentsLength (fn) { |
| 8274 |
if (isUndef(fn)) { |
| 8275 |
return false |
| 8276 |
} |
| 8277 |
var invokerFns = fn.fns; |
| 8278 |
if (isDef(invokerFns)) { |
| 8279 |
// invoker |
| 8280 |
return getHookArgumentsLength( |
| 8281 |
Array.isArray(invokerFns) |
| 8282 |
? invokerFns[0] |
| 8283 |
: invokerFns |
| 8284 |
) |
| 8285 |
} else { |
| 8286 |
return (fn._length || fn.length) > 1 |
| 8287 |
} |
| 8288 |
} |
| 8289 |
|
| 8290 |
function _enter (_, vnode) { |
| 8291 |
if (vnode.data.show !== true) { |
| 8292 |
enter(vnode); |
| 8293 |
} |
| 8294 |
} |
| 8295 |
|
| 8296 |
var transition = inBrowser ? { |
| 8297 |
create: _enter, |
| 8298 |
activate: _enter, |
| 8299 |
remove: function remove$$1 (vnode, rm) { |
| 8300 |
/* istanbul ignore else */ |
| 8301 |
if (vnode.data.show !== true) { |
| 8302 |
leave(vnode, rm); |
| 8303 |
} else { |
| 8304 |
rm(); |
| 8305 |
} |
| 8306 |
} |
| 8307 |
} : {} |
| 8308 |
|
| 8309 |
var platformModules = [ |
| 8310 |
attrs, |
| 8311 |
klass, |
| 8312 |
events, |
| 8313 |
domProps, |
| 8314 |
style, |
| 8315 |
transition |
| 8316 |
] |
| 8317 |
|
| 8318 |
/* */ |
| 8319 |
|
| 8320 |
// the directive module should be applied last, after all |
| 8321 |
// built-in modules have been applied. |
| 8322 |
var modules = platformModules.concat(baseModules); |
| 8323 |
|
| 8324 |
var patch = createPatchFunction({ nodeOps: nodeOps, modules: modules }); |
| 8325 |
|
| 8326 |
/** |
| 8327 |
* Not type checking this file because flow doesn't like attaching |
| 8328 |
* properties to Elements. |
| 8329 |
*/ |
| 8330 |
|
| 8331 |
/* istanbul ignore if */ |
| 8332 |
if (isIE9) { |
| 8333 |
// http://www.matts411.com/post/internet-explorer-9-oninput/ |
| 8334 |
document.addEventListener('selectionchange', function () { |
| 8335 |
var el = document.activeElement; |
| 8336 |
if (el && el.vmodel) { |
| 8337 |
trigger(el, 'input'); |
| 8338 |
} |
| 8339 |
}); |
| 8340 |
} |
| 8341 |
|
| 8342 |
var directive = { |
| 8343 |
inserted: function inserted (el, binding, vnode, oldVnode) { |
| 8344 |
if (vnode.tag === 'select') { |
| 8345 |
// #6903 |
| 8346 |
if (oldVnode.elm && !oldVnode.elm._vOptions) { |
| 8347 |
mergeVNodeHook(vnode, 'postpatch', function () { |
| 8348 |
directive.componentUpdated(el, binding, vnode); |
| 8349 |
}); |
| 8350 |
} else { |
| 8351 |
setSelected(el, binding, vnode.context); |
| 8352 |
} |
| 8353 |
el._vOptions = [].map.call(el.options, getValue); |
| 8354 |
} else if (vnode.tag === 'textarea' || isTextInputType(el.type)) { |
| 8355 |
el._vModifiers = binding.modifiers; |
| 8356 |
if (!binding.modifiers.lazy) { |
| 8357 |
el.addEventListener('compositionstart', onCompositionStart); |
| 8358 |
el.addEventListener('compositionend', onCompositionEnd); |
| 8359 |
// Safari < 10.2 & UIWebView doesn't fire compositionend when |
| 8360 |
// switching focus before confirming composition choice |
| 8361 |
// this also fixes the issue where some browsers e.g. iOS Chrome |
| 8362 |
// fires "change" instead of "input" on autocomplete. |
| 8363 |
el.addEventListener('change', onCompositionEnd); |
| 8364 |
/* istanbul ignore if */ |
| 8365 |
if (isIE9) { |
| 8366 |
el.vmodel = true; |
| 8367 |
} |
| 8368 |
} |
| 8369 |
} |
| 8370 |
}, |
| 8371 |
|
| 8372 |
componentUpdated: function componentUpdated (el, binding, vnode) { |
| 8373 |
if (vnode.tag === 'select') { |
| 8374 |
setSelected(el, binding, vnode.context); |
| 8375 |
// in case the options rendered by v-for have changed, |
| 8376 |
// it's possible that the value is out-of-sync with the rendered options. |
| 8377 |
// detect such cases and filter out values that no longer has a matching |
| 8378 |
// option in the DOM. |
| 8379 |
var prevOptions = el._vOptions; |
| 8380 |
var curOptions = el._vOptions = [].map.call(el.options, getValue); |
| 8381 |
if (curOptions.some(function (o, i) { return !looseEqual(o, prevOptions[i]); })) { |
| 8382 |
// trigger change event if |
| 8383 |
// no matching option found for at least one value |
| 8384 |
var needReset = el.multiple |
| 8385 |
? binding.value.some(function (v) { return hasNoMatchingOption(v, curOptions); }) |
| 8386 |
: binding.value !== binding.oldValue && hasNoMatchingOption(binding.value, curOptions); |
| 8387 |
if (needReset) { |
| 8388 |
trigger(el, 'change'); |
| 8389 |
} |
| 8390 |
} |
| 8391 |
} |
| 8392 |
} |
| 8393 |
}; |
| 8394 |
|
| 8395 |
function setSelected (el, binding, vm) { |
| 8396 |
actuallySetSelected(el, binding, vm); |
| 8397 |
/* istanbul ignore if */ |
| 8398 |
if (isIE || isEdge) { |
| 8399 |
setTimeout(function () { |
| 8400 |
actuallySetSelected(el, binding, vm); |
| 8401 |
}, 0); |
| 8402 |
} |
| 8403 |
} |
| 8404 |
|
| 8405 |
function actuallySetSelected (el, binding, vm) { |
| 8406 |
var value = binding.value; |
| 8407 |
var isMultiple = el.multiple; |
| 8408 |
if (isMultiple && !Array.isArray(value)) { |
| 8409 |
process.env.NODE_ENV !== 'production' && warn( |
| 8410 |
"<select multiple v-model=\"" + (binding.expression) + "\"> " + |
| 8411 |
"expects an Array value for its binding, but got " + (Object.prototype.toString.call(value).slice(8, -1)), |
| 8412 |
vm |
| 8413 |
); |
| 8414 |
return |
| 8415 |
} |
| 8416 |
var selected, option; |
| 8417 |
for (var i = 0, l = el.options.length; i < l; i++) { |
| 8418 |
option = el.options[i]; |
| 8419 |
if (isMultiple) { |
| 8420 |
selected = looseIndexOf(value, getValue(option)) > -1; |
| 8421 |
if (option.selected !== selected) { |
| 8422 |
option.selected = selected; |
| 8423 |
} |
| 8424 |
} else { |
| 8425 |
if (looseEqual(getValue(option), value)) { |
| 8426 |
if (el.selectedIndex !== i) { |
| 8427 |
el.selectedIndex = i; |
| 8428 |
} |
| 8429 |
return |
| 8430 |
} |
| 8431 |
} |
| 8432 |
} |
| 8433 |
if (!isMultiple) { |
| 8434 |
el.selectedIndex = -1; |
| 8435 |
} |
| 8436 |
} |
| 8437 |
|
| 8438 |
function hasNoMatchingOption (value, options) { |
| 8439 |
return options.every(function (o) { return !looseEqual(o, value); }) |
| 8440 |
} |
| 8441 |
|
| 8442 |
function getValue (option) { |
| 8443 |
return '_value' in option |
| 8444 |
? option._value |
| 8445 |
: option.value |
| 8446 |
} |
| 8447 |
|
| 8448 |
function onCompositionStart (e) { |
| 8449 |
e.target.composing = true; |
| 8450 |
} |
| 8451 |
|
| 8452 |
function onCompositionEnd (e) { |
| 8453 |
// prevent triggering an input event for no reason |
| 8454 |
if (!e.target.composing) { return } |
| 8455 |
e.target.composing = false; |
| 8456 |
trigger(e.target, 'input'); |
| 8457 |
} |
| 8458 |
|
| 8459 |
function trigger (el, type) { |
| 8460 |
var e = document.createEvent('HTMLEvents'); |
| 8461 |
e.initEvent(type, true, true); |
| 8462 |
el.dispatchEvent(e); |
| 8463 |
} |
| 8464 |
|
| 8465 |
/* */ |
| 8466 |
|
| 8467 |
// recursively search for possible transition defined inside the component root |
| 8468 |
function locateNode (vnode) { |
| 8469 |
return vnode.componentInstance && (!vnode.data || !vnode.data.transition) |
| 8470 |
? locateNode(vnode.componentInstance._vnode) |
| 8471 |
: vnode |
| 8472 |
} |
| 8473 |
|
| 8474 |
var show = { |
| 8475 |
bind: function bind (el, ref, vnode) { |
| 8476 |
var value = ref.value; |
| 8477 |
|
| 8478 |
vnode = locateNode(vnode); |
| 8479 |
var transition$$1 = vnode.data && vnode.data.transition; |
| 8480 |
var originalDisplay = el.__vOriginalDisplay = |
| 8481 |
el.style.display === 'none' ? '' : el.style.display; |
| 8482 |
if (value && transition$$1) { |
| 8483 |
vnode.data.show = true; |
| 8484 |
enter(vnode, function () { |
| 8485 |
el.style.display = originalDisplay; |
| 8486 |
}); |
| 8487 |
} else { |
| 8488 |
el.style.display = value ? originalDisplay : 'none'; |
| 8489 |
} |
| 8490 |
}, |
| 8491 |
|
| 8492 |
update: function update (el, ref, vnode) { |
| 8493 |
var value = ref.value; |
| 8494 |
var oldValue = ref.oldValue; |
| 8495 |
|
| 8496 |
/* istanbul ignore if */ |
| 8497 |
if (!value === !oldValue) { return } |
| 8498 |
vnode = locateNode(vnode); |
| 8499 |
var transition$$1 = vnode.data && vnode.data.transition; |
| 8500 |
if (transition$$1) { |
| 8501 |
vnode.data.show = true; |
| 8502 |
if (value) { |
| 8503 |
enter(vnode, function () { |
| 8504 |
el.style.display = el.__vOriginalDisplay; |
| 8505 |
}); |
| 8506 |
} else { |
| 8507 |
leave(vnode, function () { |
| 8508 |
el.style.display = 'none'; |
| 8509 |
}); |
| 8510 |
} |
| 8511 |
} else { |
| 8512 |
el.style.display = value ? el.__vOriginalDisplay : 'none'; |
| 8513 |
} |
| 8514 |
}, |
| 8515 |
|
| 8516 |
unbind: function unbind ( |
| 8517 |
el, |
| 8518 |
binding, |
| 8519 |
vnode, |
| 8520 |
oldVnode, |
| 8521 |
isDestroy |
| 8522 |
) { |
| 8523 |
if (!isDestroy) { |
| 8524 |
el.style.display = el.__vOriginalDisplay; |
| 8525 |
} |
| 8526 |
} |
| 8527 |
} |
| 8528 |
|
| 8529 |
var platformDirectives = { |
| 8530 |
model: directive, |
| 8531 |
show: show |
| 8532 |
} |
| 8533 |
|
| 8534 |
/* */ |
| 8535 |
|
| 8536 |
// Provides transition support for a single element/component. |
| 8537 |
// supports transition mode (out-in / in-out) |
| 8538 |
|
| 8539 |
var transitionProps = { |
| 8540 |
name: String, |
| 8541 |
appear: Boolean, |
| 8542 |
css: Boolean, |
| 8543 |
mode: String, |
| 8544 |
type: String, |
| 8545 |
enterClass: String, |
| 8546 |
leaveClass: String, |
| 8547 |
enterToClass: String, |
| 8548 |
leaveToClass: String, |
| 8549 |
enterActiveClass: String, |
| 8550 |
leaveActiveClass: String, |
| 8551 |
appearClass: String, |
| 8552 |
appearActiveClass: String, |
| 8553 |
appearToClass: String, |
| 8554 |
duration: [Number, String, Object] |
| 8555 |
}; |
| 8556 |
|
| 8557 |
// in case the child is also an abstract component, e.g. <keep-alive> |
| 8558 |
// we want to recursively retrieve the real component to be rendered |
| 8559 |
function getRealChild (vnode) { |
| 8560 |
var compOptions = vnode && vnode.componentOptions; |
| 8561 |
if (compOptions && compOptions.Ctor.options.abstract) { |
| 8562 |
return getRealChild(getFirstComponentChild(compOptions.children)) |
| 8563 |
} else { |
| 8564 |
return vnode |
| 8565 |
} |
| 8566 |
} |
| 8567 |
|
| 8568 |
function extractTransitionData (comp) { |
| 8569 |
var data = {}; |
| 8570 |
var options = comp.$options; |
| 8571 |
// props |
| 8572 |
for (var key in options.propsData) { |
| 8573 |
data[key] = comp[key]; |
| 8574 |
} |
| 8575 |
// events. |
| 8576 |
// extract listeners and pass them directly to the transition methods |
| 8577 |
var listeners = options._parentListeners; |
| 8578 |
for (var key$1 in listeners) { |
| 8579 |
data[camelize(key$1)] = listeners[key$1]; |
| 8580 |
} |
| 8581 |
return data |
| 8582 |
} |
| 8583 |
|
| 8584 |
function placeholder (h, rawChild) { |
| 8585 |
if (/\d-keep-alive$/.test(rawChild.tag)) { |
| 8586 |
return h('keep-alive', { |
| 8587 |
props: rawChild.componentOptions.propsData |
| 8588 |
}) |
| 8589 |
} |
| 8590 |
} |
| 8591 |
|
| 8592 |
function hasParentTransition (vnode) { |
| 8593 |
while ((vnode = vnode.parent)) { |
| 8594 |
if (vnode.data.transition) { |
| 8595 |
return true |
| 8596 |
} |
| 8597 |
} |
| 8598 |
} |
| 8599 |
|
| 8600 |
function isSameChild (child, oldChild) { |
| 8601 |
return oldChild.key === child.key && oldChild.tag === child.tag |
| 8602 |
} |
| 8603 |
|
| 8604 |
var Transition = { |
| 8605 |
name: 'transition', |
| 8606 |
props: transitionProps, |
| 8607 |
abstract: true, |
| 8608 |
|
| 8609 |
render: function render (h) { |
| 8610 |
var this$1 = this; |
| 8611 |
|
| 8612 |
var children = this.$slots.default; |
| 8613 |
if (!children) { |
| 8614 |
return |
| 8615 |
} |
| 8616 |
|
| 8617 |
// filter out text nodes (possible whitespaces) |
| 8618 |
children = children.filter(function (c) { return c.tag || isAsyncPlaceholder(c); }); |
| 8619 |
/* istanbul ignore if */ |
| 8620 |
if (!children.length) { |
| 8621 |
return |
| 8622 |
} |
| 8623 |
|
| 8624 |
// warn multiple elements |
| 8625 |
if (process.env.NODE_ENV !== 'production' && children.length > 1) { |
| 8626 |
warn( |
| 8627 |
'<transition> can only be used on a single element. Use ' + |
| 8628 |
'<transition-group> for lists.', |
| 8629 |
this.$parent |
| 8630 |
); |
| 8631 |
} |
| 8632 |
|
| 8633 |
var mode = this.mode; |
| 8634 |
|
| 8635 |
// warn invalid mode |
| 8636 |
if (process.env.NODE_ENV !== 'production' && |
| 8637 |
mode && mode !== 'in-out' && mode !== 'out-in' |
| 8638 |
) { |
| 8639 |
warn( |
| 8640 |
'invalid <transition> mode: ' + mode, |
| 8641 |
this.$parent |
| 8642 |
); |
| 8643 |
} |
| 8644 |
|
| 8645 |
var rawChild = children[0]; |
| 8646 |
|
| 8647 |
// if this is a component root node and the component's |
| 8648 |
// parent container node also has transition, skip. |
| 8649 |
if (hasParentTransition(this.$vnode)) { |
| 8650 |
return rawChild |
| 8651 |
} |
| 8652 |
|
| 8653 |
// apply transition data to child |
| 8654 |
// use getRealChild() to ignore abstract components e.g. keep-alive |
| 8655 |
var child = getRealChild(rawChild); |
| 8656 |
/* istanbul ignore if */ |
| 8657 |
if (!child) { |
| 8658 |
return rawChild |
| 8659 |
} |
| 8660 |
|
| 8661 |
if (this._leaving) { |
| 8662 |
return placeholder(h, rawChild) |
| 8663 |
} |
| 8664 |
|
| 8665 |
// ensure a key that is unique to the vnode type and to this transition |
| 8666 |
// component instance. This key will be used to remove pending leaving nodes |
| 8667 |
// during entering. |
| 8668 |
var id = "__transition-" + (this._uid) + "-"; |
| 8669 |
child.key = child.key == null |
| 8670 |
? child.isComment |
| 8671 |
? id + 'comment' |
| 8672 |
: id + child.tag |
| 8673 |
: isPrimitive(child.key) |
| 8674 |
? (String(child.key).indexOf(id) === 0 ? child.key : id + child.key) |
| 8675 |
: child.key; |
| 8676 |
|
| 8677 |
var data = (child.data || (child.data = {})).transition = extractTransitionData(this); |
| 8678 |
var oldRawChild = this._vnode; |
| 8679 |
var oldChild = getRealChild(oldRawChild); |
| 8680 |
|
| 8681 |
// mark v-show |
| 8682 |
// so that the transition module can hand over the control to the directive |
| 8683 |
if (child.data.directives && child.data.directives.some(function (d) { return d.name === 'show'; })) { |
| 8684 |
child.data.show = true; |
| 8685 |
} |
| 8686 |
|
| 8687 |
if ( |
| 8688 |
oldChild && |
| 8689 |
oldChild.data && |
| 8690 |
!isSameChild(child, oldChild) && |
| 8691 |
!isAsyncPlaceholder(oldChild) && |
| 8692 |
// #6687 component root is a comment node |
| 8693 |
!(oldChild.componentInstance && oldChild.componentInstance._vnode.isComment) |
| 8694 |
) { |
| 8695 |
// replace old child transition data with fresh one |
| 8696 |
// important for dynamic transitions! |
| 8697 |
var oldData = oldChild.data.transition = extend({}, data); |
| 8698 |
// handle transition mode |
| 8699 |
if (mode === 'out-in') { |
| 8700 |
// return placeholder node and queue update when leave finishes |
| 8701 |
this._leaving = true; |
| 8702 |
mergeVNodeHook(oldData, 'afterLeave', function () { |
| 8703 |
this$1._leaving = false; |
| 8704 |
this$1.$forceUpdate(); |
| 8705 |
}); |
| 8706 |
return placeholder(h, rawChild) |
| 8707 |
} else if (mode === 'in-out') { |
| 8708 |
if (isAsyncPlaceholder(child)) { |
| 8709 |
return oldRawChild |
| 8710 |
} |
| 8711 |
var delayedLeave; |
| 8712 |
var performLeave = function () { delayedLeave(); }; |
| 8713 |
mergeVNodeHook(data, 'afterEnter', performLeave); |
| 8714 |
mergeVNodeHook(data, 'enterCancelled', performLeave); |
| 8715 |
mergeVNodeHook(oldData, 'delayLeave', function (leave) { delayedLeave = leave; }); |
| 8716 |
} |
| 8717 |
} |
| 8718 |
|
| 8719 |
return rawChild |
| 8720 |
} |
| 8721 |
} |
| 8722 |
|
| 8723 |
/* */ |
| 8724 |
|
| 8725 |
// Provides transition support for list items. |
| 8726 |
// supports move transitions using the FLIP technique. |
| 8727 |
|
| 8728 |
// Because the vdom's children update algorithm is "unstable" - i.e. |
| 8729 |
// it doesn't guarantee the relative positioning of removed elements, |
| 8730 |
// we force transition-group to update its children into two passes: |
| 8731 |
// in the first pass, we remove all nodes that need to be removed, |
| 8732 |
// triggering their leaving transition; in the second pass, we insert/move |
| 8733 |
// into the final desired state. This way in the second pass removed |
| 8734 |
// nodes will remain where they should be. |
| 8735 |
|
| 8736 |
var props = extend({ |
| 8737 |
tag: String, |
| 8738 |
moveClass: String |
| 8739 |
}, transitionProps); |
| 8740 |
|
| 8741 |
delete props.mode; |
| 8742 |
|
| 8743 |
var TransitionGroup = { |
| 8744 |
props: props, |
| 8745 |
|
| 8746 |
render: function render (h) { |
| 8747 |
var tag = this.tag || this.$vnode.data.tag || 'span'; |
| 8748 |
var map = Object.create(null); |
| 8749 |
var prevChildren = this.prevChildren = this.children; |
| 8750 |
var rawChildren = this.$slots.default || []; |
| 8751 |
var children = this.children = []; |
| 8752 |
var transitionData = extractTransitionData(this); |
| 8753 |
|
| 8754 |
for (var i = 0; i < rawChildren.length; i++) { |
| 8755 |
var c = rawChildren[i]; |
| 8756 |
if (c.tag) { |
| 8757 |
if (c.key != null && String(c.key).indexOf('__vlist') !== 0) { |
| 8758 |
children.push(c); |
| 8759 |
map[c.key] = c |
| 8760 |
;(c.data || (c.data = {})).transition = transitionData; |
| 8761 |
} else if (process.env.NODE_ENV !== 'production') { |
| 8762 |
var opts = c.componentOptions; |
| 8763 |
var name = opts ? (opts.Ctor.options.name || opts.tag || '') : c.tag; |
| 8764 |
warn(("<transition-group> children must be keyed: <" + name + ">")); |
| 8765 |
} |
| 8766 |
} |
| 8767 |
} |
| 8768 |
|
| 8769 |
if (prevChildren) { |
| 8770 |
var kept = []; |
| 8771 |
var removed = []; |
| 8772 |
for (var i$1 = 0; i$1 < prevChildren.length; i$1++) { |
| 8773 |
var c$1 = prevChildren[i$1]; |
| 8774 |
c$1.data.transition = transitionData; |
| 8775 |
c$1.data.pos = c$1.elm.getBoundingClientRect(); |
| 8776 |
if (map[c$1.key]) { |
| 8777 |
kept.push(c$1); |
| 8778 |
} else { |
| 8779 |
removed.push(c$1); |
| 8780 |
} |
| 8781 |
} |
| 8782 |
this.kept = h(tag, null, kept); |
| 8783 |
this.removed = removed; |
| 8784 |
} |
| 8785 |
|
| 8786 |
return h(tag, null, children) |
| 8787 |
}, |
| 8788 |
|
| 8789 |
beforeUpdate: function beforeUpdate () { |
| 8790 |
// force removing pass |
| 8791 |
this.__patch__( |
| 8792 |
this._vnode, |
| 8793 |
this.kept, |
| 8794 |
false, // hydrating |
| 8795 |
true // removeOnly (!important, avoids unnecessary moves) |
| 8796 |
); |
| 8797 |
this._vnode = this.kept; |
| 8798 |
}, |
| 8799 |
|
| 8800 |
updated: function updated () { |
| 8801 |
var children = this.prevChildren; |
| 8802 |
var moveClass = this.moveClass || ((this.name || 'v') + '-move'); |
| 8803 |
if (!children.length || !this.hasMove(children[0].elm, moveClass)) { |
| 8804 |
return |
| 8805 |
} |
| 8806 |
|
| 8807 |
// we divide the work into three loops to avoid mixing DOM reads and writes |
| 8808 |
// in each iteration - which helps prevent layout thrashing. |
| 8809 |
children.forEach(callPendingCbs); |
| 8810 |
children.forEach(recordPosition); |
| 8811 |
children.forEach(applyTranslation); |
| 8812 |
|
| 8813 |
// force reflow to put everything in position |
| 8814 |
// assign to this to avoid being removed in tree-shaking |
| 8815 |
// $flow-disable-line |
| 8816 |
this._reflow = document.body.offsetHeight; |
| 8817 |
|
| 8818 |
children.forEach(function (c) { |
| 8819 |
if (c.data.moved) { |
| 8820 |
var el = c.elm; |
| 8821 |
var s = el.style; |
| 8822 |
addTransitionClass(el, moveClass); |
| 8823 |
s.transform = s.WebkitTransform = s.transitionDuration = ''; |
| 8824 |
el.addEventListener(transitionEndEvent, el._moveCb = function cb (e) { |
| 8825 |
if (!e || /transform$/.test(e.propertyName)) { |
| 8826 |
el.removeEventListener(transitionEndEvent, cb); |
| 8827 |
el._moveCb = null; |
| 8828 |
removeTransitionClass(el, moveClass); |
| 8829 |
} |
| 8830 |
}); |
| 8831 |
} |
| 8832 |
}); |
| 8833 |
}, |
| 8834 |
|
| 8835 |
methods: { |
| 8836 |
hasMove: function hasMove (el, moveClass) { |
| 8837 |
/* istanbul ignore if */ |
| 8838 |
if (!hasTransition) { |
| 8839 |
return false |
| 8840 |
} |
| 8841 |
/* istanbul ignore if */ |
| 8842 |
if (this._hasMove) { |
| 8843 |
return this._hasMove |
| 8844 |
} |
| 8845 |
// Detect whether an element with the move class applied has |
| 8846 |
// CSS transitions. Since the element may be inside an entering |
| 8847 |
// transition at this very moment, we make a clone of it and remove |
| 8848 |
// all other transition classes applied to ensure only the move class |
| 8849 |
// is applied. |
| 8850 |
var clone = el.cloneNode(); |
| 8851 |
if (el._transitionClasses) { |
| 8852 |
el._transitionClasses.forEach(function (cls) { removeClass(clone, cls); }); |
| 8853 |
} |
| 8854 |
addClass(clone, moveClass); |
| 8855 |
clone.style.display = 'none'; |
| 8856 |
this.$el.appendChild(clone); |
| 8857 |
var info = getTransitionInfo(clone); |
| 8858 |
this.$el.removeChild(clone); |
| 8859 |
return (this._hasMove = info.hasTransform) |
| 8860 |
} |
| 8861 |
} |
| 8862 |
} |
| 8863 |
|
| 8864 |
function callPendingCbs (c) { |
| 8865 |
/* istanbul ignore if */ |
| 8866 |
if (c.elm._moveCb) { |
| 8867 |
c.elm._moveCb(); |
| 8868 |
} |
| 8869 |
/* istanbul ignore if */ |
| 8870 |
if (c.elm._enterCb) { |
| 8871 |
c.elm._enterCb(); |
| 8872 |
} |
| 8873 |
} |
| 8874 |
|
| 8875 |
function recordPosition (c) { |
| 8876 |
c.data.newPos = c.elm.getBoundingClientRect(); |
| 8877 |
} |
| 8878 |
|
| 8879 |
function applyTranslation (c) { |
| 8880 |
var oldPos = c.data.pos; |
| 8881 |
var newPos = c.data.newPos; |
| 8882 |
var dx = oldPos.left - newPos.left; |
| 8883 |
var dy = oldPos.top - newPos.top; |
| 8884 |
if (dx || dy) { |
| 8885 |
c.data.moved = true; |
| 8886 |
var s = c.elm.style; |
| 8887 |
s.transform = s.WebkitTransform = "translate(" + dx + "px," + dy + "px)"; |
| 8888 |
s.transitionDuration = '0s'; |
| 8889 |
} |
| 8890 |
} |
| 8891 |
|
| 8892 |
var platformComponents = { |
| 8893 |
Transition: Transition, |
| 8894 |
TransitionGroup: TransitionGroup |
| 8895 |
} |
| 8896 |
|
| 8897 |
/* */ |
| 8898 |
|
| 8899 |
// install platform specific utils |
| 8900 |
Vue.config.mustUseProp = mustUseProp; |
| 8901 |
Vue.config.isReservedTag = isReservedTag; |
| 8902 |
Vue.config.isReservedAttr = isReservedAttr; |
| 8903 |
Vue.config.getTagNamespace = getTagNamespace; |
| 8904 |
Vue.config.isUnknownElement = isUnknownElement; |
| 8905 |
|
| 8906 |
// install platform runtime directives & components |
| 8907 |
extend(Vue.options.directives, platformDirectives); |
| 8908 |
extend(Vue.options.components, platformComponents); |
| 8909 |
|
| 8910 |
// install platform patch function |
| 8911 |
Vue.prototype.__patch__ = inBrowser ? patch : noop; |
| 8912 |
|
| 8913 |
// public mount method |
| 8914 |
Vue.prototype.$mount = function ( |
| 8915 |
el, |
| 8916 |
hydrating |
| 8917 |
) { |
| 8918 |
el = el && inBrowser ? query(el) : undefined; |
| 8919 |
return mountComponent(this, el, hydrating) |
| 8920 |
}; |
| 8921 |
|
| 8922 |
// devtools global hook |
| 8923 |
/* istanbul ignore next */ |
| 8924 |
if (inBrowser) { |
| 8925 |
setTimeout(function () { |
| 8926 |
if (config.devtools) { |
| 8927 |
if (devtools) { |
| 8928 |
devtools.emit('init', Vue); |
| 8929 |
} else if ( |
| 8930 |
process.env.NODE_ENV !== 'production' && |
| 8931 |
process.env.NODE_ENV !== 'test' && |
| 8932 |
isChrome |
| 8933 |
) { |
| 8934 |
console[console.info ? 'info' : 'log']( |
| 8935 |
'Download the Vue Devtools extension for a better development experience:\n' + |
| 8936 |
'https://github.com/vuejs/vue-devtools' |
| 8937 |
); |
| 8938 |
} |
| 8939 |
} |
| 8940 |
if (process.env.NODE_ENV !== 'production' && |
| 8941 |
process.env.NODE_ENV !== 'test' && |
| 8942 |
config.productionTip !== false && |
| 8943 |
typeof console !== 'undefined' |
| 8944 |
) { |
| 8945 |
console[console.info ? 'info' : 'log']( |
| 8946 |
"You are running Vue in development mode.\n" + |
| 8947 |
"Make sure to turn on production mode when deploying for production.\n" + |
| 8948 |
"See more tips at https://vuejs.org/guide/deployment.html" |
| 8949 |
); |
| 8950 |
} |
| 8951 |
}, 0); |
| 8952 |
} |
| 8953 |
|
| 8954 |
/* */ |
| 8955 |
|
| 8956 |
var defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g; |
| 8957 |
var regexEscapeRE = /[-.*+?^${}()|[\]\/\\]/g; |
| 8958 |
|
| 8959 |
var buildRegex = cached(function (delimiters) { |
| 8960 |
var open = delimiters[0].replace(regexEscapeRE, '\\$&'); |
| 8961 |
var close = delimiters[1].replace(regexEscapeRE, '\\$&'); |
| 8962 |
return new RegExp(open + '((?:.|\\n)+?)' + close, 'g') |
| 8963 |
}); |
| 8964 |
|
| 8965 |
|
| 8966 |
|
| 8967 |
function parseText ( |
| 8968 |
text, |
| 8969 |
delimiters |
| 8970 |
) { |
| 8971 |
var tagRE = delimiters ? buildRegex(delimiters) : defaultTagRE; |
| 8972 |
if (!tagRE.test(text)) { |
| 8973 |
return |
| 8974 |
} |
| 8975 |
var tokens = []; |
| 8976 |
var rawTokens = []; |
| 8977 |
var lastIndex = tagRE.lastIndex = 0; |
| 8978 |
var match, index, tokenValue; |
| 8979 |
while ((match = tagRE.exec(text))) { |
| 8980 |
index = match.index; |
| 8981 |
// push text token |
| 8982 |
if (index > lastIndex) { |
| 8983 |
rawTokens.push(tokenValue = text.slice(lastIndex, index)); |
| 8984 |
tokens.push(JSON.stringify(tokenValue)); |
| 8985 |
} |
| 8986 |
// tag token |
| 8987 |
var exp = parseFilters(match[1].trim()); |
| 8988 |
tokens.push(("_s(" + exp + ")")); |
| 8989 |
rawTokens.push({ '@binding': exp }); |
| 8990 |
lastIndex = index + match[0].length; |
| 8991 |
} |
| 8992 |
if (lastIndex < text.length) { |
| 8993 |
rawTokens.push(tokenValue = text.slice(lastIndex)); |
| 8994 |
tokens.push(JSON.stringify(tokenValue)); |
| 8995 |
} |
| 8996 |
return { |
| 8997 |
expression: tokens.join('+'), |
| 8998 |
tokens: rawTokens |
| 8999 |
} |
| 9000 |
} |
| 9001 |
|
| 9002 |
/* */ |
| 9003 |
|
| 9004 |
function transformNode (el, options) { |
| 9005 |
var warn = options.warn || baseWarn; |
| 9006 |
var staticClass = getAndRemoveAttr(el, 'class'); |
| 9007 |
if (process.env.NODE_ENV !== 'production' && staticClass) { |
| 9008 |
var res = parseText(staticClass, options.delimiters); |
| 9009 |
if (res) { |
| 9010 |
warn( |
| 9011 |
"class=\"" + staticClass + "\": " + |
| 9012 |
'Interpolation inside attributes has been removed. ' + |
| 9013 |
'Use v-bind or the colon shorthand instead. For example, ' + |
| 9014 |
'instead of <div class="{{ val }}">, use <div :class="val">.' |
| 9015 |
); |
| 9016 |
} |
| 9017 |
} |
| 9018 |
if (staticClass) { |
| 9019 |
el.staticClass = JSON.stringify(staticClass); |
| 9020 |
} |
| 9021 |
var classBinding = getBindingAttr(el, 'class', false /* getStatic */); |
| 9022 |
if (classBinding) { |
| 9023 |
el.classBinding = classBinding; |
| 9024 |
} |
| 9025 |
} |
| 9026 |
|
| 9027 |
function genData (el) { |
| 9028 |
var data = ''; |
| 9029 |
if (el.staticClass) { |
| 9030 |
data += "staticClass:" + (el.staticClass) + ","; |
| 9031 |
} |
| 9032 |
if (el.classBinding) { |
| 9033 |
data += "class:" + (el.classBinding) + ","; |
| 9034 |
} |
| 9035 |
return data |
| 9036 |
} |
| 9037 |
|
| 9038 |
var klass$1 = { |
| 9039 |
staticKeys: ['staticClass'], |
| 9040 |
transformNode: transformNode, |
| 9041 |
genData: genData |
| 9042 |
} |
| 9043 |
|
| 9044 |
/* */ |
| 9045 |
|
| 9046 |
function transformNode$1 (el, options) { |
| 9047 |
var warn = options.warn || baseWarn; |
| 9048 |
var staticStyle = getAndRemoveAttr(el, 'style'); |
| 9049 |
if (staticStyle) { |
| 9050 |
/* istanbul ignore if */ |
| 9051 |
if (process.env.NODE_ENV !== 'production') { |
| 9052 |
var res = parseText(staticStyle, options.delimiters); |
| 9053 |
if (res) { |
| 9054 |
warn( |
| 9055 |
"style=\"" + staticStyle + "\": " + |
| 9056 |
'Interpolation inside attributes has been removed. ' + |
| 9057 |
'Use v-bind or the colon shorthand instead. For example, ' + |
| 9058 |
'instead of <div style="{{ val }}">, use <div :style="val">.' |
| 9059 |
); |
| 9060 |
} |
| 9061 |
} |
| 9062 |
el.staticStyle = JSON.stringify(parseStyleText(staticStyle)); |
| 9063 |
} |
| 9064 |
|
| 9065 |
var styleBinding = getBindingAttr(el, 'style', false /* getStatic */); |
| 9066 |
if (styleBinding) { |
| 9067 |
el.styleBinding = styleBinding; |
| 9068 |
} |
| 9069 |
} |
| 9070 |
|
| 9071 |
function genData$1 (el) { |
| 9072 |
var data = ''; |
| 9073 |
if (el.staticStyle) { |
| 9074 |
data += "staticStyle:" + (el.staticStyle) + ","; |
| 9075 |
} |
| 9076 |
if (el.styleBinding) { |
| 9077 |
data += "style:(" + (el.styleBinding) + "),"; |
| 9078 |
} |
| 9079 |
return data |
| 9080 |
} |
| 9081 |
|
| 9082 |
var style$1 = { |
| 9083 |
staticKeys: ['staticStyle'], |
| 9084 |
transformNode: transformNode$1, |
| 9085 |
genData: genData$1 |
| 9086 |
} |
| 9087 |
|
| 9088 |
/* */ |
| 9089 |
|
| 9090 |
var decoder; |
| 9091 |
|
| 9092 |
var he = { |
| 9093 |
decode: function decode (html) { |
| 9094 |
decoder = decoder || document.createElement('div'); |
| 9095 |
decoder.innerHTML = html; |
| 9096 |
return decoder.textContent |
| 9097 |
} |
| 9098 |
} |
| 9099 |
|
| 9100 |
/* */ |
| 9101 |
|
| 9102 |
var isUnaryTag = makeMap( |
| 9103 |
'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' + |
| 9104 |
'link,meta,param,source,track,wbr' |
| 9105 |
); |
| 9106 |
|
| 9107 |
// Elements that you can, intentionally, leave open |
| 9108 |
// (and which close themselves) |
| 9109 |
var canBeLeftOpenTag = makeMap( |
| 9110 |
'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source' |
| 9111 |
); |
| 9112 |
|
| 9113 |
// HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3 |
| 9114 |
// Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content |
| 9115 |
var isNonPhrasingTag = makeMap( |
| 9116 |
'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' + |
| 9117 |
'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' + |
| 9118 |
'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' + |
| 9119 |
'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' + |
| 9120 |
'title,tr,track' |
| 9121 |
); |
| 9122 |
|
| 9123 |
/** |
| 9124 |
* Not type-checking this file because it's mostly vendor code. |
| 9125 |
*/ |
| 9126 |
|
| 9127 |
/*! |
| 9128 |
* HTML Parser By John Resig (ejohn.org) |
| 9129 |
* Modified by Juriy "kangax" Zaytsev |
| 9130 |
* Original code by Erik Arvidsson, Mozilla Public License |
| 9131 |
* http://erik.eae.net/simplehtmlparser/simplehtmlparser.js |
| 9132 |
*/ |
| 9133 |
|
| 9134 |
// Regular Expressions for parsing tags and attributes |
| 9135 |
var attribute = /^\s*([^\s"'<>\/=]+)(?:\s*(=)\s*(?:"([^"]*)"+|'([^']*)'+|([^\s"'=<>`]+)))?/; |
| 9136 |
// could use https://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-QName |
| 9137 |
// but for Vue templates we can enforce a simple charset |
| 9138 |
var ncname = '[a-zA-Z_][\\w\\-\\.]*'; |
| 9139 |
var qnameCapture = "((?:" + ncname + "\\:)?" + ncname + ")"; |
| 9140 |
var startTagOpen = new RegExp(("^<" + qnameCapture)); |
| 9141 |
var startTagClose = /^\s*(\/?)>/; |
| 9142 |
var endTag = new RegExp(("^<\\/" + qnameCapture + "[^>]*>")); |
| 9143 |
var doctype = /^<!DOCTYPE [^>]+>/i; |
| 9144 |
// #7298: escape - to avoid being pased as HTML comment when inlined in page |
| 9145 |
var comment = /^<!\--/; |
| 9146 |
var conditionalComment = /^<!\[/; |
| 9147 |
|
| 9148 |
var IS_REGEX_CAPTURING_BROKEN = false; |
| 9149 |
'x'.replace(/x(.)?/g, function (m, g) { |
| 9150 |
IS_REGEX_CAPTURING_BROKEN = g === ''; |
| 9151 |
}); |
| 9152 |
|
| 9153 |
// Special Elements (can contain anything) |
| 9154 |
var isPlainTextElement = makeMap('script,style,textarea', true); |
| 9155 |
var reCache = {}; |
| 9156 |
|
| 9157 |
var decodingMap = { |
| 9158 |
'<': '<', |
| 9159 |
'>': '>', |
| 9160 |
'"': '"', |
| 9161 |
'&': '&', |
| 9162 |
' ': '\n', |
| 9163 |
'	': '\t' |
| 9164 |
}; |
| 9165 |
var encodedAttr = /&(?:lt|gt|quot|amp);/g; |
| 9166 |
var encodedAttrWithNewLines = /&(?:lt|gt|quot|amp|#10|#9);/g; |
| 9167 |
|
| 9168 |
// #5992 |
| 9169 |
var isIgnoreNewlineTag = makeMap('pre,textarea', true); |
| 9170 |
var shouldIgnoreFirstNewline = function (tag, html) { return tag && isIgnoreNewlineTag(tag) && html[0] === '\n'; }; |
| 9171 |
|
| 9172 |
function decodeAttr (value, shouldDecodeNewlines) { |
| 9173 |
var re = shouldDecodeNewlines ? encodedAttrWithNewLines : encodedAttr; |
| 9174 |
return value.replace(re, function (match) { return decodingMap[match]; }) |
| 9175 |
} |
| 9176 |
|
| 9177 |
function parseHTML (html, options) { |
| 9178 |
var stack = []; |
| 9179 |
var expectHTML = options.expectHTML; |
| 9180 |
var isUnaryTag$$1 = options.isUnaryTag || no; |
| 9181 |
var canBeLeftOpenTag$$1 = options.canBeLeftOpenTag || no; |
| 9182 |
var index = 0; |
| 9183 |
var last, lastTag; |
| 9184 |
while (html) { |
| 9185 |
last = html; |
| 9186 |
// Make sure we're not in a plaintext content element like script/style |
| 9187 |
if (!lastTag || !isPlainTextElement(lastTag)) { |
| 9188 |
var textEnd = html.indexOf('<'); |
| 9189 |
if (textEnd === 0) { |
| 9190 |
// Comment: |
| 9191 |
if (comment.test(html)) { |
| 9192 |
var commentEnd = html.indexOf('-->'); |
| 9193 |
|
| 9194 |
if (commentEnd >= 0) { |
| 9195 |
if (options.shouldKeepComment) { |
| 9196 |
options.comment(html.substring(4, commentEnd)); |
| 9197 |
} |
| 9198 |
advance(commentEnd + 3); |
| 9199 |
continue |
| 9200 |
} |
| 9201 |
} |
| 9202 |
|
| 9203 |
// http://en.wikipedia.org/wiki/Conditional_comment#Downlevel-revealed_conditional_comment |
| 9204 |
if (conditionalComment.test(html)) { |
| 9205 |
var conditionalEnd = html.indexOf(']>'); |
| 9206 |
|
| 9207 |
if (conditionalEnd >= 0) { |
| 9208 |
advance(conditionalEnd + 2); |
| 9209 |
continue |
| 9210 |
} |
| 9211 |
} |
| 9212 |
|
| 9213 |
// Doctype: |
| 9214 |
var doctypeMatch = html.match(doctype); |
| 9215 |
if (doctypeMatch) { |
| 9216 |
advance(doctypeMatch[0].length); |
| 9217 |
continue |
| 9218 |
} |
| 9219 |
|
| 9220 |
// End tag: |
| 9221 |
var endTagMatch = html.match(endTag); |
| 9222 |
if (endTagMatch) { |
| 9223 |
var curIndex = index; |
| 9224 |
advance(endTagMatch[0].length); |
| 9225 |
parseEndTag(endTagMatch[1], curIndex, index); |
| 9226 |
continue |
| 9227 |
} |
| 9228 |
|
| 9229 |
// Start tag: |
| 9230 |
var startTagMatch = parseStartTag(); |
| 9231 |
if (startTagMatch) { |
| 9232 |
handleStartTag(startTagMatch); |
| 9233 |
if (shouldIgnoreFirstNewline(lastTag, html)) { |
| 9234 |
advance(1); |
| 9235 |
} |
| 9236 |
continue |
| 9237 |
} |
| 9238 |
} |
| 9239 |
|
| 9240 |
var text = (void 0), rest = (void 0), next = (void 0); |
| 9241 |
if (textEnd >= 0) { |
| 9242 |
rest = html.slice(textEnd); |
| 9243 |
while ( |
| 9244 |
!endTag.test(rest) && |
| 9245 |
!startTagOpen.test(rest) && |
| 9246 |
!comment.test(rest) && |
| 9247 |
!conditionalComment.test(rest) |
| 9248 |
) { |
| 9249 |
// < in plain text, be forgiving and treat it as text |
| 9250 |
next = rest.indexOf('<', 1); |
| 9251 |
if (next < 0) { break } |
| 9252 |
textEnd += next; |
| 9253 |
rest = html.slice(textEnd); |
| 9254 |
} |
| 9255 |
text = html.substring(0, textEnd); |
| 9256 |
advance(textEnd); |
| 9257 |
} |
| 9258 |
|
| 9259 |
if (textEnd < 0) { |
| 9260 |
text = html; |
| 9261 |
html = ''; |
| 9262 |
} |
| 9263 |
|
| 9264 |
if (options.chars && text) { |
| 9265 |
options.chars(text); |
| 9266 |
} |
| 9267 |
} else { |
| 9268 |
var endTagLength = 0; |
| 9269 |
var stackedTag = lastTag.toLowerCase(); |
| 9270 |
var reStackedTag = reCache[stackedTag] || (reCache[stackedTag] = new RegExp('([\\s\\S]*?)(</' + stackedTag + '[^>]*>)', 'i')); |
| 9271 |
var rest$1 = html.replace(reStackedTag, function (all, text, endTag) { |
| 9272 |
endTagLength = endTag.length; |
| 9273 |
if (!isPlainTextElement(stackedTag) && stackedTag !== 'noscript') { |
| 9274 |
text = text |
| 9275 |
.replace(/<!\--([\s\S]*?)-->/g, '$1') // #7298 |
| 9276 |
.replace(/<!\[CDATA\[([\s\S]*?)]]>/g, '$1'); |
| 9277 |
} |
| 9278 |
if (shouldIgnoreFirstNewline(stackedTag, text)) { |
| 9279 |
text = text.slice(1); |
| 9280 |
} |
| 9281 |
if (options.chars) { |
| 9282 |
options.chars(text); |
| 9283 |
} |
| 9284 |
return '' |
| 9285 |
}); |
| 9286 |
index += html.length - rest$1.length; |
| 9287 |
html = rest$1; |
| 9288 |
parseEndTag(stackedTag, index - endTagLength, index); |
| 9289 |
} |
| 9290 |
|
| 9291 |
if (html === last) { |
| 9292 |
options.chars && options.chars(html); |
| 9293 |
if (process.env.NODE_ENV !== 'production' && !stack.length && options.warn) { |
| 9294 |
options.warn(("Mal-formatted tag at end of template: \"" + html + "\"")); |
| 9295 |
} |
| 9296 |
break |
| 9297 |
} |
| 9298 |
} |
| 9299 |
|
| 9300 |
// Clean up any remaining tags |
| 9301 |
parseEndTag(); |
| 9302 |
|
| 9303 |
function advance (n) { |
| 9304 |
index += n; |
| 9305 |
html = html.substring(n); |
| 9306 |
} |
| 9307 |
|
| 9308 |
function parseStartTag () { |
| 9309 |
var start = html.match(startTagOpen); |
| 9310 |
if (start) { |
| 9311 |
var match = { |
| 9312 |
tagName: start[1], |
| 9313 |
attrs: [], |
| 9314 |
start: index |
| 9315 |
}; |
| 9316 |
advance(start[0].length); |
| 9317 |
var end, attr; |
| 9318 |
while (!(end = html.match(startTagClose)) && (attr = html.match(attribute))) { |
| 9319 |
advance(attr[0].length); |
| 9320 |
match.attrs.push(attr); |
| 9321 |
} |
| 9322 |
if (end) { |
| 9323 |
match.unarySlash = end[1]; |
| 9324 |
advance(end[0].length); |
| 9325 |
match.end = index; |
| 9326 |
return match |
| 9327 |
} |
| 9328 |
} |
| 9329 |
} |
| 9330 |
|
| 9331 |
function handleStartTag (match) { |
| 9332 |
var tagName = match.tagName; |
| 9333 |
var unarySlash = match.unarySlash; |
| 9334 |
|
| 9335 |
if (expectHTML) { |
| 9336 |
if (lastTag === 'p' && isNonPhrasingTag(tagName)) { |
| 9337 |
parseEndTag(lastTag); |
| 9338 |
} |
| 9339 |
if (canBeLeftOpenTag$$1(tagName) && lastTag === tagName) { |
| 9340 |
parseEndTag(tagName); |
| 9341 |
} |
| 9342 |
} |
| 9343 |
|
| 9344 |
var unary = isUnaryTag$$1(tagName) || !!unarySlash; |
| 9345 |
|
| 9346 |
var l = match.attrs.length; |
| 9347 |
var attrs = new Array(l); |
| 9348 |
for (var i = 0; i < l; i++) { |
| 9349 |
var args = match.attrs[i]; |
| 9350 |
// hackish work around FF bug https://bugzilla.mozilla.org/show_bug.cgi?id=369778 |
| 9351 |
if (IS_REGEX_CAPTURING_BROKEN && args[0].indexOf('""') === -1) { |
| 9352 |
if (args[3] === '') { delete args[3]; } |
| 9353 |
if (args[4] === '') { delete args[4]; } |
| 9354 |
if (args[5] === '') { delete args[5]; } |
| 9355 |
} |
| 9356 |
var value = args[3] || args[4] || args[5] || ''; |
| 9357 |
var shouldDecodeNewlines = tagName === 'a' && args[1] === 'href' |
| 9358 |
? options.shouldDecodeNewlinesForHref |
| 9359 |
: options.shouldDecodeNewlines; |
| 9360 |
attrs[i] = { |
| 9361 |
name: args[1], |
| 9362 |
value: decodeAttr(value, shouldDecodeNewlines) |
| 9363 |
}; |
| 9364 |
} |
| 9365 |
|
| 9366 |
if (!unary) { |
| 9367 |
stack.push({ tag: tagName, lowerCasedTag: tagName.toLowerCase(), attrs: attrs }); |
| 9368 |
lastTag = tagName; |
| 9369 |
} |
| 9370 |
|
| 9371 |
if (options.start) { |
| 9372 |
options.start(tagName, attrs, unary, match.start, match.end); |
| 9373 |
} |
| 9374 |
} |
| 9375 |
|
| 9376 |
function parseEndTag (tagName, start, end) { |
| 9377 |
var pos, lowerCasedTagName; |
| 9378 |
if (start == null) { start = index; } |
| 9379 |
if (end == null) { end = index; } |
| 9380 |
|
| 9381 |
if (tagName) { |
| 9382 |
lowerCasedTagName = tagName.toLowerCase(); |
| 9383 |
} |
| 9384 |
|
| 9385 |
// Find the closest opened tag of the same type |
| 9386 |
if (tagName) { |
| 9387 |
for (pos = stack.length - 1; pos >= 0; pos--) { |
| 9388 |
if (stack[pos].lowerCasedTag === lowerCasedTagName) { |
| 9389 |
break |
| 9390 |
} |
| 9391 |
} |
| 9392 |
} else { |
| 9393 |
// If no tag name is provided, clean shop |
| 9394 |
pos = 0; |
| 9395 |
} |
| 9396 |
|
| 9397 |
if (pos >= 0) { |
| 9398 |
// Close all the open elements, up the stack |
| 9399 |
for (var i = stack.length - 1; i >= pos; i--) { |
| 9400 |
if (process.env.NODE_ENV !== 'production' && |
| 9401 |
(i > pos || !tagName) && |
| 9402 |
options.warn |
| 9403 |
) { |
| 9404 |
options.warn( |
| 9405 |
("tag <" + (stack[i].tag) + "> has no matching end tag.") |
| 9406 |
); |
| 9407 |
} |
| 9408 |
if (options.end) { |
| 9409 |
options.end(stack[i].tag, start, end); |
| 9410 |
} |
| 9411 |
} |
| 9412 |
|
| 9413 |
// Remove the open elements from the stack |
| 9414 |
stack.length = pos; |
| 9415 |
lastTag = pos && stack[pos - 1].tag; |
| 9416 |
} else if (lowerCasedTagName === 'br') { |
| 9417 |
if (options.start) { |
| 9418 |
options.start(tagName, [], true, start, end); |
| 9419 |
} |
| 9420 |
} else if (lowerCasedTagName === 'p') { |
| 9421 |
if (options.start) { |
| 9422 |
options.start(tagName, [], false, start, end); |
| 9423 |
} |
| 9424 |
if (options.end) { |
| 9425 |
options.end(tagName, start, end); |
| 9426 |
} |
| 9427 |
} |
| 9428 |
} |
| 9429 |
} |
| 9430 |
|
| 9431 |
/* */ |
| 9432 |
|
| 9433 |
var onRE = /^@|^v-on:/; |
| 9434 |
var dirRE = /^v-|^@|^:/; |
| 9435 |
var forAliasRE = /([^]*?)\s+(?:in|of)\s+([^]*)/; |
| 9436 |
var forIteratorRE = /,([^,\}\]]*)(?:,([^,\}\]]*))?$/; |
| 9437 |
var stripParensRE = /^\(|\)$/g; |
| 9438 |
|
| 9439 |
var argRE = /:(.*)$/; |
| 9440 |
var bindRE = /^:|^v-bind:/; |
| 9441 |
var modifierRE = /\.[^.]+/g; |
| 9442 |
|
| 9443 |
var decodeHTMLCached = cached(he.decode); |
| 9444 |
|
| 9445 |
// configurable state |
| 9446 |
var warn$2; |
| 9447 |
var delimiters; |
| 9448 |
var transforms; |
| 9449 |
var preTransforms; |
| 9450 |
var postTransforms; |
| 9451 |
var platformIsPreTag; |
| 9452 |
var platformMustUseProp; |
| 9453 |
var platformGetTagNamespace; |
| 9454 |
|
| 9455 |
|
| 9456 |
|
| 9457 |
function createASTElement ( |
| 9458 |
tag, |
| 9459 |
attrs, |
| 9460 |
parent |
| 9461 |
) { |
| 9462 |
return { |
| 9463 |
type: 1, |
| 9464 |
tag: tag, |
| 9465 |
attrsList: attrs, |
| 9466 |
attrsMap: makeAttrsMap(attrs), |
| 9467 |
parent: parent, |
| 9468 |
children: [] |
| 9469 |
} |
| 9470 |
} |
| 9471 |
|
| 9472 |
/** |
| 9473 |
* Convert HTML string to AST. |
| 9474 |
*/ |
| 9475 |
function parse ( |
| 9476 |
template, |
| 9477 |
options |
| 9478 |
) { |
| 9479 |
warn$2 = options.warn || baseWarn; |
| 9480 |
|
| 9481 |
platformIsPreTag = options.isPreTag || no; |
| 9482 |
platformMustUseProp = options.mustUseProp || no; |
| 9483 |
platformGetTagNamespace = options.getTagNamespace || no; |
| 9484 |
|
| 9485 |
transforms = pluckModuleFunction(options.modules, 'transformNode'); |
| 9486 |
preTransforms = pluckModuleFunction(options.modules, 'preTransformNode'); |
| 9487 |
postTransforms = pluckModuleFunction(options.modules, 'postTransformNode'); |
| 9488 |
|
| 9489 |
delimiters = options.delimiters; |
| 9490 |
|
| 9491 |
var stack = []; |
| 9492 |
var preserveWhitespace = options.preserveWhitespace !== false; |
| 9493 |
var root; |
| 9494 |
var currentParent; |
| 9495 |
var inVPre = false; |
| 9496 |
var inPre = false; |
| 9497 |
var warned = false; |
| 9498 |
|
| 9499 |
function warnOnce (msg) { |
| 9500 |
if (!warned) { |
| 9501 |
warned = true; |
| 9502 |
warn$2(msg); |
| 9503 |
} |
| 9504 |
} |
| 9505 |
|
| 9506 |
function closeElement (element) { |
| 9507 |
// check pre state |
| 9508 |
if (element.pre) { |
| 9509 |
inVPre = false; |
| 9510 |
} |
| 9511 |
if (platformIsPreTag(element.tag)) { |
| 9512 |
inPre = false; |
| 9513 |
} |
| 9514 |
// apply post-transforms |
| 9515 |
for (var i = 0; i < postTransforms.length; i++) { |
| 9516 |
postTransforms[i](element, options); |
| 9517 |
} |
| 9518 |
} |
| 9519 |
|
| 9520 |
parseHTML(template, { |
| 9521 |
warn: warn$2, |
| 9522 |
expectHTML: options.expectHTML, |
| 9523 |
isUnaryTag: options.isUnaryTag, |
| 9524 |
canBeLeftOpenTag: options.canBeLeftOpenTag, |
| 9525 |
shouldDecodeNewlines: options.shouldDecodeNewlines, |
| 9526 |
shouldDecodeNewlinesForHref: options.shouldDecodeNewlinesForHref, |
| 9527 |
shouldKeepComment: options.comments, |
| 9528 |
start: function start (tag, attrs, unary) { |
| 9529 |
// check namespace. |
| 9530 |
// inherit parent ns if there is one |
| 9531 |
var ns = (currentParent && currentParent.ns) || platformGetTagNamespace(tag); |
| 9532 |
|
| 9533 |
// handle IE svg bug |
| 9534 |
/* istanbul ignore if */ |
| 9535 |
if (isIE && ns === 'svg') { |
| 9536 |
attrs = guardIESVGBug(attrs); |
| 9537 |
} |
| 9538 |
|
| 9539 |
var element = createASTElement(tag, attrs, currentParent); |
| 9540 |
if (ns) { |
| 9541 |
element.ns = ns; |
| 9542 |
} |
| 9543 |
|
| 9544 |
if (isForbiddenTag(element) && !isServerRendering()) { |
| 9545 |
element.forbidden = true; |
| 9546 |
process.env.NODE_ENV !== 'production' && warn$2( |
| 9547 |
'Templates should only be responsible for mapping the state to the ' + |
| 9548 |
'UI. Avoid placing tags with side-effects in your templates, such as ' + |
| 9549 |
"<" + tag + ">" + ', as they will not be parsed.' |
| 9550 |
); |
| 9551 |
} |
| 9552 |
|
| 9553 |
// apply pre-transforms |
| 9554 |
for (var i = 0; i < preTransforms.length; i++) { |
| 9555 |
element = preTransforms[i](element, options) || element; |
| 9556 |
} |
| 9557 |
|
| 9558 |
if (!inVPre) { |
| 9559 |
processPre(element); |
| 9560 |
if (element.pre) { |
| 9561 |
inVPre = true; |
| 9562 |
} |
| 9563 |
} |
| 9564 |
if (platformIsPreTag(element.tag)) { |
| 9565 |
inPre = true; |
| 9566 |
} |
| 9567 |
if (inVPre) { |
| 9568 |
processRawAttrs(element); |
| 9569 |
} else if (!element.processed) { |
| 9570 |
// structural directives |
| 9571 |
processFor(element); |
| 9572 |
processIf(element); |
| 9573 |
processOnce(element); |
| 9574 |
// element-scope stuff |
| 9575 |
processElement(element, options); |
| 9576 |
} |
| 9577 |
|
| 9578 |
function checkRootConstraints (el) { |
| 9579 |
if (process.env.NODE_ENV !== 'production') { |
| 9580 |
if (el.tag === 'slot' || el.tag === 'template') { |
| 9581 |
warnOnce( |
| 9582 |
"Cannot use <" + (el.tag) + "> as component root element because it may " + |
| 9583 |
'contain multiple nodes.' |
| 9584 |
); |
| 9585 |
} |
| 9586 |
if (el.attrsMap.hasOwnProperty('v-for')) { |
| 9587 |
warnOnce( |
| 9588 |
'Cannot use v-for on stateful component root element because ' + |
| 9589 |
'it renders multiple elements.' |
| 9590 |
); |
| 9591 |
} |
| 9592 |
} |
| 9593 |
} |
| 9594 |
|
| 9595 |
// tree management |
| 9596 |
if (!root) { |
| 9597 |
root = element; |
| 9598 |
checkRootConstraints(root); |
| 9599 |
} else if (!stack.length) { |
| 9600 |
// allow root elements with v-if, v-else-if and v-else |
| 9601 |
if (root.if && (element.elseif || element.else)) { |
| 9602 |
checkRootConstraints(element); |
| 9603 |
addIfCondition(root, { |
| 9604 |
exp: element.elseif, |
| 9605 |
block: element |
| 9606 |
}); |
| 9607 |
} else if (process.env.NODE_ENV !== 'production') { |
| 9608 |
warnOnce( |
| 9609 |
"Component template should contain exactly one root element. " + |
| 9610 |
"If you are using v-if on multiple elements, " + |
| 9611 |
"use v-else-if to chain them instead." |
| 9612 |
); |
| 9613 |
} |
| 9614 |
} |
| 9615 |
if (currentParent && !element.forbidden) { |
| 9616 |
if (element.elseif || element.else) { |
| 9617 |
processIfConditions(element, currentParent); |
| 9618 |
} else if (element.slotScope) { // scoped slot |
| 9619 |
currentParent.plain = false; |
| 9620 |
var name = element.slotTarget || '"default"';(currentParent.scopedSlots || (currentParent.scopedSlots = {}))[name] = element; |
| 9621 |
} else { |
| 9622 |
currentParent.children.push(element); |
| 9623 |
element.parent = currentParent; |
| 9624 |
} |
| 9625 |
} |
| 9626 |
if (!unary) { |
| 9627 |
currentParent = element; |
| 9628 |
stack.push(element); |
| 9629 |
} else { |
| 9630 |
closeElement(element); |
| 9631 |
} |
| 9632 |
}, |
| 9633 |
|
| 9634 |
end: function end () { |
| 9635 |
// remove trailing whitespace |
| 9636 |
var element = stack[stack.length - 1]; |
| 9637 |
var lastNode = element.children[element.children.length - 1]; |
| 9638 |
if (lastNode && lastNode.type === 3 && lastNode.text === ' ' && !inPre) { |
| 9639 |
element.children.pop(); |
| 9640 |
} |
| 9641 |
// pop stack |
| 9642 |
stack.length -= 1; |
| 9643 |
currentParent = stack[stack.length - 1]; |
| 9644 |
closeElement(element); |
| 9645 |
}, |
| 9646 |
|
| 9647 |
chars: function chars (text) { |
| 9648 |
if (!currentParent) { |
| 9649 |
if (process.env.NODE_ENV !== 'production') { |
| 9650 |
if (text === template) { |
| 9651 |
warnOnce( |
| 9652 |
'Component template requires a root element, rather than just text.' |
| 9653 |
); |
| 9654 |
} else if ((text = text.trim())) { |
| 9655 |
warnOnce( |
| 9656 |
("text \"" + text + "\" outside root element will be ignored.") |
| 9657 |
); |
| 9658 |
} |
| 9659 |
} |
| 9660 |
return |
| 9661 |
} |
| 9662 |
// IE textarea placeholder bug |
| 9663 |
/* istanbul ignore if */ |
| 9664 |
if (isIE && |
| 9665 |
currentParent.tag === 'textarea' && |
| 9666 |
currentParent.attrsMap.placeholder === text |
| 9667 |
) { |
| 9668 |
return |
| 9669 |
} |
| 9670 |
var children = currentParent.children; |
| 9671 |
text = inPre || text.trim() |
| 9672 |
? isTextTag(currentParent) ? text : decodeHTMLCached(text) |
| 9673 |
// only preserve whitespace if its not right after a starting tag |
| 9674 |
: preserveWhitespace && children.length ? ' ' : ''; |
| 9675 |
if (text) { |
| 9676 |
var res; |
| 9677 |
if (!inVPre && text !== ' ' && (res = parseText(text, delimiters))) { |
| 9678 |
children.push({ |
| 9679 |
type: 2, |
| 9680 |
expression: res.expression, |
| 9681 |
tokens: res.tokens, |
| 9682 |
text: text |
| 9683 |
}); |
| 9684 |
} else if (text !== ' ' || !children.length || children[children.length - 1].text !== ' ') { |
| 9685 |
children.push({ |
| 9686 |
type: 3, |
| 9687 |
text: text |
| 9688 |
}); |
| 9689 |
} |
| 9690 |
} |
| 9691 |
}, |
| 9692 |
comment: function comment (text) { |
| 9693 |
currentParent.children.push({ |
| 9694 |
type: 3, |
| 9695 |
text: text, |
| 9696 |
isComment: true |
| 9697 |
}); |
| 9698 |
} |
| 9699 |
}); |
| 9700 |
return root |
| 9701 |
} |
| 9702 |
|
| 9703 |
function processPre (el) { |
| 9704 |
if (getAndRemoveAttr(el, 'v-pre') != null) { |
| 9705 |
el.pre = true; |
| 9706 |
} |
| 9707 |
} |
| 9708 |
|
| 9709 |
function processRawAttrs (el) { |
| 9710 |
var l = el.attrsList.length; |
| 9711 |
if (l) { |
| 9712 |
var attrs = el.attrs = new Array(l); |
| 9713 |
for (var i = 0; i < l; i++) { |
| 9714 |
attrs[i] = { |
| 9715 |
name: el.attrsList[i].name, |
| 9716 |
value: JSON.stringify(el.attrsList[i].value) |
| 9717 |
}; |
| 9718 |
} |
| 9719 |
} else if (!el.pre) { |
| 9720 |
// non root node in pre blocks with no attributes |
| 9721 |
el.plain = true; |
| 9722 |
} |
| 9723 |
} |
| 9724 |
|
| 9725 |
function processElement (element, options) { |
| 9726 |
processKey(element); |
| 9727 |
|
| 9728 |
// determine whether this is a plain element after |
| 9729 |
// removing structural attributes |
| 9730 |
element.plain = !element.key && !element.attrsList.length; |
| 9731 |
|
| 9732 |
processRef(element); |
| 9733 |
processSlot(element); |
| 9734 |
processComponent(element); |
| 9735 |
for (var i = 0; i < transforms.length; i++) { |
| 9736 |
element = transforms[i](element, options) || element; |
| 9737 |
} |
| 9738 |
processAttrs(element); |
| 9739 |
} |
| 9740 |
|
| 9741 |
function processKey (el) { |
| 9742 |
var exp = getBindingAttr(el, 'key'); |
| 9743 |
if (exp) { |
| 9744 |
if (process.env.NODE_ENV !== 'production' && el.tag === 'template') { |
| 9745 |
warn$2("<template> cannot be keyed. Place the key on real elements instead."); |
| 9746 |
} |
| 9747 |
el.key = exp; |
| 9748 |
} |
| 9749 |
} |
| 9750 |
|
| 9751 |
function processRef (el) { |
| 9752 |
var ref = getBindingAttr(el, 'ref'); |
| 9753 |
if (ref) { |
| 9754 |
el.ref = ref; |
| 9755 |
el.refInFor = checkInFor(el); |
| 9756 |
} |
| 9757 |
} |
| 9758 |
|
| 9759 |
function processFor (el) { |
| 9760 |
var exp; |
| 9761 |
if ((exp = getAndRemoveAttr(el, 'v-for'))) { |
| 9762 |
var res = parseFor(exp); |
| 9763 |
if (res) { |
| 9764 |
extend(el, res); |
| 9765 |
} else if (process.env.NODE_ENV !== 'production') { |
| 9766 |
warn$2( |
| 9767 |
("Invalid v-for expression: " + exp) |
| 9768 |
); |
| 9769 |
} |
| 9770 |
} |
| 9771 |
} |
| 9772 |
|
| 9773 |
|
| 9774 |
|
| 9775 |
function parseFor (exp) { |
| 9776 |
var inMatch = exp.match(forAliasRE); |
| 9777 |
if (!inMatch) { return } |
| 9778 |
var res = {}; |
| 9779 |
res.for = inMatch[2].trim(); |
| 9780 |
var alias = inMatch[1].trim().replace(stripParensRE, ''); |
| 9781 |
var iteratorMatch = alias.match(forIteratorRE); |
| 9782 |
if (iteratorMatch) { |
| 9783 |
res.alias = alias.replace(forIteratorRE, ''); |
| 9784 |
res.iterator1 = iteratorMatch[1].trim(); |
| 9785 |
if (iteratorMatch[2]) { |
| 9786 |
res.iterator2 = iteratorMatch[2].trim(); |
| 9787 |
} |
| 9788 |
} else { |
| 9789 |
res.alias = alias; |
| 9790 |
} |
| 9791 |
return res |
| 9792 |
} |
| 9793 |
|
| 9794 |
function processIf (el) { |
| 9795 |
var exp = getAndRemoveAttr(el, 'v-if'); |
| 9796 |
if (exp) { |
| 9797 |
el.if = exp; |
| 9798 |
addIfCondition(el, { |
| 9799 |
exp: exp, |
| 9800 |
block: el |
| 9801 |
}); |
| 9802 |
} else { |
| 9803 |
if (getAndRemoveAttr(el, 'v-else') != null) { |
| 9804 |
el.else = true; |
| 9805 |
} |
| 9806 |
var elseif = getAndRemoveAttr(el, 'v-else-if'); |
| 9807 |
if (elseif) { |
| 9808 |
el.elseif = elseif; |
| 9809 |
} |
| 9810 |
} |
| 9811 |
} |
| 9812 |
|
| 9813 |
function processIfConditions (el, parent) { |
| 9814 |
var prev = findPrevElement(parent.children); |
| 9815 |
if (prev && prev.if) { |
| 9816 |
addIfCondition(prev, { |
| 9817 |
exp: el.elseif, |
| 9818 |
block: el |
| 9819 |
}); |
| 9820 |
} else if (process.env.NODE_ENV !== 'production') { |
| 9821 |
warn$2( |
| 9822 |
"v-" + (el.elseif ? ('else-if="' + el.elseif + '"') : 'else') + " " + |
| 9823 |
"used on element <" + (el.tag) + "> without corresponding v-if." |
| 9824 |
); |
| 9825 |
} |
| 9826 |
} |
| 9827 |
|
| 9828 |
function findPrevElement (children) { |
| 9829 |
var i = children.length; |
| 9830 |
while (i--) { |
| 9831 |
if (children[i].type === 1) { |
| 9832 |
return children[i] |
| 9833 |
} else { |
| 9834 |
if (process.env.NODE_ENV !== 'production' && children[i].text !== ' ') { |
| 9835 |
warn$2( |
| 9836 |
"text \"" + (children[i].text.trim()) + "\" between v-if and v-else(-if) " + |
| 9837 |
"will be ignored." |
| 9838 |
); |
| 9839 |
} |
| 9840 |
children.pop(); |
| 9841 |
} |
| 9842 |
} |
| 9843 |
} |
| 9844 |
|
| 9845 |
function addIfCondition (el, condition) { |
| 9846 |
if (!el.ifConditions) { |
| 9847 |
el.ifConditions = []; |
| 9848 |
} |
| 9849 |
el.ifConditions.push(condition); |
| 9850 |
} |
| 9851 |
|
| 9852 |
function processOnce (el) { |
| 9853 |
var once$$1 = getAndRemoveAttr(el, 'v-once'); |
| 9854 |
if (once$$1 != null) { |
| 9855 |
el.once = true; |
| 9856 |
} |
| 9857 |
} |
| 9858 |
|
| 9859 |
function processSlot (el) { |
| 9860 |
if (el.tag === 'slot') { |
| 9861 |
el.slotName = getBindingAttr(el, 'name'); |
| 9862 |
if (process.env.NODE_ENV !== 'production' && el.key) { |
| 9863 |
warn$2( |
| 9864 |
"`key` does not work on <slot> because slots are abstract outlets " + |
| 9865 |
"and can possibly expand into multiple elements. " + |
| 9866 |
"Use the key on a wrapping element instead." |
| 9867 |
); |
| 9868 |
} |
| 9869 |
} else { |
| 9870 |
var slotScope; |
| 9871 |
if (el.tag === 'template') { |
| 9872 |
slotScope = getAndRemoveAttr(el, 'scope'); |
| 9873 |
/* istanbul ignore if */ |
| 9874 |
if (process.env.NODE_ENV !== 'production' && slotScope) { |
| 9875 |
warn$2( |
| 9876 |
"the \"scope\" attribute for scoped slots have been deprecated and " + |
| 9877 |
"replaced by \"slot-scope\" since 2.5. The new \"slot-scope\" attribute " + |
| 9878 |
"can also be used on plain elements in addition to <template> to " + |
| 9879 |
"denote scoped slots.", |
| 9880 |
true |
| 9881 |
); |
| 9882 |
} |
| 9883 |
el.slotScope = slotScope || getAndRemoveAttr(el, 'slot-scope'); |
| 9884 |
} else if ((slotScope = getAndRemoveAttr(el, 'slot-scope'))) { |
| 9885 |
/* istanbul ignore if */ |
| 9886 |
if (process.env.NODE_ENV !== 'production' && el.attrsMap['v-for']) { |
| 9887 |
warn$2( |
| 9888 |
"Ambiguous combined usage of slot-scope and v-for on <" + (el.tag) + "> " + |
| 9889 |
"(v-for takes higher priority). Use a wrapper <template> for the " + |
| 9890 |
"scoped slot to make it clearer.", |
| 9891 |
true |
| 9892 |
); |
| 9893 |
} |
| 9894 |
el.slotScope = slotScope; |
| 9895 |
} |
| 9896 |
var slotTarget = getBindingAttr(el, 'slot'); |
| 9897 |
if (slotTarget) { |
| 9898 |
el.slotTarget = slotTarget === '""' ? '"default"' : slotTarget; |
| 9899 |
// preserve slot as an attribute for native shadow DOM compat |
| 9900 |
// only for non-scoped slots. |
| 9901 |
if (el.tag !== 'template' && !el.slotScope) { |
| 9902 |
addAttr(el, 'slot', slotTarget); |
| 9903 |
} |
| 9904 |
} |
| 9905 |
} |
| 9906 |
} |
| 9907 |
|
| 9908 |
function processComponent (el) { |
| 9909 |
var binding; |
| 9910 |
if ((binding = getBindingAttr(el, 'is'))) { |
| 9911 |
el.component = binding; |
| 9912 |
} |
| 9913 |
if (getAndRemoveAttr(el, 'inline-template') != null) { |
| 9914 |
el.inlineTemplate = true; |
| 9915 |
} |
| 9916 |
} |
| 9917 |
|
| 9918 |
function processAttrs (el) { |
| 9919 |
var list = el.attrsList; |
| 9920 |
var i, l, name, rawName, value, modifiers, isProp; |
| 9921 |
for (i = 0, l = list.length; i < l; i++) { |
| 9922 |
name = rawName = list[i].name; |
| 9923 |
value = list[i].value; |
| 9924 |
if (dirRE.test(name)) { |
| 9925 |
// mark element as dynamic |
| 9926 |
el.hasBindings = true; |
| 9927 |
// modifiers |
| 9928 |
modifiers = parseModifiers(name); |
| 9929 |
if (modifiers) { |
| 9930 |
name = name.replace(modifierRE, ''); |
| 9931 |
} |
| 9932 |
if (bindRE.test(name)) { // v-bind |
| 9933 |
name = name.replace(bindRE, ''); |
| 9934 |
value = parseFilters(value); |
| 9935 |
isProp = false; |
| 9936 |
if (modifiers) { |
| 9937 |
if (modifiers.prop) { |
| 9938 |
isProp = true; |
| 9939 |
name = camelize(name); |
| 9940 |
if (name === 'innerHtml') { name = 'innerHTML'; } |
| 9941 |
} |
| 9942 |
if (modifiers.camel) { |
| 9943 |
name = camelize(name); |
| 9944 |
} |
| 9945 |
if (modifiers.sync) { |
| 9946 |
addHandler( |
| 9947 |
el, |
| 9948 |
("update:" + (camelize(name))), |
| 9949 |
genAssignmentCode(value, "$event") |
| 9950 |
); |
| 9951 |
} |
| 9952 |
} |
| 9953 |
if (isProp || ( |
| 9954 |
!el.component && platformMustUseProp(el.tag, el.attrsMap.type, name) |
| 9955 |
)) { |
| 9956 |
addProp(el, name, value); |
| 9957 |
} else { |
| 9958 |
addAttr(el, name, value); |
| 9959 |
} |
| 9960 |
} else if (onRE.test(name)) { // v-on |
| 9961 |
name = name.replace(onRE, ''); |
| 9962 |
addHandler(el, name, value, modifiers, false, warn$2); |
| 9963 |
} else { // normal directives |
| 9964 |
name = name.replace(dirRE, ''); |
| 9965 |
// parse arg |
| 9966 |
var argMatch = name.match(argRE); |
| 9967 |
var arg = argMatch && argMatch[1]; |
| 9968 |
if (arg) { |
| 9969 |
name = name.slice(0, -(arg.length + 1)); |
| 9970 |
} |
| 9971 |
addDirective(el, name, rawName, value, arg, modifiers); |
| 9972 |
if (process.env.NODE_ENV !== 'production' && name === 'model') { |
| 9973 |
checkForAliasModel(el, value); |
| 9974 |
} |
| 9975 |
} |
| 9976 |
} else { |
| 9977 |
// literal attribute |
| 9978 |
if (process.env.NODE_ENV !== 'production') { |
| 9979 |
var res = parseText(value, delimiters); |
| 9980 |
if (res) { |
| 9981 |
warn$2( |
| 9982 |
name + "=\"" + value + "\": " + |
| 9983 |
'Interpolation inside attributes has been removed. ' + |
| 9984 |
'Use v-bind or the colon shorthand instead. For example, ' + |
| 9985 |
'instead of <div id="{{ val }}">, use <div :id="val">.' |
| 9986 |
); |
| 9987 |
} |
| 9988 |
} |
| 9989 |
addAttr(el, name, JSON.stringify(value)); |
| 9990 |
// #6887 firefox doesn't update muted state if set via attribute |
| 9991 |
// even immediately after element creation |
| 9992 |
if (!el.component && |
| 9993 |
name === 'muted' && |
| 9994 |
platformMustUseProp(el.tag, el.attrsMap.type, name)) { |
| 9995 |
addProp(el, name, 'true'); |
| 9996 |
} |
| 9997 |
} |
| 9998 |
} |
| 9999 |
} |
| 10000 |
|
| 10001 |
function checkInFor (el) { |
| 10002 |
var parent = el; |
| 10003 |
while (parent) { |
| 10004 |
if (parent.for !== undefined) { |
| 10005 |
return true |
| 10006 |
} |
| 10007 |
parent = parent.parent; |
| 10008 |
} |
| 10009 |
return false |
| 10010 |
} |
| 10011 |
|
| 10012 |
function parseModifiers (name) { |
| 10013 |
var match = name.match(modifierRE); |
| 10014 |
if (match) { |
| 10015 |
var ret = {}; |
| 10016 |
match.forEach(function (m) { ret[m.slice(1)] = true; }); |
| 10017 |
return ret |
| 10018 |
} |
| 10019 |
} |
| 10020 |
|
| 10021 |
function makeAttrsMap (attrs) { |
| 10022 |
var map = {}; |
| 10023 |
for (var i = 0, l = attrs.length; i < l; i++) { |
| 10024 |
if ( |
| 10025 |
process.env.NODE_ENV !== 'production' && |
| 10026 |
map[attrs[i].name] && !isIE && !isEdge |
| 10027 |
) { |
| 10028 |
warn$2('duplicate attribute: ' + attrs[i].name); |
| 10029 |
} |
| 10030 |
map[attrs[i].name] = attrs[i].value; |
| 10031 |
} |
| 10032 |
return map |
| 10033 |
} |
| 10034 |
|
| 10035 |
// for script (e.g. type="x/template") or style, do not decode content |
| 10036 |
function isTextTag (el) { |
| 10037 |
return el.tag === 'script' || el.tag === 'style' |
| 10038 |
} |
| 10039 |
|
| 10040 |
function isForbiddenTag (el) { |
| 10041 |
return ( |
| 10042 |
el.tag === 'style' || |
| 10043 |
(el.tag === 'script' && ( |
| 10044 |
!el.attrsMap.type || |
| 10045 |
el.attrsMap.type === 'text/javascript' |
| 10046 |
)) |
| 10047 |
) |
| 10048 |
} |
| 10049 |
|
| 10050 |
var ieNSBug = /^xmlns:NS\d+/; |
| 10051 |
var ieNSPrefix = /^NS\d+:/; |
| 10052 |
|
| 10053 |
/* istanbul ignore next */ |
| 10054 |
function guardIESVGBug (attrs) { |
| 10055 |
var res = []; |
| 10056 |
for (var i = 0; i < attrs.length; i++) { |
| 10057 |
var attr = attrs[i]; |
| 10058 |
if (!ieNSBug.test(attr.name)) { |
| 10059 |
attr.name = attr.name.replace(ieNSPrefix, ''); |
| 10060 |
res.push(attr); |
| 10061 |
} |
| 10062 |
} |
| 10063 |
return res |
| 10064 |
} |
| 10065 |
|
| 10066 |
function checkForAliasModel (el, value) { |
| 10067 |
var _el = el; |
| 10068 |
while (_el) { |
| 10069 |
if (_el.for && _el.alias === value) { |
| 10070 |
warn$2( |
| 10071 |
"<" + (el.tag) + " v-model=\"" + value + "\">: " + |
| 10072 |
"You are binding v-model directly to a v-for iteration alias. " + |
| 10073 |
"This will not be able to modify the v-for source array because " + |
| 10074 |
"writing to the alias is like modifying a function local variable. " + |
| 10075 |
"Consider using an array of objects and use v-model on an object property instead." |
| 10076 |
); |
| 10077 |
} |
| 10078 |
_el = _el.parent; |
| 10079 |
} |
| 10080 |
} |
| 10081 |
|
| 10082 |
/* */ |
| 10083 |
|
| 10084 |
/** |
| 10085 |
* Expand input[v-model] with dyanmic type bindings into v-if-else chains |
| 10086 |
* Turn this: |
| 10087 |
* <input v-model="data[type]" :type="type"> |
| 10088 |
* into this: |
| 10089 |
* <input v-if="type === 'checkbox'" type="checkbox" v-model="data[type]"> |
| 10090 |
* <input v-else-if="type === 'radio'" type="radio" v-model="data[type]"> |
| 10091 |
* <input v-else :type="type" v-model="data[type]"> |
| 10092 |
*/ |
| 10093 |
|
| 10094 |
function preTransformNode (el, options) { |
| 10095 |
if (el.tag === 'input') { |
| 10096 |
var map = el.attrsMap; |
| 10097 |
if (!map['v-model']) { |
| 10098 |
return |
| 10099 |
} |
| 10100 |
|
| 10101 |
var typeBinding; |
| 10102 |
if (map[':type'] || map['v-bind:type']) { |
| 10103 |
typeBinding = getBindingAttr(el, 'type'); |
| 10104 |
} |
| 10105 |
if (!map.type && !typeBinding && map['v-bind']) { |
| 10106 |
typeBinding = "(" + (map['v-bind']) + ").type"; |
| 10107 |
} |
| 10108 |
|
| 10109 |
if (typeBinding) { |
| 10110 |
var ifCondition = getAndRemoveAttr(el, 'v-if', true); |
| 10111 |
var ifConditionExtra = ifCondition ? ("&&(" + ifCondition + ")") : ""; |
| 10112 |
var hasElse = getAndRemoveAttr(el, 'v-else', true) != null; |
| 10113 |
var elseIfCondition = getAndRemoveAttr(el, 'v-else-if', true); |
| 10114 |
// 1. checkbox |
| 10115 |
var branch0 = cloneASTElement(el); |
| 10116 |
// process for on the main node |
| 10117 |
processFor(branch0); |
| 10118 |
addRawAttr(branch0, 'type', 'checkbox'); |
| 10119 |
processElement(branch0, options); |
| 10120 |
branch0.processed = true; // prevent it from double-processed |
| 10121 |
branch0.if = "(" + typeBinding + ")==='checkbox'" + ifConditionExtra; |
| 10122 |
addIfCondition(branch0, { |
| 10123 |
exp: branch0.if, |
| 10124 |
block: branch0 |
| 10125 |
}); |
| 10126 |
// 2. add radio else-if condition |
| 10127 |
var branch1 = cloneASTElement(el); |
| 10128 |
getAndRemoveAttr(branch1, 'v-for', true); |
| 10129 |
addRawAttr(branch1, 'type', 'radio'); |
| 10130 |
processElement(branch1, options); |
| 10131 |
addIfCondition(branch0, { |
| 10132 |
exp: "(" + typeBinding + ")==='radio'" + ifConditionExtra, |
| 10133 |
block: branch1 |
| 10134 |
}); |
| 10135 |
// 3. other |
| 10136 |
var branch2 = cloneASTElement(el); |
| 10137 |
getAndRemoveAttr(branch2, 'v-for', true); |
| 10138 |
addRawAttr(branch2, ':type', typeBinding); |
| 10139 |
processElement(branch2, options); |
| 10140 |
addIfCondition(branch0, { |
| 10141 |
exp: ifCondition, |
| 10142 |
block: branch2 |
| 10143 |
}); |
| 10144 |
|
| 10145 |
if (hasElse) { |
| 10146 |
branch0.else = true; |
| 10147 |
} else if (elseIfCondition) { |
| 10148 |
branch0.elseif = elseIfCondition; |
| 10149 |
} |
| 10150 |
|
| 10151 |
return branch0 |
| 10152 |
} |
| 10153 |
} |
| 10154 |
} |
| 10155 |
|
| 10156 |
function cloneASTElement (el) { |
| 10157 |
return createASTElement(el.tag, el.attrsList.slice(), el.parent) |
| 10158 |
} |
| 10159 |
|
| 10160 |
var model$2 = { |
| 10161 |
preTransformNode: preTransformNode |
| 10162 |
} |
| 10163 |
|
| 10164 |
var modules$1 = [ |
| 10165 |
klass$1, |
| 10166 |
style$1, |
| 10167 |
model$2 |
| 10168 |
] |
| 10169 |
|
| 10170 |
/* */ |
| 10171 |
|
| 10172 |
function text (el, dir) { |
| 10173 |
if (dir.value) { |
| 10174 |
addProp(el, 'textContent', ("_s(" + (dir.value) + ")")); |
| 10175 |
} |
| 10176 |
} |
| 10177 |
|
| 10178 |
/* */ |
| 10179 |
|
| 10180 |
function html (el, dir) { |
| 10181 |
if (dir.value) { |
| 10182 |
addProp(el, 'innerHTML', ("_s(" + (dir.value) + ")")); |
| 10183 |
} |
| 10184 |
} |
| 10185 |
|
| 10186 |
var directives$1 = { |
| 10187 |
model: model, |
| 10188 |
text: text, |
| 10189 |
html: html |
| 10190 |
} |
| 10191 |
|
| 10192 |
/* */ |
| 10193 |
|
| 10194 |
var baseOptions = { |
| 10195 |
expectHTML: true, |
| 10196 |
modules: modules$1, |
| 10197 |
directives: directives$1, |
| 10198 |
isPreTag: isPreTag, |
| 10199 |
isUnaryTag: isUnaryTag, |
| 10200 |
mustUseProp: mustUseProp, |
| 10201 |
canBeLeftOpenTag: canBeLeftOpenTag, |
| 10202 |
isReservedTag: isReservedTag, |
| 10203 |
getTagNamespace: getTagNamespace, |
| 10204 |
staticKeys: genStaticKeys(modules$1) |
| 10205 |
}; |
| 10206 |
|
| 10207 |
/* */ |
| 10208 |
|
| 10209 |
var isStaticKey; |
| 10210 |
var isPlatformReservedTag; |
| 10211 |
|
| 10212 |
var genStaticKeysCached = cached(genStaticKeys$1); |
| 10213 |
|
| 10214 |
/** |
| 10215 |
* Goal of the optimizer: walk the generated template AST tree |
| 10216 |
* and detect sub-trees that are purely static, i.e. parts of |
| 10217 |
* the DOM that never needs to change. |
| 10218 |
* |
| 10219 |
* Once we detect these sub-trees, we can: |
| 10220 |
* |
| 10221 |
* 1. Hoist them into constants, so that we no longer need to |
| 10222 |
* create fresh nodes for them on each re-render; |
| 10223 |
* 2. Completely skip them in the patching process. |
| 10224 |
*/ |
| 10225 |
function optimize (root, options) { |
| 10226 |
if (!root) { return } |
| 10227 |
isStaticKey = genStaticKeysCached(options.staticKeys || ''); |
| 10228 |
isPlatformReservedTag = options.isReservedTag || no; |
| 10229 |
// first pass: mark all non-static nodes. |
| 10230 |
markStatic$1(root); |
| 10231 |
// second pass: mark static roots. |
| 10232 |
markStaticRoots(root, false); |
| 10233 |
} |
| 10234 |
|
| 10235 |
function genStaticKeys$1 (keys) { |
| 10236 |
return makeMap( |
| 10237 |
'type,tag,attrsList,attrsMap,plain,parent,children,attrs' + |
| 10238 |
(keys ? ',' + keys : '') |
| 10239 |
) |
| 10240 |
} |
| 10241 |
|
| 10242 |
function markStatic$1 (node) { |
| 10243 |
node.static = isStatic(node); |
| 10244 |
if (node.type === 1) { |
| 10245 |
// do not make component slot content static. this avoids |
| 10246 |
// 1. components not able to mutate slot nodes |
| 10247 |
// 2. static slot content fails for hot-reloading |
| 10248 |
if ( |
| 10249 |
!isPlatformReservedTag(node.tag) && |
| 10250 |
node.tag !== 'slot' && |
| 10251 |
node.attrsMap['inline-template'] == null |
| 10252 |
) { |
| 10253 |
return |
| 10254 |
} |
| 10255 |
for (var i = 0, l = node.children.length; i < l; i++) { |
| 10256 |
var child = node.children[i]; |
| 10257 |
markStatic$1(child); |
| 10258 |
if (!child.static) { |
| 10259 |
node.static = false; |
| 10260 |
} |
| 10261 |
} |
| 10262 |
if (node.ifConditions) { |
| 10263 |
for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) { |
| 10264 |
var block = node.ifConditions[i$1].block; |
| 10265 |
markStatic$1(block); |
| 10266 |
if (!block.static) { |
| 10267 |
node.static = false; |
| 10268 |
} |
| 10269 |
} |
| 10270 |
} |
| 10271 |
} |
| 10272 |
} |
| 10273 |
|
| 10274 |
function markStaticRoots (node, isInFor) { |
| 10275 |
if (node.type === 1) { |
| 10276 |
if (node.static || node.once) { |
| 10277 |
node.staticInFor = isInFor; |
| 10278 |
} |
| 10279 |
// For a node to qualify as a static root, it should have children that |
| 10280 |
// are not just static text. Otherwise the cost of hoisting out will |
| 10281 |
// outweigh the benefits and it's better off to just always render it fresh. |
| 10282 |
if (node.static && node.children.length && !( |
| 10283 |
node.children.length === 1 && |
| 10284 |
node.children[0].type === 3 |
| 10285 |
)) { |
| 10286 |
node.staticRoot = true; |
| 10287 |
return |
| 10288 |
} else { |
| 10289 |
node.staticRoot = false; |
| 10290 |
} |
| 10291 |
if (node.children) { |
| 10292 |
for (var i = 0, l = node.children.length; i < l; i++) { |
| 10293 |
markStaticRoots(node.children[i], isInFor || !!node.for); |
| 10294 |
} |
| 10295 |
} |
| 10296 |
if (node.ifConditions) { |
| 10297 |
for (var i$1 = 1, l$1 = node.ifConditions.length; i$1 < l$1; i$1++) { |
| 10298 |
markStaticRoots(node.ifConditions[i$1].block, isInFor); |
| 10299 |
} |
| 10300 |
} |
| 10301 |
} |
| 10302 |
} |
| 10303 |
|
| 10304 |
function isStatic (node) { |
| 10305 |
if (node.type === 2) { // expression |
| 10306 |
return false |
| 10307 |
} |
| 10308 |
if (node.type === 3) { // text |
| 10309 |
return true |
| 10310 |
} |
| 10311 |
return !!(node.pre || ( |
| 10312 |
!node.hasBindings && // no dynamic bindings |
| 10313 |
!node.if && !node.for && // not v-if or v-for or v-else |
| 10314 |
!isBuiltInTag(node.tag) && // not a built-in |
| 10315 |
isPlatformReservedTag(node.tag) && // not a component |
| 10316 |
!isDirectChildOfTemplateFor(node) && |
| 10317 |
Object.keys(node).every(isStaticKey) |
| 10318 |
)) |
| 10319 |
} |
| 10320 |
|
| 10321 |
function isDirectChildOfTemplateFor (node) { |
| 10322 |
while (node.parent) { |
| 10323 |
node = node.parent; |
| 10324 |
if (node.tag !== 'template') { |
| 10325 |
return false |
| 10326 |
} |
| 10327 |
if (node.for) { |
| 10328 |
return true |
| 10329 |
} |
| 10330 |
} |
| 10331 |
return false |
| 10332 |
} |
| 10333 |
|
| 10334 |
/* */ |
| 10335 |
|
| 10336 |
var fnExpRE = /^([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/; |
| 10337 |
var simplePathRE = /^[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['[^']*?']|\["[^"]*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*$/; |
| 10338 |
|
| 10339 |
// KeyboardEvent.keyCode aliases |
| 10340 |
var keyCodes = { |
| 10341 |
esc: 27, |
| 10342 |
tab: 9, |
| 10343 |
enter: 13, |
| 10344 |
space: 32, |
| 10345 |
up: 38, |
| 10346 |
left: 37, |
| 10347 |
right: 39, |
| 10348 |
down: 40, |
| 10349 |
'delete': [8, 46] |
| 10350 |
}; |
| 10351 |
|
| 10352 |
// KeyboardEvent.key aliases |
| 10353 |
var keyNames = { |
| 10354 |
esc: 'Escape', |
| 10355 |
tab: 'Tab', |
| 10356 |
enter: 'Enter', |
| 10357 |
space: ' ', |
| 10358 |
// #7806: IE11 uses key names without `Arrow` prefix for arrow keys. |
| 10359 |
up: ['Up', 'ArrowUp'], |
| 10360 |
left: ['Left', 'ArrowLeft'], |
| 10361 |
right: ['Right', 'ArrowRight'], |
| 10362 |
down: ['Down', 'ArrowDown'], |
| 10363 |
'delete': ['Backspace', 'Delete'] |
| 10364 |
}; |
| 10365 |
|
| 10366 |
// #4868: modifiers that prevent the execution of the listener |
| 10367 |
// need to explicitly return null so that we can determine whether to remove |
| 10368 |
// the listener for .once |
| 10369 |
var genGuard = function (condition) { return ("if(" + condition + ")return null;"); }; |
| 10370 |
|
| 10371 |
var modifierCode = { |
| 10372 |
stop: '$event.stopPropagation();', |
| 10373 |
prevent: '$event.preventDefault();', |
| 10374 |
self: genGuard("$event.target !== $event.currentTarget"), |
| 10375 |
ctrl: genGuard("!$event.ctrlKey"), |
| 10376 |
shift: genGuard("!$event.shiftKey"), |
| 10377 |
alt: genGuard("!$event.altKey"), |
| 10378 |
meta: genGuard("!$event.metaKey"), |
| 10379 |
left: genGuard("'button' in $event && $event.button !== 0"), |
| 10380 |
middle: genGuard("'button' in $event && $event.button !== 1"), |
| 10381 |
right: genGuard("'button' in $event && $event.button !== 2") |
| 10382 |
}; |
| 10383 |
|
| 10384 |
function genHandlers ( |
| 10385 |
events, |
| 10386 |
isNative, |
| 10387 |
warn |
| 10388 |
) { |
| 10389 |
var res = isNative ? 'nativeOn:{' : 'on:{'; |
| 10390 |
for (var name in events) { |
| 10391 |
res += "\"" + name + "\":" + (genHandler(name, events[name])) + ","; |
| 10392 |
} |
| 10393 |
return res.slice(0, -1) + '}' |
| 10394 |
} |
| 10395 |
|
| 10396 |
function genHandler ( |
| 10397 |
name, |
| 10398 |
handler |
| 10399 |
) { |
| 10400 |
if (!handler) { |
| 10401 |
return 'function(){}' |
| 10402 |
} |
| 10403 |
|
| 10404 |
if (Array.isArray(handler)) { |
| 10405 |
return ("[" + (handler.map(function (handler) { return genHandler(name, handler); }).join(',')) + "]") |
| 10406 |
} |
| 10407 |
|
| 10408 |
var isMethodPath = simplePathRE.test(handler.value); |
| 10409 |
var isFunctionExpression = fnExpRE.test(handler.value); |
| 10410 |
|
| 10411 |
if (!handler.modifiers) { |
| 10412 |
if (isMethodPath || isFunctionExpression) { |
| 10413 |
return handler.value |
| 10414 |
} |
| 10415 |
/* istanbul ignore if */ |
| 10416 |
return ("function($event){" + (handler.value) + "}") // inline statement |
| 10417 |
} else { |
| 10418 |
var code = ''; |
| 10419 |
var genModifierCode = ''; |
| 10420 |
var keys = []; |
| 10421 |
for (var key in handler.modifiers) { |
| 10422 |
if (modifierCode[key]) { |
| 10423 |
genModifierCode += modifierCode[key]; |
| 10424 |
// left/right |
| 10425 |
if (keyCodes[key]) { |
| 10426 |
keys.push(key); |
| 10427 |
} |
| 10428 |
} else if (key === 'exact') { |
| 10429 |
var modifiers = (handler.modifiers); |
| 10430 |
genModifierCode += genGuard( |
| 10431 |
['ctrl', 'shift', 'alt', 'meta'] |
| 10432 |
.filter(function (keyModifier) { return !modifiers[keyModifier]; }) |
| 10433 |
.map(function (keyModifier) { return ("$event." + keyModifier + "Key"); }) |
| 10434 |
.join('||') |
| 10435 |
); |
| 10436 |
} else { |
| 10437 |
keys.push(key); |
| 10438 |
} |
| 10439 |
} |
| 10440 |
if (keys.length) { |
| 10441 |
code += genKeyFilter(keys); |
| 10442 |
} |
| 10443 |
// Make sure modifiers like prevent and stop get executed after key filtering |
| 10444 |
if (genModifierCode) { |
| 10445 |
code += genModifierCode; |
| 10446 |
} |
| 10447 |
var handlerCode = isMethodPath |
| 10448 |
? ("return " + (handler.value) + "($event)") |
| 10449 |
: isFunctionExpression |
| 10450 |
? ("return (" + (handler.value) + ")($event)") |
| 10451 |
: handler.value; |
| 10452 |
/* istanbul ignore if */ |
| 10453 |
return ("function($event){" + code + handlerCode + "}") |
| 10454 |
} |
| 10455 |
} |
| 10456 |
|
| 10457 |
function genKeyFilter (keys) { |
| 10458 |
return ("if(!('button' in $event)&&" + (keys.map(genFilterCode).join('&&')) + ")return null;") |
| 10459 |
} |
| 10460 |
|
| 10461 |
function genFilterCode (key) { |
| 10462 |
var keyVal = parseInt(key, 10); |
| 10463 |
if (keyVal) { |
| 10464 |
return ("$event.keyCode!==" + keyVal) |
| 10465 |
} |
| 10466 |
var keyCode = keyCodes[key]; |
| 10467 |
var keyName = keyNames[key]; |
| 10468 |
return ( |
| 10469 |
"_k($event.keyCode," + |
| 10470 |
(JSON.stringify(key)) + "," + |
| 10471 |
(JSON.stringify(keyCode)) + "," + |
| 10472 |
"$event.key," + |
| 10473 |
"" + (JSON.stringify(keyName)) + |
| 10474 |
")" |
| 10475 |
) |
| 10476 |
} |
| 10477 |
|
| 10478 |
/* */ |
| 10479 |
|
| 10480 |
function on (el, dir) { |
| 10481 |
if (process.env.NODE_ENV !== 'production' && dir.modifiers) { |
| 10482 |
warn("v-on without argument does not support modifiers."); |
| 10483 |
} |
| 10484 |
el.wrapListeners = function (code) { return ("_g(" + code + "," + (dir.value) + ")"); }; |
| 10485 |
} |
| 10486 |
|
| 10487 |
/* */ |
| 10488 |
|
| 10489 |
function bind$1 (el, dir) { |
| 10490 |
el.wrapData = function (code) { |
| 10491 |
return ("_b(" + code + ",'" + (el.tag) + "'," + (dir.value) + "," + (dir.modifiers && dir.modifiers.prop ? 'true' : 'false') + (dir.modifiers && dir.modifiers.sync ? ',true' : '') + ")") |
| 10492 |
}; |
| 10493 |
} |
| 10494 |
|
| 10495 |
/* */ |
| 10496 |
|
| 10497 |
var baseDirectives = { |
| 10498 |
on: on, |
| 10499 |
bind: bind$1, |
| 10500 |
cloak: noop |
| 10501 |
} |
| 10502 |
|
| 10503 |
/* */ |
| 10504 |
|
| 10505 |
var CodegenState = function CodegenState (options) { |
| 10506 |
this.options = options; |
| 10507 |
this.warn = options.warn || baseWarn; |
| 10508 |
this.transforms = pluckModuleFunction(options.modules, 'transformCode'); |
| 10509 |
this.dataGenFns = pluckModuleFunction(options.modules, 'genData'); |
| 10510 |
this.directives = extend(extend({}, baseDirectives), options.directives); |
| 10511 |
var isReservedTag = options.isReservedTag || no; |
| 10512 |
this.maybeComponent = function (el) { return !isReservedTag(el.tag); }; |
| 10513 |
this.onceId = 0; |
| 10514 |
this.staticRenderFns = []; |
| 10515 |
}; |
| 10516 |
|
| 10517 |
|
| 10518 |
|
| 10519 |
function generate ( |
| 10520 |
ast, |
| 10521 |
options |
| 10522 |
) { |
| 10523 |
var state = new CodegenState(options); |
| 10524 |
var code = ast ? genElement(ast, state) : '_c("div")'; |
| 10525 |
return { |
| 10526 |
render: ("with(this){return " + code + "}"), |
| 10527 |
staticRenderFns: state.staticRenderFns |
| 10528 |
} |
| 10529 |
} |
| 10530 |
|
| 10531 |
function genElement (el, state) { |
| 10532 |
if (el.staticRoot && !el.staticProcessed) { |
| 10533 |
return genStatic(el, state) |
| 10534 |
} else if (el.once && !el.onceProcessed) { |
| 10535 |
return genOnce(el, state) |
| 10536 |
} else if (el.for && !el.forProcessed) { |
| 10537 |
return genFor(el, state) |
| 10538 |
} else if (el.if && !el.ifProcessed) { |
| 10539 |
return genIf(el, state) |
| 10540 |
} else if (el.tag === 'template' && !el.slotTarget) { |
| 10541 |
return genChildren(el, state) || 'void 0' |
| 10542 |
} else if (el.tag === 'slot') { |
| 10543 |
return genSlot(el, state) |
| 10544 |
} else { |
| 10545 |
// component or element |
| 10546 |
var code; |
| 10547 |
if (el.component) { |
| 10548 |
code = genComponent(el.component, el, state); |
| 10549 |
} else { |
| 10550 |
var data = el.plain ? undefined : genData$2(el, state); |
| 10551 |
|
| 10552 |
var children = el.inlineTemplate ? null : genChildren(el, state, true); |
| 10553 |
code = "_c('" + (el.tag) + "'" + (data ? ("," + data) : '') + (children ? ("," + children) : '') + ")"; |
| 10554 |
} |
| 10555 |
// module transforms |
| 10556 |
for (var i = 0; i < state.transforms.length; i++) { |
| 10557 |
code = state.transforms[i](el, code); |
| 10558 |
} |
| 10559 |
return code |
| 10560 |
} |
| 10561 |
} |
| 10562 |
|
| 10563 |
// hoist static sub-trees out |
| 10564 |
function genStatic (el, state) { |
| 10565 |
el.staticProcessed = true; |
| 10566 |
state.staticRenderFns.push(("with(this){return " + (genElement(el, state)) + "}")); |
| 10567 |
return ("_m(" + (state.staticRenderFns.length - 1) + (el.staticInFor ? ',true' : '') + ")") |
| 10568 |
} |
| 10569 |
|
| 10570 |
// v-once |
| 10571 |
function genOnce (el, state) { |
| 10572 |
el.onceProcessed = true; |
| 10573 |
if (el.if && !el.ifProcessed) { |
| 10574 |
return genIf(el, state) |
| 10575 |
} else if (el.staticInFor) { |
| 10576 |
var key = ''; |
| 10577 |
var parent = el.parent; |
| 10578 |
while (parent) { |
| 10579 |
if (parent.for) { |
| 10580 |
key = parent.key; |
| 10581 |
break |
| 10582 |
} |
| 10583 |
parent = parent.parent; |
| 10584 |
} |
| 10585 |
if (!key) { |
| 10586 |
process.env.NODE_ENV !== 'production' && state.warn( |
| 10587 |
"v-once can only be used inside v-for that is keyed. " |
| 10588 |
); |
| 10589 |
return genElement(el, state) |
| 10590 |
} |
| 10591 |
return ("_o(" + (genElement(el, state)) + "," + (state.onceId++) + "," + key + ")") |
| 10592 |
} else { |
| 10593 |
return genStatic(el, state) |
| 10594 |
} |
| 10595 |
} |
| 10596 |
|
| 10597 |
function genIf ( |
| 10598 |
el, |
| 10599 |
state, |
| 10600 |
altGen, |
| 10601 |
altEmpty |
| 10602 |
) { |
| 10603 |
el.ifProcessed = true; // avoid recursion |
| 10604 |
return genIfConditions(el.ifConditions.slice(), state, altGen, altEmpty) |
| 10605 |
} |
| 10606 |
|
| 10607 |
function genIfConditions ( |
| 10608 |
conditions, |
| 10609 |
state, |
| 10610 |
altGen, |
| 10611 |
altEmpty |
| 10612 |
) { |
| 10613 |
if (!conditions.length) { |
| 10614 |
return altEmpty || '_e()' |
| 10615 |
} |
| 10616 |
|
| 10617 |
var condition = conditions.shift(); |
| 10618 |
if (condition.exp) { |
| 10619 |
return ("(" + (condition.exp) + ")?" + (genTernaryExp(condition.block)) + ":" + (genIfConditions(conditions, state, altGen, altEmpty))) |
| 10620 |
} else { |
| 10621 |
return ("" + (genTernaryExp(condition.block))) |
| 10622 |
} |
| 10623 |
|
| 10624 |
// v-if with v-once should generate code like (a)?_m(0):_m(1) |
| 10625 |
function genTernaryExp (el) { |
| 10626 |
return altGen |
| 10627 |
? altGen(el, state) |
| 10628 |
: el.once |
| 10629 |
? genOnce(el, state) |
| 10630 |
: genElement(el, state) |
| 10631 |
} |
| 10632 |
} |
| 10633 |
|
| 10634 |
function genFor ( |
| 10635 |
el, |
| 10636 |
state, |
| 10637 |
altGen, |
| 10638 |
altHelper |
| 10639 |
) { |
| 10640 |
var exp = el.for; |
| 10641 |
var alias = el.alias; |
| 10642 |
var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : ''; |
| 10643 |
var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : ''; |
| 10644 |
|
| 10645 |
if (process.env.NODE_ENV !== 'production' && |
| 10646 |
state.maybeComponent(el) && |
| 10647 |
el.tag !== 'slot' && |
| 10648 |
el.tag !== 'template' && |
| 10649 |
!el.key |
| 10650 |
) { |
| 10651 |
state.warn( |
| 10652 |
"<" + (el.tag) + " v-for=\"" + alias + " in " + exp + "\">: component lists rendered with " + |
| 10653 |
"v-for should have explicit keys. " + |
| 10654 |
"See https://vuejs.org/guide/list.html#key for more info.", |
| 10655 |
true /* tip */ |
| 10656 |
); |
| 10657 |
} |
| 10658 |
|
| 10659 |
el.forProcessed = true; // avoid recursion |
| 10660 |
return (altHelper || '_l') + "((" + exp + ")," + |
| 10661 |
"function(" + alias + iterator1 + iterator2 + "){" + |
| 10662 |
"return " + ((altGen || genElement)(el, state)) + |
| 10663 |
'})' |
| 10664 |
} |
| 10665 |
|
| 10666 |
function genData$2 (el, state) { |
| 10667 |
var data = '{'; |
| 10668 |
|
| 10669 |
// directives first. |
| 10670 |
// directives may mutate the el's other properties before they are generated. |
| 10671 |
var dirs = genDirectives(el, state); |
| 10672 |
if (dirs) { data += dirs + ','; } |
| 10673 |
|
| 10674 |
// key |
| 10675 |
if (el.key) { |
| 10676 |
data += "key:" + (el.key) + ","; |
| 10677 |
} |
| 10678 |
// ref |
| 10679 |
if (el.ref) { |
| 10680 |
data += "ref:" + (el.ref) + ","; |
| 10681 |
} |
| 10682 |
if (el.refInFor) { |
| 10683 |
data += "refInFor:true,"; |
| 10684 |
} |
| 10685 |
// pre |
| 10686 |
if (el.pre) { |
| 10687 |
data += "pre:true,"; |
| 10688 |
} |
| 10689 |
// record original tag name for components using "is" attribute |
| 10690 |
if (el.component) { |
| 10691 |
data += "tag:\"" + (el.tag) + "\","; |
| 10692 |
} |
| 10693 |
// module data generation functions |
| 10694 |
for (var i = 0; i < state.dataGenFns.length; i++) { |
| 10695 |
data += state.dataGenFns[i](el); |
| 10696 |
} |
| 10697 |
// attributes |
| 10698 |
if (el.attrs) { |
| 10699 |
data += "attrs:{" + (genProps(el.attrs)) + "},"; |
| 10700 |
} |
| 10701 |
// DOM props |
| 10702 |
if (el.props) { |
| 10703 |
data += "domProps:{" + (genProps(el.props)) + "},"; |
| 10704 |
} |
| 10705 |
// event handlers |
| 10706 |
if (el.events) { |
| 10707 |
data += (genHandlers(el.events, false, state.warn)) + ","; |
| 10708 |
} |
| 10709 |
if (el.nativeEvents) { |
| 10710 |
data += (genHandlers(el.nativeEvents, true, state.warn)) + ","; |
| 10711 |
} |
| 10712 |
// slot target |
| 10713 |
// only for non-scoped slots |
| 10714 |
if (el.slotTarget && !el.slotScope) { |
| 10715 |
data += "slot:" + (el.slotTarget) + ","; |
| 10716 |
} |
| 10717 |
// scoped slots |
| 10718 |
if (el.scopedSlots) { |
| 10719 |
data += (genScopedSlots(el.scopedSlots, state)) + ","; |
| 10720 |
} |
| 10721 |
// component v-model |
| 10722 |
if (el.model) { |
| 10723 |
data += "model:{value:" + (el.model.value) + ",callback:" + (el.model.callback) + ",expression:" + (el.model.expression) + "},"; |
| 10724 |
} |
| 10725 |
// inline-template |
| 10726 |
if (el.inlineTemplate) { |
| 10727 |
var inlineTemplate = genInlineTemplate(el, state); |
| 10728 |
if (inlineTemplate) { |
| 10729 |
data += inlineTemplate + ","; |
| 10730 |
} |
| 10731 |
} |
| 10732 |
data = data.replace(/,$/, '') + '}'; |
| 10733 |
// v-bind data wrap |
| 10734 |
if (el.wrapData) { |
| 10735 |
data = el.wrapData(data); |
| 10736 |
} |
| 10737 |
// v-on data wrap |
| 10738 |
if (el.wrapListeners) { |
| 10739 |
data = el.wrapListeners(data); |
| 10740 |
} |
| 10741 |
return data |
| 10742 |
} |
| 10743 |
|
| 10744 |
function genDirectives (el, state) { |
| 10745 |
var dirs = el.directives; |
| 10746 |
if (!dirs) { return } |
| 10747 |
var res = 'directives:['; |
| 10748 |
var hasRuntime = false; |
| 10749 |
var i, l, dir, needRuntime; |
| 10750 |
for (i = 0, l = dirs.length; i < l; i++) { |
| 10751 |
dir = dirs[i]; |
| 10752 |
needRuntime = true; |
| 10753 |
var gen = state.directives[dir.name]; |
| 10754 |
if (gen) { |
| 10755 |
// compile-time directive that manipulates AST. |
| 10756 |
// returns true if it also needs a runtime counterpart. |
| 10757 |
needRuntime = !!gen(el, dir, state.warn); |
| 10758 |
} |
| 10759 |
if (needRuntime) { |
| 10760 |
hasRuntime = true; |
| 10761 |
res += "{name:\"" + (dir.name) + "\",rawName:\"" + (dir.rawName) + "\"" + (dir.value ? (",value:(" + (dir.value) + "),expression:" + (JSON.stringify(dir.value))) : '') + (dir.arg ? (",arg:\"" + (dir.arg) + "\"") : '') + (dir.modifiers ? (",modifiers:" + (JSON.stringify(dir.modifiers))) : '') + "},"; |
| 10762 |
} |
| 10763 |
} |
| 10764 |
if (hasRuntime) { |
| 10765 |
return res.slice(0, -1) + ']' |
| 10766 |
} |
| 10767 |
} |
| 10768 |
|
| 10769 |
function genInlineTemplate (el, state) { |
| 10770 |
var ast = el.children[0]; |
| 10771 |
if (process.env.NODE_ENV !== 'production' && ( |
| 10772 |
el.children.length !== 1 || ast.type !== 1 |
| 10773 |
)) { |
| 10774 |
state.warn('Inline-template components must have exactly one child element.'); |
| 10775 |
} |
| 10776 |
if (ast.type === 1) { |
| 10777 |
var inlineRenderFns = generate(ast, state.options); |
| 10778 |
return ("inlineTemplate:{render:function(){" + (inlineRenderFns.render) + "},staticRenderFns:[" + (inlineRenderFns.staticRenderFns.map(function (code) { return ("function(){" + code + "}"); }).join(',')) + "]}") |
| 10779 |
} |
| 10780 |
} |
| 10781 |
|
| 10782 |
function genScopedSlots ( |
| 10783 |
slots, |
| 10784 |
state |
| 10785 |
) { |
| 10786 |
return ("scopedSlots:_u([" + (Object.keys(slots).map(function (key) { |
| 10787 |
return genScopedSlot(key, slots[key], state) |
| 10788 |
}).join(',')) + "])") |
| 10789 |
} |
| 10790 |
|
| 10791 |
function genScopedSlot ( |
| 10792 |
key, |
| 10793 |
el, |
| 10794 |
state |
| 10795 |
) { |
| 10796 |
if (el.for && !el.forProcessed) { |
| 10797 |
return genForScopedSlot(key, el, state) |
| 10798 |
} |
| 10799 |
var fn = "function(" + (String(el.slotScope)) + "){" + |
| 10800 |
"return " + (el.tag === 'template' |
| 10801 |
? el.if |
| 10802 |
? ((el.if) + "?" + (genChildren(el, state) || 'undefined') + ":undefined") |
| 10803 |
: genChildren(el, state) || 'undefined' |
| 10804 |
: genElement(el, state)) + "}"; |
| 10805 |
return ("{key:" + key + ",fn:" + fn + "}") |
| 10806 |
} |
| 10807 |
|
| 10808 |
function genForScopedSlot ( |
| 10809 |
key, |
| 10810 |
el, |
| 10811 |
state |
| 10812 |
) { |
| 10813 |
var exp = el.for; |
| 10814 |
var alias = el.alias; |
| 10815 |
var iterator1 = el.iterator1 ? ("," + (el.iterator1)) : ''; |
| 10816 |
var iterator2 = el.iterator2 ? ("," + (el.iterator2)) : ''; |
| 10817 |
el.forProcessed = true; // avoid recursion |
| 10818 |
return "_l((" + exp + ")," + |
| 10819 |
"function(" + alias + iterator1 + iterator2 + "){" + |
| 10820 |
"return " + (genScopedSlot(key, el, state)) + |
| 10821 |
'})' |
| 10822 |
} |
| 10823 |
|
| 10824 |
function genChildren ( |
| 10825 |
el, |
| 10826 |
state, |
| 10827 |
checkSkip, |
| 10828 |
altGenElement, |
| 10829 |
altGenNode |
| 10830 |
) { |
| 10831 |
var children = el.children; |
| 10832 |
if (children.length) { |
| 10833 |
var el$1 = children[0]; |
| 10834 |
// optimize single v-for |
| 10835 |
if (children.length === 1 && |
| 10836 |
el$1.for && |
| 10837 |
el$1.tag !== 'template' && |
| 10838 |
el$1.tag !== 'slot' |
| 10839 |
) { |
| 10840 |
return (altGenElement || genElement)(el$1, state) |
| 10841 |
} |
| 10842 |
var normalizationType = checkSkip |
| 10843 |
? getNormalizationType(children, state.maybeComponent) |
| 10844 |
: 0; |
| 10845 |
var gen = altGenNode || genNode; |
| 10846 |
return ("[" + (children.map(function (c) { return gen(c, state); }).join(',')) + "]" + (normalizationType ? ("," + normalizationType) : '')) |
| 10847 |
} |
| 10848 |
} |
| 10849 |
|
| 10850 |
// determine the normalization needed for the children array. |
| 10851 |
// 0: no normalization needed |
| 10852 |
// 1: simple normalization needed (possible 1-level deep nested array) |
| 10853 |
// 2: full normalization needed |
| 10854 |
function getNormalizationType ( |
| 10855 |
children, |
| 10856 |
maybeComponent |
| 10857 |
) { |
| 10858 |
var res = 0; |
| 10859 |
for (var i = 0; i < children.length; i++) { |
| 10860 |
var el = children[i]; |
| 10861 |
if (el.type !== 1) { |
| 10862 |
continue |
| 10863 |
} |
| 10864 |
if (needsNormalization(el) || |
| 10865 |
(el.ifConditions && el.ifConditions.some(function (c) { return needsNormalization(c.block); }))) { |
| 10866 |
res = 2; |
| 10867 |
break |
| 10868 |
} |
| 10869 |
if (maybeComponent(el) || |
| 10870 |
(el.ifConditions && el.ifConditions.some(function (c) { return maybeComponent(c.block); }))) { |
| 10871 |
res = 1; |
| 10872 |
} |
| 10873 |
} |
| 10874 |
return res |
| 10875 |
} |
| 10876 |
|
| 10877 |
function needsNormalization (el) { |
| 10878 |
return el.for !== undefined || el.tag === 'template' || el.tag === 'slot' |
| 10879 |
} |
| 10880 |
|
| 10881 |
function genNode (node, state) { |
| 10882 |
if (node.type === 1) { |
| 10883 |
return genElement(node, state) |
| 10884 |
} if (node.type === 3 && node.isComment) { |
| 10885 |
return genComment(node) |
| 10886 |
} else { |
| 10887 |
return genText(node) |
| 10888 |
} |
| 10889 |
} |
| 10890 |
|
| 10891 |
function genText (text) { |
| 10892 |
return ("_v(" + (text.type === 2 |
| 10893 |
? text.expression // no need for () because already wrapped in _s() |
| 10894 |
: transformSpecialNewlines(JSON.stringify(text.text))) + ")") |
| 10895 |
} |
| 10896 |
|
| 10897 |
function genComment (comment) { |
| 10898 |
return ("_e(" + (JSON.stringify(comment.text)) + ")") |
| 10899 |
} |
| 10900 |
|
| 10901 |
function genSlot (el, state) { |
| 10902 |
var slotName = el.slotName || '"default"'; |
| 10903 |
var children = genChildren(el, state); |
| 10904 |
var res = "_t(" + slotName + (children ? ("," + children) : ''); |
| 10905 |
var attrs = el.attrs && ("{" + (el.attrs.map(function (a) { return ((camelize(a.name)) + ":" + (a.value)); }).join(',')) + "}"); |
| 10906 |
var bind$$1 = el.attrsMap['v-bind']; |
| 10907 |
if ((attrs || bind$$1) && !children) { |
| 10908 |
res += ",null"; |
| 10909 |
} |
| 10910 |
if (attrs) { |
| 10911 |
res += "," + attrs; |
| 10912 |
} |
| 10913 |
if (bind$$1) { |
| 10914 |
res += (attrs ? '' : ',null') + "," + bind$$1; |
| 10915 |
} |
| 10916 |
return res + ')' |
| 10917 |
} |
| 10918 |
|
| 10919 |
// componentName is el.component, take it as argument to shun flow's pessimistic refinement |
| 10920 |
function genComponent ( |
| 10921 |
componentName, |
| 10922 |
el, |
| 10923 |
state |
| 10924 |
) { |
| 10925 |
var children = el.inlineTemplate ? null : genChildren(el, state, true); |
| 10926 |
return ("_c(" + componentName + "," + (genData$2(el, state)) + (children ? ("," + children) : '') + ")") |
| 10927 |
} |
| 10928 |
|
| 10929 |
function genProps (props) { |
| 10930 |
var res = ''; |
| 10931 |
for (var i = 0; i < props.length; i++) { |
| 10932 |
var prop = props[i]; |
| 10933 |
/* istanbul ignore if */ |
| 10934 |
{ |
| 10935 |
res += "\"" + (prop.name) + "\":" + (transformSpecialNewlines(prop.value)) + ","; |
| 10936 |
} |
| 10937 |
} |
| 10938 |
return res.slice(0, -1) |
| 10939 |
} |
| 10940 |
|
| 10941 |
// #3895, #4268 |
| 10942 |
function transformSpecialNewlines (text) { |
| 10943 |
return text |
| 10944 |
.replace(/\u2028/g, '\\u2028') |
| 10945 |
.replace(/\u2029/g, '\\u2029') |
| 10946 |
} |
| 10947 |
|
| 10948 |
/* */ |
| 10949 |
|
| 10950 |
// these keywords should not appear inside expressions, but operators like |
| 10951 |
// typeof, instanceof and in are allowed |
| 10952 |
var prohibitedKeywordRE = new RegExp('\\b' + ( |
| 10953 |
'do,if,for,let,new,try,var,case,else,with,await,break,catch,class,const,' + |
| 10954 |
'super,throw,while,yield,delete,export,import,return,switch,default,' + |
| 10955 |
'extends,finally,continue,debugger,function,arguments' |
| 10956 |
).split(',').join('\\b|\\b') + '\\b'); |
| 10957 |
|
| 10958 |
// these unary operators should not be used as property/method names |
| 10959 |
var unaryOperatorsRE = new RegExp('\\b' + ( |
| 10960 |
'delete,typeof,void' |
| 10961 |
).split(',').join('\\s*\\([^\\)]*\\)|\\b') + '\\s*\\([^\\)]*\\)'); |
| 10962 |
|
| 10963 |
// strip strings in expressions |
| 10964 |
var stripStringRE = /'(?:[^'\\]|\\.)*'|"(?:[^"\\]|\\.)*"|`(?:[^`\\]|\\.)*\$\{|\}(?:[^`\\]|\\.)*`|`(?:[^`\\]|\\.)*`/g; |
| 10965 |
|
| 10966 |
// detect problematic expressions in a template |
| 10967 |
function detectErrors (ast) { |
| 10968 |
var errors = []; |
| 10969 |
if (ast) { |
| 10970 |
checkNode(ast, errors); |
| 10971 |
} |
| 10972 |
return errors |
| 10973 |
} |
| 10974 |
|
| 10975 |
function checkNode (node, errors) { |
| 10976 |
if (node.type === 1) { |
| 10977 |
for (var name in node.attrsMap) { |
| 10978 |
if (dirRE.test(name)) { |
| 10979 |
var value = node.attrsMap[name]; |
| 10980 |
if (value) { |
| 10981 |
if (name === 'v-for') { |
| 10982 |
checkFor(node, ("v-for=\"" + value + "\""), errors); |
| 10983 |
} else if (onRE.test(name)) { |
| 10984 |
checkEvent(value, (name + "=\"" + value + "\""), errors); |
| 10985 |
} else { |
| 10986 |
checkExpression(value, (name + "=\"" + value + "\""), errors); |
| 10987 |
} |
| 10988 |
} |
| 10989 |
} |
| 10990 |
} |
| 10991 |
if (node.children) { |
| 10992 |
for (var i = 0; i < node.children.length; i++) { |
| 10993 |
checkNode(node.children[i], errors); |
| 10994 |
} |
| 10995 |
} |
| 10996 |
} else if (node.type === 2) { |
| 10997 |
checkExpression(node.expression, node.text, errors); |
| 10998 |
} |
| 10999 |
} |
| 11000 |
|
| 11001 |
function checkEvent (exp, text, errors) { |
| 11002 |
var stipped = exp.replace(stripStringRE, ''); |
| 11003 |
var keywordMatch = stipped.match(unaryOperatorsRE); |
| 11004 |
if (keywordMatch && stipped.charAt(keywordMatch.index - 1) !== '$') { |
| 11005 |
errors.push( |
| 11006 |
"avoid using JavaScript unary operator as property name: " + |
| 11007 |
"\"" + (keywordMatch[0]) + "\" in expression " + (text.trim()) |
| 11008 |
); |
| 11009 |
} |
| 11010 |
checkExpression(exp, text, errors); |
| 11011 |
} |
| 11012 |
|
| 11013 |
function checkFor (node, text, errors) { |
| 11014 |
checkExpression(node.for || '', text, errors); |
| 11015 |
checkIdentifier(node.alias, 'v-for alias', text, errors); |
| 11016 |
checkIdentifier(node.iterator1, 'v-for iterator', text, errors); |
| 11017 |
checkIdentifier(node.iterator2, 'v-for iterator', text, errors); |
| 11018 |
} |
| 11019 |
|
| 11020 |
function checkIdentifier ( |
| 11021 |
ident, |
| 11022 |
type, |
| 11023 |
text, |
| 11024 |
errors |
| 11025 |
) { |
| 11026 |
if (typeof ident === 'string') { |
| 11027 |
try { |
| 11028 |
new Function(("var " + ident + "=_")); |
| 11029 |
} catch (e) { |
| 11030 |
errors.push(("invalid " + type + " \"" + ident + "\" in expression: " + (text.trim()))); |
| 11031 |
} |
| 11032 |
} |
| 11033 |
} |
| 11034 |
|
| 11035 |
function checkExpression (exp, text, errors) { |
| 11036 |
try { |
| 11037 |
new Function(("return " + exp)); |
| 11038 |
} catch (e) { |
| 11039 |
var keywordMatch = exp.replace(stripStringRE, '').match(prohibitedKeywordRE); |
| 11040 |
if (keywordMatch) { |
| 11041 |
errors.push( |
| 11042 |
"avoid using JavaScript keyword as property name: " + |
| 11043 |
"\"" + (keywordMatch[0]) + "\"\n Raw expression: " + (text.trim()) |
| 11044 |
); |
| 11045 |
} else { |
| 11046 |
errors.push( |
| 11047 |
"invalid expression: " + (e.message) + " in\n\n" + |
| 11048 |
" " + exp + "\n\n" + |
| 11049 |
" Raw expression: " + (text.trim()) + "\n" |
| 11050 |
); |
| 11051 |
} |
| 11052 |
} |
| 11053 |
} |
| 11054 |
|
| 11055 |
/* */ |
| 11056 |
|
| 11057 |
function createFunction (code, errors) { |
| 11058 |
try { |
| 11059 |
return new Function(code) |
| 11060 |
} catch (err) { |
| 11061 |
errors.push({ err: err, code: code }); |
| 11062 |
return noop |
| 11063 |
} |
| 11064 |
} |
| 11065 |
|
| 11066 |
function createCompileToFunctionFn (compile) { |
| 11067 |
var cache = Object.create(null); |
| 11068 |
|
| 11069 |
return function compileToFunctions ( |
| 11070 |
template, |
| 11071 |
options, |
| 11072 |
vm |
| 11073 |
) { |
| 11074 |
options = extend({}, options); |
| 11075 |
var warn$$1 = options.warn || warn; |
| 11076 |
delete options.warn; |
| 11077 |
|
| 11078 |
/* istanbul ignore if */ |
| 11079 |
if (process.env.NODE_ENV !== 'production') { |
| 11080 |
// detect possible CSP restriction |
| 11081 |
try { |
| 11082 |
new Function('return 1'); |
| 11083 |
} catch (e) { |
| 11084 |
if (e.toString().match(/unsafe-eval|CSP/)) { |
| 11085 |
warn$$1( |
| 11086 |
'It seems you are using the standalone build of Vue.js in an ' + |
| 11087 |
'environment with Content Security Policy that prohibits unsafe-eval. ' + |
| 11088 |
'The template compiler cannot work in this environment. Consider ' + |
| 11089 |
'relaxing the policy to allow unsafe-eval or pre-compiling your ' + |
| 11090 |
'templates into render functions.' |
| 11091 |
); |
| 11092 |
} |
| 11093 |
} |
| 11094 |
} |
| 11095 |
|
| 11096 |
// check cache |
| 11097 |
var key = options.delimiters |
| 11098 |
? String(options.delimiters) + template |
| 11099 |
: template; |
| 11100 |
if (cache[key]) { |
| 11101 |
return cache[key] |
| 11102 |
} |
| 11103 |
|
| 11104 |
// compile |
| 11105 |
var compiled = compile(template, options); |
| 11106 |
|
| 11107 |
// check compilation errors/tips |
| 11108 |
if (process.env.NODE_ENV !== 'production') { |
| 11109 |
if (compiled.errors && compiled.errors.length) { |
| 11110 |
warn$$1( |
| 11111 |
"Error compiling template:\n\n" + template + "\n\n" + |
| 11112 |
compiled.errors.map(function (e) { return ("- " + e); }).join('\n') + '\n', |
| 11113 |
vm |
| 11114 |
); |
| 11115 |
} |
| 11116 |
if (compiled.tips && compiled.tips.length) { |
| 11117 |
compiled.tips.forEach(function (msg) { return tip(msg, vm); }); |
| 11118 |
} |
| 11119 |
} |
| 11120 |
|
| 11121 |
// turn code into functions |
| 11122 |
var res = {}; |
| 11123 |
var fnGenErrors = []; |
| 11124 |
res.render = createFunction(compiled.render, fnGenErrors); |
| 11125 |
res.staticRenderFns = compiled.staticRenderFns.map(function (code) { |
| 11126 |
return createFunction(code, fnGenErrors) |
| 11127 |
}); |
| 11128 |
|
| 11129 |
// check function generation errors. |
| 11130 |
// this should only happen if there is a bug in the compiler itself. |
| 11131 |
// mostly for codegen development use |
| 11132 |
/* istanbul ignore if */ |
| 11133 |
if (process.env.NODE_ENV !== 'production') { |
| 11134 |
if ((!compiled.errors || !compiled.errors.length) && fnGenErrors.length) { |
| 11135 |
warn$$1( |
| 11136 |
"Failed to generate render function:\n\n" + |
| 11137 |
fnGenErrors.map(function (ref) { |
| 11138 |
var err = ref.err; |
| 11139 |
var code = ref.code; |
| 11140 |
|
| 11141 |
return ((err.toString()) + " in\n\n" + code + "\n"); |
| 11142 |
}).join('\n'), |
| 11143 |
vm |
| 11144 |
); |
| 11145 |
} |
| 11146 |
} |
| 11147 |
|
| 11148 |
return (cache[key] = res) |
| 11149 |
} |
| 11150 |
} |
| 11151 |
|
| 11152 |
/* */ |
| 11153 |
|
| 11154 |
function createCompilerCreator (baseCompile) { |
| 11155 |
return function createCompiler (baseOptions) { |
| 11156 |
function compile ( |
| 11157 |
template, |
| 11158 |
options |
| 11159 |
) { |
| 11160 |
var finalOptions = Object.create(baseOptions); |
| 11161 |
var errors = []; |
| 11162 |
var tips = []; |
| 11163 |
finalOptions.warn = function (msg, tip) { |
| 11164 |
(tip ? tips : errors).push(msg); |
| 11165 |
}; |
| 11166 |
|
| 11167 |
if (options) { |
| 11168 |
// merge custom modules |
| 11169 |
if (options.modules) { |
| 11170 |
finalOptions.modules = |
| 11171 |
(baseOptions.modules || []).concat(options.modules); |
| 11172 |
} |
| 11173 |
// merge custom directives |
| 11174 |
if (options.directives) { |
| 11175 |
finalOptions.directives = extend( |
| 11176 |
Object.create(baseOptions.directives || null), |
| 11177 |
options.directives |
| 11178 |
); |
| 11179 |
} |
| 11180 |
// copy other options |
| 11181 |
for (var key in options) { |
| 11182 |
if (key !== 'modules' && key !== 'directives') { |
| 11183 |
finalOptions[key] = options[key]; |
| 11184 |
} |
| 11185 |
} |
| 11186 |
} |
| 11187 |
|
| 11188 |
var compiled = baseCompile(template, finalOptions); |
| 11189 |
if (process.env.NODE_ENV !== 'production') { |
| 11190 |
errors.push.apply(errors, detectErrors(compiled.ast)); |
| 11191 |
} |
| 11192 |
compiled.errors = errors; |
| 11193 |
compiled.tips = tips; |
| 11194 |
return compiled |
| 11195 |
} |
| 11196 |
|
| 11197 |
return { |
| 11198 |
compile: compile, |
| 11199 |
compileToFunctions: createCompileToFunctionFn(compile) |
| 11200 |
} |
| 11201 |
} |
| 11202 |
} |
| 11203 |
|
| 11204 |
/* */ |
| 11205 |
|
| 11206 |
// `createCompilerCreator` allows creating compilers that use alternative |
| 11207 |
// parser/optimizer/codegen, e.g the SSR optimizing compiler. |
| 11208 |
// Here we just export a default compiler using the default parts. |
| 11209 |
var createCompiler = createCompilerCreator(function baseCompile ( |
| 11210 |
template, |
| 11211 |
options |
| 11212 |
) { |
| 11213 |
var ast = parse(template.trim(), options); |
| 11214 |
if (options.optimize !== false) { |
| 11215 |
optimize(ast, options); |
| 11216 |
} |
| 11217 |
var code = generate(ast, options); |
| 11218 |
return { |
| 11219 |
ast: ast, |
| 11220 |
render: code.render, |
| 11221 |
staticRenderFns: code.staticRenderFns |
| 11222 |
} |
| 11223 |
}); |
| 11224 |
|
| 11225 |
/* */ |
| 11226 |
|
| 11227 |
var ref$1 = createCompiler(baseOptions); |
| 11228 |
var compileToFunctions = ref$1.compileToFunctions; |
| 11229 |
|
| 11230 |
/* */ |
| 11231 |
|
| 11232 |
// check whether current browser encodes a char inside attribute values |
| 11233 |
var div; |
| 11234 |
function getShouldDecode (href) { |
| 11235 |
div = div || document.createElement('div'); |
| 11236 |
div.innerHTML = href ? "<a href=\"\n\"/>" : "<div a=\"\n\"/>"; |
| 11237 |
return div.innerHTML.indexOf(' ') > 0 |
| 11238 |
} |
| 11239 |
|
| 11240 |
// #3663: IE encodes newlines inside attribute values while other browsers don't |
| 11241 |
var shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false; |
| 11242 |
// #6828: chrome encodes content in a[href] |
| 11243 |
var shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false; |
| 11244 |
|
| 11245 |
/* */ |
| 11246 |
|
| 11247 |
var idToTemplate = cached(function (id) { |
| 11248 |
var el = query(id); |
| 11249 |
return el && el.innerHTML |
| 11250 |
}); |
| 11251 |
|
| 11252 |
var mount = Vue.prototype.$mount; |
| 11253 |
Vue.prototype.$mount = function ( |
| 11254 |
el, |
| 11255 |
hydrating |
| 11256 |
) { |
| 11257 |
el = el && query(el); |
| 11258 |
|
| 11259 |
/* istanbul ignore if */ |
| 11260 |
if (el === document.body || el === document.documentElement) { |
| 11261 |
process.env.NODE_ENV !== 'production' && warn( |
| 11262 |
"Do not mount Vue to <html> or <body> - mount to normal elements instead." |
| 11263 |
); |
| 11264 |
return this |
| 11265 |
} |
| 11266 |
|
| 11267 |
var options = this.$options; |
| 11268 |
// resolve template/el and convert to render function |
| 11269 |
if (!options.render) { |
| 11270 |
var template = options.template; |
| 11271 |
if (template) { |
| 11272 |
if (typeof template === 'string') { |
| 11273 |
if (template.charAt(0) === '#') { |
| 11274 |
template = idToTemplate(template); |
| 11275 |
/* istanbul ignore if */ |
| 11276 |
if (process.env.NODE_ENV !== 'production' && !template) { |
| 11277 |
warn( |
| 11278 |
("Template element not found or is empty: " + (options.template)), |
| 11279 |
this |
| 11280 |
); |
| 11281 |
} |
| 11282 |
} |
| 11283 |
} else if (template.nodeType) { |
| 11284 |
template = template.innerHTML; |
| 11285 |
} else { |
| 11286 |
if (process.env.NODE_ENV !== 'production') { |
| 11287 |
warn('invalid template option:' + template, this); |
| 11288 |
} |
| 11289 |
return this |
| 11290 |
} |
| 11291 |
} else if (el) { |
| 11292 |
template = getOuterHTML(el); |
| 11293 |
} |
| 11294 |
if (template) { |
| 11295 |
/* istanbul ignore if */ |
| 11296 |
if (process.env.NODE_ENV !== 'production' && config.performance && mark) { |
| 11297 |
mark('compile'); |
| 11298 |
} |
| 11299 |
|
| 11300 |
var ref = compileToFunctions(template, { |
| 11301 |
shouldDecodeNewlines: shouldDecodeNewlines, |
| 11302 |
shouldDecodeNewlinesForHref: shouldDecodeNewlinesForHref, |
| 11303 |
delimiters: options.delimiters, |
| 11304 |
comments: options.comments |
| 11305 |
}, this); |
| 11306 |
var render = ref.render; |
| 11307 |
var staticRenderFns = ref.staticRenderFns; |
| 11308 |
options.render = render; |
| 11309 |
options.staticRenderFns = staticRenderFns; |
| 11310 |
|
| 11311 |
/* istanbul ignore if */ |
| 11312 |
if (process.env.NODE_ENV !== 'production' && config.performance && mark) { |
| 11313 |
mark('compile end'); |
| 11314 |
measure(("vue " + (this._name) + " compile"), 'compile', 'compile end'); |
| 11315 |
} |
| 11316 |
} |
| 11317 |
} |
| 11318 |
return mount.call(this, el, hydrating) |
| 11319 |
}; |
| 11320 |
|
| 11321 |
/** |
| 11322 |
* Get outerHTML of elements, taking care |
| 11323 |
* of SVG elements in IE as well. |
| 11324 |
*/ |
| 11325 |
function getOuterHTML (el) { |
| 11326 |
if (el.outerHTML) { |
| 11327 |
return el.outerHTML |
| 11328 |
} else { |
| 11329 |
var container = document.createElement('div'); |
| 11330 |
container.appendChild(el.cloneNode(true)); |
| 11331 |
return container.innerHTML |
| 11332 |
} |
| 11333 |
} |
| 11334 |
|
| 11335 |
Vue.compile = compileToFunctions; |
| 11336 |
|
| 11337 |
/* harmony default export */ __webpack_exports__["default"] = (Vue); |
| 11338 |
|
| 11339 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(4), __webpack_require__(3), __webpack_require__(8).setImmediate)) |
| 11340 |
|
| 11341 |
/***/ }), |
| 11342 |
/* 3 */ |
| 11343 |
/***/ (function(module, exports) { |
| 11344 |
|
| 11345 |
var g; |
| 11346 |
|
| 11347 |
// This works in non-strict mode |
| 11348 |
g = (function() { |
| 11349 |
return this; |
| 11350 |
})(); |
| 11351 |
|
| 11352 |
try { |
| 11353 |
// This works if eval is allowed (see CSP) |
| 11354 |
g = g || Function("return this")() || (1,eval)("this"); |
| 11355 |
} catch(e) { |
| 11356 |
// This works if the window reference is available |
| 11357 |
if(typeof window === "object") |
| 11358 |
g = window; |
| 11359 |
} |
| 11360 |
|
| 11361 |
// g can still be undefined, but nothing to do about it... |
| 11362 |
// We return undefined, instead of nothing here, so it's |
| 11363 |
// easier to handle this case. if(!global) { ...} |
| 11364 |
|
| 11365 |
module.exports = g; |
| 11366 |
|
| 11367 |
|
| 11368 |
/***/ }), |
| 11369 |
/* 4 */ |
| 11370 |
/***/ (function(module, exports) { |
| 11371 |
|
| 11372 |
// shim for using process in browser |
| 11373 |
var process = module.exports = {}; |
| 11374 |
|
| 11375 |
// cached from whatever global is present so that test runners that stub it |
| 11376 |
// don't break things. But we need to wrap it in a try catch in case it is |
| 11377 |
// wrapped in strict mode code which doesn't define any globals. It's inside a |
| 11378 |
// function because try/catches deoptimize in certain engines. |
| 11379 |
|
| 11380 |
var cachedSetTimeout; |
| 11381 |
var cachedClearTimeout; |
| 11382 |
|
| 11383 |
function defaultSetTimout() { |
| 11384 |
throw new Error('setTimeout has not been defined'); |
| 11385 |
} |
| 11386 |
function defaultClearTimeout () { |
| 11387 |
throw new Error('clearTimeout has not been defined'); |
| 11388 |
} |
| 11389 |
(function () { |
| 11390 |
try { |
| 11391 |
if (typeof setTimeout === 'function') { |
| 11392 |
cachedSetTimeout = setTimeout; |
| 11393 |
} else { |
| 11394 |
cachedSetTimeout = defaultSetTimout; |
| 11395 |
} |
| 11396 |
} catch (e) { |
| 11397 |
cachedSetTimeout = defaultSetTimout; |
| 11398 |
} |
| 11399 |
try { |
| 11400 |
if (typeof clearTimeout === 'function') { |
| 11401 |
cachedClearTimeout = clearTimeout; |
| 11402 |
} else { |
| 11403 |
cachedClearTimeout = defaultClearTimeout; |
| 11404 |
} |
| 11405 |
} catch (e) { |
| 11406 |
cachedClearTimeout = defaultClearTimeout; |
| 11407 |
} |
| 11408 |
} ()) |
| 11409 |
function runTimeout(fun) { |
| 11410 |
if (cachedSetTimeout === setTimeout) { |
| 11411 |
//normal enviroments in sane situations |
| 11412 |
return setTimeout(fun, 0); |
| 11413 |
} |
| 11414 |
// if setTimeout wasn't available but was latter defined |
| 11415 |
if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { |
| 11416 |
cachedSetTimeout = setTimeout; |
| 11417 |
return setTimeout(fun, 0); |
| 11418 |
} |
| 11419 |
try { |
| 11420 |
// when when somebody has screwed with setTimeout but no I.E. maddness |
| 11421 |
return cachedSetTimeout(fun, 0); |
| 11422 |
} catch(e){ |
| 11423 |
try { |
| 11424 |
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
| 11425 |
return cachedSetTimeout.call(null, fun, 0); |
| 11426 |
} catch(e){ |
| 11427 |
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error |
| 11428 |
return cachedSetTimeout.call(this, fun, 0); |
| 11429 |
} |
| 11430 |
} |
| 11431 |
|
| 11432 |
|
| 11433 |
} |
| 11434 |
function runClearTimeout(marker) { |
| 11435 |
if (cachedClearTimeout === clearTimeout) { |
| 11436 |
//normal enviroments in sane situations |
| 11437 |
return clearTimeout(marker); |
| 11438 |
} |
| 11439 |
// if clearTimeout wasn't available but was latter defined |
| 11440 |
if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { |
| 11441 |
cachedClearTimeout = clearTimeout; |
| 11442 |
return clearTimeout(marker); |
| 11443 |
} |
| 11444 |
try { |
| 11445 |
// when when somebody has screwed with setTimeout but no I.E. maddness |
| 11446 |
return cachedClearTimeout(marker); |
| 11447 |
} catch (e){ |
| 11448 |
try { |
| 11449 |
// When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally |
| 11450 |
return cachedClearTimeout.call(null, marker); |
| 11451 |
} catch (e){ |
| 11452 |
// same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. |
| 11453 |
// Some versions of I.E. have different rules for clearTimeout vs setTimeout |
| 11454 |
return cachedClearTimeout.call(this, marker); |
| 11455 |
} |
| 11456 |
} |
| 11457 |
|
| 11458 |
|
| 11459 |
|
| 11460 |
} |
| 11461 |
var queue = []; |
| 11462 |
var draining = false; |
| 11463 |
var currentQueue; |
| 11464 |
var queueIndex = -1; |
| 11465 |
|
| 11466 |
function cleanUpNextTick() { |
| 11467 |
if (!draining || !currentQueue) { |
| 11468 |
return; |
| 11469 |
} |
| 11470 |
draining = false; |
| 11471 |
if (currentQueue.length) { |
| 11472 |
queue = currentQueue.concat(queue); |
| 11473 |
} else { |
| 11474 |
queueIndex = -1; |
| 11475 |
} |
| 11476 |
if (queue.length) { |
| 11477 |
drainQueue(); |
| 11478 |
} |
| 11479 |
} |
| 11480 |
|
| 11481 |
function drainQueue() { |
| 11482 |
if (draining) { |
| 11483 |
return; |
| 11484 |
} |
| 11485 |
var timeout = runTimeout(cleanUpNextTick); |
| 11486 |
draining = true; |
| 11487 |
|
| 11488 |
var len = queue.length; |
| 11489 |
while(len) { |
| 11490 |
currentQueue = queue; |
| 11491 |
queue = []; |
| 11492 |
while (++queueIndex < len) { |
| 11493 |
if (currentQueue) { |
| 11494 |
currentQueue[queueIndex].run(); |
| 11495 |
} |
| 11496 |
} |
| 11497 |
queueIndex = -1; |
| 11498 |
len = queue.length; |
| 11499 |
} |
| 11500 |
currentQueue = null; |
| 11501 |
draining = false; |
| 11502 |
runClearTimeout(timeout); |
| 11503 |
} |
| 11504 |
|
| 11505 |
process.nextTick = function (fun) { |
| 11506 |
var args = new Array(arguments.length - 1); |
| 11507 |
if (arguments.length > 1) { |
| 11508 |
for (var i = 1; i < arguments.length; i++) { |
| 11509 |
args[i - 1] = arguments[i]; |
| 11510 |
} |
| 11511 |
} |
| 11512 |
queue.push(new Item(fun, args)); |
| 11513 |
if (queue.length === 1 && !draining) { |
| 11514 |
runTimeout(drainQueue); |
| 11515 |
} |
| 11516 |
}; |
| 11517 |
|
| 11518 |
// v8 likes predictible objects |
| 11519 |
function Item(fun, array) { |
| 11520 |
this.fun = fun; |
| 11521 |
this.array = array; |
| 11522 |
} |
| 11523 |
Item.prototype.run = function () { |
| 11524 |
this.fun.apply(null, this.array); |
| 11525 |
}; |
| 11526 |
process.title = 'browser'; |
| 11527 |
process.browser = true; |
| 11528 |
process.env = {}; |
| 11529 |
process.argv = []; |
| 11530 |
process.version = ''; // empty string to avoid regexp issues |
| 11531 |
process.versions = {}; |
| 11532 |
|
| 11533 |
function noop() {} |
| 11534 |
|
| 11535 |
process.on = noop; |
| 11536 |
process.addListener = noop; |
| 11537 |
process.once = noop; |
| 11538 |
process.off = noop; |
| 11539 |
process.removeListener = noop; |
| 11540 |
process.removeAllListeners = noop; |
| 11541 |
process.emit = noop; |
| 11542 |
process.prependListener = noop; |
| 11543 |
process.prependOnceListener = noop; |
| 11544 |
|
| 11545 |
process.listeners = function (name) { return [] } |
| 11546 |
|
| 11547 |
process.binding = function (name) { |
| 11548 |
throw new Error('process.binding is not supported'); |
| 11549 |
}; |
| 11550 |
|
| 11551 |
process.cwd = function () { return '/' }; |
| 11552 |
process.chdir = function (dir) { |
| 11553 |
throw new Error('process.chdir is not supported'); |
| 11554 |
}; |
| 11555 |
process.umask = function() { return 0; }; |
| 11556 |
|
| 11557 |
|
| 11558 |
/***/ }), |
| 11559 |
/* 5 */ |
| 11560 |
/***/ (function(module, exports, __webpack_require__) { |
| 11561 |
|
| 11562 |
var __vue_script__, __vue_template__ |
| 11563 |
__vue_script__ = __webpack_require__(28) |
| 11564 |
__vue_template__ = __webpack_require__(29) |
| 11565 |
module.exports = __vue_script__ || {} |
| 11566 |
if (module.exports.__esModule) module.exports = module.exports.default |
| 11567 |
if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ } |
| 11568 |
if (false) {(function () { module.hot.accept() |
| 11569 |
var hotAPI = require("vue-hot-reload-api") |
| 11570 |
hotAPI.install(require("vue"), true) |
| 11571 |
if (!hotAPI.compatible) return |
| 11572 |
var id = "D:\\local\\optimolewp\\app\\public\\wp-content\\plugins\\optimole-wp\\assets\\vue\\components\\api-key-form.vue" |
| 11573 |
if (!module.hot.data) { |
| 11574 |
hotAPI.createRecord(id, module.exports) |
| 11575 |
} else { |
| 11576 |
hotAPI.update(id, module.exports, __vue_template__) |
| 11577 |
} |
| 11578 |
})()} |
| 11579 |
|
| 11580 |
/***/ }), |
| 11581 |
/* 6 */ |
| 11582 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
| 11583 |
|
| 11584 |
"use strict"; |
| 11585 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); |
| 11586 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Url", function() { return Url; }); |
| 11587 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Http", function() { return Http; }); |
| 11588 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Resource", function() { return Resource; }); |
| 11589 |
/*! |
| 11590 |
* vue-resource v1.5.1 |
| 11591 |
* https://github.com/pagekit/vue-resource |
| 11592 |
* Released under the MIT License. |
| 11593 |
*/ |
| 11594 |
|
| 11595 |
/** |
| 11596 |
* Promises/A+ polyfill v1.1.4 (https://github.com/bramstein/promis) |
| 11597 |
*/ |
| 11598 |
|
| 11599 |
var RESOLVED = 0; |
| 11600 |
var REJECTED = 1; |
| 11601 |
var PENDING = 2; |
| 11602 |
|
| 11603 |
function Promise$1(executor) { |
| 11604 |
|
| 11605 |
this.state = PENDING; |
| 11606 |
this.value = undefined; |
| 11607 |
this.deferred = []; |
| 11608 |
|
| 11609 |
var promise = this; |
| 11610 |
|
| 11611 |
try { |
| 11612 |
executor(function (x) { |
| 11613 |
promise.resolve(x); |
| 11614 |
}, function (r) { |
| 11615 |
promise.reject(r); |
| 11616 |
}); |
| 11617 |
} catch (e) { |
| 11618 |
promise.reject(e); |
| 11619 |
} |
| 11620 |
} |
| 11621 |
|
| 11622 |
Promise$1.reject = function (r) { |
| 11623 |
return new Promise$1(function (resolve, reject) { |
| 11624 |
reject(r); |
| 11625 |
}); |
| 11626 |
}; |
| 11627 |
|
| 11628 |
Promise$1.resolve = function (x) { |
| 11629 |
return new Promise$1(function (resolve, reject) { |
| 11630 |
resolve(x); |
| 11631 |
}); |
| 11632 |
}; |
| 11633 |
|
| 11634 |
Promise$1.all = function all(iterable) { |
| 11635 |
return new Promise$1(function (resolve, reject) { |
| 11636 |
var count = 0, result = []; |
| 11637 |
|
| 11638 |
if (iterable.length === 0) { |
| 11639 |
resolve(result); |
| 11640 |
} |
| 11641 |
|
| 11642 |
function resolver(i) { |
| 11643 |
return function (x) { |
| 11644 |
result[i] = x; |
| 11645 |
count += 1; |
| 11646 |
|
| 11647 |
if (count === iterable.length) { |
| 11648 |
resolve(result); |
| 11649 |
} |
| 11650 |
}; |
| 11651 |
} |
| 11652 |
|
| 11653 |
for (var i = 0; i < iterable.length; i += 1) { |
| 11654 |
Promise$1.resolve(iterable[i]).then(resolver(i), reject); |
| 11655 |
} |
| 11656 |
}); |
| 11657 |
}; |
| 11658 |
|
| 11659 |
Promise$1.race = function race(iterable) { |
| 11660 |
return new Promise$1(function (resolve, reject) { |
| 11661 |
for (var i = 0; i < iterable.length; i += 1) { |
| 11662 |
Promise$1.resolve(iterable[i]).then(resolve, reject); |
| 11663 |
} |
| 11664 |
}); |
| 11665 |
}; |
| 11666 |
|
| 11667 |
var p = Promise$1.prototype; |
| 11668 |
|
| 11669 |
p.resolve = function resolve(x) { |
| 11670 |
var promise = this; |
| 11671 |
|
| 11672 |
if (promise.state === PENDING) { |
| 11673 |
if (x === promise) { |
| 11674 |
throw new TypeError('Promise settled with itself.'); |
| 11675 |
} |
| 11676 |
|
| 11677 |
var called = false; |
| 11678 |
|
| 11679 |
try { |
| 11680 |
var then = x && x['then']; |
| 11681 |
|
| 11682 |
if (x !== null && typeof x === 'object' && typeof then === 'function') { |
| 11683 |
then.call(x, function (x) { |
| 11684 |
if (!called) { |
| 11685 |
promise.resolve(x); |
| 11686 |
} |
| 11687 |
called = true; |
| 11688 |
|
| 11689 |
}, function (r) { |
| 11690 |
if (!called) { |
| 11691 |
promise.reject(r); |
| 11692 |
} |
| 11693 |
called = true; |
| 11694 |
}); |
| 11695 |
return; |
| 11696 |
} |
| 11697 |
} catch (e) { |
| 11698 |
if (!called) { |
| 11699 |
promise.reject(e); |
| 11700 |
} |
| 11701 |
return; |
| 11702 |
} |
| 11703 |
|
| 11704 |
promise.state = RESOLVED; |
| 11705 |
promise.value = x; |
| 11706 |
promise.notify(); |
| 11707 |
} |
| 11708 |
}; |
| 11709 |
|
| 11710 |
p.reject = function reject(reason) { |
| 11711 |
var promise = this; |
| 11712 |
|
| 11713 |
if (promise.state === PENDING) { |
| 11714 |
if (reason === promise) { |
| 11715 |
throw new TypeError('Promise settled with itself.'); |
| 11716 |
} |
| 11717 |
|
| 11718 |
promise.state = REJECTED; |
| 11719 |
promise.value = reason; |
| 11720 |
promise.notify(); |
| 11721 |
} |
| 11722 |
}; |
| 11723 |
|
| 11724 |
p.notify = function notify() { |
| 11725 |
var promise = this; |
| 11726 |
|
| 11727 |
nextTick(function () { |
| 11728 |
if (promise.state !== PENDING) { |
| 11729 |
while (promise.deferred.length) { |
| 11730 |
var deferred = promise.deferred.shift(), |
| 11731 |
onResolved = deferred[0], |
| 11732 |
onRejected = deferred[1], |
| 11733 |
resolve = deferred[2], |
| 11734 |
reject = deferred[3]; |
| 11735 |
|
| 11736 |
try { |
| 11737 |
if (promise.state === RESOLVED) { |
| 11738 |
if (typeof onResolved === 'function') { |
| 11739 |
resolve(onResolved.call(undefined, promise.value)); |
| 11740 |
} else { |
| 11741 |
resolve(promise.value); |
| 11742 |
} |
| 11743 |
} else if (promise.state === REJECTED) { |
| 11744 |
if (typeof onRejected === 'function') { |
| 11745 |
resolve(onRejected.call(undefined, promise.value)); |
| 11746 |
} else { |
| 11747 |
reject(promise.value); |
| 11748 |
} |
| 11749 |
} |
| 11750 |
} catch (e) { |
| 11751 |
reject(e); |
| 11752 |
} |
| 11753 |
} |
| 11754 |
} |
| 11755 |
}); |
| 11756 |
}; |
| 11757 |
|
| 11758 |
p.then = function then(onResolved, onRejected) { |
| 11759 |
var promise = this; |
| 11760 |
|
| 11761 |
return new Promise$1(function (resolve, reject) { |
| 11762 |
promise.deferred.push([onResolved, onRejected, resolve, reject]); |
| 11763 |
promise.notify(); |
| 11764 |
}); |
| 11765 |
}; |
| 11766 |
|
| 11767 |
p.catch = function (onRejected) { |
| 11768 |
return this.then(undefined, onRejected); |
| 11769 |
}; |
| 11770 |
|
| 11771 |
/** |
| 11772 |
* Promise adapter. |
| 11773 |
*/ |
| 11774 |
|
| 11775 |
if (typeof Promise === 'undefined') { |
| 11776 |
window.Promise = Promise$1; |
| 11777 |
} |
| 11778 |
|
| 11779 |
function PromiseObj(executor, context) { |
| 11780 |
|
| 11781 |
if (executor instanceof Promise) { |
| 11782 |
this.promise = executor; |
| 11783 |
} else { |
| 11784 |
this.promise = new Promise(executor.bind(context)); |
| 11785 |
} |
| 11786 |
|
| 11787 |
this.context = context; |
| 11788 |
} |
| 11789 |
|
| 11790 |
PromiseObj.all = function (iterable, context) { |
| 11791 |
return new PromiseObj(Promise.all(iterable), context); |
| 11792 |
}; |
| 11793 |
|
| 11794 |
PromiseObj.resolve = function (value, context) { |
| 11795 |
return new PromiseObj(Promise.resolve(value), context); |
| 11796 |
}; |
| 11797 |
|
| 11798 |
PromiseObj.reject = function (reason, context) { |
| 11799 |
return new PromiseObj(Promise.reject(reason), context); |
| 11800 |
}; |
| 11801 |
|
| 11802 |
PromiseObj.race = function (iterable, context) { |
| 11803 |
return new PromiseObj(Promise.race(iterable), context); |
| 11804 |
}; |
| 11805 |
|
| 11806 |
var p$1 = PromiseObj.prototype; |
| 11807 |
|
| 11808 |
p$1.bind = function (context) { |
| 11809 |
this.context = context; |
| 11810 |
return this; |
| 11811 |
}; |
| 11812 |
|
| 11813 |
p$1.then = function (fulfilled, rejected) { |
| 11814 |
|
| 11815 |
if (fulfilled && fulfilled.bind && this.context) { |
| 11816 |
fulfilled = fulfilled.bind(this.context); |
| 11817 |
} |
| 11818 |
|
| 11819 |
if (rejected && rejected.bind && this.context) { |
| 11820 |
rejected = rejected.bind(this.context); |
| 11821 |
} |
| 11822 |
|
| 11823 |
return new PromiseObj(this.promise.then(fulfilled, rejected), this.context); |
| 11824 |
}; |
| 11825 |
|
| 11826 |
p$1.catch = function (rejected) { |
| 11827 |
|
| 11828 |
if (rejected && rejected.bind && this.context) { |
| 11829 |
rejected = rejected.bind(this.context); |
| 11830 |
} |
| 11831 |
|
| 11832 |
return new PromiseObj(this.promise.catch(rejected), this.context); |
| 11833 |
}; |
| 11834 |
|
| 11835 |
p$1.finally = function (callback) { |
| 11836 |
|
| 11837 |
return this.then(function (value) { |
| 11838 |
callback.call(this); |
| 11839 |
return value; |
| 11840 |
}, function (reason) { |
| 11841 |
callback.call(this); |
| 11842 |
return Promise.reject(reason); |
| 11843 |
} |
| 11844 |
); |
| 11845 |
}; |
| 11846 |
|
| 11847 |
/** |
| 11848 |
* Utility functions. |
| 11849 |
*/ |
| 11850 |
|
| 11851 |
var ref = {}; |
| 11852 |
var hasOwnProperty = ref.hasOwnProperty; |
| 11853 |
var ref$1 = []; |
| 11854 |
var slice = ref$1.slice; |
| 11855 |
var debug = false, ntick; |
| 11856 |
|
| 11857 |
var inBrowser = typeof window !== 'undefined'; |
| 11858 |
|
| 11859 |
function Util (ref) { |
| 11860 |
var config = ref.config; |
| 11861 |
var nextTick = ref.nextTick; |
| 11862 |
|
| 11863 |
ntick = nextTick; |
| 11864 |
debug = config.debug || !config.silent; |
| 11865 |
} |
| 11866 |
|
| 11867 |
function warn(msg) { |
| 11868 |
if (typeof console !== 'undefined' && debug) { |
| 11869 |
console.warn('[VueResource warn]: ' + msg); |
| 11870 |
} |
| 11871 |
} |
| 11872 |
|
| 11873 |
function error(msg) { |
| 11874 |
if (typeof console !== 'undefined') { |
| 11875 |
console.error(msg); |
| 11876 |
} |
| 11877 |
} |
| 11878 |
|
| 11879 |
function nextTick(cb, ctx) { |
| 11880 |
return ntick(cb, ctx); |
| 11881 |
} |
| 11882 |
|
| 11883 |
function trim(str) { |
| 11884 |
return str ? str.replace(/^\s*|\s*$/g, '') : ''; |
| 11885 |
} |
| 11886 |
|
| 11887 |
function trimEnd(str, chars) { |
| 11888 |
|
| 11889 |
if (str && chars === undefined) { |
| 11890 |
return str.replace(/\s+$/, ''); |
| 11891 |
} |
| 11892 |
|
| 11893 |
if (!str || !chars) { |
| 11894 |
return str; |
| 11895 |
} |
| 11896 |
|
| 11897 |
return str.replace(new RegExp(("[" + chars + "]+$")), ''); |
| 11898 |
} |
| 11899 |
|
| 11900 |
function toLower(str) { |
| 11901 |
return str ? str.toLowerCase() : ''; |
| 11902 |
} |
| 11903 |
|
| 11904 |
function toUpper(str) { |
| 11905 |
return str ? str.toUpperCase() : ''; |
| 11906 |
} |
| 11907 |
|
| 11908 |
var isArray = Array.isArray; |
| 11909 |
|
| 11910 |
function isString(val) { |
| 11911 |
return typeof val === 'string'; |
| 11912 |
} |
| 11913 |
|
| 11914 |
function isFunction(val) { |
| 11915 |
return typeof val === 'function'; |
| 11916 |
} |
| 11917 |
|
| 11918 |
function isObject(obj) { |
| 11919 |
return obj !== null && typeof obj === 'object'; |
| 11920 |
} |
| 11921 |
|
| 11922 |
function isPlainObject(obj) { |
| 11923 |
return isObject(obj) && Object.getPrototypeOf(obj) == Object.prototype; |
| 11924 |
} |
| 11925 |
|
| 11926 |
function isBlob(obj) { |
| 11927 |
return typeof Blob !== 'undefined' && obj instanceof Blob; |
| 11928 |
} |
| 11929 |
|
| 11930 |
function isFormData(obj) { |
| 11931 |
return typeof FormData !== 'undefined' && obj instanceof FormData; |
| 11932 |
} |
| 11933 |
|
| 11934 |
function when(value, fulfilled, rejected) { |
| 11935 |
|
| 11936 |
var promise = PromiseObj.resolve(value); |
| 11937 |
|
| 11938 |
if (arguments.length < 2) { |
| 11939 |
return promise; |
| 11940 |
} |
| 11941 |
|
| 11942 |
return promise.then(fulfilled, rejected); |
| 11943 |
} |
| 11944 |
|
| 11945 |
function options(fn, obj, opts) { |
| 11946 |
|
| 11947 |
opts = opts || {}; |
| 11948 |
|
| 11949 |
if (isFunction(opts)) { |
| 11950 |
opts = opts.call(obj); |
| 11951 |
} |
| 11952 |
|
| 11953 |
return merge(fn.bind({$vm: obj, $options: opts}), fn, {$options: opts}); |
| 11954 |
} |
| 11955 |
|
| 11956 |
function each(obj, iterator) { |
| 11957 |
|
| 11958 |
var i, key; |
| 11959 |
|
| 11960 |
if (isArray(obj)) { |
| 11961 |
for (i = 0; i < obj.length; i++) { |
| 11962 |
iterator.call(obj[i], obj[i], i); |
| 11963 |
} |
| 11964 |
} else if (isObject(obj)) { |
| 11965 |
for (key in obj) { |
| 11966 |
if (hasOwnProperty.call(obj, key)) { |
| 11967 |
iterator.call(obj[key], obj[key], key); |
| 11968 |
} |
| 11969 |
} |
| 11970 |
} |
| 11971 |
|
| 11972 |
return obj; |
| 11973 |
} |
| 11974 |
|
| 11975 |
var assign = Object.assign || _assign; |
| 11976 |
|
| 11977 |
function merge(target) { |
| 11978 |
|
| 11979 |
var args = slice.call(arguments, 1); |
| 11980 |
|
| 11981 |
args.forEach(function (source) { |
| 11982 |
_merge(target, source, true); |
| 11983 |
}); |
| 11984 |
|
| 11985 |
return target; |
| 11986 |
} |
| 11987 |
|
| 11988 |
function defaults(target) { |
| 11989 |
|
| 11990 |
var args = slice.call(arguments, 1); |
| 11991 |
|
| 11992 |
args.forEach(function (source) { |
| 11993 |
|
| 11994 |
for (var key in source) { |
| 11995 |
if (target[key] === undefined) { |
| 11996 |
target[key] = source[key]; |
| 11997 |
} |
| 11998 |
} |
| 11999 |
|
| 12000 |
}); |
| 12001 |
|
| 12002 |
return target; |
| 12003 |
} |
| 12004 |
|
| 12005 |
function _assign(target) { |
| 12006 |
|
| 12007 |
var args = slice.call(arguments, 1); |
| 12008 |
|
| 12009 |
args.forEach(function (source) { |
| 12010 |
_merge(target, source); |
| 12011 |
}); |
| 12012 |
|
| 12013 |
return target; |
| 12014 |
} |
| 12015 |
|
| 12016 |
function _merge(target, source, deep) { |
| 12017 |
for (var key in source) { |
| 12018 |
if (deep && (isPlainObject(source[key]) || isArray(source[key]))) { |
| 12019 |
if (isPlainObject(source[key]) && !isPlainObject(target[key])) { |
| 12020 |
target[key] = {}; |
| 12021 |
} |
| 12022 |
if (isArray(source[key]) && !isArray(target[key])) { |
| 12023 |
target[key] = []; |
| 12024 |
} |
| 12025 |
_merge(target[key], source[key], deep); |
| 12026 |
} else if (source[key] !== undefined) { |
| 12027 |
target[key] = source[key]; |
| 12028 |
} |
| 12029 |
} |
| 12030 |
} |
| 12031 |
|
| 12032 |
/** |
| 12033 |
* Root Prefix Transform. |
| 12034 |
*/ |
| 12035 |
|
| 12036 |
function root (options$$1, next) { |
| 12037 |
|
| 12038 |
var url = next(options$$1); |
| 12039 |
|
| 12040 |
if (isString(options$$1.root) && !/^(https?:)?\//.test(url)) { |
| 12041 |
url = trimEnd(options$$1.root, '/') + '/' + url; |
| 12042 |
} |
| 12043 |
|
| 12044 |
return url; |
| 12045 |
} |
| 12046 |
|
| 12047 |
/** |
| 12048 |
* Query Parameter Transform. |
| 12049 |
*/ |
| 12050 |
|
| 12051 |
function query (options$$1, next) { |
| 12052 |
|
| 12053 |
var urlParams = Object.keys(Url.options.params), query = {}, url = next(options$$1); |
| 12054 |
|
| 12055 |
each(options$$1.params, function (value, key) { |
| 12056 |
if (urlParams.indexOf(key) === -1) { |
| 12057 |
query[key] = value; |
| 12058 |
} |
| 12059 |
}); |
| 12060 |
|
| 12061 |
query = Url.params(query); |
| 12062 |
|
| 12063 |
if (query) { |
| 12064 |
url += (url.indexOf('?') == -1 ? '?' : '&') + query; |
| 12065 |
} |
| 12066 |
|
| 12067 |
return url; |
| 12068 |
} |
| 12069 |
|
| 12070 |
/** |
| 12071 |
* URL Template v2.0.6 (https://github.com/bramstein/url-template) |
| 12072 |
*/ |
| 12073 |
|
| 12074 |
function expand(url, params, variables) { |
| 12075 |
|
| 12076 |
var tmpl = parse(url), expanded = tmpl.expand(params); |
| 12077 |
|
| 12078 |
if (variables) { |
| 12079 |
variables.push.apply(variables, tmpl.vars); |
| 12080 |
} |
| 12081 |
|
| 12082 |
return expanded; |
| 12083 |
} |
| 12084 |
|
| 12085 |
function parse(template) { |
| 12086 |
|
| 12087 |
var operators = ['+', '#', '.', '/', ';', '?', '&'], variables = []; |
| 12088 |
|
| 12089 |
return { |
| 12090 |
vars: variables, |
| 12091 |
expand: function expand(context) { |
| 12092 |
return template.replace(/\{([^{}]+)\}|([^{}]+)/g, function (_, expression, literal) { |
| 12093 |
if (expression) { |
| 12094 |
|
| 12095 |
var operator = null, values = []; |
| 12096 |
|
| 12097 |
if (operators.indexOf(expression.charAt(0)) !== -1) { |
| 12098 |
operator = expression.charAt(0); |
| 12099 |
expression = expression.substr(1); |
| 12100 |
} |
| 12101 |
|
| 12102 |
expression.split(/,/g).forEach(function (variable) { |
| 12103 |
var tmp = /([^:*]*)(?::(\d+)|(\*))?/.exec(variable); |
| 12104 |
values.push.apply(values, getValues(context, operator, tmp[1], tmp[2] || tmp[3])); |
| 12105 |
variables.push(tmp[1]); |
| 12106 |
}); |
| 12107 |
|
| 12108 |
if (operator && operator !== '+') { |
| 12109 |
|
| 12110 |
var separator = ','; |
| 12111 |
|
| 12112 |
if (operator === '?') { |
| 12113 |
separator = '&'; |
| 12114 |
} else if (operator !== '#') { |
| 12115 |
separator = operator; |
| 12116 |
} |
| 12117 |
|
| 12118 |
return (values.length !== 0 ? operator : '') + values.join(separator); |
| 12119 |
} else { |
| 12120 |
return values.join(','); |
| 12121 |
} |
| 12122 |
|
| 12123 |
} else { |
| 12124 |
return encodeReserved(literal); |
| 12125 |
} |
| 12126 |
}); |
| 12127 |
} |
| 12128 |
}; |
| 12129 |
} |
| 12130 |
|
| 12131 |
function getValues(context, operator, key, modifier) { |
| 12132 |
|
| 12133 |
var value = context[key], result = []; |
| 12134 |
|
| 12135 |
if (isDefined(value) && value !== '') { |
| 12136 |
if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { |
| 12137 |
value = value.toString(); |
| 12138 |
|
| 12139 |
if (modifier && modifier !== '*') { |
| 12140 |
value = value.substring(0, parseInt(modifier, 10)); |
| 12141 |
} |
| 12142 |
|
| 12143 |
result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); |
| 12144 |
} else { |
| 12145 |
if (modifier === '*') { |
| 12146 |
if (Array.isArray(value)) { |
| 12147 |
value.filter(isDefined).forEach(function (value) { |
| 12148 |
result.push(encodeValue(operator, value, isKeyOperator(operator) ? key : null)); |
| 12149 |
}); |
| 12150 |
} else { |
| 12151 |
Object.keys(value).forEach(function (k) { |
| 12152 |
if (isDefined(value[k])) { |
| 12153 |
result.push(encodeValue(operator, value[k], k)); |
| 12154 |
} |
| 12155 |
}); |
| 12156 |
} |
| 12157 |
} else { |
| 12158 |
var tmp = []; |
| 12159 |
|
| 12160 |
if (Array.isArray(value)) { |
| 12161 |
value.filter(isDefined).forEach(function (value) { |
| 12162 |
tmp.push(encodeValue(operator, value)); |
| 12163 |
}); |
| 12164 |
} else { |
| 12165 |
Object.keys(value).forEach(function (k) { |
| 12166 |
if (isDefined(value[k])) { |
| 12167 |
tmp.push(encodeURIComponent(k)); |
| 12168 |
tmp.push(encodeValue(operator, value[k].toString())); |
| 12169 |
} |
| 12170 |
}); |
| 12171 |
} |
| 12172 |
|
| 12173 |
if (isKeyOperator(operator)) { |
| 12174 |
result.push(encodeURIComponent(key) + '=' + tmp.join(',')); |
| 12175 |
} else if (tmp.length !== 0) { |
| 12176 |
result.push(tmp.join(',')); |
| 12177 |
} |
| 12178 |
} |
| 12179 |
} |
| 12180 |
} else { |
| 12181 |
if (operator === ';') { |
| 12182 |
result.push(encodeURIComponent(key)); |
| 12183 |
} else if (value === '' && (operator === '&' || operator === '?')) { |
| 12184 |
result.push(encodeURIComponent(key) + '='); |
| 12185 |
} else if (value === '') { |
| 12186 |
result.push(''); |
| 12187 |
} |
| 12188 |
} |
| 12189 |
|
| 12190 |
return result; |
| 12191 |
} |
| 12192 |
|
| 12193 |
function isDefined(value) { |
| 12194 |
return value !== undefined && value !== null; |
| 12195 |
} |
| 12196 |
|
| 12197 |
function isKeyOperator(operator) { |
| 12198 |
return operator === ';' || operator === '&' || operator === '?'; |
| 12199 |
} |
| 12200 |
|
| 12201 |
function encodeValue(operator, value, key) { |
| 12202 |
|
| 12203 |
value = (operator === '+' || operator === '#') ? encodeReserved(value) : encodeURIComponent(value); |
| 12204 |
|
| 12205 |
if (key) { |
| 12206 |
return encodeURIComponent(key) + '=' + value; |
| 12207 |
} else { |
| 12208 |
return value; |
| 12209 |
} |
| 12210 |
} |
| 12211 |
|
| 12212 |
function encodeReserved(str) { |
| 12213 |
return str.split(/(%[0-9A-Fa-f]{2})/g).map(function (part) { |
| 12214 |
if (!/%[0-9A-Fa-f]/.test(part)) { |
| 12215 |
part = encodeURI(part); |
| 12216 |
} |
| 12217 |
return part; |
| 12218 |
}).join(''); |
| 12219 |
} |
| 12220 |
|
| 12221 |
/** |
| 12222 |
* URL Template (RFC 6570) Transform. |
| 12223 |
*/ |
| 12224 |
|
| 12225 |
function template (options) { |
| 12226 |
|
| 12227 |
var variables = [], url = expand(options.url, options.params, variables); |
| 12228 |
|
| 12229 |
variables.forEach(function (key) { |
| 12230 |
delete options.params[key]; |
| 12231 |
}); |
| 12232 |
|
| 12233 |
return url; |
| 12234 |
} |
| 12235 |
|
| 12236 |
/** |
| 12237 |
* Service for URL templating. |
| 12238 |
*/ |
| 12239 |
|
| 12240 |
function Url(url, params) { |
| 12241 |
|
| 12242 |
var self = this || {}, options$$1 = url, transform; |
| 12243 |
|
| 12244 |
if (isString(url)) { |
| 12245 |
options$$1 = {url: url, params: params}; |
| 12246 |
} |
| 12247 |
|
| 12248 |
options$$1 = merge({}, Url.options, self.$options, options$$1); |
| 12249 |
|
| 12250 |
Url.transforms.forEach(function (handler) { |
| 12251 |
|
| 12252 |
if (isString(handler)) { |
| 12253 |
handler = Url.transform[handler]; |
| 12254 |
} |
| 12255 |
|
| 12256 |
if (isFunction(handler)) { |
| 12257 |
transform = factory(handler, transform, self.$vm); |
| 12258 |
} |
| 12259 |
|
| 12260 |
}); |
| 12261 |
|
| 12262 |
return transform(options$$1); |
| 12263 |
} |
| 12264 |
|
| 12265 |
/** |
| 12266 |
* Url options. |
| 12267 |
*/ |
| 12268 |
|
| 12269 |
Url.options = { |
| 12270 |
url: '', |
| 12271 |
root: null, |
| 12272 |
params: {} |
| 12273 |
}; |
| 12274 |
|
| 12275 |
/** |
| 12276 |
* Url transforms. |
| 12277 |
*/ |
| 12278 |
|
| 12279 |
Url.transform = {template: template, query: query, root: root}; |
| 12280 |
Url.transforms = ['template', 'query', 'root']; |
| 12281 |
|
| 12282 |
/** |
| 12283 |
* Encodes a Url parameter string. |
| 12284 |
* |
| 12285 |
* @param {Object} obj |
| 12286 |
*/ |
| 12287 |
|
| 12288 |
Url.params = function (obj) { |
| 12289 |
|
| 12290 |
var params = [], escape = encodeURIComponent; |
| 12291 |
|
| 12292 |
params.add = function (key, value) { |
| 12293 |
|
| 12294 |
if (isFunction(value)) { |
| 12295 |
value = value(); |
| 12296 |
} |
| 12297 |
|
| 12298 |
if (value === null) { |
| 12299 |
value = ''; |
| 12300 |
} |
| 12301 |
|
| 12302 |
this.push(escape(key) + '=' + escape(value)); |
| 12303 |
}; |
| 12304 |
|
| 12305 |
serialize(params, obj); |
| 12306 |
|
| 12307 |
return params.join('&').replace(/%20/g, '+'); |
| 12308 |
}; |
| 12309 |
|
| 12310 |
/** |
| 12311 |
* Parse a URL and return its components. |
| 12312 |
* |
| 12313 |
* @param {String} url |
| 12314 |
*/ |
| 12315 |
|
| 12316 |
Url.parse = function (url) { |
| 12317 |
|
| 12318 |
var el = document.createElement('a'); |
| 12319 |
|
| 12320 |
if (document.documentMode) { |
| 12321 |
el.href = url; |
| 12322 |
url = el.href; |
| 12323 |
} |
| 12324 |
|
| 12325 |
el.href = url; |
| 12326 |
|
| 12327 |
return { |
| 12328 |
href: el.href, |
| 12329 |
protocol: el.protocol ? el.protocol.replace(/:$/, '') : '', |
| 12330 |
port: el.port, |
| 12331 |
host: el.host, |
| 12332 |
hostname: el.hostname, |
| 12333 |
pathname: el.pathname.charAt(0) === '/' ? el.pathname : '/' + el.pathname, |
| 12334 |
search: el.search ? el.search.replace(/^\?/, '') : '', |
| 12335 |
hash: el.hash ? el.hash.replace(/^#/, '') : '' |
| 12336 |
}; |
| 12337 |
}; |
| 12338 |
|
| 12339 |
function factory(handler, next, vm) { |
| 12340 |
return function (options$$1) { |
| 12341 |
return handler.call(vm, options$$1, next); |
| 12342 |
}; |
| 12343 |
} |
| 12344 |
|
| 12345 |
function serialize(params, obj, scope) { |
| 12346 |
|
| 12347 |
var array = isArray(obj), plain = isPlainObject(obj), hash; |
| 12348 |
|
| 12349 |
each(obj, function (value, key) { |
| 12350 |
|
| 12351 |
hash = isObject(value) || isArray(value); |
| 12352 |
|
| 12353 |
if (scope) { |
| 12354 |
key = scope + '[' + (plain || hash ? key : '') + ']'; |
| 12355 |
} |
| 12356 |
|
| 12357 |
if (!scope && array) { |
| 12358 |
params.add(value.name, value.value); |
| 12359 |
} else if (hash) { |
| 12360 |
serialize(params, value, key); |
| 12361 |
} else { |
| 12362 |
params.add(key, value); |
| 12363 |
} |
| 12364 |
}); |
| 12365 |
} |
| 12366 |
|
| 12367 |
/** |
| 12368 |
* XDomain client (Internet Explorer). |
| 12369 |
*/ |
| 12370 |
|
| 12371 |
function xdrClient (request) { |
| 12372 |
return new PromiseObj(function (resolve) { |
| 12373 |
|
| 12374 |
var xdr = new XDomainRequest(), handler = function (ref) { |
| 12375 |
var type = ref.type; |
| 12376 |
|
| 12377 |
|
| 12378 |
var status = 0; |
| 12379 |
|
| 12380 |
if (type === 'load') { |
| 12381 |
status = 200; |
| 12382 |
} else if (type === 'error') { |
| 12383 |
status = 500; |
| 12384 |
} |
| 12385 |
|
| 12386 |
resolve(request.respondWith(xdr.responseText, {status: status})); |
| 12387 |
}; |
| 12388 |
|
| 12389 |
request.abort = function () { return xdr.abort(); }; |
| 12390 |
|
| 12391 |
xdr.open(request.method, request.getUrl()); |
| 12392 |
|
| 12393 |
if (request.timeout) { |
| 12394 |
xdr.timeout = request.timeout; |
| 12395 |
} |
| 12396 |
|
| 12397 |
xdr.onload = handler; |
| 12398 |
xdr.onabort = handler; |
| 12399 |
xdr.onerror = handler; |
| 12400 |
xdr.ontimeout = handler; |
| 12401 |
xdr.onprogress = function () {}; |
| 12402 |
xdr.send(request.getBody()); |
| 12403 |
}); |
| 12404 |
} |
| 12405 |
|
| 12406 |
/** |
| 12407 |
* CORS Interceptor. |
| 12408 |
*/ |
| 12409 |
|
| 12410 |
var SUPPORTS_CORS = inBrowser && 'withCredentials' in new XMLHttpRequest(); |
| 12411 |
|
| 12412 |
function cors (request) { |
| 12413 |
|
| 12414 |
if (inBrowser) { |
| 12415 |
|
| 12416 |
var orgUrl = Url.parse(location.href); |
| 12417 |
var reqUrl = Url.parse(request.getUrl()); |
| 12418 |
|
| 12419 |
if (reqUrl.protocol !== orgUrl.protocol || reqUrl.host !== orgUrl.host) { |
| 12420 |
|
| 12421 |
request.crossOrigin = true; |
| 12422 |
request.emulateHTTP = false; |
| 12423 |
|
| 12424 |
if (!SUPPORTS_CORS) { |
| 12425 |
request.client = xdrClient; |
| 12426 |
} |
| 12427 |
} |
| 12428 |
} |
| 12429 |
|
| 12430 |
} |
| 12431 |
|
| 12432 |
/** |
| 12433 |
* Form data Interceptor. |
| 12434 |
*/ |
| 12435 |
|
| 12436 |
function form (request) { |
| 12437 |
|
| 12438 |
if (isFormData(request.body)) { |
| 12439 |
request.headers.delete('Content-Type'); |
| 12440 |
} else if (isObject(request.body) && request.emulateJSON) { |
| 12441 |
request.body = Url.params(request.body); |
| 12442 |
request.headers.set('Content-Type', 'application/x-www-form-urlencoded'); |
| 12443 |
} |
| 12444 |
|
| 12445 |
} |
| 12446 |
|
| 12447 |
/** |
| 12448 |
* JSON Interceptor. |
| 12449 |
*/ |
| 12450 |
|
| 12451 |
function json (request) { |
| 12452 |
|
| 12453 |
var type = request.headers.get('Content-Type') || ''; |
| 12454 |
|
| 12455 |
if (isObject(request.body) && type.indexOf('application/json') === 0) { |
| 12456 |
request.body = JSON.stringify(request.body); |
| 12457 |
} |
| 12458 |
|
| 12459 |
return function (response) { |
| 12460 |
|
| 12461 |
return response.bodyText ? when(response.text(), function (text) { |
| 12462 |
|
| 12463 |
var type = response.headers.get('Content-Type') || ''; |
| 12464 |
|
| 12465 |
if (type.indexOf('application/json') === 0 || isJson(text)) { |
| 12466 |
|
| 12467 |
try { |
| 12468 |
response.body = JSON.parse(text); |
| 12469 |
} catch (e) { |
| 12470 |
response.body = null; |
| 12471 |
} |
| 12472 |
|
| 12473 |
} else { |
| 12474 |
response.body = text; |
| 12475 |
} |
| 12476 |
|
| 12477 |
return response; |
| 12478 |
|
| 12479 |
}) : response; |
| 12480 |
|
| 12481 |
}; |
| 12482 |
} |
| 12483 |
|
| 12484 |
function isJson(str) { |
| 12485 |
|
| 12486 |
var start = str.match(/^\s*(\[|\{)/); |
| 12487 |
var end = {'[': /]\s*$/, '{': /}\s*$/}; |
| 12488 |
|
| 12489 |
return start && end[start[1]].test(str); |
| 12490 |
} |
| 12491 |
|
| 12492 |
/** |
| 12493 |
* JSONP client (Browser). |
| 12494 |
*/ |
| 12495 |
|
| 12496 |
function jsonpClient (request) { |
| 12497 |
return new PromiseObj(function (resolve) { |
| 12498 |
|
| 12499 |
var name = request.jsonp || 'callback', callback = request.jsonpCallback || '_jsonp' + Math.random().toString(36).substr(2), body = null, handler, script; |
| 12500 |
|
| 12501 |
handler = function (ref) { |
| 12502 |
var type = ref.type; |
| 12503 |
|
| 12504 |
|
| 12505 |
var status = 0; |
| 12506 |
|
| 12507 |
if (type === 'load' && body !== null) { |
| 12508 |
status = 200; |
| 12509 |
} else if (type === 'error') { |
| 12510 |
status = 500; |
| 12511 |
} |
| 12512 |
|
| 12513 |
if (status && window[callback]) { |
| 12514 |
delete window[callback]; |
| 12515 |
document.body.removeChild(script); |
| 12516 |
} |
| 12517 |
|
| 12518 |
resolve(request.respondWith(body, {status: status})); |
| 12519 |
}; |
| 12520 |
|
| 12521 |
window[callback] = function (result) { |
| 12522 |
body = JSON.stringify(result); |
| 12523 |
}; |
| 12524 |
|
| 12525 |
request.abort = function () { |
| 12526 |
handler({type: 'abort'}); |
| 12527 |
}; |
| 12528 |
|
| 12529 |
request.params[name] = callback; |
| 12530 |
|
| 12531 |
if (request.timeout) { |
| 12532 |
setTimeout(request.abort, request.timeout); |
| 12533 |
} |
| 12534 |
|
| 12535 |
script = document.createElement('script'); |
| 12536 |
script.src = request.getUrl(); |
| 12537 |
script.type = 'text/javascript'; |
| 12538 |
script.async = true; |
| 12539 |
script.onload = handler; |
| 12540 |
script.onerror = handler; |
| 12541 |
|
| 12542 |
document.body.appendChild(script); |
| 12543 |
}); |
| 12544 |
} |
| 12545 |
|
| 12546 |
/** |
| 12547 |
* JSONP Interceptor. |
| 12548 |
*/ |
| 12549 |
|
| 12550 |
function jsonp (request) { |
| 12551 |
|
| 12552 |
if (request.method == 'JSONP') { |
| 12553 |
request.client = jsonpClient; |
| 12554 |
} |
| 12555 |
|
| 12556 |
} |
| 12557 |
|
| 12558 |
/** |
| 12559 |
* Before Interceptor. |
| 12560 |
*/ |
| 12561 |
|
| 12562 |
function before (request) { |
| 12563 |
|
| 12564 |
if (isFunction(request.before)) { |
| 12565 |
request.before.call(this, request); |
| 12566 |
} |
| 12567 |
|
| 12568 |
} |
| 12569 |
|
| 12570 |
/** |
| 12571 |
* HTTP method override Interceptor. |
| 12572 |
*/ |
| 12573 |
|
| 12574 |
function method (request) { |
| 12575 |
|
| 12576 |
if (request.emulateHTTP && /^(PUT|PATCH|DELETE)$/i.test(request.method)) { |
| 12577 |
request.headers.set('X-HTTP-Method-Override', request.method); |
| 12578 |
request.method = 'POST'; |
| 12579 |
} |
| 12580 |
|
| 12581 |
} |
| 12582 |
|
| 12583 |
/** |
| 12584 |
* Header Interceptor. |
| 12585 |
*/ |
| 12586 |
|
| 12587 |
function header (request) { |
| 12588 |
|
| 12589 |
var headers = assign({}, Http.headers.common, |
| 12590 |
!request.crossOrigin ? Http.headers.custom : {}, |
| 12591 |
Http.headers[toLower(request.method)] |
| 12592 |
); |
| 12593 |
|
| 12594 |
each(headers, function (value, name) { |
| 12595 |
if (!request.headers.has(name)) { |
| 12596 |
request.headers.set(name, value); |
| 12597 |
} |
| 12598 |
}); |
| 12599 |
|
| 12600 |
} |
| 12601 |
|
| 12602 |
/** |
| 12603 |
* XMLHttp client (Browser). |
| 12604 |
*/ |
| 12605 |
|
| 12606 |
function xhrClient (request) { |
| 12607 |
return new PromiseObj(function (resolve) { |
| 12608 |
|
| 12609 |
var xhr = new XMLHttpRequest(), handler = function (event) { |
| 12610 |
|
| 12611 |
var response = request.respondWith( |
| 12612 |
'response' in xhr ? xhr.response : xhr.responseText, { |
| 12613 |
status: xhr.status === 1223 ? 204 : xhr.status, // IE9 status bug |
| 12614 |
statusText: xhr.status === 1223 ? 'No Content' : trim(xhr.statusText) |
| 12615 |
}); |
| 12616 |
|
| 12617 |
each(trim(xhr.getAllResponseHeaders()).split('\n'), function (row) { |
| 12618 |
response.headers.append(row.slice(0, row.indexOf(':')), row.slice(row.indexOf(':') + 1)); |
| 12619 |
}); |
| 12620 |
|
| 12621 |
resolve(response); |
| 12622 |
}; |
| 12623 |
|
| 12624 |
request.abort = function () { return xhr.abort(); }; |
| 12625 |
|
| 12626 |
xhr.open(request.method, request.getUrl(), true); |
| 12627 |
|
| 12628 |
if (request.timeout) { |
| 12629 |
xhr.timeout = request.timeout; |
| 12630 |
} |
| 12631 |
|
| 12632 |
if (request.responseType && 'responseType' in xhr) { |
| 12633 |
xhr.responseType = request.responseType; |
| 12634 |
} |
| 12635 |
|
| 12636 |
if (request.withCredentials || request.credentials) { |
| 12637 |
xhr.withCredentials = true; |
| 12638 |
} |
| 12639 |
|
| 12640 |
if (!request.crossOrigin) { |
| 12641 |
request.headers.set('X-Requested-With', 'XMLHttpRequest'); |
| 12642 |
} |
| 12643 |
|
| 12644 |
// deprecated use downloadProgress |
| 12645 |
if (isFunction(request.progress) && request.method === 'GET') { |
| 12646 |
xhr.addEventListener('progress', request.progress); |
| 12647 |
} |
| 12648 |
|
| 12649 |
if (isFunction(request.downloadProgress)) { |
| 12650 |
xhr.addEventListener('progress', request.downloadProgress); |
| 12651 |
} |
| 12652 |
|
| 12653 |
// deprecated use uploadProgress |
| 12654 |
if (isFunction(request.progress) && /^(POST|PUT)$/i.test(request.method)) { |
| 12655 |
xhr.upload.addEventListener('progress', request.progress); |
| 12656 |
} |
| 12657 |
|
| 12658 |
if (isFunction(request.uploadProgress) && xhr.upload) { |
| 12659 |
xhr.upload.addEventListener('progress', request.uploadProgress); |
| 12660 |
} |
| 12661 |
|
| 12662 |
request.headers.forEach(function (value, name) { |
| 12663 |
xhr.setRequestHeader(name, value); |
| 12664 |
}); |
| 12665 |
|
| 12666 |
xhr.onload = handler; |
| 12667 |
xhr.onabort = handler; |
| 12668 |
xhr.onerror = handler; |
| 12669 |
xhr.ontimeout = handler; |
| 12670 |
xhr.send(request.getBody()); |
| 12671 |
}); |
| 12672 |
} |
| 12673 |
|
| 12674 |
/** |
| 12675 |
* Http client (Node). |
| 12676 |
*/ |
| 12677 |
|
| 12678 |
function nodeClient (request) { |
| 12679 |
|
| 12680 |
var client = __webpack_require__(49); |
| 12681 |
|
| 12682 |
return new PromiseObj(function (resolve) { |
| 12683 |
|
| 12684 |
var url = request.getUrl(); |
| 12685 |
var body = request.getBody(); |
| 12686 |
var method = request.method; |
| 12687 |
var headers = {}, handler; |
| 12688 |
|
| 12689 |
request.headers.forEach(function (value, name) { |
| 12690 |
headers[name] = value; |
| 12691 |
}); |
| 12692 |
|
| 12693 |
client(url, {body: body, method: method, headers: headers}).then(handler = function (resp) { |
| 12694 |
|
| 12695 |
var response = request.respondWith(resp.body, { |
| 12696 |
status: resp.statusCode, |
| 12697 |
statusText: trim(resp.statusMessage) |
| 12698 |
}); |
| 12699 |
|
| 12700 |
each(resp.headers, function (value, name) { |
| 12701 |
response.headers.set(name, value); |
| 12702 |
}); |
| 12703 |
|
| 12704 |
resolve(response); |
| 12705 |
|
| 12706 |
}, function (error$$1) { return handler(error$$1.response); }); |
| 12707 |
}); |
| 12708 |
} |
| 12709 |
|
| 12710 |
/** |
| 12711 |
* Base client. |
| 12712 |
*/ |
| 12713 |
|
| 12714 |
function Client (context) { |
| 12715 |
|
| 12716 |
var reqHandlers = [sendRequest], resHandlers = []; |
| 12717 |
|
| 12718 |
if (!isObject(context)) { |
| 12719 |
context = null; |
| 12720 |
} |
| 12721 |
|
| 12722 |
function Client(request) { |
| 12723 |
while (reqHandlers.length) { |
| 12724 |
|
| 12725 |
var handler = reqHandlers.pop(); |
| 12726 |
|
| 12727 |
if (isFunction(handler)) { |
| 12728 |
|
| 12729 |
var response = (void 0), next = (void 0); |
| 12730 |
|
| 12731 |
response = handler.call(context, request, function (val) { return next = val; }) || next; |
| 12732 |
|
| 12733 |
if (isObject(response)) { |
| 12734 |
return new PromiseObj(function (resolve, reject) { |
| 12735 |
|
| 12736 |
resHandlers.forEach(function (handler) { |
| 12737 |
response = when(response, function (response) { |
| 12738 |
return handler.call(context, response) || response; |
| 12739 |
}, reject); |
| 12740 |
}); |
| 12741 |
|
| 12742 |
when(response, resolve, reject); |
| 12743 |
|
| 12744 |
}, context); |
| 12745 |
} |
| 12746 |
|
| 12747 |
if (isFunction(response)) { |
| 12748 |
resHandlers.unshift(response); |
| 12749 |
} |
| 12750 |
|
| 12751 |
} else { |
| 12752 |
warn(("Invalid interceptor of type " + (typeof handler) + ", must be a function")); |
| 12753 |
} |
| 12754 |
} |
| 12755 |
} |
| 12756 |
|
| 12757 |
Client.use = function (handler) { |
| 12758 |
reqHandlers.push(handler); |
| 12759 |
}; |
| 12760 |
|
| 12761 |
return Client; |
| 12762 |
} |
| 12763 |
|
| 12764 |
function sendRequest(request) { |
| 12765 |
|
| 12766 |
var client = request.client || (inBrowser ? xhrClient : nodeClient); |
| 12767 |
|
| 12768 |
return client(request); |
| 12769 |
} |
| 12770 |
|
| 12771 |
/** |
| 12772 |
* HTTP Headers. |
| 12773 |
*/ |
| 12774 |
|
| 12775 |
var Headers = function Headers(headers) { |
| 12776 |
var this$1 = this; |
| 12777 |
|
| 12778 |
|
| 12779 |
this.map = {}; |
| 12780 |
|
| 12781 |
each(headers, function (value, name) { return this$1.append(name, value); }); |
| 12782 |
}; |
| 12783 |
|
| 12784 |
Headers.prototype.has = function has (name) { |
| 12785 |
return getName(this.map, name) !== null; |
| 12786 |
}; |
| 12787 |
|
| 12788 |
Headers.prototype.get = function get (name) { |
| 12789 |
|
| 12790 |
var list = this.map[getName(this.map, name)]; |
| 12791 |
|
| 12792 |
return list ? list.join() : null; |
| 12793 |
}; |
| 12794 |
|
| 12795 |
Headers.prototype.getAll = function getAll (name) { |
| 12796 |
return this.map[getName(this.map, name)] || []; |
| 12797 |
}; |
| 12798 |
|
| 12799 |
Headers.prototype.set = function set (name, value) { |
| 12800 |
this.map[normalizeName(getName(this.map, name) || name)] = [trim(value)]; |
| 12801 |
}; |
| 12802 |
|
| 12803 |
Headers.prototype.append = function append (name, value) { |
| 12804 |
|
| 12805 |
var list = this.map[getName(this.map, name)]; |
| 12806 |
|
| 12807 |
if (list) { |
| 12808 |
list.push(trim(value)); |
| 12809 |
} else { |
| 12810 |
this.set(name, value); |
| 12811 |
} |
| 12812 |
}; |
| 12813 |
|
| 12814 |
Headers.prototype.delete = function delete$1 (name) { |
| 12815 |
delete this.map[getName(this.map, name)]; |
| 12816 |
}; |
| 12817 |
|
| 12818 |
Headers.prototype.deleteAll = function deleteAll () { |
| 12819 |
this.map = {}; |
| 12820 |
}; |
| 12821 |
|
| 12822 |
Headers.prototype.forEach = function forEach (callback, thisArg) { |
| 12823 |
var this$1 = this; |
| 12824 |
|
| 12825 |
each(this.map, function (list, name) { |
| 12826 |
each(list, function (value) { return callback.call(thisArg, value, name, this$1); }); |
| 12827 |
}); |
| 12828 |
}; |
| 12829 |
|
| 12830 |
function getName(map, name) { |
| 12831 |
return Object.keys(map).reduce(function (prev, curr) { |
| 12832 |
return toLower(name) === toLower(curr) ? curr : prev; |
| 12833 |
}, null); |
| 12834 |
} |
| 12835 |
|
| 12836 |
function normalizeName(name) { |
| 12837 |
|
| 12838 |
if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) { |
| 12839 |
throw new TypeError('Invalid character in header field name'); |
| 12840 |
} |
| 12841 |
|
| 12842 |
return trim(name); |
| 12843 |
} |
| 12844 |
|
| 12845 |
/** |
| 12846 |
* HTTP Response. |
| 12847 |
*/ |
| 12848 |
|
| 12849 |
var Response = function Response(body, ref) { |
| 12850 |
var url = ref.url; |
| 12851 |
var headers = ref.headers; |
| 12852 |
var status = ref.status; |
| 12853 |
var statusText = ref.statusText; |
| 12854 |
|
| 12855 |
|
| 12856 |
this.url = url; |
| 12857 |
this.ok = status >= 200 && status < 300; |
| 12858 |
this.status = status || 0; |
| 12859 |
this.statusText = statusText || ''; |
| 12860 |
this.headers = new Headers(headers); |
| 12861 |
this.body = body; |
| 12862 |
|
| 12863 |
if (isString(body)) { |
| 12864 |
|
| 12865 |
this.bodyText = body; |
| 12866 |
|
| 12867 |
} else if (isBlob(body)) { |
| 12868 |
|
| 12869 |
this.bodyBlob = body; |
| 12870 |
|
| 12871 |
if (isBlobText(body)) { |
| 12872 |
this.bodyText = blobText(body); |
| 12873 |
} |
| 12874 |
} |
| 12875 |
}; |
| 12876 |
|
| 12877 |
Response.prototype.blob = function blob () { |
| 12878 |
return when(this.bodyBlob); |
| 12879 |
}; |
| 12880 |
|
| 12881 |
Response.prototype.text = function text () { |
| 12882 |
return when(this.bodyText); |
| 12883 |
}; |
| 12884 |
|
| 12885 |
Response.prototype.json = function json () { |
| 12886 |
return when(this.text(), function (text) { return JSON.parse(text); }); |
| 12887 |
}; |
| 12888 |
|
| 12889 |
Object.defineProperty(Response.prototype, 'data', { |
| 12890 |
|
| 12891 |
get: function get() { |
| 12892 |
return this.body; |
| 12893 |
}, |
| 12894 |
|
| 12895 |
set: function set(body) { |
| 12896 |
this.body = body; |
| 12897 |
} |
| 12898 |
|
| 12899 |
}); |
| 12900 |
|
| 12901 |
function blobText(body) { |
| 12902 |
return new PromiseObj(function (resolve) { |
| 12903 |
|
| 12904 |
var reader = new FileReader(); |
| 12905 |
|
| 12906 |
reader.readAsText(body); |
| 12907 |
reader.onload = function () { |
| 12908 |
resolve(reader.result); |
| 12909 |
}; |
| 12910 |
|
| 12911 |
}); |
| 12912 |
} |
| 12913 |
|
| 12914 |
function isBlobText(body) { |
| 12915 |
return body.type.indexOf('text') === 0 || body.type.indexOf('json') !== -1; |
| 12916 |
} |
| 12917 |
|
| 12918 |
/** |
| 12919 |
* HTTP Request. |
| 12920 |
*/ |
| 12921 |
|
| 12922 |
var Request = function Request(options$$1) { |
| 12923 |
|
| 12924 |
this.body = null; |
| 12925 |
this.params = {}; |
| 12926 |
|
| 12927 |
assign(this, options$$1, { |
| 12928 |
method: toUpper(options$$1.method || 'GET') |
| 12929 |
}); |
| 12930 |
|
| 12931 |
if (!(this.headers instanceof Headers)) { |
| 12932 |
this.headers = new Headers(this.headers); |
| 12933 |
} |
| 12934 |
}; |
| 12935 |
|
| 12936 |
Request.prototype.getUrl = function getUrl () { |
| 12937 |
return Url(this); |
| 12938 |
}; |
| 12939 |
|
| 12940 |
Request.prototype.getBody = function getBody () { |
| 12941 |
return this.body; |
| 12942 |
}; |
| 12943 |
|
| 12944 |
Request.prototype.respondWith = function respondWith (body, options$$1) { |
| 12945 |
return new Response(body, assign(options$$1 || {}, {url: this.getUrl()})); |
| 12946 |
}; |
| 12947 |
|
| 12948 |
/** |
| 12949 |
* Service for sending network requests. |
| 12950 |
*/ |
| 12951 |
|
| 12952 |
var COMMON_HEADERS = {'Accept': 'application/json, text/plain, */*'}; |
| 12953 |
var JSON_CONTENT_TYPE = {'Content-Type': 'application/json;charset=utf-8'}; |
| 12954 |
|
| 12955 |
function Http(options$$1) { |
| 12956 |
|
| 12957 |
var self = this || {}, client = Client(self.$vm); |
| 12958 |
|
| 12959 |
defaults(options$$1 || {}, self.$options, Http.options); |
| 12960 |
|
| 12961 |
Http.interceptors.forEach(function (handler) { |
| 12962 |
|
| 12963 |
if (isString(handler)) { |
| 12964 |
handler = Http.interceptor[handler]; |
| 12965 |
} |
| 12966 |
|
| 12967 |
if (isFunction(handler)) { |
| 12968 |
client.use(handler); |
| 12969 |
} |
| 12970 |
|
| 12971 |
}); |
| 12972 |
|
| 12973 |
return client(new Request(options$$1)).then(function (response) { |
| 12974 |
|
| 12975 |
return response.ok ? response : PromiseObj.reject(response); |
| 12976 |
|
| 12977 |
}, function (response) { |
| 12978 |
|
| 12979 |
if (response instanceof Error) { |
| 12980 |
error(response); |
| 12981 |
} |
| 12982 |
|
| 12983 |
return PromiseObj.reject(response); |
| 12984 |
}); |
| 12985 |
} |
| 12986 |
|
| 12987 |
Http.options = {}; |
| 12988 |
|
| 12989 |
Http.headers = { |
| 12990 |
put: JSON_CONTENT_TYPE, |
| 12991 |
post: JSON_CONTENT_TYPE, |
| 12992 |
patch: JSON_CONTENT_TYPE, |
| 12993 |
delete: JSON_CONTENT_TYPE, |
| 12994 |
common: COMMON_HEADERS, |
| 12995 |
custom: {} |
| 12996 |
}; |
| 12997 |
|
| 12998 |
Http.interceptor = {before: before, method: method, jsonp: jsonp, json: json, form: form, header: header, cors: cors}; |
| 12999 |
Http.interceptors = ['before', 'method', 'jsonp', 'json', 'form', 'header', 'cors']; |
| 13000 |
|
| 13001 |
['get', 'delete', 'head', 'jsonp'].forEach(function (method$$1) { |
| 13002 |
|
| 13003 |
Http[method$$1] = function (url, options$$1) { |
| 13004 |
return this(assign(options$$1 || {}, {url: url, method: method$$1})); |
| 13005 |
}; |
| 13006 |
|
| 13007 |
}); |
| 13008 |
|
| 13009 |
['post', 'put', 'patch'].forEach(function (method$$1) { |
| 13010 |
|
| 13011 |
Http[method$$1] = function (url, body, options$$1) { |
| 13012 |
return this(assign(options$$1 || {}, {url: url, method: method$$1, body: body})); |
| 13013 |
}; |
| 13014 |
|
| 13015 |
}); |
| 13016 |
|
| 13017 |
/** |
| 13018 |
* Service for interacting with RESTful services. |
| 13019 |
*/ |
| 13020 |
|
| 13021 |
function Resource(url, params, actions, options$$1) { |
| 13022 |
|
| 13023 |
var self = this || {}, resource = {}; |
| 13024 |
|
| 13025 |
actions = assign({}, |
| 13026 |
Resource.actions, |
| 13027 |
actions |
| 13028 |
); |
| 13029 |
|
| 13030 |
each(actions, function (action, name) { |
| 13031 |
|
| 13032 |
action = merge({url: url, params: assign({}, params)}, options$$1, action); |
| 13033 |
|
| 13034 |
resource[name] = function () { |
| 13035 |
return (self.$http || Http)(opts(action, arguments)); |
| 13036 |
}; |
| 13037 |
}); |
| 13038 |
|
| 13039 |
return resource; |
| 13040 |
} |
| 13041 |
|
| 13042 |
function opts(action, args) { |
| 13043 |
|
| 13044 |
var options$$1 = assign({}, action), params = {}, body; |
| 13045 |
|
| 13046 |
switch (args.length) { |
| 13047 |
|
| 13048 |
case 2: |
| 13049 |
|
| 13050 |
params = args[0]; |
| 13051 |
body = args[1]; |
| 13052 |
|
| 13053 |
break; |
| 13054 |
|
| 13055 |
case 1: |
| 13056 |
|
| 13057 |
if (/^(POST|PUT|PATCH)$/i.test(options$$1.method)) { |
| 13058 |
body = args[0]; |
| 13059 |
} else { |
| 13060 |
params = args[0]; |
| 13061 |
} |
| 13062 |
|
| 13063 |
break; |
| 13064 |
|
| 13065 |
case 0: |
| 13066 |
|
| 13067 |
break; |
| 13068 |
|
| 13069 |
default: |
| 13070 |
|
| 13071 |
throw 'Expected up to 2 arguments [params, body], got ' + args.length + ' arguments'; |
| 13072 |
} |
| 13073 |
|
| 13074 |
options$$1.body = body; |
| 13075 |
options$$1.params = assign({}, options$$1.params, params); |
| 13076 |
|
| 13077 |
return options$$1; |
| 13078 |
} |
| 13079 |
|
| 13080 |
Resource.actions = { |
| 13081 |
|
| 13082 |
get: {method: 'GET'}, |
| 13083 |
save: {method: 'POST'}, |
| 13084 |
query: {method: 'GET'}, |
| 13085 |
update: {method: 'PUT'}, |
| 13086 |
remove: {method: 'DELETE'}, |
| 13087 |
delete: {method: 'DELETE'} |
| 13088 |
|
| 13089 |
}; |
| 13090 |
|
| 13091 |
/** |
| 13092 |
* Install plugin. |
| 13093 |
*/ |
| 13094 |
|
| 13095 |
function plugin(Vue) { |
| 13096 |
|
| 13097 |
if (plugin.installed) { |
| 13098 |
return; |
| 13099 |
} |
| 13100 |
|
| 13101 |
Util(Vue); |
| 13102 |
|
| 13103 |
Vue.url = Url; |
| 13104 |
Vue.http = Http; |
| 13105 |
Vue.resource = Resource; |
| 13106 |
Vue.Promise = PromiseObj; |
| 13107 |
|
| 13108 |
Object.defineProperties(Vue.prototype, { |
| 13109 |
|
| 13110 |
$url: { |
| 13111 |
get: function get() { |
| 13112 |
return options(Vue.url, this, this.$options.url); |
| 13113 |
} |
| 13114 |
}, |
| 13115 |
|
| 13116 |
$http: { |
| 13117 |
get: function get() { |
| 13118 |
return options(Vue.http, this, this.$options.http); |
| 13119 |
} |
| 13120 |
}, |
| 13121 |
|
| 13122 |
$resource: { |
| 13123 |
get: function get() { |
| 13124 |
return Vue.resource.bind(this); |
| 13125 |
} |
| 13126 |
}, |
| 13127 |
|
| 13128 |
$promise: { |
| 13129 |
get: function get() { |
| 13130 |
var this$1 = this; |
| 13131 |
|
| 13132 |
return function (executor) { return new Vue.Promise(executor, this$1); }; |
| 13133 |
} |
| 13134 |
} |
| 13135 |
|
| 13136 |
}); |
| 13137 |
} |
| 13138 |
|
| 13139 |
if (typeof window !== 'undefined' && window.Vue) { |
| 13140 |
window.Vue.use(plugin); |
| 13141 |
} |
| 13142 |
|
| 13143 |
/* harmony default export */ __webpack_exports__["default"] = (plugin); |
| 13144 |
|
| 13145 |
|
| 13146 |
|
| 13147 |
/***/ }), |
| 13148 |
/* 7 */ |
| 13149 |
/***/ (function(module, exports, __webpack_require__) { |
| 13150 |
|
| 13151 |
"use strict"; |
| 13152 |
|
| 13153 |
|
| 13154 |
var _vue = __webpack_require__(2); |
| 13155 |
|
| 13156 |
var _vue2 = _interopRequireDefault(_vue); |
| 13157 |
|
| 13158 |
var _main = __webpack_require__(10); |
| 13159 |
|
| 13160 |
var _main2 = _interopRequireDefault(_main); |
| 13161 |
|
| 13162 |
var _store = __webpack_require__(47); |
| 13163 |
|
| 13164 |
var _store2 = _interopRequireDefault(_store); |
| 13165 |
|
| 13166 |
var _vueResize = __webpack_require__(52); |
| 13167 |
|
| 13168 |
var _vueResize2 = _interopRequireDefault(_vueResize); |
| 13169 |
|
| 13170 |
var _vueJsToggleButton = __webpack_require__(53); |
| 13171 |
|
| 13172 |
var _vueJsToggleButton2 = _interopRequireDefault(_vueJsToggleButton); |
| 13173 |
|
| 13174 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
| 13175 |
|
| 13176 |
_vue2.default.use(_vueJsToggleButton2.default); /*jshint esversion: 6 */ |
| 13177 |
|
| 13178 |
|
| 13179 |
_vue2.default.use(_vueResize2.default); |
| 13180 |
|
| 13181 |
window.onload = function () { |
| 13182 |
new _vue2.default({ |
| 13183 |
el: '#optimole-app', |
| 13184 |
store: _store2.default, |
| 13185 |
components: { |
| 13186 |
App: _main2.default |
| 13187 |
} |
| 13188 |
}); |
| 13189 |
}; |
| 13190 |
|
| 13191 |
/***/ }), |
| 13192 |
/* 8 */ |
| 13193 |
/***/ (function(module, exports, __webpack_require__) { |
| 13194 |
|
| 13195 |
/* WEBPACK VAR INJECTION */(function(global) {var scope = (typeof global !== "undefined" && global) || |
| 13196 |
(typeof self !== "undefined" && self) || |
| 13197 |
window; |
| 13198 |
var apply = Function.prototype.apply; |
| 13199 |
|
| 13200 |
// DOM APIs, for completeness |
| 13201 |
|
| 13202 |
exports.setTimeout = function() { |
| 13203 |
return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout); |
| 13204 |
}; |
| 13205 |
exports.setInterval = function() { |
| 13206 |
return new Timeout(apply.call(setInterval, scope, arguments), clearInterval); |
| 13207 |
}; |
| 13208 |
exports.clearTimeout = |
| 13209 |
exports.clearInterval = function(timeout) { |
| 13210 |
if (timeout) { |
| 13211 |
timeout.close(); |
| 13212 |
} |
| 13213 |
}; |
| 13214 |
|
| 13215 |
function Timeout(id, clearFn) { |
| 13216 |
this._id = id; |
| 13217 |
this._clearFn = clearFn; |
| 13218 |
} |
| 13219 |
Timeout.prototype.unref = Timeout.prototype.ref = function() {}; |
| 13220 |
Timeout.prototype.close = function() { |
| 13221 |
this._clearFn.call(scope, this._id); |
| 13222 |
}; |
| 13223 |
|
| 13224 |
// Does not start the time, just sets up the members needed. |
| 13225 |
exports.enroll = function(item, msecs) { |
| 13226 |
clearTimeout(item._idleTimeoutId); |
| 13227 |
item._idleTimeout = msecs; |
| 13228 |
}; |
| 13229 |
|
| 13230 |
exports.unenroll = function(item) { |
| 13231 |
clearTimeout(item._idleTimeoutId); |
| 13232 |
item._idleTimeout = -1; |
| 13233 |
}; |
| 13234 |
|
| 13235 |
exports._unrefActive = exports.active = function(item) { |
| 13236 |
clearTimeout(item._idleTimeoutId); |
| 13237 |
|
| 13238 |
var msecs = item._idleTimeout; |
| 13239 |
if (msecs >= 0) { |
| 13240 |
item._idleTimeoutId = setTimeout(function onTimeout() { |
| 13241 |
if (item._onTimeout) |
| 13242 |
item._onTimeout(); |
| 13243 |
}, msecs); |
| 13244 |
} |
| 13245 |
}; |
| 13246 |
|
| 13247 |
// setimmediate attaches itself to the global object |
| 13248 |
__webpack_require__(9); |
| 13249 |
// On some exotic environments, it's not clear which object `setimmediate` was |
| 13250 |
// able to install onto. Search each possibility in the same order as the |
| 13251 |
// `setimmediate` library. |
| 13252 |
exports.setImmediate = (typeof self !== "undefined" && self.setImmediate) || |
| 13253 |
(typeof global !== "undefined" && global.setImmediate) || |
| 13254 |
(this && this.setImmediate); |
| 13255 |
exports.clearImmediate = (typeof self !== "undefined" && self.clearImmediate) || |
| 13256 |
(typeof global !== "undefined" && global.clearImmediate) || |
| 13257 |
(this && this.clearImmediate); |
| 13258 |
|
| 13259 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3))) |
| 13260 |
|
| 13261 |
/***/ }), |
| 13262 |
/* 9 */ |
| 13263 |
/***/ (function(module, exports, __webpack_require__) { |
| 13264 |
|
| 13265 |
/* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) { |
| 13266 |
"use strict"; |
| 13267 |
|
| 13268 |
if (global.setImmediate) { |
| 13269 |
return; |
| 13270 |
} |
| 13271 |
|
| 13272 |
var nextHandle = 1; // Spec says greater than zero |
| 13273 |
var tasksByHandle = {}; |
| 13274 |
var currentlyRunningATask = false; |
| 13275 |
var doc = global.document; |
| 13276 |
var registerImmediate; |
| 13277 |
|
| 13278 |
function setImmediate(callback) { |
| 13279 |
// Callback can either be a function or a string |
| 13280 |
if (typeof callback !== "function") { |
| 13281 |
callback = new Function("" + callback); |
| 13282 |
} |
| 13283 |
// Copy function arguments |
| 13284 |
var args = new Array(arguments.length - 1); |
| 13285 |
for (var i = 0; i < args.length; i++) { |
| 13286 |
args[i] = arguments[i + 1]; |
| 13287 |
} |
| 13288 |
// Store and register the task |
| 13289 |
var task = { callback: callback, args: args }; |
| 13290 |
tasksByHandle[nextHandle] = task; |
| 13291 |
registerImmediate(nextHandle); |
| 13292 |
return nextHandle++; |
| 13293 |
} |
| 13294 |
|
| 13295 |
function clearImmediate(handle) { |
| 13296 |
delete tasksByHandle[handle]; |
| 13297 |
} |
| 13298 |
|
| 13299 |
function run(task) { |
| 13300 |
var callback = task.callback; |
| 13301 |
var args = task.args; |
| 13302 |
switch (args.length) { |
| 13303 |
case 0: |
| 13304 |
callback(); |
| 13305 |
break; |
| 13306 |
case 1: |
| 13307 |
callback(args[0]); |
| 13308 |
break; |
| 13309 |
case 2: |
| 13310 |
callback(args[0], args[1]); |
| 13311 |
break; |
| 13312 |
case 3: |
| 13313 |
callback(args[0], args[1], args[2]); |
| 13314 |
break; |
| 13315 |
default: |
| 13316 |
callback.apply(undefined, args); |
| 13317 |
break; |
| 13318 |
} |
| 13319 |
} |
| 13320 |
|
| 13321 |
function runIfPresent(handle) { |
| 13322 |
// From the spec: "Wait until any invocations of this algorithm started before this one have completed." |
| 13323 |
// So if we're currently running a task, we'll need to delay this invocation. |
| 13324 |
if (currentlyRunningATask) { |
| 13325 |
// Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a |
| 13326 |
// "too much recursion" error. |
| 13327 |
setTimeout(runIfPresent, 0, handle); |
| 13328 |
} else { |
| 13329 |
var task = tasksByHandle[handle]; |
| 13330 |
if (task) { |
| 13331 |
currentlyRunningATask = true; |
| 13332 |
try { |
| 13333 |
run(task); |
| 13334 |
} finally { |
| 13335 |
clearImmediate(handle); |
| 13336 |
currentlyRunningATask = false; |
| 13337 |
} |
| 13338 |
} |
| 13339 |
} |
| 13340 |
} |
| 13341 |
|
| 13342 |
function installNextTickImplementation() { |
| 13343 |
registerImmediate = function(handle) { |
| 13344 |
process.nextTick(function () { runIfPresent(handle); }); |
| 13345 |
}; |
| 13346 |
} |
| 13347 |
|
| 13348 |
function canUsePostMessage() { |
| 13349 |
// The test against `importScripts` prevents this implementation from being installed inside a web worker, |
| 13350 |
// where `global.postMessage` means something completely different and can't be used for this purpose. |
| 13351 |
if (global.postMessage && !global.importScripts) { |
| 13352 |
var postMessageIsAsynchronous = true; |
| 13353 |
var oldOnMessage = global.onmessage; |
| 13354 |
global.onmessage = function() { |
| 13355 |
postMessageIsAsynchronous = false; |
| 13356 |
}; |
| 13357 |
global.postMessage("", "*"); |
| 13358 |
global.onmessage = oldOnMessage; |
| 13359 |
return postMessageIsAsynchronous; |
| 13360 |
} |
| 13361 |
} |
| 13362 |
|
| 13363 |
function installPostMessageImplementation() { |
| 13364 |
// Installs an event handler on `global` for the `message` event: see |
| 13365 |
// * https://developer.mozilla.org/en/DOM/window.postMessage |
| 13366 |
// * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages |
| 13367 |
|
| 13368 |
var messagePrefix = "setImmediate$" + Math.random() + "$"; |
| 13369 |
var onGlobalMessage = function(event) { |
| 13370 |
if (event.source === global && |
| 13371 |
typeof event.data === "string" && |
| 13372 |
event.data.indexOf(messagePrefix) === 0) { |
| 13373 |
runIfPresent(+event.data.slice(messagePrefix.length)); |
| 13374 |
} |
| 13375 |
}; |
| 13376 |
|
| 13377 |
if (global.addEventListener) { |
| 13378 |
global.addEventListener("message", onGlobalMessage, false); |
| 13379 |
} else { |
| 13380 |
global.attachEvent("onmessage", onGlobalMessage); |
| 13381 |
} |
| 13382 |
|
| 13383 |
registerImmediate = function(handle) { |
| 13384 |
global.postMessage(messagePrefix + handle, "*"); |
| 13385 |
}; |
| 13386 |
} |
| 13387 |
|
| 13388 |
function installMessageChannelImplementation() { |
| 13389 |
var channel = new MessageChannel(); |
| 13390 |
channel.port1.onmessage = function(event) { |
| 13391 |
var handle = event.data; |
| 13392 |
runIfPresent(handle); |
| 13393 |
}; |
| 13394 |
|
| 13395 |
registerImmediate = function(handle) { |
| 13396 |
channel.port2.postMessage(handle); |
| 13397 |
}; |
| 13398 |
} |
| 13399 |
|
| 13400 |
function installReadyStateChangeImplementation() { |
| 13401 |
var html = doc.documentElement; |
| 13402 |
registerImmediate = function(handle) { |
| 13403 |
// Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted |
| 13404 |
// into the document. Do so, thus queuing up the task. Remember to clean up once it's been called. |
| 13405 |
var script = doc.createElement("script"); |
| 13406 |
script.onreadystatechange = function () { |
| 13407 |
runIfPresent(handle); |
| 13408 |
script.onreadystatechange = null; |
| 13409 |
html.removeChild(script); |
| 13410 |
script = null; |
| 13411 |
}; |
| 13412 |
html.appendChild(script); |
| 13413 |
}; |
| 13414 |
} |
| 13415 |
|
| 13416 |
function installSetTimeoutImplementation() { |
| 13417 |
registerImmediate = function(handle) { |
| 13418 |
setTimeout(runIfPresent, 0, handle); |
| 13419 |
}; |
| 13420 |
} |
| 13421 |
|
| 13422 |
// If supported, we should attach to the prototype of global, since that is where setTimeout et al. live. |
| 13423 |
var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global); |
| 13424 |
attachTo = attachTo && attachTo.setTimeout ? attachTo : global; |
| 13425 |
|
| 13426 |
// Don't get fooled by e.g. browserify environments. |
| 13427 |
if ({}.toString.call(global.process) === "[object process]") { |
| 13428 |
// For Node.js before 0.9 |
| 13429 |
installNextTickImplementation(); |
| 13430 |
|
| 13431 |
} else if (canUsePostMessage()) { |
| 13432 |
// For non-IE10 modern browsers |
| 13433 |
installPostMessageImplementation(); |
| 13434 |
|
| 13435 |
} else if (global.MessageChannel) { |
| 13436 |
// For web workers, where supported |
| 13437 |
installMessageChannelImplementation(); |
| 13438 |
|
| 13439 |
} else if (doc && "onreadystatechange" in doc.createElement("script")) { |
| 13440 |
// For IE 6–8 |
| 13441 |
installReadyStateChangeImplementation(); |
| 13442 |
|
| 13443 |
} else { |
| 13444 |
// For older browsers |
| 13445 |
installSetTimeoutImplementation(); |
| 13446 |
} |
| 13447 |
|
| 13448 |
attachTo.setImmediate = setImmediate; |
| 13449 |
attachTo.clearImmediate = clearImmediate; |
| 13450 |
}(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self)); |
| 13451 |
|
| 13452 |
/* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(3), __webpack_require__(4))) |
| 13453 |
|
| 13454 |
/***/ }), |
| 13455 |
/* 10 */ |
| 13456 |
/***/ (function(module, exports, __webpack_require__) { |
| 13457 |
|
| 13458 |
var __vue_script__, __vue_template__ |
| 13459 |
__webpack_require__(11) |
| 13460 |
__vue_script__ = __webpack_require__(13) |
| 13461 |
__vue_template__ = __webpack_require__(46) |
| 13462 |
module.exports = __vue_script__ || {} |
| 13463 |
if (module.exports.__esModule) module.exports = module.exports.default |
| 13464 |
if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ } |
| 13465 |
if (false) {(function () { module.hot.accept() |
| 13466 |
var hotAPI = require("vue-hot-reload-api") |
| 13467 |
hotAPI.install(require("vue"), true) |
| 13468 |
if (!hotAPI.compatible) return |
| 13469 |
var id = "D:\\local\\optimolewp\\app\\public\\wp-content\\plugins\\optimole-wp\\assets\\vue\\components\\main.vue" |
| 13470 |
if (!module.hot.data) { |
| 13471 |
hotAPI.createRecord(id, module.exports) |
| 13472 |
} else { |
| 13473 |
hotAPI.update(id, module.exports, __vue_template__) |
| 13474 |
} |
| 13475 |
})()} |
| 13476 |
|
| 13477 |
/***/ }), |
| 13478 |
/* 11 */ |
| 13479 |
/***/ (function(module, exports, __webpack_require__) { |
| 13480 |
|
| 13481 |
// style-loader: Adds some css to the DOM by adding a <style> tag |
| 13482 |
|
| 13483 |
// load the styles |
| 13484 |
var content = __webpack_require__(12); |
| 13485 |
if(typeof content === 'string') content = [[module.i, content, '']]; |
| 13486 |
// add the styles to the DOM |
| 13487 |
var update = __webpack_require__(1)(content, {}); |
| 13488 |
if(content.locals) module.exports = content.locals; |
| 13489 |
// Hot Module Replacement |
| 13490 |
if(false) { |
| 13491 |
// When the styles change, update the <style> tags |
| 13492 |
if(!content.locals) { |
| 13493 |
module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-0911b1fb&file=main.vue!../../../node_modules/sass-loader/lib/loader.js!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./main.vue", function() { |
| 13494 |
var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-0911b1fb&file=main.vue!../../../node_modules/sass-loader/lib/loader.js!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./main.vue"); |
| 13495 |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; |
| 13496 |
update(newContent); |
| 13497 |
}); |
| 13498 |
} |
| 13499 |
// When the module is disposed, remove the <style> tags |
| 13500 |
module.hot.dispose(function() { update(); }); |
| 13501 |
} |
| 13502 |
|
| 13503 |
/***/ }), |
| 13504 |
/* 12 */ |
| 13505 |
/***/ (function(module, exports, __webpack_require__) { |
| 13506 |
|
| 13507 |
exports = module.exports = __webpack_require__(0)(); |
| 13508 |
// imports |
| 13509 |
|
| 13510 |
|
| 13511 |
// module |
| 13512 |
exports.push([module.i, "#optimole-app {\n padding: 0 30px 0 20px;\n /*! bulma.io v0.7.1 | MIT License | github.com/jgthms/bulma */\n /*! minireset.css v0.0.3 | MIT License | github.com/jgthms/minireset.css */ }\n\n@keyframes spinAround {\n from {\n transform: rotate(0deg); }\n to {\n transform: rotate(359deg); } }\n #optimole-app .delete, #optimole-app .modal-close, #optimole-app .is-unselectable, #optimole-app .button, #optimole-app .file, #optimole-app .breadcrumb, #optimole-app .pagination-previous,\n #optimole-app .pagination-next,\n #optimole-app .pagination-link,\n #optimole-app .pagination-ellipsis, #optimole-app .tabs {\n -webkit-touch-callout: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none; }\n #optimole-app .select:not(.is-multiple):not(.is-loading)::after, #optimole-app .navbar-link::after {\n border: 3px solid transparent;\n border-radius: 2px;\n border-right: 0;\n border-top: 0;\n content: \" \";\n display: block;\n height: 0.625em;\n margin-top: -0.4375em;\n pointer-events: none;\n position: absolute;\n top: 50%;\n transform: rotate(-45deg);\n transform-origin: center;\n width: 0.625em; }\n #optimole-app .box:not(:last-child), #optimole-app .content:not(:last-child), #optimole-app .notification:not(:last-child), #optimole-app .progress:not(:last-child), #optimole-app .table:not(:last-child), #optimole-app .table-container:not(:last-child), #optimole-app .title:not(:last-child),\n #optimole-app .subtitle:not(:last-child), #optimole-app .block:not(:last-child), #optimole-app .highlight:not(:last-child), #optimole-app .breadcrumb:not(:last-child), #optimole-app .level:not(:last-child), #optimole-app .message:not(:last-child), #optimole-app .tabs:not(:last-child) {\n margin-bottom: 1.5rem; }\n #optimole-app .delete, #optimole-app .modal-close {\n -moz-appearance: none;\n -webkit-appearance: none;\n background-color: rgba(10, 10, 10, 0.2);\n border: none;\n border-radius: 290486px;\n cursor: pointer;\n display: inline-block;\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n font-size: 0;\n height: 20px;\n max-height: 20px;\n max-width: 20px;\n min-height: 20px;\n min-width: 20px;\n outline: none;\n position: relative;\n vertical-align: top;\n width: 20px; }\n #optimole-app .delete::before, #optimole-app .modal-close::before, #optimole-app .delete::after, #optimole-app .modal-close::after {\n background-color: white;\n content: \"\";\n display: block;\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n transform-origin: center center; }\n #optimole-app .delete::before, #optimole-app .modal-close::before {\n height: 2px;\n width: 50%; }\n #optimole-app .delete::after, #optimole-app .modal-close::after {\n height: 50%;\n width: 2px; }\n #optimole-app .delete:hover, #optimole-app .modal-close:hover, #optimole-app .delete:focus, #optimole-app .modal-close:focus {\n background-color: rgba(10, 10, 10, 0.3); }\n #optimole-app .delete:active, #optimole-app .modal-close:active {\n background-color: rgba(10, 10, 10, 0.4); }\n #optimole-app .is-small.delete, #optimole-app .is-small.modal-close {\n height: 16px;\n max-height: 16px;\n max-width: 16px;\n min-height: 16px;\n min-width: 16px;\n width: 16px; }\n #optimole-app .is-medium.delete, #optimole-app .is-medium.modal-close {\n height: 24px;\n max-height: 24px;\n max-width: 24px;\n min-height: 24px;\n min-width: 24px;\n width: 24px; }\n #optimole-app .is-large.delete, #optimole-app .is-large.modal-close {\n height: 32px;\n max-height: 32px;\n max-width: 32px;\n min-height: 32px;\n min-width: 32px;\n width: 32px; }\n #optimole-app .button.is-loading::after, #optimole-app .select.is-loading::after, #optimole-app .control.is-loading::after, #optimole-app .loader {\n animation: spinAround 500ms infinite linear;\n border: 2px solid #dbdbdb;\n border-radius: 290486px;\n border-right-color: transparent;\n border-top-color: transparent;\n content: \"\";\n display: block;\n height: 1em;\n position: relative;\n width: 1em; }\n #optimole-app .is-overlay, #optimole-app .image.is-square img, #optimole-app .image.is-1by1 img, #optimole-app .image.is-5by4 img, #optimole-app .image.is-4by3 img, #optimole-app .image.is-3by2 img, #optimole-app .image.is-5by3 img, #optimole-app .image.is-16by9 img, #optimole-app .image.is-2by1 img, #optimole-app .image.is-3by1 img, #optimole-app .image.is-4by5 img, #optimole-app .image.is-3by4 img, #optimole-app .image.is-2by3 img, #optimole-app .image.is-3by5 img, #optimole-app .image.is-9by16 img, #optimole-app .image.is-1by2 img, #optimole-app .image.is-1by3 img, #optimole-app .modal, #optimole-app .modal-background, #optimole-app .hero-video {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0; }\n #optimole-app .button, #optimole-app .input,\n #optimole-app .textarea, #optimole-app .select select, #optimole-app .file-cta,\n #optimole-app .file-name, #optimole-app .pagination-previous,\n #optimole-app .pagination-next,\n #optimole-app .pagination-link,\n #optimole-app .pagination-ellipsis {\n -moz-appearance: none;\n -webkit-appearance: none;\n -ms-flex-align: center;\n align-items: center;\n border: 1px solid transparent;\n border-radius: 4px;\n box-shadow: none;\n display: -ms-inline-flexbox;\n display: inline-flex;\n font-size: 1rem;\n height: 2.25em;\n -ms-flex-pack: start;\n justify-content: flex-start;\n line-height: 1.5;\n padding-bottom: calc(0.375em - 1px);\n padding-left: calc(0.625em - 1px);\n padding-right: calc(0.625em - 1px);\n padding-top: calc(0.375em - 1px);\n position: relative;\n vertical-align: top; }\n #optimole-app .button:focus, #optimole-app .input:focus,\n #optimole-app .textarea:focus, #optimole-app .select select:focus, #optimole-app .file-cta:focus,\n #optimole-app .file-name:focus, #optimole-app .pagination-previous:focus,\n #optimole-app .pagination-next:focus,\n #optimole-app .pagination-link:focus,\n #optimole-app .pagination-ellipsis:focus, #optimole-app .is-focused.button, #optimole-app .is-focused.input,\n #optimole-app .is-focused.textarea, #optimole-app .select select.is-focused, #optimole-app .is-focused.file-cta,\n #optimole-app .is-focused.file-name, #optimole-app .is-focused.pagination-previous,\n #optimole-app .is-focused.pagination-next,\n #optimole-app .is-focused.pagination-link,\n #optimole-app .is-focused.pagination-ellipsis, #optimole-app .button:active, #optimole-app .input:active,\n #optimole-app .textarea:active, #optimole-app .select select:active, #optimole-app .file-cta:active,\n #optimole-app .file-name:active, #optimole-app .pagination-previous:active,\n #optimole-app .pagination-next:active,\n #optimole-app .pagination-link:active,\n #optimole-app .pagination-ellipsis:active, #optimole-app .is-active.button, #optimole-app .is-active.input,\n #optimole-app .is-active.textarea, #optimole-app .select select.is-active, #optimole-app .is-active.file-cta,\n #optimole-app .is-active.file-name, #optimole-app .is-active.pagination-previous,\n #optimole-app .is-active.pagination-next,\n #optimole-app .is-active.pagination-link,\n #optimole-app .is-active.pagination-ellipsis {\n outline: none; }\n #optimole-app .button[disabled], #optimole-app .input[disabled],\n #optimole-app .textarea[disabled], #optimole-app .select select[disabled], #optimole-app .file-cta[disabled],\n #optimole-app .file-name[disabled], #optimole-app .pagination-previous[disabled],\n #optimole-app .pagination-next[disabled],\n #optimole-app .pagination-link[disabled],\n #optimole-app .pagination-ellipsis[disabled] {\n cursor: not-allowed; }\n #optimole-app html,\n #optimole-app body,\n #optimole-app p,\n #optimole-app ol,\n #optimole-app ul,\n #optimole-app li,\n #optimole-app dl,\n #optimole-app dt,\n #optimole-app dd,\n #optimole-app blockquote,\n #optimole-app figure,\n #optimole-app fieldset,\n #optimole-app legend,\n #optimole-app textarea,\n #optimole-app pre,\n #optimole-app iframe,\n #optimole-app hr,\n #optimole-app h1,\n #optimole-app h2,\n #optimole-app h3,\n #optimole-app h4,\n #optimole-app h5,\n #optimole-app h6 {\n margin: 0;\n padding: 0; }\n #optimole-app h1,\n #optimole-app h2,\n #optimole-app h3,\n #optimole-app h4,\n #optimole-app h5,\n #optimole-app h6 {\n font-size: 100%;\n font-weight: normal; }\n #optimole-app ul {\n list-style: none; }\n #optimole-app button,\n #optimole-app input,\n #optimole-app select,\n #optimole-app textarea {\n margin: 0; }\n #optimole-app html {\n box-sizing: border-box; }\n #optimole-app *, #optimole-app *::before, #optimole-app *::after {\n box-sizing: inherit; }\n #optimole-app img,\n #optimole-app audio,\n #optimole-app video {\n height: auto;\n max-width: 100%; }\n #optimole-app iframe {\n border: 0; }\n #optimole-app table {\n border-collapse: collapse;\n border-spacing: 0; }\n #optimole-app td,\n #optimole-app th {\n padding: 0;\n text-align: left; }\n #optimole-app html {\n background-color: white;\n font-size: 16px;\n -moz-osx-font-smoothing: grayscale;\n -webkit-font-smoothing: antialiased;\n min-width: 300px;\n overflow-x: hidden;\n overflow-y: scroll;\n text-rendering: optimizeLegibility;\n -webkit-text-size-adjust: 100%;\n -ms-text-size-adjust: 100%;\n text-size-adjust: 100%; }\n #optimole-app article,\n #optimole-app aside,\n #optimole-app figure,\n #optimole-app footer,\n #optimole-app header,\n #optimole-app hgroup,\n #optimole-app section {\n display: block; }\n #optimole-app body,\n #optimole-app button,\n #optimole-app input,\n #optimole-app select,\n #optimole-app textarea {\n font-family: BlinkMacSystemFont, -apple-system, \"Segoe UI\", \"Roboto\", \"Oxygen\", \"Ubuntu\", \"Cantarell\", \"Fira Sans\", \"Droid Sans\", \"Helvetica Neue\", \"Helvetica\", \"Arial\", sans-serif; }\n #optimole-app code,\n #optimole-app pre {\n -moz-osx-font-smoothing: auto;\n -webkit-font-smoothing: auto;\n font-family: monospace; }\n #optimole-app body {\n color: #4a4a4a;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5; }\n #optimole-app a {\n color: #3273dc;\n cursor: pointer;\n text-decoration: none; }\n #optimole-app a strong {\n color: currentColor; }\n #optimole-app a:hover {\n color: #363636; }\n #optimole-app code {\n background-color: whitesmoke;\n color: #ff3860;\n font-size: 0.875em;\n font-weight: normal;\n padding: 0.25em 0.5em 0.25em; }\n #optimole-app hr {\n background-color: whitesmoke;\n border: none;\n display: block;\n height: 2px;\n margin: 1.5rem 0; }\n #optimole-app img {\n height: auto;\n max-width: 100%; }\n #optimole-app input[type=\"checkbox\"],\n #optimole-app input[type=\"radio\"] {\n vertical-align: baseline; }\n #optimole-app small {\n font-size: 0.875em; }\n #optimole-app span {\n font-style: inherit;\n font-weight: inherit; }\n #optimole-app strong {\n color: #363636;\n font-weight: 700; }\n #optimole-app pre {\n -webkit-overflow-scrolling: touch;\n background-color: whitesmoke;\n color: #4a4a4a;\n font-size: 0.875em;\n overflow-x: auto;\n padding: 1.25rem 1.5rem;\n white-space: pre;\n word-wrap: normal; }\n #optimole-app pre code {\n background-color: transparent;\n color: currentColor;\n font-size: 1em;\n padding: 0; }\n #optimole-app table td,\n #optimole-app table th {\n text-align: left;\n vertical-align: top; }\n #optimole-app table th {\n color: #363636; }\n #optimole-app .is-clearfix::after {\n clear: both;\n content: \" \";\n display: table; }\n #optimole-app .is-pulled-left {\n float: left !important; }\n #optimole-app .is-pulled-right {\n float: right !important; }\n #optimole-app .is-clipped {\n overflow: hidden !important; }\n #optimole-app .is-size-1 {\n font-size: 3rem !important; }\n #optimole-app .is-size-2 {\n font-size: 2.5rem !important; }\n #optimole-app .is-size-3 {\n font-size: 2rem !important; }\n #optimole-app .is-size-4 {\n font-size: 1.5rem !important; }\n #optimole-app .is-size-5 {\n font-size: 1.25rem !important; }\n #optimole-app .is-size-6 {\n font-size: 1rem !important; }\n #optimole-app .is-size-7 {\n font-size: 0.75rem !important; }\n @media screen and (max-width: 768px) {\n #optimole-app .is-size-1-mobile {\n font-size: 3rem !important; }\n #optimole-app .is-size-2-mobile {\n font-size: 2.5rem !important; }\n #optimole-app .is-size-3-mobile {\n font-size: 2rem !important; }\n #optimole-app .is-size-4-mobile {\n font-size: 1.5rem !important; }\n #optimole-app .is-size-5-mobile {\n font-size: 1.25rem !important; }\n #optimole-app .is-size-6-mobile {\n font-size: 1rem !important; }\n #optimole-app .is-size-7-mobile {\n font-size: 0.75rem !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .is-size-1-tablet {\n font-size: 3rem !important; }\n #optimole-app .is-size-2-tablet {\n font-size: 2.5rem !important; }\n #optimole-app .is-size-3-tablet {\n font-size: 2rem !important; }\n #optimole-app .is-size-4-tablet {\n font-size: 1.5rem !important; }\n #optimole-app .is-size-5-tablet {\n font-size: 1.25rem !important; }\n #optimole-app .is-size-6-tablet {\n font-size: 1rem !important; }\n #optimole-app .is-size-7-tablet {\n font-size: 0.75rem !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .is-size-1-touch {\n font-size: 3rem !important; }\n #optimole-app .is-size-2-touch {\n font-size: 2.5rem !important; }\n #optimole-app .is-size-3-touch {\n font-size: 2rem !important; }\n #optimole-app .is-size-4-touch {\n font-size: 1.5rem !important; }\n #optimole-app .is-size-5-touch {\n font-size: 1.25rem !important; }\n #optimole-app .is-size-6-touch {\n font-size: 1rem !important; }\n #optimole-app .is-size-7-touch {\n font-size: 0.75rem !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .is-size-1-desktop {\n font-size: 3rem !important; }\n #optimole-app .is-size-2-desktop {\n font-size: 2.5rem !important; }\n #optimole-app .is-size-3-desktop {\n font-size: 2rem !important; }\n #optimole-app .is-size-4-desktop {\n font-size: 1.5rem !important; }\n #optimole-app .is-size-5-desktop {\n font-size: 1.25rem !important; }\n #optimole-app .is-size-6-desktop {\n font-size: 1rem !important; }\n #optimole-app .is-size-7-desktop {\n font-size: 0.75rem !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .is-size-1-widescreen {\n font-size: 3rem !important; }\n #optimole-app .is-size-2-widescreen {\n font-size: 2.5rem !important; }\n #optimole-app .is-size-3-widescreen {\n font-size: 2rem !important; }\n #optimole-app .is-size-4-widescreen {\n font-size: 1.5rem !important; }\n #optimole-app .is-size-5-widescreen {\n font-size: 1.25rem !important; }\n #optimole-app .is-size-6-widescreen {\n font-size: 1rem !important; }\n #optimole-app .is-size-7-widescreen {\n font-size: 0.75rem !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .is-size-1-fullhd {\n font-size: 3rem !important; }\n #optimole-app .is-size-2-fullhd {\n font-size: 2.5rem !important; }\n #optimole-app .is-size-3-fullhd {\n font-size: 2rem !important; }\n #optimole-app .is-size-4-fullhd {\n font-size: 1.5rem !important; }\n #optimole-app .is-size-5-fullhd {\n font-size: 1.25rem !important; }\n #optimole-app .is-size-6-fullhd {\n font-size: 1rem !important; }\n #optimole-app .is-size-7-fullhd {\n font-size: 0.75rem !important; } }\n #optimole-app .has-text-centered {\n text-align: center !important; }\n #optimole-app .has-text-justified {\n text-align: justify !important; }\n #optimole-app .has-text-left {\n text-align: left !important; }\n #optimole-app .has-text-right {\n text-align: right !important; }\n @media screen and (max-width: 768px) {\n #optimole-app .has-text-centered-mobile {\n text-align: center !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .has-text-centered-tablet {\n text-align: center !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .has-text-centered-tablet-only {\n text-align: center !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .has-text-centered-touch {\n text-align: center !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .has-text-centered-desktop {\n text-align: center !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .has-text-centered-desktop-only {\n text-align: center !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .has-text-centered-widescreen {\n text-align: center !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .has-text-centered-widescreen-only {\n text-align: center !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .has-text-centered-fullhd {\n text-align: center !important; } }\n @media screen and (max-width: 768px) {\n #optimole-app .has-text-justified-mobile {\n text-align: justify !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .has-text-justified-tablet {\n text-align: justify !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .has-text-justified-tablet-only {\n text-align: justify !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .has-text-justified-touch {\n text-align: justify !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .has-text-justified-desktop {\n text-align: justify !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .has-text-justified-desktop-only {\n text-align: justify !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .has-text-justified-widescreen {\n text-align: justify !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .has-text-justified-widescreen-only {\n text-align: justify !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .has-text-justified-fullhd {\n text-align: justify !important; } }\n @media screen and (max-width: 768px) {\n #optimole-app .has-text-left-mobile {\n text-align: left !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .has-text-left-tablet {\n text-align: left !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .has-text-left-tablet-only {\n text-align: left !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .has-text-left-touch {\n text-align: left !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .has-text-left-desktop {\n text-align: left !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .has-text-left-desktop-only {\n text-align: left !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .has-text-left-widescreen {\n text-align: left !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .has-text-left-widescreen-only {\n text-align: left !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .has-text-left-fullhd {\n text-align: left !important; } }\n @media screen and (max-width: 768px) {\n #optimole-app .has-text-right-mobile {\n text-align: right !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .has-text-right-tablet {\n text-align: right !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .has-text-right-tablet-only {\n text-align: right !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .has-text-right-touch {\n text-align: right !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .has-text-right-desktop {\n text-align: right !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .has-text-right-desktop-only {\n text-align: right !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .has-text-right-widescreen {\n text-align: right !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .has-text-right-widescreen-only {\n text-align: right !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .has-text-right-fullhd {\n text-align: right !important; } }\n #optimole-app .is-capitalized {\n text-transform: capitalize !important; }\n #optimole-app .is-lowercase {\n text-transform: lowercase !important; }\n #optimole-app .is-uppercase {\n text-transform: uppercase !important; }\n #optimole-app .is-italic {\n font-style: italic !important; }\n #optimole-app .has-text-white {\n color: white !important; }\n #optimole-app a.has-text-white:hover, #optimole-app a.has-text-white:focus {\n color: #e6e6e6 !important; }\n #optimole-app .has-background-white {\n background-color: white !important; }\n #optimole-app .has-text-black {\n color: #0a0a0a !important; }\n #optimole-app a.has-text-black:hover, #optimole-app a.has-text-black:focus {\n color: black !important; }\n #optimole-app .has-background-black {\n background-color: #0a0a0a !important; }\n #optimole-app .has-text-light {\n color: whitesmoke !important; }\n #optimole-app a.has-text-light:hover, #optimole-app a.has-text-light:focus {\n color: #dbdbdb !important; }\n #optimole-app .has-background-light {\n background-color: whitesmoke !important; }\n #optimole-app .has-text-dark {\n color: #363636 !important; }\n #optimole-app a.has-text-dark:hover, #optimole-app a.has-text-dark:focus {\n color: #1c1c1c !important; }\n #optimole-app .has-background-dark {\n background-color: #363636 !important; }\n #optimole-app .has-text-primary {\n color: #e7602a !important; }\n #optimole-app a.has-text-primary:hover, #optimole-app a.has-text-primary:focus {\n color: #c84916 !important; }\n #optimole-app .has-background-primary {\n background-color: #e7602a !important; }\n #optimole-app .has-text-link {\n color: #3273dc !important; }\n #optimole-app a.has-text-link:hover, #optimole-app a.has-text-link:focus {\n color: #205bbc !important; }\n #optimole-app .has-background-link {\n background-color: #3273dc !important; }\n #optimole-app .has-text-info {\n color: #008ec2 !important; }\n #optimole-app a.has-text-info:hover, #optimole-app a.has-text-info:focus {\n color: #00698f !important; }\n #optimole-app .has-background-info {\n background-color: #008ec2 !important; }\n #optimole-app .has-text-success {\n color: #34a85e !important; }\n #optimole-app a.has-text-success:hover, #optimole-app a.has-text-success:focus {\n color: #288148 !important; }\n #optimole-app .has-background-success {\n background-color: #34a85e !important; }\n #optimole-app .has-text-warning {\n color: #ffdd57 !important; }\n #optimole-app a.has-text-warning:hover, #optimole-app a.has-text-warning:focus {\n color: #ffd324 !important; }\n #optimole-app .has-background-warning {\n background-color: #ffdd57 !important; }\n #optimole-app .has-text-danger {\n color: #d54222 !important; }\n #optimole-app a.has-text-danger:hover, #optimole-app a.has-text-danger:focus {\n color: #a9341b !important; }\n #optimole-app .has-background-danger {\n background-color: #d54222 !important; }\n #optimole-app .has-text-black-bis {\n color: #121212 !important; }\n #optimole-app .has-background-black-bis {\n background-color: #121212 !important; }\n #optimole-app .has-text-black-ter {\n color: #242424 !important; }\n #optimole-app .has-background-black-ter {\n background-color: #242424 !important; }\n #optimole-app .has-text-grey-darker {\n color: #363636 !important; }\n #optimole-app .has-background-grey-darker {\n background-color: #363636 !important; }\n #optimole-app .has-text-grey-dark {\n color: #4a4a4a !important; }\n #optimole-app .has-background-grey-dark {\n background-color: #4a4a4a !important; }\n #optimole-app .has-text-grey {\n color: #7a7a7a !important; }\n #optimole-app .has-background-grey {\n background-color: #7a7a7a !important; }\n #optimole-app .has-text-grey-light {\n color: #b5b5b5 !important; }\n #optimole-app .has-background-grey-light {\n background-color: #b5b5b5 !important; }\n #optimole-app .has-text-grey-lighter {\n color: #dbdbdb !important; }\n #optimole-app .has-background-grey-lighter {\n background-color: #dbdbdb !important; }\n #optimole-app .has-text-white-ter {\n color: whitesmoke !important; }\n #optimole-app .has-background-white-ter {\n background-color: whitesmoke !important; }\n #optimole-app .has-text-white-bis {\n color: #fafafa !important; }\n #optimole-app .has-background-white-bis {\n background-color: #fafafa !important; }\n #optimole-app .has-text-weight-light {\n font-weight: 300 !important; }\n #optimole-app .has-text-weight-normal {\n font-weight: 400 !important; }\n #optimole-app .has-text-weight-semibold {\n font-weight: 600 !important; }\n #optimole-app .has-text-weight-bold {\n font-weight: 700 !important; }\n #optimole-app .is-block {\n display: block !important; }\n @media screen and (max-width: 768px) {\n #optimole-app .is-block-mobile {\n display: block !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .is-block-tablet {\n display: block !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .is-block-tablet-only {\n display: block !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .is-block-touch {\n display: block !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .is-block-desktop {\n display: block !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .is-block-desktop-only {\n display: block !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .is-block-widescreen {\n display: block !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .is-block-widescreen-only {\n display: block !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .is-block-fullhd {\n display: block !important; } }\n #optimole-app .is-flex {\n display: -ms-flexbox !important;\n display: flex !important; }\n @media screen and (max-width: 768px) {\n #optimole-app .is-flex-mobile {\n display: -ms-flexbox !important;\n display: flex !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .is-flex-tablet {\n display: -ms-flexbox !important;\n display: flex !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .is-flex-tablet-only {\n display: -ms-flexbox !important;\n display: flex !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .is-flex-touch {\n display: -ms-flexbox !important;\n display: flex !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .is-flex-desktop {\n display: -ms-flexbox !important;\n display: flex !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .is-flex-desktop-only {\n display: -ms-flexbox !important;\n display: flex !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .is-flex-widescreen {\n display: -ms-flexbox !important;\n display: flex !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .is-flex-widescreen-only {\n display: -ms-flexbox !important;\n display: flex !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .is-flex-fullhd {\n display: -ms-flexbox !important;\n display: flex !important; } }\n #optimole-app .is-inline {\n display: inline !important; }\n @media screen and (max-width: 768px) {\n #optimole-app .is-inline-mobile {\n display: inline !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .is-inline-tablet {\n display: inline !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .is-inline-tablet-only {\n display: inline !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .is-inline-touch {\n display: inline !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .is-inline-desktop {\n display: inline !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .is-inline-desktop-only {\n display: inline !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .is-inline-widescreen {\n display: inline !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .is-inline-widescreen-only {\n display: inline !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .is-inline-fullhd {\n display: inline !important; } }\n #optimole-app .is-inline-block {\n display: inline-block !important; }\n @media screen and (max-width: 768px) {\n #optimole-app .is-inline-block-mobile {\n display: inline-block !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .is-inline-block-tablet {\n display: inline-block !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .is-inline-block-tablet-only {\n display: inline-block !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .is-inline-block-touch {\n display: inline-block !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .is-inline-block-desktop {\n display: inline-block !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .is-inline-block-desktop-only {\n display: inline-block !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .is-inline-block-widescreen {\n display: inline-block !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .is-inline-block-widescreen-only {\n display: inline-block !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .is-inline-block-fullhd {\n display: inline-block !important; } }\n #optimole-app .is-inline-flex {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; }\n @media screen and (max-width: 768px) {\n #optimole-app .is-inline-flex-mobile {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .is-inline-flex-tablet {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .is-inline-flex-tablet-only {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .is-inline-flex-touch {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .is-inline-flex-desktop {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .is-inline-flex-desktop-only {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .is-inline-flex-widescreen {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .is-inline-flex-widescreen-only {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .is-inline-flex-fullhd {\n display: -ms-inline-flexbox !important;\n display: inline-flex !important; } }\n #optimole-app .is-hidden {\n display: none !important; }\n @media screen and (max-width: 768px) {\n #optimole-app .is-hidden-mobile {\n display: none !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .is-hidden-tablet {\n display: none !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .is-hidden-tablet-only {\n display: none !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .is-hidden-touch {\n display: none !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .is-hidden-desktop {\n display: none !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .is-hidden-desktop-only {\n display: none !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .is-hidden-widescreen {\n display: none !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .is-hidden-widescreen-only {\n display: none !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .is-hidden-fullhd {\n display: none !important; } }\n #optimole-app .is-invisible {\n visibility: hidden !important; }\n @media screen and (max-width: 768px) {\n #optimole-app .is-invisible-mobile {\n visibility: hidden !important; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .is-invisible-tablet {\n visibility: hidden !important; } }\n @media screen and (min-width: 769px) and (max-width: 1087px) {\n #optimole-app .is-invisible-tablet-only {\n visibility: hidden !important; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .is-invisible-touch {\n visibility: hidden !important; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .is-invisible-desktop {\n visibility: hidden !important; } }\n @media screen and (min-width: 1088px) and (max-width: 1279px) {\n #optimole-app .is-invisible-desktop-only {\n visibility: hidden !important; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .is-invisible-widescreen {\n visibility: hidden !important; } }\n @media screen and (min-width: 1280px) and (max-width: 1471px) {\n #optimole-app .is-invisible-widescreen-only {\n visibility: hidden !important; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .is-invisible-fullhd {\n visibility: hidden !important; } }\n #optimole-app .is-marginless {\n margin: 0 !important; }\n #optimole-app .is-paddingless {\n padding: 0 !important; }\n #optimole-app .is-radiusless {\n border-radius: 0 !important; }\n #optimole-app .is-shadowless {\n box-shadow: none !important; }\n #optimole-app .box {\n background-color: white;\n border-radius: 6px;\n box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);\n color: #4a4a4a;\n display: block;\n padding: 1.25rem; }\n #optimole-app a.box:hover, #optimole-app a.box:focus {\n box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px #3273dc; }\n #optimole-app a.box:active {\n box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.2), 0 0 0 1px #3273dc; }\n #optimole-app .button {\n background-color: white;\n border-color: #dbdbdb;\n border-width: 1px;\n color: #363636;\n cursor: pointer;\n -ms-flex-pack: center;\n justify-content: center;\n padding-bottom: calc(0.375em - 1px);\n padding-left: 0.75em;\n padding-right: 0.75em;\n padding-top: calc(0.375em - 1px);\n text-align: center;\n white-space: nowrap; }\n #optimole-app .button strong {\n color: inherit; }\n #optimole-app .button .icon, #optimole-app .button .icon.is-small, #optimole-app .button .icon.is-medium, #optimole-app .button .icon.is-large {\n height: 1.5em;\n width: 1.5em; }\n #optimole-app .button .icon:first-child:not(:last-child) {\n margin-left: calc(-0.375em - 1px);\n margin-right: 0.1875em; }\n #optimole-app .button .icon:last-child:not(:first-child) {\n margin-left: 0.1875em;\n margin-right: calc(-0.375em - 1px); }\n #optimole-app .button .icon:first-child:last-child {\n margin-left: calc(-0.375em - 1px);\n margin-right: calc(-0.375em - 1px); }\n #optimole-app .button:hover, #optimole-app .button.is-hovered {\n border-color: #b5b5b5;\n color: #363636; }\n #optimole-app .button:focus, #optimole-app .button.is-focused {\n border-color: #3273dc;\n color: #363636; }\n #optimole-app .button:focus:not(:active), #optimole-app .button.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25); }\n #optimole-app .button:active, #optimole-app .button.is-active {\n border-color: #4a4a4a;\n color: #363636; }\n #optimole-app .button.is-text {\n background-color: transparent;\n border-color: transparent;\n color: #4a4a4a;\n text-decoration: underline; }\n #optimole-app .button.is-text:hover, #optimole-app .button.is-text.is-hovered, #optimole-app .button.is-text:focus, #optimole-app .button.is-text.is-focused {\n background-color: whitesmoke;\n color: #363636; }\n #optimole-app .button.is-text:active, #optimole-app .button.is-text.is-active {\n background-color: #e8e8e8;\n color: #363636; }\n #optimole-app .button.is-text[disabled] {\n background-color: transparent;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-white {\n background-color: white;\n border-color: transparent;\n color: #0a0a0a; }\n #optimole-app .button.is-white:hover, #optimole-app .button.is-white.is-hovered {\n background-color: #f9f9f9;\n border-color: transparent;\n color: #0a0a0a; }\n #optimole-app .button.is-white:focus, #optimole-app .button.is-white.is-focused {\n border-color: transparent;\n color: #0a0a0a; }\n #optimole-app .button.is-white:focus:not(:active), #optimole-app .button.is-white.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); }\n #optimole-app .button.is-white:active, #optimole-app .button.is-white.is-active {\n background-color: #f2f2f2;\n border-color: transparent;\n color: #0a0a0a; }\n #optimole-app .button.is-white[disabled] {\n background-color: white;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-white.is-inverted {\n background-color: #0a0a0a;\n color: white; }\n #optimole-app .button.is-white.is-inverted:hover {\n background-color: black; }\n #optimole-app .button.is-white.is-inverted[disabled] {\n background-color: #0a0a0a;\n border-color: transparent;\n box-shadow: none;\n color: white; }\n #optimole-app .button.is-white.is-loading::after {\n border-color: transparent transparent #0a0a0a #0a0a0a !important; }\n #optimole-app .button.is-white.is-outlined {\n background-color: transparent;\n border-color: white;\n color: white; }\n #optimole-app .button.is-white.is-outlined:hover, #optimole-app .button.is-white.is-outlined:focus {\n background-color: white;\n border-color: white;\n color: #0a0a0a; }\n #optimole-app .button.is-white.is-outlined.is-loading::after {\n border-color: transparent transparent white white !important; }\n #optimole-app .button.is-white.is-outlined[disabled] {\n background-color: transparent;\n border-color: white;\n box-shadow: none;\n color: white; }\n #optimole-app .button.is-white.is-inverted.is-outlined {\n background-color: transparent;\n border-color: #0a0a0a;\n color: #0a0a0a; }\n #optimole-app .button.is-white.is-inverted.is-outlined:hover, #optimole-app .button.is-white.is-inverted.is-outlined:focus {\n background-color: #0a0a0a;\n color: white; }\n #optimole-app .button.is-white.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: #0a0a0a;\n box-shadow: none;\n color: #0a0a0a; }\n #optimole-app .button.is-black {\n background-color: #0a0a0a;\n border-color: transparent;\n color: white; }\n #optimole-app .button.is-black:hover, #optimole-app .button.is-black.is-hovered {\n background-color: #040404;\n border-color: transparent;\n color: white; }\n #optimole-app .button.is-black:focus, #optimole-app .button.is-black.is-focused {\n border-color: transparent;\n color: white; }\n #optimole-app .button.is-black:focus:not(:active), #optimole-app .button.is-black.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25); }\n #optimole-app .button.is-black:active, #optimole-app .button.is-black.is-active {\n background-color: black;\n border-color: transparent;\n color: white; }\n #optimole-app .button.is-black[disabled] {\n background-color: #0a0a0a;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-black.is-inverted {\n background-color: white;\n color: #0a0a0a; }\n #optimole-app .button.is-black.is-inverted:hover {\n background-color: #f2f2f2; }\n #optimole-app .button.is-black.is-inverted[disabled] {\n background-color: white;\n border-color: transparent;\n box-shadow: none;\n color: #0a0a0a; }\n #optimole-app .button.is-black.is-loading::after {\n border-color: transparent transparent white white !important; }\n #optimole-app .button.is-black.is-outlined {\n background-color: transparent;\n border-color: #0a0a0a;\n color: #0a0a0a; }\n #optimole-app .button.is-black.is-outlined:hover, #optimole-app .button.is-black.is-outlined:focus {\n background-color: #0a0a0a;\n border-color: #0a0a0a;\n color: white; }\n #optimole-app .button.is-black.is-outlined.is-loading::after {\n border-color: transparent transparent #0a0a0a #0a0a0a !important; }\n #optimole-app .button.is-black.is-outlined[disabled] {\n background-color: transparent;\n border-color: #0a0a0a;\n box-shadow: none;\n color: #0a0a0a; }\n #optimole-app .button.is-black.is-inverted.is-outlined {\n background-color: transparent;\n border-color: white;\n color: white; }\n #optimole-app .button.is-black.is-inverted.is-outlined:hover, #optimole-app .button.is-black.is-inverted.is-outlined:focus {\n background-color: white;\n color: #0a0a0a; }\n #optimole-app .button.is-black.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: white;\n box-shadow: none;\n color: white; }\n #optimole-app .button.is-light {\n background-color: whitesmoke;\n border-color: transparent;\n color: #363636; }\n #optimole-app .button.is-light:hover, #optimole-app .button.is-light.is-hovered {\n background-color: #eeeeee;\n border-color: transparent;\n color: #363636; }\n #optimole-app .button.is-light:focus, #optimole-app .button.is-light.is-focused {\n border-color: transparent;\n color: #363636; }\n #optimole-app .button.is-light:focus:not(:active), #optimole-app .button.is-light.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25); }\n #optimole-app .button.is-light:active, #optimole-app .button.is-light.is-active {\n background-color: #e8e8e8;\n border-color: transparent;\n color: #363636; }\n #optimole-app .button.is-light[disabled] {\n background-color: whitesmoke;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-light.is-inverted {\n background-color: #363636;\n color: whitesmoke; }\n #optimole-app .button.is-light.is-inverted:hover {\n background-color: #292929; }\n #optimole-app .button.is-light.is-inverted[disabled] {\n background-color: #363636;\n border-color: transparent;\n box-shadow: none;\n color: whitesmoke; }\n #optimole-app .button.is-light.is-loading::after {\n border-color: transparent transparent #363636 #363636 !important; }\n #optimole-app .button.is-light.is-outlined {\n background-color: transparent;\n border-color: whitesmoke;\n color: whitesmoke; }\n #optimole-app .button.is-light.is-outlined:hover, #optimole-app .button.is-light.is-outlined:focus {\n background-color: whitesmoke;\n border-color: whitesmoke;\n color: #363636; }\n #optimole-app .button.is-light.is-outlined.is-loading::after {\n border-color: transparent transparent whitesmoke whitesmoke !important; }\n #optimole-app .button.is-light.is-outlined[disabled] {\n background-color: transparent;\n border-color: whitesmoke;\n box-shadow: none;\n color: whitesmoke; }\n #optimole-app .button.is-light.is-inverted.is-outlined {\n background-color: transparent;\n border-color: #363636;\n color: #363636; }\n #optimole-app .button.is-light.is-inverted.is-outlined:hover, #optimole-app .button.is-light.is-inverted.is-outlined:focus {\n background-color: #363636;\n color: whitesmoke; }\n #optimole-app .button.is-light.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: #363636;\n box-shadow: none;\n color: #363636; }\n #optimole-app .button.is-dark {\n background-color: #363636;\n border-color: transparent;\n color: whitesmoke; }\n #optimole-app .button.is-dark:hover, #optimole-app .button.is-dark.is-hovered {\n background-color: #2f2f2f;\n border-color: transparent;\n color: whitesmoke; }\n #optimole-app .button.is-dark:focus, #optimole-app .button.is-dark.is-focused {\n border-color: transparent;\n color: whitesmoke; }\n #optimole-app .button.is-dark:focus:not(:active), #optimole-app .button.is-dark.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25); }\n #optimole-app .button.is-dark:active, #optimole-app .button.is-dark.is-active {\n background-color: #292929;\n border-color: transparent;\n color: whitesmoke; }\n #optimole-app .button.is-dark[disabled] {\n background-color: #363636;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-dark.is-inverted {\n background-color: whitesmoke;\n color: #363636; }\n #optimole-app .button.is-dark.is-inverted:hover {\n background-color: #e8e8e8; }\n #optimole-app .button.is-dark.is-inverted[disabled] {\n background-color: whitesmoke;\n border-color: transparent;\n box-shadow: none;\n color: #363636; }\n #optimole-app .button.is-dark.is-loading::after {\n border-color: transparent transparent whitesmoke whitesmoke !important; }\n #optimole-app .button.is-dark.is-outlined {\n background-color: transparent;\n border-color: #363636;\n color: #363636; }\n #optimole-app .button.is-dark.is-outlined:hover, #optimole-app .button.is-dark.is-outlined:focus {\n background-color: #363636;\n border-color: #363636;\n color: whitesmoke; }\n #optimole-app .button.is-dark.is-outlined.is-loading::after {\n border-color: transparent transparent #363636 #363636 !important; }\n #optimole-app .button.is-dark.is-outlined[disabled] {\n background-color: transparent;\n border-color: #363636;\n box-shadow: none;\n color: #363636; }\n #optimole-app .button.is-dark.is-inverted.is-outlined {\n background-color: transparent;\n border-color: whitesmoke;\n color: whitesmoke; }\n #optimole-app .button.is-dark.is-inverted.is-outlined:hover, #optimole-app .button.is-dark.is-inverted.is-outlined:focus {\n background-color: whitesmoke;\n color: #363636; }\n #optimole-app .button.is-dark.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: whitesmoke;\n box-shadow: none;\n color: whitesmoke; }\n #optimole-app .button.is-primary {\n background-color: #e7602a;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-primary:hover, #optimole-app .button.is-primary.is-hovered {\n background-color: #e6571f;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-primary:focus, #optimole-app .button.is-primary.is-focused {\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-primary:focus:not(:active), #optimole-app .button.is-primary.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(231, 96, 42, 0.25); }\n #optimole-app .button.is-primary:active, #optimole-app .button.is-primary.is-active {\n background-color: #de5119;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-primary[disabled] {\n background-color: #e7602a;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-primary.is-inverted {\n background-color: #fff;\n color: #e7602a; }\n #optimole-app .button.is-primary.is-inverted:hover {\n background-color: #f2f2f2; }\n #optimole-app .button.is-primary.is-inverted[disabled] {\n background-color: #fff;\n border-color: transparent;\n box-shadow: none;\n color: #e7602a; }\n #optimole-app .button.is-primary.is-loading::after {\n border-color: transparent transparent #fff #fff !important; }\n #optimole-app .button.is-primary.is-outlined {\n background-color: transparent;\n border-color: #e7602a;\n color: #e7602a; }\n #optimole-app .button.is-primary.is-outlined:hover, #optimole-app .button.is-primary.is-outlined:focus {\n background-color: #e7602a;\n border-color: #e7602a;\n color: #fff; }\n #optimole-app .button.is-primary.is-outlined.is-loading::after {\n border-color: transparent transparent #e7602a #e7602a !important; }\n #optimole-app .button.is-primary.is-outlined[disabled] {\n background-color: transparent;\n border-color: #e7602a;\n box-shadow: none;\n color: #e7602a; }\n #optimole-app .button.is-primary.is-inverted.is-outlined {\n background-color: transparent;\n border-color: #fff;\n color: #fff; }\n #optimole-app .button.is-primary.is-inverted.is-outlined:hover, #optimole-app .button.is-primary.is-inverted.is-outlined:focus {\n background-color: #fff;\n color: #e7602a; }\n #optimole-app .button.is-primary.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: #fff;\n box-shadow: none;\n color: #fff; }\n #optimole-app .button.is-link {\n background-color: #3273dc;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-link:hover, #optimole-app .button.is-link.is-hovered {\n background-color: #276cda;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-link:focus, #optimole-app .button.is-link.is-focused {\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-link:focus:not(:active), #optimole-app .button.is-link.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25); }\n #optimole-app .button.is-link:active, #optimole-app .button.is-link.is-active {\n background-color: #2366d1;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-link[disabled] {\n background-color: #3273dc;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-link.is-inverted {\n background-color: #fff;\n color: #3273dc; }\n #optimole-app .button.is-link.is-inverted:hover {\n background-color: #f2f2f2; }\n #optimole-app .button.is-link.is-inverted[disabled] {\n background-color: #fff;\n border-color: transparent;\n box-shadow: none;\n color: #3273dc; }\n #optimole-app .button.is-link.is-loading::after {\n border-color: transparent transparent #fff #fff !important; }\n #optimole-app .button.is-link.is-outlined {\n background-color: transparent;\n border-color: #3273dc;\n color: #3273dc; }\n #optimole-app .button.is-link.is-outlined:hover, #optimole-app .button.is-link.is-outlined:focus {\n background-color: #3273dc;\n border-color: #3273dc;\n color: #fff; }\n #optimole-app .button.is-link.is-outlined.is-loading::after {\n border-color: transparent transparent #3273dc #3273dc !important; }\n #optimole-app .button.is-link.is-outlined[disabled] {\n background-color: transparent;\n border-color: #3273dc;\n box-shadow: none;\n color: #3273dc; }\n #optimole-app .button.is-link.is-inverted.is-outlined {\n background-color: transparent;\n border-color: #fff;\n color: #fff; }\n #optimole-app .button.is-link.is-inverted.is-outlined:hover, #optimole-app .button.is-link.is-inverted.is-outlined:focus {\n background-color: #fff;\n color: #3273dc; }\n #optimole-app .button.is-link.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: #fff;\n box-shadow: none;\n color: #fff; }\n #optimole-app .button.is-info {\n background-color: #008ec2;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-info:hover, #optimole-app .button.is-info.is-hovered {\n background-color: #0085b5;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-info:focus, #optimole-app .button.is-info.is-focused {\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-info:focus:not(:active), #optimole-app .button.is-info.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(0, 142, 194, 0.25); }\n #optimole-app .button.is-info:active, #optimole-app .button.is-info.is-active {\n background-color: #007ba9;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-info[disabled] {\n background-color: #008ec2;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-info.is-inverted {\n background-color: #fff;\n color: #008ec2; }\n #optimole-app .button.is-info.is-inverted:hover {\n background-color: #f2f2f2; }\n #optimole-app .button.is-info.is-inverted[disabled] {\n background-color: #fff;\n border-color: transparent;\n box-shadow: none;\n color: #008ec2; }\n #optimole-app .button.is-info.is-loading::after {\n border-color: transparent transparent #fff #fff !important; }\n #optimole-app .button.is-info.is-outlined {\n background-color: transparent;\n border-color: #008ec2;\n color: #008ec2; }\n #optimole-app .button.is-info.is-outlined:hover, #optimole-app .button.is-info.is-outlined:focus {\n background-color: #008ec2;\n border-color: #008ec2;\n color: #fff; }\n #optimole-app .button.is-info.is-outlined.is-loading::after {\n border-color: transparent transparent #008ec2 #008ec2 !important; }\n #optimole-app .button.is-info.is-outlined[disabled] {\n background-color: transparent;\n border-color: #008ec2;\n box-shadow: none;\n color: #008ec2; }\n #optimole-app .button.is-info.is-inverted.is-outlined {\n background-color: transparent;\n border-color: #fff;\n color: #fff; }\n #optimole-app .button.is-info.is-inverted.is-outlined:hover, #optimole-app .button.is-info.is-inverted.is-outlined:focus {\n background-color: #fff;\n color: #008ec2; }\n #optimole-app .button.is-info.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: #fff;\n box-shadow: none;\n color: #fff; }\n #optimole-app .button.is-success {\n background-color: #34a85e;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-success:hover, #optimole-app .button.is-success.is-hovered {\n background-color: #319e59;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-success:focus, #optimole-app .button.is-success.is-focused {\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-success:focus:not(:active), #optimole-app .button.is-success.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(52, 168, 94, 0.25); }\n #optimole-app .button.is-success:active, #optimole-app .button.is-success.is-active {\n background-color: #2e9553;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-success[disabled] {\n background-color: #34a85e;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-success.is-inverted {\n background-color: #fff;\n color: #34a85e; }\n #optimole-app .button.is-success.is-inverted:hover {\n background-color: #f2f2f2; }\n #optimole-app .button.is-success.is-inverted[disabled] {\n background-color: #fff;\n border-color: transparent;\n box-shadow: none;\n color: #34a85e; }\n #optimole-app .button.is-success.is-loading::after {\n border-color: transparent transparent #fff #fff !important; }\n #optimole-app .button.is-success.is-outlined {\n background-color: transparent;\n border-color: #34a85e;\n color: #34a85e; }\n #optimole-app .button.is-success.is-outlined:hover, #optimole-app .button.is-success.is-outlined:focus {\n background-color: #34a85e;\n border-color: #34a85e;\n color: #fff; }\n #optimole-app .button.is-success.is-outlined.is-loading::after {\n border-color: transparent transparent #34a85e #34a85e !important; }\n #optimole-app .button.is-success.is-outlined[disabled] {\n background-color: transparent;\n border-color: #34a85e;\n box-shadow: none;\n color: #34a85e; }\n #optimole-app .button.is-success.is-inverted.is-outlined {\n background-color: transparent;\n border-color: #fff;\n color: #fff; }\n #optimole-app .button.is-success.is-inverted.is-outlined:hover, #optimole-app .button.is-success.is-inverted.is-outlined:focus {\n background-color: #fff;\n color: #34a85e; }\n #optimole-app .button.is-success.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: #fff;\n box-shadow: none;\n color: #fff; }\n #optimole-app .button.is-warning {\n background-color: #ffdd57;\n border-color: transparent;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .button.is-warning:hover, #optimole-app .button.is-warning.is-hovered {\n background-color: #ffdb4a;\n border-color: transparent;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .button.is-warning:focus, #optimole-app .button.is-warning.is-focused {\n border-color: transparent;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .button.is-warning:focus:not(:active), #optimole-app .button.is-warning.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(255, 221, 87, 0.25); }\n #optimole-app .button.is-warning:active, #optimole-app .button.is-warning.is-active {\n background-color: #ffd83d;\n border-color: transparent;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .button.is-warning[disabled] {\n background-color: #ffdd57;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-warning.is-inverted {\n background-color: rgba(0, 0, 0, 0.7);\n color: #ffdd57; }\n #optimole-app .button.is-warning.is-inverted:hover {\n background-color: rgba(0, 0, 0, 0.7); }\n #optimole-app .button.is-warning.is-inverted[disabled] {\n background-color: rgba(0, 0, 0, 0.7);\n border-color: transparent;\n box-shadow: none;\n color: #ffdd57; }\n #optimole-app .button.is-warning.is-loading::after {\n border-color: transparent transparent rgba(0, 0, 0, 0.7) rgba(0, 0, 0, 0.7) !important; }\n #optimole-app .button.is-warning.is-outlined {\n background-color: transparent;\n border-color: #ffdd57;\n color: #ffdd57; }\n #optimole-app .button.is-warning.is-outlined:hover, #optimole-app .button.is-warning.is-outlined:focus {\n background-color: #ffdd57;\n border-color: #ffdd57;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .button.is-warning.is-outlined.is-loading::after {\n border-color: transparent transparent #ffdd57 #ffdd57 !important; }\n #optimole-app .button.is-warning.is-outlined[disabled] {\n background-color: transparent;\n border-color: #ffdd57;\n box-shadow: none;\n color: #ffdd57; }\n #optimole-app .button.is-warning.is-inverted.is-outlined {\n background-color: transparent;\n border-color: rgba(0, 0, 0, 0.7);\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .button.is-warning.is-inverted.is-outlined:hover, #optimole-app .button.is-warning.is-inverted.is-outlined:focus {\n background-color: rgba(0, 0, 0, 0.7);\n color: #ffdd57; }\n #optimole-app .button.is-warning.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: rgba(0, 0, 0, 0.7);\n box-shadow: none;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .button.is-danger {\n background-color: #d54222;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-danger:hover, #optimole-app .button.is-danger.is-hovered {\n background-color: #ca3f20;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-danger:focus, #optimole-app .button.is-danger.is-focused {\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-danger:focus:not(:active), #optimole-app .button.is-danger.is-focused:not(:active) {\n box-shadow: 0 0 0 0.125em rgba(213, 66, 34, 0.25); }\n #optimole-app .button.is-danger:active, #optimole-app .button.is-danger.is-active {\n background-color: #bf3b1e;\n border-color: transparent;\n color: #fff; }\n #optimole-app .button.is-danger[disabled] {\n background-color: #d54222;\n border-color: transparent;\n box-shadow: none; }\n #optimole-app .button.is-danger.is-inverted {\n background-color: #fff;\n color: #d54222; }\n #optimole-app .button.is-danger.is-inverted:hover {\n background-color: #f2f2f2; }\n #optimole-app .button.is-danger.is-inverted[disabled] {\n background-color: #fff;\n border-color: transparent;\n box-shadow: none;\n color: #d54222; }\n #optimole-app .button.is-danger.is-loading::after {\n border-color: transparent transparent #fff #fff !important; }\n #optimole-app .button.is-danger.is-outlined {\n background-color: transparent;\n border-color: #d54222;\n color: #d54222; }\n #optimole-app .button.is-danger.is-outlined:hover, #optimole-app .button.is-danger.is-outlined:focus {\n background-color: #d54222;\n border-color: #d54222;\n color: #fff; }\n #optimole-app .button.is-danger.is-outlined.is-loading::after {\n border-color: transparent transparent #d54222 #d54222 !important; }\n #optimole-app .button.is-danger.is-outlined[disabled] {\n background-color: transparent;\n border-color: #d54222;\n box-shadow: none;\n color: #d54222; }\n #optimole-app .button.is-danger.is-inverted.is-outlined {\n background-color: transparent;\n border-color: #fff;\n color: #fff; }\n #optimole-app .button.is-danger.is-inverted.is-outlined:hover, #optimole-app .button.is-danger.is-inverted.is-outlined:focus {\n background-color: #fff;\n color: #d54222; }\n #optimole-app .button.is-danger.is-inverted.is-outlined[disabled] {\n background-color: transparent;\n border-color: #fff;\n box-shadow: none;\n color: #fff; }\n #optimole-app .button.is-small {\n border-radius: 2px;\n font-size: 0.75rem; }\n #optimole-app .button.is-medium {\n font-size: 1.25rem; }\n #optimole-app .button.is-large {\n font-size: 1.5rem; }\n #optimole-app .button[disabled] {\n background-color: white;\n border-color: #dbdbdb;\n box-shadow: none;\n opacity: 0.5; }\n #optimole-app .button.is-fullwidth {\n display: -ms-flexbox;\n display: flex;\n width: 100%; }\n #optimole-app .button.is-loading {\n color: transparent !important;\n pointer-events: none; }\n #optimole-app .button.is-loading::after {\n position: absolute;\n left: calc(50% - (1em / 2));\n top: calc(50% - (1em / 2));\n position: absolute !important; }\n #optimole-app .button.is-static {\n background-color: whitesmoke;\n border-color: #dbdbdb;\n color: #7a7a7a;\n box-shadow: none;\n pointer-events: none; }\n #optimole-app .button.is-rounded {\n border-radius: 290486px;\n padding-left: 1em;\n padding-right: 1em; }\n #optimole-app .buttons {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n #optimole-app .buttons .button {\n margin-bottom: 0.5rem; }\n #optimole-app .buttons .button:not(:last-child) {\n margin-right: 0.5rem; }\n #optimole-app .buttons:last-child {\n margin-bottom: -0.5rem; }\n #optimole-app .buttons:not(:last-child) {\n margin-bottom: 1rem; }\n #optimole-app .buttons.has-addons .button:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0; }\n #optimole-app .buttons.has-addons .button:not(:last-child) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0;\n margin-right: -1px; }\n #optimole-app .buttons.has-addons .button:last-child {\n margin-right: 0; }\n #optimole-app .buttons.has-addons .button:hover, #optimole-app .buttons.has-addons .button.is-hovered {\n z-index: 2; }\n #optimole-app .buttons.has-addons .button:focus, #optimole-app .buttons.has-addons .button.is-focused, #optimole-app .buttons.has-addons .button:active, #optimole-app .buttons.has-addons .button.is-active, #optimole-app .buttons.has-addons .button.is-selected {\n z-index: 3; }\n #optimole-app .buttons.has-addons .button:focus:hover, #optimole-app .buttons.has-addons .button.is-focused:hover, #optimole-app .buttons.has-addons .button:active:hover, #optimole-app .buttons.has-addons .button.is-active:hover, #optimole-app .buttons.has-addons .button.is-selected:hover {\n z-index: 4; }\n #optimole-app .buttons.has-addons .button.is-expanded {\n -ms-flex-positive: 1;\n flex-grow: 1; }\n #optimole-app .buttons.is-centered {\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .buttons.is-right {\n -ms-flex-pack: end;\n justify-content: flex-end; }\n #optimole-app .container {\n margin: 0 auto;\n position: relative; }\n @media screen and (min-width: 1088px) {\n #optimole-app .container {\n max-width: 960px;\n width: 960px; }\n #optimole-app .container.is-fluid {\n margin-left: 64px;\n margin-right: 64px;\n max-width: none;\n width: auto; } }\n @media screen and (max-width: 1279px) {\n #optimole-app .container.is-widescreen {\n max-width: 1152px;\n width: auto; } }\n @media screen and (max-width: 1471px) {\n #optimole-app .container.is-fullhd {\n max-width: 1344px;\n width: auto; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .container {\n max-width: 1152px;\n width: 1152px; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .container {\n max-width: 1344px;\n width: 1344px; } }\n #optimole-app .content li + li {\n margin-top: 0.25em; }\n #optimole-app .content p:not(:last-child),\n #optimole-app .content dl:not(:last-child),\n #optimole-app .content ol:not(:last-child),\n #optimole-app .content ul:not(:last-child),\n #optimole-app .content blockquote:not(:last-child),\n #optimole-app .content pre:not(:last-child),\n #optimole-app .content table:not(:last-child) {\n margin-bottom: 1em; }\n #optimole-app .content h1,\n #optimole-app .content h2,\n #optimole-app .content h3,\n #optimole-app .content h4,\n #optimole-app .content h5,\n #optimole-app .content h6 {\n color: #363636;\n font-weight: 600;\n line-height: 1.125; }\n #optimole-app .content h1 {\n font-size: 2em;\n margin-bottom: 0.5em; }\n #optimole-app .content h1:not(:first-child) {\n margin-top: 1em; }\n #optimole-app .content h2 {\n font-size: 1.75em;\n margin-bottom: 0.5714em; }\n #optimole-app .content h2:not(:first-child) {\n margin-top: 1.1428em; }\n #optimole-app .content h3 {\n font-size: 1.5em;\n margin-bottom: 0.6666em; }\n #optimole-app .content h3:not(:first-child) {\n margin-top: 1.3333em; }\n #optimole-app .content h4 {\n font-size: 1.25em;\n margin-bottom: 0.8em; }\n #optimole-app .content h5 {\n font-size: 1.125em;\n margin-bottom: 0.8888em; }\n #optimole-app .content h6 {\n font-size: 1em;\n margin-bottom: 1em; }\n #optimole-app .content blockquote {\n background-color: whitesmoke;\n border-left: 5px solid #dbdbdb;\n padding: 1.25em 1.5em; }\n #optimole-app .content ol {\n list-style: decimal outside;\n margin-left: 2em;\n margin-top: 1em; }\n #optimole-app .content ul {\n list-style: disc outside;\n margin-left: 2em;\n margin-top: 1em; }\n #optimole-app .content ul ul {\n list-style-type: circle;\n margin-top: 0.5em; }\n #optimole-app .content ul ul ul {\n list-style-type: square; }\n #optimole-app .content dd {\n margin-left: 2em; }\n #optimole-app .content figure {\n margin-left: 2em;\n margin-right: 2em;\n text-align: center; }\n #optimole-app .content figure:not(:first-child) {\n margin-top: 2em; }\n #optimole-app .content figure:not(:last-child) {\n margin-bottom: 2em; }\n #optimole-app .content figure img {\n display: inline-block; }\n #optimole-app .content figure figcaption {\n font-style: italic; }\n #optimole-app .content pre {\n -webkit-overflow-scrolling: touch;\n overflow-x: auto;\n padding: 1.25em 1.5em;\n white-space: pre;\n word-wrap: normal; }\n #optimole-app .content sup,\n #optimole-app .content sub {\n font-size: 75%; }\n #optimole-app .content table {\n width: 100%; }\n #optimole-app .content table td,\n #optimole-app .content table th {\n border: 1px solid #dbdbdb;\n border-width: 0 0 1px;\n padding: 0.5em 0.75em;\n vertical-align: top; }\n #optimole-app .content table th {\n color: #363636;\n text-align: left; }\n #optimole-app .content table thead td,\n #optimole-app .content table thead th {\n border-width: 0 0 2px;\n color: #363636; }\n #optimole-app .content table tfoot td,\n #optimole-app .content table tfoot th {\n border-width: 2px 0 0;\n color: #363636; }\n #optimole-app .content table tbody tr:last-child td,\n #optimole-app .content table tbody tr:last-child th {\n border-bottom-width: 0; }\n #optimole-app .content.is-small {\n font-size: 0.75rem; }\n #optimole-app .content.is-medium {\n font-size: 1.25rem; }\n #optimole-app .content.is-large {\n font-size: 1.5rem; }\n #optimole-app .input,\n #optimole-app .textarea {\n background-color: white;\n border-color: #dbdbdb;\n color: #363636;\n box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.1);\n max-width: 100%;\n width: 100%; }\n #optimole-app .input::-moz-placeholder,\n #optimole-app .textarea::-moz-placeholder {\n color: rgba(54, 54, 54, 0.3); }\n #optimole-app .input::-webkit-input-placeholder,\n #optimole-app .textarea::-webkit-input-placeholder {\n color: rgba(54, 54, 54, 0.3); }\n #optimole-app .input:-moz-placeholder,\n #optimole-app .textarea:-moz-placeholder {\n color: rgba(54, 54, 54, 0.3); }\n #optimole-app .input:-ms-input-placeholder,\n #optimole-app .textarea:-ms-input-placeholder {\n color: rgba(54, 54, 54, 0.3); }\n #optimole-app .input:hover, #optimole-app .input.is-hovered,\n #optimole-app .textarea:hover,\n #optimole-app .textarea.is-hovered {\n border-color: #b5b5b5; }\n #optimole-app .input:focus, #optimole-app .input.is-focused, #optimole-app .input:active, #optimole-app .input.is-active,\n #optimole-app .textarea:focus,\n #optimole-app .textarea.is-focused,\n #optimole-app .textarea:active,\n #optimole-app .textarea.is-active {\n border-color: #3273dc;\n box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25); }\n #optimole-app .input[disabled],\n #optimole-app .textarea[disabled] {\n background-color: whitesmoke;\n border-color: whitesmoke;\n box-shadow: none;\n color: #7a7a7a; }\n #optimole-app .input[disabled]::-moz-placeholder,\n #optimole-app .textarea[disabled]::-moz-placeholder {\n color: rgba(122, 122, 122, 0.3); }\n #optimole-app .input[disabled]::-webkit-input-placeholder,\n #optimole-app .textarea[disabled]::-webkit-input-placeholder {\n color: rgba(122, 122, 122, 0.3); }\n #optimole-app .input[disabled]:-moz-placeholder,\n #optimole-app .textarea[disabled]:-moz-placeholder {\n color: rgba(122, 122, 122, 0.3); }\n #optimole-app .input[disabled]:-ms-input-placeholder,\n #optimole-app .textarea[disabled]:-ms-input-placeholder {\n color: rgba(122, 122, 122, 0.3); }\n #optimole-app .input[readonly],\n #optimole-app .textarea[readonly] {\n box-shadow: none; }\n #optimole-app .input.is-white,\n #optimole-app .textarea.is-white {\n border-color: white; }\n #optimole-app .input.is-white:focus, #optimole-app .input.is-white.is-focused, #optimole-app .input.is-white:active, #optimole-app .input.is-white.is-active,\n #optimole-app .textarea.is-white:focus,\n #optimole-app .textarea.is-white.is-focused,\n #optimole-app .textarea.is-white:active,\n #optimole-app .textarea.is-white.is-active {\n box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); }\n #optimole-app .input.is-black,\n #optimole-app .textarea.is-black {\n border-color: #0a0a0a; }\n #optimole-app .input.is-black:focus, #optimole-app .input.is-black.is-focused, #optimole-app .input.is-black:active, #optimole-app .input.is-black.is-active,\n #optimole-app .textarea.is-black:focus,\n #optimole-app .textarea.is-black.is-focused,\n #optimole-app .textarea.is-black:active,\n #optimole-app .textarea.is-black.is-active {\n box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25); }\n #optimole-app .input.is-light,\n #optimole-app .textarea.is-light {\n border-color: whitesmoke; }\n #optimole-app .input.is-light:focus, #optimole-app .input.is-light.is-focused, #optimole-app .input.is-light:active, #optimole-app .input.is-light.is-active,\n #optimole-app .textarea.is-light:focus,\n #optimole-app .textarea.is-light.is-focused,\n #optimole-app .textarea.is-light:active,\n #optimole-app .textarea.is-light.is-active {\n box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25); }\n #optimole-app .input.is-dark,\n #optimole-app .textarea.is-dark {\n border-color: #363636; }\n #optimole-app .input.is-dark:focus, #optimole-app .input.is-dark.is-focused, #optimole-app .input.is-dark:active, #optimole-app .input.is-dark.is-active,\n #optimole-app .textarea.is-dark:focus,\n #optimole-app .textarea.is-dark.is-focused,\n #optimole-app .textarea.is-dark:active,\n #optimole-app .textarea.is-dark.is-active {\n box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25); }\n #optimole-app .input.is-primary,\n #optimole-app .textarea.is-primary {\n border-color: #e7602a; }\n #optimole-app .input.is-primary:focus, #optimole-app .input.is-primary.is-focused, #optimole-app .input.is-primary:active, #optimole-app .input.is-primary.is-active,\n #optimole-app .textarea.is-primary:focus,\n #optimole-app .textarea.is-primary.is-focused,\n #optimole-app .textarea.is-primary:active,\n #optimole-app .textarea.is-primary.is-active {\n box-shadow: 0 0 0 0.125em rgba(231, 96, 42, 0.25); }\n #optimole-app .input.is-link,\n #optimole-app .textarea.is-link {\n border-color: #3273dc; }\n #optimole-app .input.is-link:focus, #optimole-app .input.is-link.is-focused, #optimole-app .input.is-link:active, #optimole-app .input.is-link.is-active,\n #optimole-app .textarea.is-link:focus,\n #optimole-app .textarea.is-link.is-focused,\n #optimole-app .textarea.is-link:active,\n #optimole-app .textarea.is-link.is-active {\n box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25); }\n #optimole-app .input.is-info,\n #optimole-app .textarea.is-info {\n border-color: #008ec2; }\n #optimole-app .input.is-info:focus, #optimole-app .input.is-info.is-focused, #optimole-app .input.is-info:active, #optimole-app .input.is-info.is-active,\n #optimole-app .textarea.is-info:focus,\n #optimole-app .textarea.is-info.is-focused,\n #optimole-app .textarea.is-info:active,\n #optimole-app .textarea.is-info.is-active {\n box-shadow: 0 0 0 0.125em rgba(0, 142, 194, 0.25); }\n #optimole-app .input.is-success,\n #optimole-app .textarea.is-success {\n border-color: #34a85e; }\n #optimole-app .input.is-success:focus, #optimole-app .input.is-success.is-focused, #optimole-app .input.is-success:active, #optimole-app .input.is-success.is-active,\n #optimole-app .textarea.is-success:focus,\n #optimole-app .textarea.is-success.is-focused,\n #optimole-app .textarea.is-success:active,\n #optimole-app .textarea.is-success.is-active {\n box-shadow: 0 0 0 0.125em rgba(52, 168, 94, 0.25); }\n #optimole-app .input.is-warning,\n #optimole-app .textarea.is-warning {\n border-color: #ffdd57; }\n #optimole-app .input.is-warning:focus, #optimole-app .input.is-warning.is-focused, #optimole-app .input.is-warning:active, #optimole-app .input.is-warning.is-active,\n #optimole-app .textarea.is-warning:focus,\n #optimole-app .textarea.is-warning.is-focused,\n #optimole-app .textarea.is-warning:active,\n #optimole-app .textarea.is-warning.is-active {\n box-shadow: 0 0 0 0.125em rgba(255, 221, 87, 0.25); }\n #optimole-app .input.is-danger,\n #optimole-app .textarea.is-danger {\n border-color: #d54222; }\n #optimole-app .input.is-danger:focus, #optimole-app .input.is-danger.is-focused, #optimole-app .input.is-danger:active, #optimole-app .input.is-danger.is-active,\n #optimole-app .textarea.is-danger:focus,\n #optimole-app .textarea.is-danger.is-focused,\n #optimole-app .textarea.is-danger:active,\n #optimole-app .textarea.is-danger.is-active {\n box-shadow: 0 0 0 0.125em rgba(213, 66, 34, 0.25); }\n #optimole-app .input.is-small,\n #optimole-app .textarea.is-small {\n border-radius: 2px;\n font-size: 0.75rem; }\n #optimole-app .input.is-medium,\n #optimole-app .textarea.is-medium {\n font-size: 1.25rem; }\n #optimole-app .input.is-large,\n #optimole-app .textarea.is-large {\n font-size: 1.5rem; }\n #optimole-app .input.is-fullwidth,\n #optimole-app .textarea.is-fullwidth {\n display: block;\n width: 100%; }\n #optimole-app .input.is-inline,\n #optimole-app .textarea.is-inline {\n display: inline;\n width: auto; }\n #optimole-app .input.is-rounded {\n border-radius: 290486px;\n padding-left: 1em;\n padding-right: 1em; }\n #optimole-app .input.is-static {\n background-color: transparent;\n border-color: transparent;\n box-shadow: none;\n padding-left: 0;\n padding-right: 0; }\n #optimole-app .textarea {\n display: block;\n max-width: 100%;\n min-width: 100%;\n padding: 0.625em;\n resize: vertical; }\n #optimole-app .textarea:not([rows]) {\n max-height: 600px;\n min-height: 120px; }\n #optimole-app .textarea[rows] {\n height: initial; }\n #optimole-app .textarea.has-fixed-size {\n resize: none; }\n #optimole-app .checkbox,\n #optimole-app .radio {\n cursor: pointer;\n display: inline-block;\n line-height: 1.25;\n position: relative; }\n #optimole-app .checkbox input,\n #optimole-app .radio input {\n cursor: pointer; }\n #optimole-app .checkbox:hover,\n #optimole-app .radio:hover {\n color: #363636; }\n #optimole-app .checkbox[disabled],\n #optimole-app .radio[disabled] {\n color: #7a7a7a;\n cursor: not-allowed; }\n #optimole-app .radio + .radio {\n margin-left: 0.5em; }\n #optimole-app .select {\n display: inline-block;\n max-width: 100%;\n position: relative;\n vertical-align: top; }\n #optimole-app .select:not(.is-multiple) {\n height: 2.25em; }\n #optimole-app .select:not(.is-multiple):not(.is-loading)::after {\n border-color: #3273dc;\n right: 1.125em;\n z-index: 4; }\n #optimole-app .select.is-rounded select {\n border-radius: 290486px;\n padding-left: 1em; }\n #optimole-app .select select {\n background-color: white;\n border-color: #dbdbdb;\n color: #363636;\n cursor: pointer;\n display: block;\n font-size: 1em;\n max-width: 100%;\n outline: none; }\n #optimole-app .select select::-moz-placeholder {\n color: rgba(54, 54, 54, 0.3); }\n #optimole-app .select select::-webkit-input-placeholder {\n color: rgba(54, 54, 54, 0.3); }\n #optimole-app .select select:-moz-placeholder {\n color: rgba(54, 54, 54, 0.3); }\n #optimole-app .select select:-ms-input-placeholder {\n color: rgba(54, 54, 54, 0.3); }\n #optimole-app .select select:hover, #optimole-app .select select.is-hovered {\n border-color: #b5b5b5; }\n #optimole-app .select select:focus, #optimole-app .select select.is-focused, #optimole-app .select select:active, #optimole-app .select select.is-active {\n border-color: #3273dc;\n box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25); }\n #optimole-app .select select[disabled] {\n background-color: whitesmoke;\n border-color: whitesmoke;\n box-shadow: none;\n color: #7a7a7a; }\n #optimole-app .select select[disabled]::-moz-placeholder {\n color: rgba(122, 122, 122, 0.3); }\n #optimole-app .select select[disabled]::-webkit-input-placeholder {\n color: rgba(122, 122, 122, 0.3); }\n #optimole-app .select select[disabled]:-moz-placeholder {\n color: rgba(122, 122, 122, 0.3); }\n #optimole-app .select select[disabled]:-ms-input-placeholder {\n color: rgba(122, 122, 122, 0.3); }\n #optimole-app .select select::-ms-expand {\n display: none; }\n #optimole-app .select select[disabled]:hover {\n border-color: whitesmoke; }\n #optimole-app .select select:not([multiple]) {\n padding-right: 2.5em; }\n #optimole-app .select select[multiple] {\n height: initial;\n padding: 0; }\n #optimole-app .select select[multiple] option {\n padding: 0.5em 1em; }\n #optimole-app .select:not(.is-multiple):not(.is-loading):hover::after {\n border-color: #363636; }\n #optimole-app .select.is-white:not(:hover)::after {\n border-color: white; }\n #optimole-app .select.is-white select {\n border-color: white; }\n #optimole-app .select.is-white select:hover, #optimole-app .select.is-white select.is-hovered {\n border-color: #f2f2f2; }\n #optimole-app .select.is-white select:focus, #optimole-app .select.is-white select.is-focused, #optimole-app .select.is-white select:active, #optimole-app .select.is-white select.is-active {\n box-shadow: 0 0 0 0.125em rgba(255, 255, 255, 0.25); }\n #optimole-app .select.is-black:not(:hover)::after {\n border-color: #0a0a0a; }\n #optimole-app .select.is-black select {\n border-color: #0a0a0a; }\n #optimole-app .select.is-black select:hover, #optimole-app .select.is-black select.is-hovered {\n border-color: black; }\n #optimole-app .select.is-black select:focus, #optimole-app .select.is-black select.is-focused, #optimole-app .select.is-black select:active, #optimole-app .select.is-black select.is-active {\n box-shadow: 0 0 0 0.125em rgba(10, 10, 10, 0.25); }\n #optimole-app .select.is-light:not(:hover)::after {\n border-color: whitesmoke; }\n #optimole-app .select.is-light select {\n border-color: whitesmoke; }\n #optimole-app .select.is-light select:hover, #optimole-app .select.is-light select.is-hovered {\n border-color: #e8e8e8; }\n #optimole-app .select.is-light select:focus, #optimole-app .select.is-light select.is-focused, #optimole-app .select.is-light select:active, #optimole-app .select.is-light select.is-active {\n box-shadow: 0 0 0 0.125em rgba(245, 245, 245, 0.25); }\n #optimole-app .select.is-dark:not(:hover)::after {\n border-color: #363636; }\n #optimole-app .select.is-dark select {\n border-color: #363636; }\n #optimole-app .select.is-dark select:hover, #optimole-app .select.is-dark select.is-hovered {\n border-color: #292929; }\n #optimole-app .select.is-dark select:focus, #optimole-app .select.is-dark select.is-focused, #optimole-app .select.is-dark select:active, #optimole-app .select.is-dark select.is-active {\n box-shadow: 0 0 0 0.125em rgba(54, 54, 54, 0.25); }\n #optimole-app .select.is-primary:not(:hover)::after {\n border-color: #e7602a; }\n #optimole-app .select.is-primary select {\n border-color: #e7602a; }\n #optimole-app .select.is-primary select:hover, #optimole-app .select.is-primary select.is-hovered {\n border-color: #de5119; }\n #optimole-app .select.is-primary select:focus, #optimole-app .select.is-primary select.is-focused, #optimole-app .select.is-primary select:active, #optimole-app .select.is-primary select.is-active {\n box-shadow: 0 0 0 0.125em rgba(231, 96, 42, 0.25); }\n #optimole-app .select.is-link:not(:hover)::after {\n border-color: #3273dc; }\n #optimole-app .select.is-link select {\n border-color: #3273dc; }\n #optimole-app .select.is-link select:hover, #optimole-app .select.is-link select.is-hovered {\n border-color: #2366d1; }\n #optimole-app .select.is-link select:focus, #optimole-app .select.is-link select.is-focused, #optimole-app .select.is-link select:active, #optimole-app .select.is-link select.is-active {\n box-shadow: 0 0 0 0.125em rgba(50, 115, 220, 0.25); }\n #optimole-app .select.is-info:not(:hover)::after {\n border-color: #008ec2; }\n #optimole-app .select.is-info select {\n border-color: #008ec2; }\n #optimole-app .select.is-info select:hover, #optimole-app .select.is-info select.is-hovered {\n border-color: #007ba9; }\n #optimole-app .select.is-info select:focus, #optimole-app .select.is-info select.is-focused, #optimole-app .select.is-info select:active, #optimole-app .select.is-info select.is-active {\n box-shadow: 0 0 0 0.125em rgba(0, 142, 194, 0.25); }\n #optimole-app .select.is-success:not(:hover)::after {\n border-color: #34a85e; }\n #optimole-app .select.is-success select {\n border-color: #34a85e; }\n #optimole-app .select.is-success select:hover, #optimole-app .select.is-success select.is-hovered {\n border-color: #2e9553; }\n #optimole-app .select.is-success select:focus, #optimole-app .select.is-success select.is-focused, #optimole-app .select.is-success select:active, #optimole-app .select.is-success select.is-active {\n box-shadow: 0 0 0 0.125em rgba(52, 168, 94, 0.25); }\n #optimole-app .select.is-warning:not(:hover)::after {\n border-color: #ffdd57; }\n #optimole-app .select.is-warning select {\n border-color: #ffdd57; }\n #optimole-app .select.is-warning select:hover, #optimole-app .select.is-warning select.is-hovered {\n border-color: #ffd83d; }\n #optimole-app .select.is-warning select:focus, #optimole-app .select.is-warning select.is-focused, #optimole-app .select.is-warning select:active, #optimole-app .select.is-warning select.is-active {\n box-shadow: 0 0 0 0.125em rgba(255, 221, 87, 0.25); }\n #optimole-app .select.is-danger:not(:hover)::after {\n border-color: #d54222; }\n #optimole-app .select.is-danger select {\n border-color: #d54222; }\n #optimole-app .select.is-danger select:hover, #optimole-app .select.is-danger select.is-hovered {\n border-color: #bf3b1e; }\n #optimole-app .select.is-danger select:focus, #optimole-app .select.is-danger select.is-focused, #optimole-app .select.is-danger select:active, #optimole-app .select.is-danger select.is-active {\n box-shadow: 0 0 0 0.125em rgba(213, 66, 34, 0.25); }\n #optimole-app .select.is-small {\n border-radius: 2px;\n font-size: 0.75rem; }\n #optimole-app .select.is-medium {\n font-size: 1.25rem; }\n #optimole-app .select.is-large {\n font-size: 1.5rem; }\n #optimole-app .select.is-disabled::after {\n border-color: #7a7a7a; }\n #optimole-app .select.is-fullwidth {\n width: 100%; }\n #optimole-app .select.is-fullwidth select {\n width: 100%; }\n #optimole-app .select.is-loading::after {\n margin-top: 0;\n position: absolute;\n right: 0.625em;\n top: 0.625em;\n transform: none; }\n #optimole-app .select.is-loading.is-small:after {\n font-size: 0.75rem; }\n #optimole-app .select.is-loading.is-medium:after {\n font-size: 1.25rem; }\n #optimole-app .select.is-loading.is-large:after {\n font-size: 1.5rem; }\n #optimole-app .file {\n -ms-flex-align: stretch;\n align-items: stretch;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: start;\n justify-content: flex-start;\n position: relative; }\n #optimole-app .file.is-white .file-cta {\n background-color: white;\n border-color: transparent;\n color: #0a0a0a; }\n #optimole-app .file.is-white:hover .file-cta, #optimole-app .file.is-white.is-hovered .file-cta {\n background-color: #f9f9f9;\n border-color: transparent;\n color: #0a0a0a; }\n #optimole-app .file.is-white:focus .file-cta, #optimole-app .file.is-white.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(255, 255, 255, 0.25);\n color: #0a0a0a; }\n #optimole-app .file.is-white:active .file-cta, #optimole-app .file.is-white.is-active .file-cta {\n background-color: #f2f2f2;\n border-color: transparent;\n color: #0a0a0a; }\n #optimole-app .file.is-black .file-cta {\n background-color: #0a0a0a;\n border-color: transparent;\n color: white; }\n #optimole-app .file.is-black:hover .file-cta, #optimole-app .file.is-black.is-hovered .file-cta {\n background-color: #040404;\n border-color: transparent;\n color: white; }\n #optimole-app .file.is-black:focus .file-cta, #optimole-app .file.is-black.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(10, 10, 10, 0.25);\n color: white; }\n #optimole-app .file.is-black:active .file-cta, #optimole-app .file.is-black.is-active .file-cta {\n background-color: black;\n border-color: transparent;\n color: white; }\n #optimole-app .file.is-light .file-cta {\n background-color: whitesmoke;\n border-color: transparent;\n color: #363636; }\n #optimole-app .file.is-light:hover .file-cta, #optimole-app .file.is-light.is-hovered .file-cta {\n background-color: #eeeeee;\n border-color: transparent;\n color: #363636; }\n #optimole-app .file.is-light:focus .file-cta, #optimole-app .file.is-light.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(245, 245, 245, 0.25);\n color: #363636; }\n #optimole-app .file.is-light:active .file-cta, #optimole-app .file.is-light.is-active .file-cta {\n background-color: #e8e8e8;\n border-color: transparent;\n color: #363636; }\n #optimole-app .file.is-dark .file-cta {\n background-color: #363636;\n border-color: transparent;\n color: whitesmoke; }\n #optimole-app .file.is-dark:hover .file-cta, #optimole-app .file.is-dark.is-hovered .file-cta {\n background-color: #2f2f2f;\n border-color: transparent;\n color: whitesmoke; }\n #optimole-app .file.is-dark:focus .file-cta, #optimole-app .file.is-dark.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(54, 54, 54, 0.25);\n color: whitesmoke; }\n #optimole-app .file.is-dark:active .file-cta, #optimole-app .file.is-dark.is-active .file-cta {\n background-color: #292929;\n border-color: transparent;\n color: whitesmoke; }\n #optimole-app .file.is-primary .file-cta {\n background-color: #e7602a;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-primary:hover .file-cta, #optimole-app .file.is-primary.is-hovered .file-cta {\n background-color: #e6571f;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-primary:focus .file-cta, #optimole-app .file.is-primary.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(231, 96, 42, 0.25);\n color: #fff; }\n #optimole-app .file.is-primary:active .file-cta, #optimole-app .file.is-primary.is-active .file-cta {\n background-color: #de5119;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-link .file-cta {\n background-color: #3273dc;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-link:hover .file-cta, #optimole-app .file.is-link.is-hovered .file-cta {\n background-color: #276cda;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-link:focus .file-cta, #optimole-app .file.is-link.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(50, 115, 220, 0.25);\n color: #fff; }\n #optimole-app .file.is-link:active .file-cta, #optimole-app .file.is-link.is-active .file-cta {\n background-color: #2366d1;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-info .file-cta {\n background-color: #008ec2;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-info:hover .file-cta, #optimole-app .file.is-info.is-hovered .file-cta {\n background-color: #0085b5;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-info:focus .file-cta, #optimole-app .file.is-info.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(0, 142, 194, 0.25);\n color: #fff; }\n #optimole-app .file.is-info:active .file-cta, #optimole-app .file.is-info.is-active .file-cta {\n background-color: #007ba9;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-success .file-cta {\n background-color: #34a85e;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-success:hover .file-cta, #optimole-app .file.is-success.is-hovered .file-cta {\n background-color: #319e59;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-success:focus .file-cta, #optimole-app .file.is-success.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(52, 168, 94, 0.25);\n color: #fff; }\n #optimole-app .file.is-success:active .file-cta, #optimole-app .file.is-success.is-active .file-cta {\n background-color: #2e9553;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-warning .file-cta {\n background-color: #ffdd57;\n border-color: transparent;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .file.is-warning:hover .file-cta, #optimole-app .file.is-warning.is-hovered .file-cta {\n background-color: #ffdb4a;\n border-color: transparent;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .file.is-warning:focus .file-cta, #optimole-app .file.is-warning.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(255, 221, 87, 0.25);\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .file.is-warning:active .file-cta, #optimole-app .file.is-warning.is-active .file-cta {\n background-color: #ffd83d;\n border-color: transparent;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .file.is-danger .file-cta {\n background-color: #d54222;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-danger:hover .file-cta, #optimole-app .file.is-danger.is-hovered .file-cta {\n background-color: #ca3f20;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-danger:focus .file-cta, #optimole-app .file.is-danger.is-focused .file-cta {\n border-color: transparent;\n box-shadow: 0 0 0.5em rgba(213, 66, 34, 0.25);\n color: #fff; }\n #optimole-app .file.is-danger:active .file-cta, #optimole-app .file.is-danger.is-active .file-cta {\n background-color: #bf3b1e;\n border-color: transparent;\n color: #fff; }\n #optimole-app .file.is-small {\n font-size: 0.75rem; }\n #optimole-app .file.is-medium {\n font-size: 1.25rem; }\n #optimole-app .file.is-medium .file-icon .fa {\n font-size: 21px; }\n #optimole-app .file.is-large {\n font-size: 1.5rem; }\n #optimole-app .file.is-large .file-icon .fa {\n font-size: 28px; }\n #optimole-app .file.has-name .file-cta {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0; }\n #optimole-app .file.has-name .file-name {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0; }\n #optimole-app .file.has-name.is-empty .file-cta {\n border-radius: 4px; }\n #optimole-app .file.has-name.is-empty .file-name {\n display: none; }\n #optimole-app .file.is-boxed .file-label {\n -ms-flex-direction: column;\n flex-direction: column; }\n #optimole-app .file.is-boxed .file-cta {\n -ms-flex-direction: column;\n flex-direction: column;\n height: auto;\n padding: 1em 3em; }\n #optimole-app .file.is-boxed .file-name {\n border-width: 0 1px 1px; }\n #optimole-app .file.is-boxed .file-icon {\n height: 1.5em;\n width: 1.5em; }\n #optimole-app .file.is-boxed .file-icon .fa {\n font-size: 21px; }\n #optimole-app .file.is-boxed.is-small .file-icon .fa {\n font-size: 14px; }\n #optimole-app .file.is-boxed.is-medium .file-icon .fa {\n font-size: 28px; }\n #optimole-app .file.is-boxed.is-large .file-icon .fa {\n font-size: 35px; }\n #optimole-app .file.is-boxed.has-name .file-cta {\n border-radius: 4px 4px 0 0; }\n #optimole-app .file.is-boxed.has-name .file-name {\n border-radius: 0 0 4px 4px;\n border-width: 0 1px 1px; }\n #optimole-app .file.is-centered {\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .file.is-fullwidth .file-label {\n width: 100%; }\n #optimole-app .file.is-fullwidth .file-name {\n -ms-flex-positive: 1;\n flex-grow: 1;\n max-width: none; }\n #optimole-app .file.is-right {\n -ms-flex-pack: end;\n justify-content: flex-end; }\n #optimole-app .file.is-right .file-cta {\n border-radius: 0 4px 4px 0; }\n #optimole-app .file.is-right .file-name {\n border-radius: 4px 0 0 4px;\n border-width: 1px 0 1px 1px;\n -ms-flex-order: -1;\n order: -1; }\n #optimole-app .file-label {\n -ms-flex-align: stretch;\n align-items: stretch;\n display: -ms-flexbox;\n display: flex;\n cursor: pointer;\n -ms-flex-pack: start;\n justify-content: flex-start;\n overflow: hidden;\n position: relative; }\n #optimole-app .file-label:hover .file-cta {\n background-color: #eeeeee;\n color: #363636; }\n #optimole-app .file-label:hover .file-name {\n border-color: #d5d5d5; }\n #optimole-app .file-label:active .file-cta {\n background-color: #e8e8e8;\n color: #363636; }\n #optimole-app .file-label:active .file-name {\n border-color: #cfcfcf; }\n #optimole-app .file-input {\n height: 0.01em;\n left: 0;\n outline: none;\n position: absolute;\n top: 0;\n width: 0.01em; }\n #optimole-app .file-cta,\n #optimole-app .file-name {\n border-color: #dbdbdb;\n border-radius: 4px;\n font-size: 1em;\n padding-left: 1em;\n padding-right: 1em;\n white-space: nowrap; }\n #optimole-app .file-cta {\n background-color: whitesmoke;\n color: #4a4a4a; }\n #optimole-app .file-name {\n border-color: #dbdbdb;\n border-style: solid;\n border-width: 1px 1px 1px 0;\n display: block;\n max-width: 16em;\n overflow: hidden;\n text-align: left;\n text-overflow: ellipsis; }\n #optimole-app .file-icon {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n height: 1em;\n -ms-flex-pack: center;\n justify-content: center;\n margin-right: 0.5em;\n width: 1em; }\n #optimole-app .file-icon .fa {\n font-size: 14px; }\n #optimole-app .label {\n color: #363636;\n display: block;\n font-size: 1rem;\n font-weight: 700; }\n #optimole-app .label:not(:last-child) {\n margin-bottom: 0.5em; }\n #optimole-app .label.is-small {\n font-size: 0.75rem; }\n #optimole-app .label.is-medium {\n font-size: 1.25rem; }\n #optimole-app .label.is-large {\n font-size: 1.5rem; }\n #optimole-app .help {\n display: block;\n font-size: 0.75rem;\n margin-top: 0.25rem; }\n #optimole-app .help.is-white {\n color: white; }\n #optimole-app .help.is-black {\n color: #0a0a0a; }\n #optimole-app .help.is-light {\n color: whitesmoke; }\n #optimole-app .help.is-dark {\n color: #363636; }\n #optimole-app .help.is-primary {\n color: #e7602a; }\n #optimole-app .help.is-link {\n color: #3273dc; }\n #optimole-app .help.is-info {\n color: #008ec2; }\n #optimole-app .help.is-success {\n color: #34a85e; }\n #optimole-app .help.is-warning {\n color: #ffdd57; }\n #optimole-app .help.is-danger {\n color: #d54222; }\n #optimole-app .field:not(:last-child) {\n margin-bottom: 0.75rem; }\n #optimole-app .field.has-addons {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n #optimole-app .field.has-addons .control:not(:last-child) {\n margin-right: -1px; }\n #optimole-app .field.has-addons .control:not(:first-child):not(:last-child) .button,\n #optimole-app .field.has-addons .control:not(:first-child):not(:last-child) .input,\n #optimole-app .field.has-addons .control:not(:first-child):not(:last-child) .select select {\n border-radius: 0; }\n #optimole-app .field.has-addons .control:first-child .button,\n #optimole-app .field.has-addons .control:first-child .input,\n #optimole-app .field.has-addons .control:first-child .select select {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0; }\n #optimole-app .field.has-addons .control:last-child .button,\n #optimole-app .field.has-addons .control:last-child .input,\n #optimole-app .field.has-addons .control:last-child .select select {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0; }\n #optimole-app .field.has-addons .control .button:hover, #optimole-app .field.has-addons .control .button.is-hovered,\n #optimole-app .field.has-addons .control .input:hover,\n #optimole-app .field.has-addons .control .input.is-hovered,\n #optimole-app .field.has-addons .control .select select:hover,\n #optimole-app .field.has-addons .control .select select.is-hovered {\n z-index: 2; }\n #optimole-app .field.has-addons .control .button:focus, #optimole-app .field.has-addons .control .button.is-focused, #optimole-app .field.has-addons .control .button:active, #optimole-app .field.has-addons .control .button.is-active,\n #optimole-app .field.has-addons .control .input:focus,\n #optimole-app .field.has-addons .control .input.is-focused,\n #optimole-app .field.has-addons .control .input:active,\n #optimole-app .field.has-addons .control .input.is-active,\n #optimole-app .field.has-addons .control .select select:focus,\n #optimole-app .field.has-addons .control .select select.is-focused,\n #optimole-app .field.has-addons .control .select select:active,\n #optimole-app .field.has-addons .control .select select.is-active {\n z-index: 3; }\n #optimole-app .field.has-addons .control .button:focus:hover, #optimole-app .field.has-addons .control .button.is-focused:hover, #optimole-app .field.has-addons .control .button:active:hover, #optimole-app .field.has-addons .control .button.is-active:hover,\n #optimole-app .field.has-addons .control .input:focus:hover,\n #optimole-app .field.has-addons .control .input.is-focused:hover,\n #optimole-app .field.has-addons .control .input:active:hover,\n #optimole-app .field.has-addons .control .input.is-active:hover,\n #optimole-app .field.has-addons .control .select select:focus:hover,\n #optimole-app .field.has-addons .control .select select.is-focused:hover,\n #optimole-app .field.has-addons .control .select select:active:hover,\n #optimole-app .field.has-addons .control .select select.is-active:hover {\n z-index: 4; }\n #optimole-app .field.has-addons .control.is-expanded {\n -ms-flex-positive: 1;\n flex-grow: 1; }\n #optimole-app .field.has-addons.has-addons-centered {\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .field.has-addons.has-addons-right {\n -ms-flex-pack: end;\n justify-content: flex-end; }\n #optimole-app .field.has-addons.has-addons-fullwidth .control {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 0;\n flex-shrink: 0; }\n #optimole-app .field.is-grouped {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n #optimole-app .field.is-grouped > .control {\n -ms-flex-negative: 0;\n flex-shrink: 0; }\n #optimole-app .field.is-grouped > .control:not(:last-child) {\n margin-bottom: 0;\n margin-right: 0.75rem; }\n #optimole-app .field.is-grouped > .control.is-expanded {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1; }\n #optimole-app .field.is-grouped.is-grouped-centered {\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .field.is-grouped.is-grouped-right {\n -ms-flex-pack: end;\n justify-content: flex-end; }\n #optimole-app .field.is-grouped.is-grouped-multiline {\n -ms-flex-wrap: wrap;\n flex-wrap: wrap; }\n #optimole-app .field.is-grouped.is-grouped-multiline > .control:last-child, #optimole-app .field.is-grouped.is-grouped-multiline > .control:not(:last-child) {\n margin-bottom: 0.75rem; }\n #optimole-app .field.is-grouped.is-grouped-multiline:last-child {\n margin-bottom: -0.75rem; }\n #optimole-app .field.is-grouped.is-grouped-multiline:not(:last-child) {\n margin-bottom: 0; }\n @media screen and (min-width: 769px), print {\n #optimole-app .field.is-horizontal {\n display: -ms-flexbox;\n display: flex; } }\n #optimole-app .field-label .label {\n font-size: inherit; }\n @media screen and (max-width: 768px) {\n #optimole-app .field-label {\n margin-bottom: 0.5rem; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .field-label {\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n margin-right: 1.5rem;\n text-align: right; }\n #optimole-app .field-label.is-small {\n font-size: 0.75rem;\n padding-top: 0.375em; }\n #optimole-app .field-label.is-normal {\n padding-top: 0.375em; }\n #optimole-app .field-label.is-medium {\n font-size: 1.25rem;\n padding-top: 0.375em; }\n #optimole-app .field-label.is-large {\n font-size: 1.5rem;\n padding-top: 0.375em; } }\n #optimole-app .field-body .field .field {\n margin-bottom: 0; }\n @media screen and (min-width: 769px), print {\n #optimole-app .field-body {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n -ms-flex-positive: 5;\n flex-grow: 5;\n -ms-flex-negative: 1;\n flex-shrink: 1; }\n #optimole-app .field-body .field {\n margin-bottom: 0; }\n #optimole-app .field-body > .field {\n -ms-flex-negative: 1;\n flex-shrink: 1; }\n #optimole-app .field-body > .field:not(.is-narrow) {\n -ms-flex-positive: 1;\n flex-grow: 1; }\n #optimole-app .field-body > .field:not(:last-child) {\n margin-right: 0.75rem; } }\n #optimole-app .control {\n font-size: 1rem;\n position: relative;\n text-align: left; }\n #optimole-app .control.has-icon .icon {\n color: #dbdbdb;\n height: 2.25em;\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 2.25em;\n z-index: 4; }\n #optimole-app .control.has-icon .input:focus + .icon {\n color: #7a7a7a; }\n #optimole-app .control.has-icon .input.is-small + .icon {\n font-size: 0.75rem; }\n #optimole-app .control.has-icon .input.is-medium + .icon {\n font-size: 1.25rem; }\n #optimole-app .control.has-icon .input.is-large + .icon {\n font-size: 1.5rem; }\n #optimole-app .control.has-icon:not(.has-icon-right) .icon {\n left: 0; }\n #optimole-app .control.has-icon:not(.has-icon-right) .input {\n padding-left: 2.25em; }\n #optimole-app .control.has-icon.has-icon-right .icon {\n right: 0; }\n #optimole-app .control.has-icon.has-icon-right .input {\n padding-right: 2.25em; }\n #optimole-app .control.has-icons-left .input:focus ~ .icon,\n #optimole-app .control.has-icons-left .select:focus ~ .icon, #optimole-app .control.has-icons-right .input:focus ~ .icon,\n #optimole-app .control.has-icons-right .select:focus ~ .icon {\n color: #7a7a7a; }\n #optimole-app .control.has-icons-left .input.is-small ~ .icon,\n #optimole-app .control.has-icons-left .select.is-small ~ .icon, #optimole-app .control.has-icons-right .input.is-small ~ .icon,\n #optimole-app .control.has-icons-right .select.is-small ~ .icon {\n font-size: 0.75rem; }\n #optimole-app .control.has-icons-left .input.is-medium ~ .icon,\n #optimole-app .control.has-icons-left .select.is-medium ~ .icon, #optimole-app .control.has-icons-right .input.is-medium ~ .icon,\n #optimole-app .control.has-icons-right .select.is-medium ~ .icon {\n font-size: 1.25rem; }\n #optimole-app .control.has-icons-left .input.is-large ~ .icon,\n #optimole-app .control.has-icons-left .select.is-large ~ .icon, #optimole-app .control.has-icons-right .input.is-large ~ .icon,\n #optimole-app .control.has-icons-right .select.is-large ~ .icon {\n font-size: 1.5rem; }\n #optimole-app .control.has-icons-left .icon, #optimole-app .control.has-icons-right .icon {\n color: #dbdbdb;\n height: 2.25em;\n pointer-events: none;\n position: absolute;\n top: 0;\n width: 2.25em;\n z-index: 4; }\n #optimole-app .control.has-icons-left .input,\n #optimole-app .control.has-icons-left .select select {\n padding-left: 2.25em; }\n #optimole-app .control.has-icons-left .icon.is-left {\n left: 0; }\n #optimole-app .control.has-icons-right .input,\n #optimole-app .control.has-icons-right .select select {\n padding-right: 2.25em; }\n #optimole-app .control.has-icons-right .icon.is-right {\n right: 0; }\n #optimole-app .control.is-loading::after {\n position: absolute !important;\n right: 0.625em;\n top: 0.625em;\n z-index: 4; }\n #optimole-app .control.is-loading.is-small:after {\n font-size: 0.75rem; }\n #optimole-app .control.is-loading.is-medium:after {\n font-size: 1.25rem; }\n #optimole-app .control.is-loading.is-large:after {\n font-size: 1.5rem; }\n #optimole-app .icon {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-inline-flexbox;\n display: inline-flex;\n -ms-flex-pack: center;\n justify-content: center;\n height: 1.5rem;\n width: 1.5rem; }\n #optimole-app .icon.is-small {\n height: 1rem;\n width: 1rem; }\n #optimole-app .icon.is-medium {\n height: 2rem;\n width: 2rem; }\n #optimole-app .icon.is-large {\n height: 3rem;\n width: 3rem; }\n #optimole-app .image {\n display: block;\n position: relative; }\n #optimole-app .image img {\n display: block;\n height: auto;\n width: 100%; }\n #optimole-app .image img.is-rounded {\n border-radius: 290486px; }\n #optimole-app .image.is-square img, #optimole-app .image.is-1by1 img, #optimole-app .image.is-5by4 img, #optimole-app .image.is-4by3 img, #optimole-app .image.is-3by2 img, #optimole-app .image.is-5by3 img, #optimole-app .image.is-16by9 img, #optimole-app .image.is-2by1 img, #optimole-app .image.is-3by1 img, #optimole-app .image.is-4by5 img, #optimole-app .image.is-3by4 img, #optimole-app .image.is-2by3 img, #optimole-app .image.is-3by5 img, #optimole-app .image.is-9by16 img, #optimole-app .image.is-1by2 img, #optimole-app .image.is-1by3 img {\n height: 100%;\n width: 100%; }\n #optimole-app .image.is-square, #optimole-app .image.is-1by1 {\n padding-top: 100%; }\n #optimole-app .image.is-5by4 {\n padding-top: 80%; }\n #optimole-app .image.is-4by3 {\n padding-top: 75%; }\n #optimole-app .image.is-3by2 {\n padding-top: 66.6666%; }\n #optimole-app .image.is-5by3 {\n padding-top: 60%; }\n #optimole-app .image.is-16by9 {\n padding-top: 56.25%; }\n #optimole-app .image.is-2by1 {\n padding-top: 50%; }\n #optimole-app .image.is-3by1 {\n padding-top: 33.3333%; }\n #optimole-app .image.is-4by5 {\n padding-top: 125%; }\n #optimole-app .image.is-3by4 {\n padding-top: 133.3333%; }\n #optimole-app .image.is-2by3 {\n padding-top: 150%; }\n #optimole-app .image.is-3by5 {\n padding-top: 166.6666%; }\n #optimole-app .image.is-9by16 {\n padding-top: 177.7777%; }\n #optimole-app .image.is-1by2 {\n padding-top: 200%; }\n #optimole-app .image.is-1by3 {\n padding-top: 300%; }\n #optimole-app .image.is-16x16 {\n height: 16px;\n width: 16px; }\n #optimole-app .image.is-24x24 {\n height: 24px;\n width: 24px; }\n #optimole-app .image.is-32x32 {\n height: 32px;\n width: 32px; }\n #optimole-app .image.is-48x48 {\n height: 48px;\n width: 48px; }\n #optimole-app .image.is-64x64 {\n height: 64px;\n width: 64px; }\n #optimole-app .image.is-96x96 {\n height: 96px;\n width: 96px; }\n #optimole-app .image.is-128x128 {\n height: 128px;\n width: 128px; }\n #optimole-app .notification {\n background-color: whitesmoke;\n border-radius: 4px;\n padding: 1.25rem 2.5rem 1.25rem 1.5rem;\n position: relative; }\n #optimole-app .notification a:not(.button) {\n color: currentColor;\n text-decoration: underline; }\n #optimole-app .notification strong {\n color: currentColor; }\n #optimole-app .notification code,\n #optimole-app .notification pre {\n background: white; }\n #optimole-app .notification pre code {\n background: transparent; }\n #optimole-app .notification > .delete {\n position: absolute;\n right: 0.5rem;\n top: 0.5rem; }\n #optimole-app .notification .title,\n #optimole-app .notification .subtitle,\n #optimole-app .notification .content {\n color: currentColor; }\n #optimole-app .notification.is-white {\n background-color: white;\n color: #0a0a0a; }\n #optimole-app .notification.is-black {\n background-color: #0a0a0a;\n color: white; }\n #optimole-app .notification.is-light {\n background-color: whitesmoke;\n color: #363636; }\n #optimole-app .notification.is-dark {\n background-color: #363636;\n color: whitesmoke; }\n #optimole-app .notification.is-primary {\n background-color: #e7602a;\n color: #fff; }\n #optimole-app .notification.is-link {\n background-color: #3273dc;\n color: #fff; }\n #optimole-app .notification.is-info {\n background-color: #008ec2;\n color: #fff; }\n #optimole-app .notification.is-success {\n background-color: #34a85e;\n color: #fff; }\n #optimole-app .notification.is-warning {\n background-color: #ffdd57;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .notification.is-danger {\n background-color: #d54222;\n color: #fff; }\n #optimole-app .progress {\n -moz-appearance: none;\n -webkit-appearance: none;\n border: none;\n border-radius: 290486px;\n display: block;\n height: 1rem;\n overflow: hidden;\n padding: 0;\n width: 100%; }\n #optimole-app .progress::-webkit-progress-bar {\n background-color: #dbdbdb; }\n #optimole-app .progress::-webkit-progress-value {\n background-color: #4a4a4a; }\n #optimole-app .progress::-moz-progress-bar {\n background-color: #4a4a4a; }\n #optimole-app .progress::-ms-fill {\n background-color: #4a4a4a;\n border: none; }\n #optimole-app .progress.is-white::-webkit-progress-value {\n background-color: white; }\n #optimole-app .progress.is-white::-moz-progress-bar {\n background-color: white; }\n #optimole-app .progress.is-white::-ms-fill {\n background-color: white; }\n #optimole-app .progress.is-black::-webkit-progress-value {\n background-color: #0a0a0a; }\n #optimole-app .progress.is-black::-moz-progress-bar {\n background-color: #0a0a0a; }\n #optimole-app .progress.is-black::-ms-fill {\n background-color: #0a0a0a; }\n #optimole-app .progress.is-light::-webkit-progress-value {\n background-color: whitesmoke; }\n #optimole-app .progress.is-light::-moz-progress-bar {\n background-color: whitesmoke; }\n #optimole-app .progress.is-light::-ms-fill {\n background-color: whitesmoke; }\n #optimole-app .progress.is-dark::-webkit-progress-value {\n background-color: #363636; }\n #optimole-app .progress.is-dark::-moz-progress-bar {\n background-color: #363636; }\n #optimole-app .progress.is-dark::-ms-fill {\n background-color: #363636; }\n #optimole-app .progress.is-primary::-webkit-progress-value {\n background-color: #e7602a; }\n #optimole-app .progress.is-primary::-moz-progress-bar {\n background-color: #e7602a; }\n #optimole-app .progress.is-primary::-ms-fill {\n background-color: #e7602a; }\n #optimole-app .progress.is-link::-webkit-progress-value {\n background-color: #3273dc; }\n #optimole-app .progress.is-link::-moz-progress-bar {\n background-color: #3273dc; }\n #optimole-app .progress.is-link::-ms-fill {\n background-color: #3273dc; }\n #optimole-app .progress.is-info::-webkit-progress-value {\n background-color: #008ec2; }\n #optimole-app .progress.is-info::-moz-progress-bar {\n background-color: #008ec2; }\n #optimole-app .progress.is-info::-ms-fill {\n background-color: #008ec2; }\n #optimole-app .progress.is-success::-webkit-progress-value {\n background-color: #34a85e; }\n #optimole-app .progress.is-success::-moz-progress-bar {\n background-color: #34a85e; }\n #optimole-app .progress.is-success::-ms-fill {\n background-color: #34a85e; }\n #optimole-app .progress.is-warning::-webkit-progress-value {\n background-color: #ffdd57; }\n #optimole-app .progress.is-warning::-moz-progress-bar {\n background-color: #ffdd57; }\n #optimole-app .progress.is-warning::-ms-fill {\n background-color: #ffdd57; }\n #optimole-app .progress.is-danger::-webkit-progress-value {\n background-color: #d54222; }\n #optimole-app .progress.is-danger::-moz-progress-bar {\n background-color: #d54222; }\n #optimole-app .progress.is-danger::-ms-fill {\n background-color: #d54222; }\n #optimole-app .progress.is-small {\n height: 0.75rem; }\n #optimole-app .progress.is-medium {\n height: 1.25rem; }\n #optimole-app .progress.is-large {\n height: 1.5rem; }\n #optimole-app .table {\n background-color: white;\n color: #363636; }\n #optimole-app .table td,\n #optimole-app .table th {\n border: 1px solid #dbdbdb;\n border-width: 0 0 1px;\n padding: 0.5em 0.75em;\n vertical-align: top; }\n #optimole-app .table td.is-white,\n #optimole-app .table th.is-white {\n background-color: white;\n border-color: white;\n color: #0a0a0a; }\n #optimole-app .table td.is-black,\n #optimole-app .table th.is-black {\n background-color: #0a0a0a;\n border-color: #0a0a0a;\n color: white; }\n #optimole-app .table td.is-light,\n #optimole-app .table th.is-light {\n background-color: whitesmoke;\n border-color: whitesmoke;\n color: #363636; }\n #optimole-app .table td.is-dark,\n #optimole-app .table th.is-dark {\n background-color: #363636;\n border-color: #363636;\n color: whitesmoke; }\n #optimole-app .table td.is-primary,\n #optimole-app .table th.is-primary {\n background-color: #e7602a;\n border-color: #e7602a;\n color: #fff; }\n #optimole-app .table td.is-link,\n #optimole-app .table th.is-link {\n background-color: #3273dc;\n border-color: #3273dc;\n color: #fff; }\n #optimole-app .table td.is-info,\n #optimole-app .table th.is-info {\n background-color: #008ec2;\n border-color: #008ec2;\n color: #fff; }\n #optimole-app .table td.is-success,\n #optimole-app .table th.is-success {\n background-color: #34a85e;\n border-color: #34a85e;\n color: #fff; }\n #optimole-app .table td.is-warning,\n #optimole-app .table th.is-warning {\n background-color: #ffdd57;\n border-color: #ffdd57;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .table td.is-danger,\n #optimole-app .table th.is-danger {\n background-color: #d54222;\n border-color: #d54222;\n color: #fff; }\n #optimole-app .table td.is-narrow,\n #optimole-app .table th.is-narrow {\n white-space: nowrap;\n width: 1%; }\n #optimole-app .table td.is-selected,\n #optimole-app .table th.is-selected {\n background-color: #e7602a;\n color: #fff; }\n #optimole-app .table td.is-selected a,\n #optimole-app .table td.is-selected strong,\n #optimole-app .table th.is-selected a,\n #optimole-app .table th.is-selected strong {\n color: currentColor; }\n #optimole-app .table th {\n color: #363636;\n text-align: left; }\n #optimole-app .table tr.is-selected {\n background-color: #e7602a;\n color: #fff; }\n #optimole-app .table tr.is-selected a,\n #optimole-app .table tr.is-selected strong {\n color: currentColor; }\n #optimole-app .table tr.is-selected td,\n #optimole-app .table tr.is-selected th {\n border-color: #fff;\n color: currentColor; }\n #optimole-app .table thead td,\n #optimole-app .table thead th {\n border-width: 0 0 2px;\n color: #363636; }\n #optimole-app .table tfoot td,\n #optimole-app .table tfoot th {\n border-width: 2px 0 0;\n color: #363636; }\n #optimole-app .table tbody tr:last-child td,\n #optimole-app .table tbody tr:last-child th {\n border-bottom-width: 0; }\n #optimole-app .table.is-bordered td,\n #optimole-app .table.is-bordered th {\n border-width: 1px; }\n #optimole-app .table.is-bordered tr:last-child td,\n #optimole-app .table.is-bordered tr:last-child th {\n border-bottom-width: 1px; }\n #optimole-app .table.is-fullwidth {\n width: 100%; }\n #optimole-app .table.is-hoverable tbody tr:not(.is-selected):hover {\n background-color: #fafafa; }\n #optimole-app .table.is-hoverable.is-striped tbody tr:not(.is-selected):hover {\n background-color: whitesmoke; }\n #optimole-app .table.is-narrow td,\n #optimole-app .table.is-narrow th {\n padding: 0.25em 0.5em; }\n #optimole-app .table.is-striped tbody tr:not(.is-selected):nth-child(even) {\n background-color: #fafafa; }\n #optimole-app .table-container {\n -webkit-overflow-scrolling: touch;\n overflow: auto;\n overflow-y: hidden;\n max-width: 100%; }\n #optimole-app .tags {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n #optimole-app .tags .tag {\n margin-bottom: 0.5rem; }\n #optimole-app .tags .tag:not(:last-child) {\n margin-right: 0.5rem; }\n #optimole-app .tags:last-child {\n margin-bottom: -0.5rem; }\n #optimole-app .tags:not(:last-child) {\n margin-bottom: 1rem; }\n #optimole-app .tags.has-addons .tag {\n margin-right: 0; }\n #optimole-app .tags.has-addons .tag:not(:first-child) {\n border-bottom-left-radius: 0;\n border-top-left-radius: 0; }\n #optimole-app .tags.has-addons .tag:not(:last-child) {\n border-bottom-right-radius: 0;\n border-top-right-radius: 0; }\n #optimole-app .tags.is-centered {\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .tags.is-centered .tag {\n margin-right: 0.25rem;\n margin-left: 0.25rem; }\n #optimole-app .tags.is-right {\n -ms-flex-pack: end;\n justify-content: flex-end; }\n #optimole-app .tags.is-right .tag:not(:first-child) {\n margin-left: 0.5rem; }\n #optimole-app .tags.is-right .tag:not(:last-child) {\n margin-right: 0; }\n #optimole-app .tag:not(body) {\n -ms-flex-align: center;\n align-items: center;\n background-color: whitesmoke;\n border-radius: 4px;\n color: #4a4a4a;\n display: -ms-inline-flexbox;\n display: inline-flex;\n font-size: 0.75rem;\n height: 2em;\n -ms-flex-pack: center;\n justify-content: center;\n line-height: 1.5;\n padding-left: 0.75em;\n padding-right: 0.75em;\n white-space: nowrap; }\n #optimole-app .tag:not(body) .delete {\n margin-left: 0.25rem;\n margin-right: -0.375rem; }\n #optimole-app .tag:not(body).is-white {\n background-color: white;\n color: #0a0a0a; }\n #optimole-app .tag:not(body).is-black {\n background-color: #0a0a0a;\n color: white; }\n #optimole-app .tag:not(body).is-light {\n background-color: whitesmoke;\n color: #363636; }\n #optimole-app .tag:not(body).is-dark {\n background-color: #363636;\n color: whitesmoke; }\n #optimole-app .tag:not(body).is-primary {\n background-color: #e7602a;\n color: #fff; }\n #optimole-app .tag:not(body).is-link {\n background-color: #3273dc;\n color: #fff; }\n #optimole-app .tag:not(body).is-info {\n background-color: #008ec2;\n color: #fff; }\n #optimole-app .tag:not(body).is-success {\n background-color: #34a85e;\n color: #fff; }\n #optimole-app .tag:not(body).is-warning {\n background-color: #ffdd57;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .tag:not(body).is-danger {\n background-color: #d54222;\n color: #fff; }\n #optimole-app .tag:not(body).is-medium {\n font-size: 1rem; }\n #optimole-app .tag:not(body).is-large {\n font-size: 1.25rem; }\n #optimole-app .tag:not(body) .icon:first-child:not(:last-child) {\n margin-left: -0.375em;\n margin-right: 0.1875em; }\n #optimole-app .tag:not(body) .icon:last-child:not(:first-child) {\n margin-left: 0.1875em;\n margin-right: -0.375em; }\n #optimole-app .tag:not(body) .icon:first-child:last-child {\n margin-left: -0.375em;\n margin-right: -0.375em; }\n #optimole-app .tag:not(body).is-delete {\n margin-left: 1px;\n padding: 0;\n position: relative;\n width: 2em; }\n #optimole-app .tag:not(body).is-delete::before, #optimole-app .tag:not(body).is-delete::after {\n background-color: currentColor;\n content: \"\";\n display: block;\n left: 50%;\n position: absolute;\n top: 50%;\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n transform-origin: center center; }\n #optimole-app .tag:not(body).is-delete::before {\n height: 1px;\n width: 50%; }\n #optimole-app .tag:not(body).is-delete::after {\n height: 50%;\n width: 1px; }\n #optimole-app .tag:not(body).is-delete:hover, #optimole-app .tag:not(body).is-delete:focus {\n background-color: #e8e8e8; }\n #optimole-app .tag:not(body).is-delete:active {\n background-color: #dbdbdb; }\n #optimole-app .tag:not(body).is-rounded {\n border-radius: 290486px; }\n #optimole-app a.tag:hover {\n text-decoration: underline; }\n #optimole-app .title,\n #optimole-app .subtitle {\n word-break: break-word; }\n #optimole-app .title em,\n #optimole-app .title span,\n #optimole-app .subtitle em,\n #optimole-app .subtitle span {\n font-weight: inherit; }\n #optimole-app .title sub,\n #optimole-app .subtitle sub {\n font-size: 0.75em; }\n #optimole-app .title sup,\n #optimole-app .subtitle sup {\n font-size: 0.75em; }\n #optimole-app .title .tag,\n #optimole-app .subtitle .tag {\n vertical-align: middle; }\n #optimole-app .title {\n color: #363636;\n font-size: 2rem;\n font-weight: 600;\n line-height: 1.125; }\n #optimole-app .title strong {\n color: inherit;\n font-weight: inherit; }\n #optimole-app .title + .highlight {\n margin-top: -0.75rem; }\n #optimole-app .title:not(.is-spaced) + .subtitle {\n margin-top: -1.25rem; }\n #optimole-app .title.is-1 {\n font-size: 3rem; }\n #optimole-app .title.is-2 {\n font-size: 2.5rem; }\n #optimole-app .title.is-3 {\n font-size: 2rem; }\n #optimole-app .title.is-4 {\n font-size: 1.5rem; }\n #optimole-app .title.is-5 {\n font-size: 1.25rem; }\n #optimole-app .title.is-6 {\n font-size: 1rem; }\n #optimole-app .title.is-7 {\n font-size: 0.75rem; }\n #optimole-app .subtitle {\n color: #4a4a4a;\n font-size: 1.25rem;\n font-weight: 400;\n line-height: 1.25; }\n #optimole-app .subtitle strong {\n color: #363636;\n font-weight: 600; }\n #optimole-app .subtitle:not(.is-spaced) + .title {\n margin-top: -1.25rem; }\n #optimole-app .subtitle.is-1 {\n font-size: 3rem; }\n #optimole-app .subtitle.is-2 {\n font-size: 2.5rem; }\n #optimole-app .subtitle.is-3 {\n font-size: 2rem; }\n #optimole-app .subtitle.is-4 {\n font-size: 1.5rem; }\n #optimole-app .subtitle.is-5 {\n font-size: 1.25rem; }\n #optimole-app .subtitle.is-6 {\n font-size: 1rem; }\n #optimole-app .subtitle.is-7 {\n font-size: 0.75rem; }\n #optimole-app .heading {\n display: block;\n font-size: 11px;\n letter-spacing: 1px;\n margin-bottom: 5px;\n text-transform: uppercase; }\n #optimole-app .highlight {\n font-weight: 400;\n max-width: 100%;\n overflow: hidden;\n padding: 0; }\n #optimole-app .highlight pre {\n overflow: auto;\n max-width: 100%; }\n #optimole-app .number {\n -ms-flex-align: center;\n align-items: center;\n background-color: whitesmoke;\n border-radius: 290486px;\n display: -ms-inline-flexbox;\n display: inline-flex;\n font-size: 1.25rem;\n height: 2em;\n -ms-flex-pack: center;\n justify-content: center;\n margin-right: 1.5rem;\n min-width: 2.5em;\n padding: 0.25rem 0.5rem;\n text-align: center;\n vertical-align: top; }\n #optimole-app .breadcrumb {\n font-size: 1rem;\n white-space: nowrap; }\n #optimole-app .breadcrumb a {\n -ms-flex-align: center;\n align-items: center;\n color: #3273dc;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center;\n padding: 0 0.75em; }\n #optimole-app .breadcrumb a:hover {\n color: #363636; }\n #optimole-app .breadcrumb li {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .breadcrumb li:first-child a {\n padding-left: 0; }\n #optimole-app .breadcrumb li.is-active a {\n color: #363636;\n cursor: default;\n pointer-events: none; }\n #optimole-app .breadcrumb li + li::before {\n color: #b5b5b5;\n content: \"/\"; }\n #optimole-app .breadcrumb ul,\n #optimole-app .breadcrumb ol {\n -ms-flex-align: start;\n align-items: flex-start;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-wrap: wrap;\n flex-wrap: wrap;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n #optimole-app .breadcrumb .icon:first-child {\n margin-right: 0.5em; }\n #optimole-app .breadcrumb .icon:last-child {\n margin-left: 0.5em; }\n #optimole-app .breadcrumb.is-centered ol,\n #optimole-app .breadcrumb.is-centered ul {\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .breadcrumb.is-right ol,\n #optimole-app .breadcrumb.is-right ul {\n -ms-flex-pack: end;\n justify-content: flex-end; }\n #optimole-app .breadcrumb.is-small {\n font-size: 0.75rem; }\n #optimole-app .breadcrumb.is-medium {\n font-size: 1.25rem; }\n #optimole-app .breadcrumb.is-large {\n font-size: 1.5rem; }\n #optimole-app .breadcrumb.has-arrow-separator li + li::before {\n content: \"\\2192\"; }\n #optimole-app .breadcrumb.has-bullet-separator li + li::before {\n content: \"\\2022\"; }\n #optimole-app .breadcrumb.has-dot-separator li + li::before {\n content: \"\\B7\"; }\n #optimole-app .breadcrumb.has-succeeds-separator li + li::before {\n content: \"\\227B\"; }\n #optimole-app .card {\n background-color: white;\n box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);\n color: #4a4a4a;\n max-width: 100%;\n position: relative; }\n #optimole-app .card-header {\n background-color: none;\n -ms-flex-align: stretch;\n align-items: stretch;\n box-shadow: 0 1px 2px rgba(10, 10, 10, 0.1);\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .card-header-title {\n -ms-flex-align: center;\n align-items: center;\n color: #363636;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-positive: 1;\n flex-grow: 1;\n font-weight: 700;\n padding: 0.75rem; }\n #optimole-app .card-header-title.is-centered {\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .card-header-icon {\n -ms-flex-align: center;\n align-items: center;\n cursor: pointer;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center;\n padding: 0.75rem; }\n #optimole-app .card-image {\n display: block;\n position: relative; }\n #optimole-app .card-content {\n background-color: none;\n padding: 1.5rem; }\n #optimole-app .card-footer {\n background-color: none;\n border-top: 1px solid #dbdbdb;\n -ms-flex-align: stretch;\n align-items: stretch;\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .card-footer-item {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n -ms-flex-pack: center;\n justify-content: center;\n padding: 0.75rem; }\n #optimole-app .card-footer-item:not(:last-child) {\n border-right: 1px solid #dbdbdb; }\n #optimole-app .card .media:not(:last-child) {\n margin-bottom: 0.75rem; }\n #optimole-app .dropdown {\n display: -ms-inline-flexbox;\n display: inline-flex;\n position: relative;\n vertical-align: top; }\n #optimole-app .dropdown.is-active .dropdown-menu, #optimole-app .dropdown.is-hoverable:hover .dropdown-menu {\n display: block; }\n #optimole-app .dropdown.is-right .dropdown-menu {\n left: auto;\n right: 0; }\n #optimole-app .dropdown.is-up .dropdown-menu {\n bottom: 100%;\n padding-bottom: 4px;\n padding-top: initial;\n top: auto; }\n #optimole-app .dropdown-menu {\n display: none;\n left: 0;\n min-width: 12rem;\n padding-top: 4px;\n position: absolute;\n top: 100%;\n z-index: 20; }\n #optimole-app .dropdown-content {\n background-color: white;\n border-radius: 4px;\n box-shadow: 0 2px 3px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);\n padding-bottom: 0.5rem;\n padding-top: 0.5rem; }\n #optimole-app .dropdown-item {\n color: #4a4a4a;\n display: block;\n font-size: 0.875rem;\n line-height: 1.5;\n padding: 0.375rem 1rem;\n position: relative; }\n #optimole-app a.dropdown-item {\n padding-right: 3rem;\n white-space: nowrap; }\n #optimole-app a.dropdown-item:hover {\n background-color: whitesmoke;\n color: #0a0a0a; }\n #optimole-app a.dropdown-item.is-active {\n background-color: #3273dc;\n color: #fff; }\n #optimole-app .dropdown-divider {\n background-color: #dbdbdb;\n border: none;\n display: block;\n height: 1px;\n margin: 0.5rem 0; }\n #optimole-app .level {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: justify;\n justify-content: space-between; }\n #optimole-app .level code {\n border-radius: 4px; }\n #optimole-app .level img {\n display: inline-block;\n vertical-align: top; }\n #optimole-app .level.is-mobile {\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .level.is-mobile .level-left,\n #optimole-app .level.is-mobile .level-right {\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .level.is-mobile .level-left + .level-right {\n margin-top: 0; }\n #optimole-app .level.is-mobile .level-item {\n margin-right: 0.75rem; }\n #optimole-app .level.is-mobile .level-item:not(:last-child) {\n margin-bottom: 0; }\n #optimole-app .level.is-mobile .level-item:not(.is-narrow) {\n -ms-flex-positive: 1;\n flex-grow: 1; }\n @media screen and (min-width: 769px), print {\n #optimole-app .level {\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .level > .level-item:not(.is-narrow) {\n -ms-flex-positive: 1;\n flex-grow: 1; } }\n #optimole-app .level-item {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-preferred-size: auto;\n flex-basis: auto;\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .level-item .title,\n #optimole-app .level-item .subtitle {\n margin-bottom: 0; }\n @media screen and (max-width: 768px) {\n #optimole-app .level-item:not(:last-child) {\n margin-bottom: 0.75rem; } }\n #optimole-app .level-left,\n #optimole-app .level-right {\n -ms-flex-preferred-size: auto;\n flex-basis: auto;\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0; }\n #optimole-app .level-left .level-item.is-flexible,\n #optimole-app .level-right .level-item.is-flexible {\n -ms-flex-positive: 1;\n flex-grow: 1; }\n @media screen and (min-width: 769px), print {\n #optimole-app .level-left .level-item:not(:last-child),\n #optimole-app .level-right .level-item:not(:last-child) {\n margin-right: 0.75rem; } }\n #optimole-app .level-left {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n @media screen and (max-width: 768px) {\n #optimole-app .level-left + .level-right {\n margin-top: 1.5rem; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .level-left {\n display: -ms-flexbox;\n display: flex; } }\n #optimole-app .level-right {\n -ms-flex-align: center;\n align-items: center;\n -ms-flex-pack: end;\n justify-content: flex-end; }\n @media screen and (min-width: 769px), print {\n #optimole-app .level-right {\n display: -ms-flexbox;\n display: flex; } }\n #optimole-app .media {\n -ms-flex-align: start;\n align-items: flex-start;\n display: -ms-flexbox;\n display: flex;\n text-align: left; }\n #optimole-app .media .content:not(:last-child) {\n margin-bottom: 0.75rem; }\n #optimole-app .media .media {\n border-top: 1px solid rgba(219, 219, 219, 0.5);\n display: -ms-flexbox;\n display: flex;\n padding-top: 0.75rem; }\n #optimole-app .media .media .content:not(:last-child),\n #optimole-app .media .media .control:not(:last-child) {\n margin-bottom: 0.5rem; }\n #optimole-app .media .media .media {\n padding-top: 0.5rem; }\n #optimole-app .media .media .media + .media {\n margin-top: 0.5rem; }\n #optimole-app .media + .media {\n border-top: 1px solid rgba(219, 219, 219, 0.5);\n margin-top: 1rem;\n padding-top: 1rem; }\n #optimole-app .media.is-large + .media {\n margin-top: 1.5rem;\n padding-top: 1.5rem; }\n #optimole-app .media-left,\n #optimole-app .media-right {\n -ms-flex-preferred-size: auto;\n flex-basis: auto;\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0; }\n #optimole-app .media-left {\n margin-right: 1rem; }\n #optimole-app .media-right {\n margin-left: 1rem; }\n #optimole-app .media-content {\n -ms-flex-preferred-size: auto;\n flex-basis: auto;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1;\n text-align: left; }\n #optimole-app .menu {\n font-size: 1rem; }\n #optimole-app .menu.is-small {\n font-size: 0.75rem; }\n #optimole-app .menu.is-medium {\n font-size: 1.25rem; }\n #optimole-app .menu.is-large {\n font-size: 1.5rem; }\n #optimole-app .menu-list {\n line-height: 1.25; }\n #optimole-app .menu-list a {\n border-radius: 2px;\n color: #4a4a4a;\n display: block;\n padding: 0.5em 0.75em; }\n #optimole-app .menu-list a:hover {\n background-color: whitesmoke;\n color: #363636; }\n #optimole-app .menu-list a.is-active {\n background-color: #3273dc;\n color: #fff; }\n #optimole-app .menu-list li ul {\n border-left: 1px solid #dbdbdb;\n margin: 0.75em;\n padding-left: 0.75em; }\n #optimole-app .menu-label {\n color: #7a7a7a;\n font-size: 0.75em;\n letter-spacing: 0.1em;\n text-transform: uppercase; }\n #optimole-app .menu-label:not(:first-child) {\n margin-top: 1em; }\n #optimole-app .menu-label:not(:last-child) {\n margin-bottom: 1em; }\n #optimole-app .message {\n background-color: whitesmoke;\n border-radius: 4px;\n font-size: 1rem; }\n #optimole-app .message strong {\n color: currentColor; }\n #optimole-app .message a:not(.button):not(.tag) {\n color: currentColor;\n text-decoration: underline; }\n #optimole-app .message.is-small {\n font-size: 0.75rem; }\n #optimole-app .message.is-medium {\n font-size: 1.25rem; }\n #optimole-app .message.is-large {\n font-size: 1.5rem; }\n #optimole-app .message.is-white {\n background-color: white; }\n #optimole-app .message.is-white .message-header {\n background-color: white;\n color: #0a0a0a; }\n #optimole-app .message.is-white .message-body {\n border-color: white;\n color: #4d4d4d; }\n #optimole-app .message.is-black {\n background-color: #fafafa; }\n #optimole-app .message.is-black .message-header {\n background-color: #0a0a0a;\n color: white; }\n #optimole-app .message.is-black .message-body {\n border-color: #0a0a0a;\n color: #090909; }\n #optimole-app .message.is-light {\n background-color: #fafafa; }\n #optimole-app .message.is-light .message-header {\n background-color: whitesmoke;\n color: #363636; }\n #optimole-app .message.is-light .message-body {\n border-color: whitesmoke;\n color: #505050; }\n #optimole-app .message.is-dark {\n background-color: #fafafa; }\n #optimole-app .message.is-dark .message-header {\n background-color: #363636;\n color: whitesmoke; }\n #optimole-app .message.is-dark .message-body {\n border-color: #363636;\n color: #2a2a2a; }\n #optimole-app .message.is-primary {\n background-color: #fef8f6; }\n #optimole-app .message.is-primary .message-header {\n background-color: #e7602a;\n color: #fff; }\n #optimole-app .message.is-primary .message-body {\n border-color: #e7602a;\n color: #8e3a18; }\n #optimole-app .message.is-link {\n background-color: #f6f9fe; }\n #optimole-app .message.is-link .message-header {\n background-color: #3273dc;\n color: #fff; }\n #optimole-app .message.is-link .message-body {\n border-color: #3273dc;\n color: #22509a; }\n #optimole-app .message.is-info {\n background-color: #f5fcff; }\n #optimole-app .message.is-info .message-header {\n background-color: #008ec2;\n color: #fff; }\n #optimole-app .message.is-info .message-body {\n border-color: #008ec2;\n color: #044259; }\n #optimole-app .message.is-success {\n background-color: #f7fdf9; }\n #optimole-app .message.is-success .message-header {\n background-color: #34a85e;\n color: #fff; }\n #optimole-app .message.is-success .message-body {\n border-color: #34a85e;\n color: #1b432a; }\n #optimole-app .message.is-warning {\n background-color: #fffdf5; }\n #optimole-app .message.is-warning .message-header {\n background-color: #ffdd57;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .message.is-warning .message-body {\n border-color: #ffdd57;\n color: #3b3108; }\n #optimole-app .message.is-danger {\n background-color: #fef8f6; }\n #optimole-app .message.is-danger .message-header {\n background-color: #d54222;\n color: #fff; }\n #optimole-app .message.is-danger .message-body {\n border-color: #d54222;\n color: #8d311d; }\n #optimole-app .message-header {\n -ms-flex-align: center;\n align-items: center;\n background-color: #4a4a4a;\n border-radius: 4px 4px 0 0;\n color: #fff;\n display: -ms-flexbox;\n display: flex;\n font-weight: 700;\n -ms-flex-pack: justify;\n justify-content: space-between;\n line-height: 1.25;\n padding: 0.75em 1em;\n position: relative; }\n #optimole-app .message-header .delete {\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n margin-left: 0.75em; }\n #optimole-app .message-header + .message-body {\n border-width: 0;\n border-top-left-radius: 0;\n border-top-right-radius: 0; }\n #optimole-app .message-body {\n border-color: #dbdbdb;\n border-radius: 4px;\n border-style: solid;\n border-width: 0 0 0 4px;\n color: #4a4a4a;\n padding: 1.25em 1.5em; }\n #optimole-app .message-body code,\n #optimole-app .message-body pre {\n background-color: white; }\n #optimole-app .message-body pre code {\n background-color: transparent; }\n #optimole-app .modal {\n -ms-flex-align: center;\n align-items: center;\n display: none;\n -ms-flex-pack: center;\n justify-content: center;\n overflow: hidden;\n position: fixed;\n z-index: 40; }\n #optimole-app .modal.is-active {\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .modal-background {\n background-color: rgba(10, 10, 10, 0.86); }\n #optimole-app .modal-content,\n #optimole-app .modal-card {\n margin: 0 20px;\n max-height: calc(100vh - 160px);\n overflow: auto;\n position: relative;\n width: 100%; }\n @media screen and (min-width: 769px), print {\n #optimole-app .modal-content,\n #optimole-app .modal-card {\n margin: 0 auto;\n max-height: calc(100vh - 40px);\n width: 640px; } }\n #optimole-app .modal-close {\n background: none;\n height: 40px;\n position: fixed;\n right: 20px;\n top: 20px;\n width: 40px; }\n #optimole-app .modal-card {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n max-height: calc(100vh - 40px);\n overflow: hidden; }\n #optimole-app .modal-card-head,\n #optimole-app .modal-card-foot {\n -ms-flex-align: center;\n align-items: center;\n background-color: whitesmoke;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n -ms-flex-pack: start;\n justify-content: flex-start;\n padding: 20px;\n position: relative; }\n #optimole-app .modal-card-head {\n border-bottom: 1px solid #dbdbdb;\n border-top-left-radius: 6px;\n border-top-right-radius: 6px; }\n #optimole-app .modal-card-title {\n color: #363636;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n font-size: 1.5rem;\n line-height: 1; }\n #optimole-app .modal-card-foot {\n border-bottom-left-radius: 6px;\n border-bottom-right-radius: 6px;\n border-top: 1px solid #dbdbdb; }\n #optimole-app .modal-card-foot .button:not(:last-child) {\n margin-right: 10px; }\n #optimole-app .modal-card-body {\n -webkit-overflow-scrolling: touch;\n background-color: white;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1;\n overflow: auto;\n padding: 20px; }\n #optimole-app .navbar {\n background-color: white;\n min-height: 3.25rem;\n position: relative;\n z-index: 30; }\n #optimole-app .navbar.is-white {\n background-color: white;\n color: #0a0a0a; }\n #optimole-app .navbar.is-white .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-white .navbar-brand .navbar-link {\n color: #0a0a0a; }\n #optimole-app .navbar.is-white .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-white .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-white .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-white .navbar-brand .navbar-link.is-active {\n background-color: #f2f2f2;\n color: #0a0a0a; }\n #optimole-app .navbar.is-white .navbar-brand .navbar-link::after {\n border-color: #0a0a0a; }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-white .navbar-start > .navbar-item,\n #optimole-app .navbar.is-white .navbar-start .navbar-link,\n #optimole-app .navbar.is-white .navbar-end > .navbar-item,\n #optimole-app .navbar.is-white .navbar-end .navbar-link {\n color: #0a0a0a; }\n #optimole-app .navbar.is-white .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-white .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-white .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-white .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-white .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-white .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-white .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-white .navbar-end .navbar-link.is-active {\n background-color: #f2f2f2;\n color: #0a0a0a; }\n #optimole-app .navbar.is-white .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-white .navbar-end .navbar-link::after {\n border-color: #0a0a0a; }\n #optimole-app .navbar.is-white .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-white .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #f2f2f2;\n color: #0a0a0a; }\n #optimole-app .navbar.is-white .navbar-dropdown a.navbar-item.is-active {\n background-color: white;\n color: #0a0a0a; } }\n #optimole-app .navbar.is-black {\n background-color: #0a0a0a;\n color: white; }\n #optimole-app .navbar.is-black .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-black .navbar-brand .navbar-link {\n color: white; }\n #optimole-app .navbar.is-black .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-black .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-black .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-black .navbar-brand .navbar-link.is-active {\n background-color: black;\n color: white; }\n #optimole-app .navbar.is-black .navbar-brand .navbar-link::after {\n border-color: white; }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-black .navbar-start > .navbar-item,\n #optimole-app .navbar.is-black .navbar-start .navbar-link,\n #optimole-app .navbar.is-black .navbar-end > .navbar-item,\n #optimole-app .navbar.is-black .navbar-end .navbar-link {\n color: white; }\n #optimole-app .navbar.is-black .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-black .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-black .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-black .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-black .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-black .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-black .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-black .navbar-end .navbar-link.is-active {\n background-color: black;\n color: white; }\n #optimole-app .navbar.is-black .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-black .navbar-end .navbar-link::after {\n border-color: white; }\n #optimole-app .navbar.is-black .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-black .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: black;\n color: white; }\n #optimole-app .navbar.is-black .navbar-dropdown a.navbar-item.is-active {\n background-color: #0a0a0a;\n color: white; } }\n #optimole-app .navbar.is-light {\n background-color: whitesmoke;\n color: #363636; }\n #optimole-app .navbar.is-light .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-light .navbar-brand .navbar-link {\n color: #363636; }\n #optimole-app .navbar.is-light .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-light .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-light .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-light .navbar-brand .navbar-link.is-active {\n background-color: #e8e8e8;\n color: #363636; }\n #optimole-app .navbar.is-light .navbar-brand .navbar-link::after {\n border-color: #363636; }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-light .navbar-start > .navbar-item,\n #optimole-app .navbar.is-light .navbar-start .navbar-link,\n #optimole-app .navbar.is-light .navbar-end > .navbar-item,\n #optimole-app .navbar.is-light .navbar-end .navbar-link {\n color: #363636; }\n #optimole-app .navbar.is-light .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-light .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-light .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-light .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-light .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-light .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-light .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-light .navbar-end .navbar-link.is-active {\n background-color: #e8e8e8;\n color: #363636; }\n #optimole-app .navbar.is-light .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-light .navbar-end .navbar-link::after {\n border-color: #363636; }\n #optimole-app .navbar.is-light .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-light .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #e8e8e8;\n color: #363636; }\n #optimole-app .navbar.is-light .navbar-dropdown a.navbar-item.is-active {\n background-color: whitesmoke;\n color: #363636; } }\n #optimole-app .navbar.is-dark {\n background-color: #363636;\n color: whitesmoke; }\n #optimole-app .navbar.is-dark .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-dark .navbar-brand .navbar-link {\n color: whitesmoke; }\n #optimole-app .navbar.is-dark .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-dark .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-dark .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-dark .navbar-brand .navbar-link.is-active {\n background-color: #292929;\n color: whitesmoke; }\n #optimole-app .navbar.is-dark .navbar-brand .navbar-link::after {\n border-color: whitesmoke; }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-dark .navbar-start > .navbar-item,\n #optimole-app .navbar.is-dark .navbar-start .navbar-link,\n #optimole-app .navbar.is-dark .navbar-end > .navbar-item,\n #optimole-app .navbar.is-dark .navbar-end .navbar-link {\n color: whitesmoke; }\n #optimole-app .navbar.is-dark .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-dark .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-dark .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-dark .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-dark .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-dark .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-dark .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-dark .navbar-end .navbar-link.is-active {\n background-color: #292929;\n color: whitesmoke; }\n #optimole-app .navbar.is-dark .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-dark .navbar-end .navbar-link::after {\n border-color: whitesmoke; }\n #optimole-app .navbar.is-dark .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-dark .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #292929;\n color: whitesmoke; }\n #optimole-app .navbar.is-dark .navbar-dropdown a.navbar-item.is-active {\n background-color: #363636;\n color: whitesmoke; } }\n #optimole-app .navbar.is-primary {\n background-color: #e7602a;\n color: #fff; }\n #optimole-app .navbar.is-primary .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-primary .navbar-brand .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-primary .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-primary .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-primary .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-primary .navbar-brand .navbar-link.is-active {\n background-color: #de5119;\n color: #fff; }\n #optimole-app .navbar.is-primary .navbar-brand .navbar-link::after {\n border-color: #fff; }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-primary .navbar-start > .navbar-item,\n #optimole-app .navbar.is-primary .navbar-start .navbar-link,\n #optimole-app .navbar.is-primary .navbar-end > .navbar-item,\n #optimole-app .navbar.is-primary .navbar-end .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-primary .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-primary .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-primary .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-primary .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-primary .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-primary .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-primary .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-primary .navbar-end .navbar-link.is-active {\n background-color: #de5119;\n color: #fff; }\n #optimole-app .navbar.is-primary .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-primary .navbar-end .navbar-link::after {\n border-color: #fff; }\n #optimole-app .navbar.is-primary .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-primary .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #de5119;\n color: #fff; }\n #optimole-app .navbar.is-primary .navbar-dropdown a.navbar-item.is-active {\n background-color: #e7602a;\n color: #fff; } }\n #optimole-app .navbar.is-link {\n background-color: #3273dc;\n color: #fff; }\n #optimole-app .navbar.is-link .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-link .navbar-brand .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-link .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-link .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-link .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-link .navbar-brand .navbar-link.is-active {\n background-color: #2366d1;\n color: #fff; }\n #optimole-app .navbar.is-link .navbar-brand .navbar-link::after {\n border-color: #fff; }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-link .navbar-start > .navbar-item,\n #optimole-app .navbar.is-link .navbar-start .navbar-link,\n #optimole-app .navbar.is-link .navbar-end > .navbar-item,\n #optimole-app .navbar.is-link .navbar-end .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-link .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-link .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-link .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-link .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-link .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-link .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-link .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-link .navbar-end .navbar-link.is-active {\n background-color: #2366d1;\n color: #fff; }\n #optimole-app .navbar.is-link .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-link .navbar-end .navbar-link::after {\n border-color: #fff; }\n #optimole-app .navbar.is-link .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-link .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #2366d1;\n color: #fff; }\n #optimole-app .navbar.is-link .navbar-dropdown a.navbar-item.is-active {\n background-color: #3273dc;\n color: #fff; } }\n #optimole-app .navbar.is-info {\n background-color: #008ec2;\n color: #fff; }\n #optimole-app .navbar.is-info .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-info .navbar-brand .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-info .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-info .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-info .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-info .navbar-brand .navbar-link.is-active {\n background-color: #007ba9;\n color: #fff; }\n #optimole-app .navbar.is-info .navbar-brand .navbar-link::after {\n border-color: #fff; }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-info .navbar-start > .navbar-item,\n #optimole-app .navbar.is-info .navbar-start .navbar-link,\n #optimole-app .navbar.is-info .navbar-end > .navbar-item,\n #optimole-app .navbar.is-info .navbar-end .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-info .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-info .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-info .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-info .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-info .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-info .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-info .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-info .navbar-end .navbar-link.is-active {\n background-color: #007ba9;\n color: #fff; }\n #optimole-app .navbar.is-info .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-info .navbar-end .navbar-link::after {\n border-color: #fff; }\n #optimole-app .navbar.is-info .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-info .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #007ba9;\n color: #fff; }\n #optimole-app .navbar.is-info .navbar-dropdown a.navbar-item.is-active {\n background-color: #008ec2;\n color: #fff; } }\n #optimole-app .navbar.is-success {\n background-color: #34a85e;\n color: #fff; }\n #optimole-app .navbar.is-success .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-success .navbar-brand .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-success .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-success .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-success .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-success .navbar-brand .navbar-link.is-active {\n background-color: #2e9553;\n color: #fff; }\n #optimole-app .navbar.is-success .navbar-brand .navbar-link::after {\n border-color: #fff; }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-success .navbar-start > .navbar-item,\n #optimole-app .navbar.is-success .navbar-start .navbar-link,\n #optimole-app .navbar.is-success .navbar-end > .navbar-item,\n #optimole-app .navbar.is-success .navbar-end .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-success .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-success .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-success .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-success .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-success .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-success .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-success .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-success .navbar-end .navbar-link.is-active {\n background-color: #2e9553;\n color: #fff; }\n #optimole-app .navbar.is-success .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-success .navbar-end .navbar-link::after {\n border-color: #fff; }\n #optimole-app .navbar.is-success .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-success .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #2e9553;\n color: #fff; }\n #optimole-app .navbar.is-success .navbar-dropdown a.navbar-item.is-active {\n background-color: #34a85e;\n color: #fff; } }\n #optimole-app .navbar.is-warning {\n background-color: #ffdd57;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .navbar.is-warning .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-warning .navbar-brand .navbar-link {\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .navbar.is-warning .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-warning .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-warning .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-warning .navbar-brand .navbar-link.is-active {\n background-color: #ffd83d;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .navbar.is-warning .navbar-brand .navbar-link::after {\n border-color: rgba(0, 0, 0, 0.7); }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-warning .navbar-start > .navbar-item,\n #optimole-app .navbar.is-warning .navbar-start .navbar-link,\n #optimole-app .navbar.is-warning .navbar-end > .navbar-item,\n #optimole-app .navbar.is-warning .navbar-end .navbar-link {\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .navbar.is-warning .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-warning .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-warning .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-warning .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-warning .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-warning .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-warning .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-warning .navbar-end .navbar-link.is-active {\n background-color: #ffd83d;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .navbar.is-warning .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-warning .navbar-end .navbar-link::after {\n border-color: rgba(0, 0, 0, 0.7); }\n #optimole-app .navbar.is-warning .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-warning .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #ffd83d;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .navbar.is-warning .navbar-dropdown a.navbar-item.is-active {\n background-color: #ffdd57;\n color: rgba(0, 0, 0, 0.7); } }\n #optimole-app .navbar.is-danger {\n background-color: #d54222;\n color: #fff; }\n #optimole-app .navbar.is-danger .navbar-brand > .navbar-item,\n #optimole-app .navbar.is-danger .navbar-brand .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-danger .navbar-brand > a.navbar-item:hover, #optimole-app .navbar.is-danger .navbar-brand > a.navbar-item.is-active,\n #optimole-app .navbar.is-danger .navbar-brand .navbar-link:hover,\n #optimole-app .navbar.is-danger .navbar-brand .navbar-link.is-active {\n background-color: #bf3b1e;\n color: #fff; }\n #optimole-app .navbar.is-danger .navbar-brand .navbar-link::after {\n border-color: #fff; }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar.is-danger .navbar-start > .navbar-item,\n #optimole-app .navbar.is-danger .navbar-start .navbar-link,\n #optimole-app .navbar.is-danger .navbar-end > .navbar-item,\n #optimole-app .navbar.is-danger .navbar-end .navbar-link {\n color: #fff; }\n #optimole-app .navbar.is-danger .navbar-start > a.navbar-item:hover, #optimole-app .navbar.is-danger .navbar-start > a.navbar-item.is-active,\n #optimole-app .navbar.is-danger .navbar-start .navbar-link:hover,\n #optimole-app .navbar.is-danger .navbar-start .navbar-link.is-active,\n #optimole-app .navbar.is-danger .navbar-end > a.navbar-item:hover,\n #optimole-app .navbar.is-danger .navbar-end > a.navbar-item.is-active,\n #optimole-app .navbar.is-danger .navbar-end .navbar-link:hover,\n #optimole-app .navbar.is-danger .navbar-end .navbar-link.is-active {\n background-color: #bf3b1e;\n color: #fff; }\n #optimole-app .navbar.is-danger .navbar-start .navbar-link::after,\n #optimole-app .navbar.is-danger .navbar-end .navbar-link::after {\n border-color: #fff; }\n #optimole-app .navbar.is-danger .navbar-item.has-dropdown:hover .navbar-link,\n #optimole-app .navbar.is-danger .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #bf3b1e;\n color: #fff; }\n #optimole-app .navbar.is-danger .navbar-dropdown a.navbar-item.is-active {\n background-color: #d54222;\n color: #fff; } }\n #optimole-app .navbar > .container {\n -ms-flex-align: stretch;\n align-items: stretch;\n display: -ms-flexbox;\n display: flex;\n min-height: 3.25rem;\n width: 100%; }\n #optimole-app .navbar.has-shadow {\n box-shadow: 0 2px 0 0 whitesmoke; }\n #optimole-app .navbar.is-fixed-bottom, #optimole-app .navbar.is-fixed-top {\n left: 0;\n position: fixed;\n right: 0;\n z-index: 30; }\n #optimole-app .navbar.is-fixed-bottom {\n bottom: 0; }\n #optimole-app .navbar.is-fixed-bottom.has-shadow {\n box-shadow: 0 -2px 0 0 whitesmoke; }\n #optimole-app .navbar.is-fixed-top {\n top: 0; }\n #optimole-app html.has-navbar-fixed-top,\n #optimole-app body.has-navbar-fixed-top {\n padding-top: 3.25rem; }\n #optimole-app html.has-navbar-fixed-bottom,\n #optimole-app body.has-navbar-fixed-bottom {\n padding-bottom: 3.25rem; }\n #optimole-app .navbar-brand,\n #optimole-app .navbar-tabs {\n -ms-flex-align: stretch;\n align-items: stretch;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n min-height: 3.25rem; }\n #optimole-app .navbar-brand a.navbar-item:hover {\n background-color: transparent; }\n #optimole-app .navbar-tabs {\n -webkit-overflow-scrolling: touch;\n max-width: 100vw;\n overflow-x: auto;\n overflow-y: hidden; }\n #optimole-app .navbar-burger {\n cursor: pointer;\n display: block;\n height: 3.25rem;\n position: relative;\n width: 3.25rem;\n margin-left: auto; }\n #optimole-app .navbar-burger span {\n background-color: currentColor;\n display: block;\n height: 1px;\n left: calc(50% - 8px);\n position: absolute;\n transform-origin: center;\n transition-duration: 86ms;\n transition-property: background-color, opacity, transform;\n transition-timing-function: ease-out;\n width: 16px; }\n #optimole-app .navbar-burger span:nth-child(1) {\n top: calc(50% - 6px); }\n #optimole-app .navbar-burger span:nth-child(2) {\n top: calc(50% - 1px); }\n #optimole-app .navbar-burger span:nth-child(3) {\n top: calc(50% + 4px); }\n #optimole-app .navbar-burger:hover {\n background-color: rgba(0, 0, 0, 0.05); }\n #optimole-app .navbar-burger.is-active span:nth-child(1) {\n transform: translateY(5px) rotate(45deg); }\n #optimole-app .navbar-burger.is-active span:nth-child(2) {\n opacity: 0; }\n #optimole-app .navbar-burger.is-active span:nth-child(3) {\n transform: translateY(-5px) rotate(-45deg); }\n #optimole-app .navbar-menu {\n display: none; }\n #optimole-app .navbar-item,\n #optimole-app .navbar-link {\n color: #4a4a4a;\n display: block;\n line-height: 1.5;\n padding: 0.5rem 0.75rem;\n position: relative; }\n #optimole-app .navbar-item .icon:only-child,\n #optimole-app .navbar-link .icon:only-child {\n margin-left: -0.25rem;\n margin-right: -0.25rem; }\n #optimole-app a.navbar-item,\n #optimole-app .navbar-link {\n cursor: pointer; }\n #optimole-app a.navbar-item:hover, #optimole-app a.navbar-item.is-active,\n #optimole-app .navbar-link:hover,\n #optimole-app .navbar-link.is-active {\n background-color: #fafafa;\n color: #3273dc; }\n #optimole-app .navbar-item {\n display: block;\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0; }\n #optimole-app .navbar-item img {\n max-height: 1.75rem; }\n #optimole-app .navbar-item.has-dropdown {\n padding: 0; }\n #optimole-app .navbar-item.is-expanded {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1; }\n #optimole-app .navbar-item.is-tab {\n border-bottom: 1px solid transparent;\n min-height: 3.25rem;\n padding-bottom: calc(0.5rem - 1px); }\n #optimole-app .navbar-item.is-tab:hover {\n background-color: transparent;\n border-bottom-color: #3273dc; }\n #optimole-app .navbar-item.is-tab.is-active {\n background-color: transparent;\n border-bottom-color: #3273dc;\n border-bottom-style: solid;\n border-bottom-width: 3px;\n color: #3273dc;\n padding-bottom: calc(0.5rem - 3px); }\n #optimole-app .navbar-content {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1; }\n #optimole-app .navbar-link {\n padding-right: 2.5em; }\n #optimole-app .navbar-link::after {\n border-color: #3273dc;\n margin-top: -0.375em;\n right: 1.125em; }\n #optimole-app .navbar-dropdown {\n font-size: 0.875rem;\n padding-bottom: 0.5rem;\n padding-top: 0.5rem; }\n #optimole-app .navbar-dropdown .navbar-item {\n padding-left: 1.5rem;\n padding-right: 1.5rem; }\n #optimole-app .navbar-divider {\n background-color: whitesmoke;\n border: none;\n display: none;\n height: 2px;\n margin: 0.5rem 0; }\n @media screen and (max-width: 1087px) {\n #optimole-app .navbar > .container {\n display: block; }\n #optimole-app .navbar-brand .navbar-item,\n #optimole-app .navbar-tabs .navbar-item {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .navbar-link::after {\n display: none; }\n #optimole-app .navbar-menu {\n background-color: white;\n box-shadow: 0 8px 16px rgba(10, 10, 10, 0.1);\n padding: 0.5rem 0; }\n #optimole-app .navbar-menu.is-active {\n display: block; }\n #optimole-app .navbar.is-fixed-bottom-touch, #optimole-app .navbar.is-fixed-top-touch {\n left: 0;\n position: fixed;\n right: 0;\n z-index: 30; }\n #optimole-app .navbar.is-fixed-bottom-touch {\n bottom: 0; }\n #optimole-app .navbar.is-fixed-bottom-touch.has-shadow {\n box-shadow: 0 -2px 3px rgba(10, 10, 10, 0.1); }\n #optimole-app .navbar.is-fixed-top-touch {\n top: 0; }\n #optimole-app .navbar.is-fixed-top .navbar-menu, #optimole-app .navbar.is-fixed-top-touch .navbar-menu {\n -webkit-overflow-scrolling: touch;\n max-height: calc(100vh - 3.25rem);\n overflow: auto; }\n #optimole-app html.has-navbar-fixed-top-touch,\n #optimole-app body.has-navbar-fixed-top-touch {\n padding-top: 3.25rem; }\n #optimole-app html.has-navbar-fixed-bottom-touch,\n #optimole-app body.has-navbar-fixed-bottom-touch {\n padding-bottom: 3.25rem; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .navbar,\n #optimole-app .navbar-menu,\n #optimole-app .navbar-start,\n #optimole-app .navbar-end {\n -ms-flex-align: stretch;\n align-items: stretch;\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .navbar {\n min-height: 3.25rem; }\n #optimole-app .navbar.is-spaced {\n padding: 1rem 2rem; }\n #optimole-app .navbar.is-spaced .navbar-start,\n #optimole-app .navbar.is-spaced .navbar-end {\n -ms-flex-align: center;\n align-items: center; }\n #optimole-app .navbar.is-spaced a.navbar-item,\n #optimole-app .navbar.is-spaced .navbar-link {\n border-radius: 4px; }\n #optimole-app .navbar.is-transparent a.navbar-item:hover, #optimole-app .navbar.is-transparent a.navbar-item.is-active,\n #optimole-app .navbar.is-transparent .navbar-link:hover,\n #optimole-app .navbar.is-transparent .navbar-link.is-active {\n background-color: transparent !important; }\n #optimole-app .navbar.is-transparent .navbar-item.has-dropdown.is-active .navbar-link, #optimole-app .navbar.is-transparent .navbar-item.has-dropdown.is-hoverable:hover .navbar-link {\n background-color: transparent !important; }\n #optimole-app .navbar.is-transparent .navbar-dropdown a.navbar-item:hover {\n background-color: whitesmoke;\n color: #0a0a0a; }\n #optimole-app .navbar.is-transparent .navbar-dropdown a.navbar-item.is-active {\n background-color: whitesmoke;\n color: #3273dc; }\n #optimole-app .navbar-burger {\n display: none; }\n #optimole-app .navbar-item,\n #optimole-app .navbar-link {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .navbar-item {\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .navbar-item.has-dropdown {\n -ms-flex-align: stretch;\n align-items: stretch; }\n #optimole-app .navbar-item.has-dropdown-up .navbar-link::after {\n transform: rotate(135deg) translate(0.25em, -0.25em); }\n #optimole-app .navbar-item.has-dropdown-up .navbar-dropdown {\n border-bottom: 2px solid #dbdbdb;\n border-radius: 6px 6px 0 0;\n border-top: none;\n bottom: 100%;\n box-shadow: 0 -8px 8px rgba(10, 10, 10, 0.1);\n top: auto; }\n #optimole-app .navbar-item.is-active .navbar-dropdown, #optimole-app .navbar-item.is-hoverable:hover .navbar-dropdown {\n display: block; }\n .navbar.is-spaced #optimole-app .navbar-item.is-active .navbar-dropdown, #optimole-app .navbar-item.is-active .navbar-dropdown.is-boxed, .navbar.is-spaced #optimole-app .navbar-item.is-hoverable:hover .navbar-dropdown, #optimole-app .navbar-item.is-hoverable:hover .navbar-dropdown.is-boxed {\n opacity: 1;\n pointer-events: auto;\n transform: translateY(0); }\n #optimole-app .navbar-menu {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 0;\n flex-shrink: 0; }\n #optimole-app .navbar-start {\n -ms-flex-pack: start;\n justify-content: flex-start;\n margin-right: auto; }\n #optimole-app .navbar-end {\n -ms-flex-pack: end;\n justify-content: flex-end;\n margin-left: auto; }\n #optimole-app .navbar-dropdown {\n background-color: white;\n border-bottom-left-radius: 6px;\n border-bottom-right-radius: 6px;\n border-top: 2px solid #dbdbdb;\n box-shadow: 0 8px 8px rgba(10, 10, 10, 0.1);\n display: none;\n font-size: 0.875rem;\n left: 0;\n min-width: 100%;\n position: absolute;\n top: 100%;\n z-index: 20; }\n #optimole-app .navbar-dropdown .navbar-item {\n padding: 0.375rem 1rem;\n white-space: nowrap; }\n #optimole-app .navbar-dropdown a.navbar-item {\n padding-right: 3rem; }\n #optimole-app .navbar-dropdown a.navbar-item:hover {\n background-color: whitesmoke;\n color: #0a0a0a; }\n #optimole-app .navbar-dropdown a.navbar-item.is-active {\n background-color: whitesmoke;\n color: #3273dc; }\n .navbar.is-spaced #optimole-app .navbar-dropdown, #optimole-app .navbar-dropdown.is-boxed {\n border-radius: 6px;\n border-top: none;\n box-shadow: 0 8px 8px rgba(10, 10, 10, 0.1), 0 0 0 1px rgba(10, 10, 10, 0.1);\n display: block;\n opacity: 0;\n pointer-events: none;\n top: calc(100% + (-4px));\n transform: translateY(-5px);\n transition-duration: 86ms;\n transition-property: opacity, transform; }\n #optimole-app .navbar-dropdown.is-right {\n left: auto;\n right: 0; }\n #optimole-app .navbar-divider {\n display: block; }\n #optimole-app .navbar > .container .navbar-brand,\n #optimole-app .container > .navbar .navbar-brand {\n margin-left: -1rem; }\n #optimole-app .navbar > .container .navbar-menu,\n #optimole-app .container > .navbar .navbar-menu {\n margin-right: -1rem; }\n #optimole-app .navbar.is-fixed-bottom-desktop, #optimole-app .navbar.is-fixed-top-desktop {\n left: 0;\n position: fixed;\n right: 0;\n z-index: 30; }\n #optimole-app .navbar.is-fixed-bottom-desktop {\n bottom: 0; }\n #optimole-app .navbar.is-fixed-bottom-desktop.has-shadow {\n box-shadow: 0 -2px 3px rgba(10, 10, 10, 0.1); }\n #optimole-app .navbar.is-fixed-top-desktop {\n top: 0; }\n #optimole-app html.has-navbar-fixed-top-desktop,\n #optimole-app body.has-navbar-fixed-top-desktop {\n padding-top: 3.25rem; }\n #optimole-app html.has-navbar-fixed-bottom-desktop,\n #optimole-app body.has-navbar-fixed-bottom-desktop {\n padding-bottom: 3.25rem; }\n #optimole-app html.has-spaced-navbar-fixed-top,\n #optimole-app body.has-spaced-navbar-fixed-top {\n padding-top: 5.25rem; }\n #optimole-app html.has-spaced-navbar-fixed-bottom,\n #optimole-app body.has-spaced-navbar-fixed-bottom {\n padding-bottom: 5.25rem; }\n #optimole-app a.navbar-item.is-active,\n #optimole-app .navbar-link.is-active {\n color: #0a0a0a; }\n #optimole-app a.navbar-item.is-active:not(:hover),\n #optimole-app .navbar-link.is-active:not(:hover) {\n background-color: transparent; }\n #optimole-app .navbar-item.has-dropdown:hover .navbar-link, #optimole-app .navbar-item.has-dropdown.is-active .navbar-link {\n background-color: #fafafa; } }\n #optimole-app .pagination {\n font-size: 1rem;\n margin: -0.25rem; }\n #optimole-app .pagination.is-small {\n font-size: 0.75rem; }\n #optimole-app .pagination.is-medium {\n font-size: 1.25rem; }\n #optimole-app .pagination.is-large {\n font-size: 1.5rem; }\n #optimole-app .pagination.is-rounded .pagination-previous,\n #optimole-app .pagination.is-rounded .pagination-next {\n padding-left: 1em;\n padding-right: 1em;\n border-radius: 290486px; }\n #optimole-app .pagination.is-rounded .pagination-link {\n border-radius: 290486px; }\n #optimole-app .pagination,\n #optimole-app .pagination-list {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center;\n text-align: center; }\n #optimole-app .pagination-previous,\n #optimole-app .pagination-next,\n #optimole-app .pagination-link,\n #optimole-app .pagination-ellipsis {\n font-size: 1em;\n padding-left: 0.5em;\n padding-right: 0.5em;\n -ms-flex-pack: center;\n justify-content: center;\n margin: 0.25rem;\n text-align: center; }\n #optimole-app .pagination-previous,\n #optimole-app .pagination-next,\n #optimole-app .pagination-link {\n border-color: #dbdbdb;\n color: #363636;\n min-width: 2.25em; }\n #optimole-app .pagination-previous:hover,\n #optimole-app .pagination-next:hover,\n #optimole-app .pagination-link:hover {\n border-color: #b5b5b5;\n color: #363636; }\n #optimole-app .pagination-previous:focus,\n #optimole-app .pagination-next:focus,\n #optimole-app .pagination-link:focus {\n border-color: #3273dc; }\n #optimole-app .pagination-previous:active,\n #optimole-app .pagination-next:active,\n #optimole-app .pagination-link:active {\n box-shadow: inset 0 1px 2px rgba(10, 10, 10, 0.2); }\n #optimole-app .pagination-previous[disabled],\n #optimole-app .pagination-next[disabled],\n #optimole-app .pagination-link[disabled] {\n background-color: #dbdbdb;\n border-color: #dbdbdb;\n box-shadow: none;\n color: #7a7a7a;\n opacity: 0.5; }\n #optimole-app .pagination-previous,\n #optimole-app .pagination-next {\n padding-left: 0.75em;\n padding-right: 0.75em;\n white-space: nowrap; }\n #optimole-app .pagination-link.is-current {\n background-color: #3273dc;\n border-color: #3273dc;\n color: #fff; }\n #optimole-app .pagination-ellipsis {\n color: #b5b5b5;\n pointer-events: none; }\n #optimole-app .pagination-list {\n -ms-flex-wrap: wrap;\n flex-wrap: wrap; }\n @media screen and (max-width: 768px) {\n #optimole-app .pagination {\n -ms-flex-wrap: wrap;\n flex-wrap: wrap; }\n #optimole-app .pagination-previous,\n #optimole-app .pagination-next {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1; }\n #optimole-app .pagination-list li {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .pagination-list {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1;\n -ms-flex-pack: start;\n justify-content: flex-start;\n -ms-flex-order: 1;\n order: 1; }\n #optimole-app .pagination-previous {\n -ms-flex-order: 2;\n order: 2; }\n #optimole-app .pagination-next {\n -ms-flex-order: 3;\n order: 3; }\n #optimole-app .pagination {\n -ms-flex-pack: justify;\n justify-content: space-between; }\n #optimole-app .pagination.is-centered .pagination-previous {\n -ms-flex-order: 1;\n order: 1; }\n #optimole-app .pagination.is-centered .pagination-list {\n -ms-flex-pack: center;\n justify-content: center;\n -ms-flex-order: 2;\n order: 2; }\n #optimole-app .pagination.is-centered .pagination-next {\n -ms-flex-order: 3;\n order: 3; }\n #optimole-app .pagination.is-right .pagination-previous {\n -ms-flex-order: 1;\n order: 1; }\n #optimole-app .pagination.is-right .pagination-next {\n -ms-flex-order: 2;\n order: 2; }\n #optimole-app .pagination.is-right .pagination-list {\n -ms-flex-pack: end;\n justify-content: flex-end;\n -ms-flex-order: 3;\n order: 3; } }\n #optimole-app .panel {\n font-size: 1rem; }\n #optimole-app .panel:not(:last-child) {\n margin-bottom: 1.5rem; }\n #optimole-app .panel-heading,\n #optimole-app .panel-tabs,\n #optimole-app .panel-block {\n border-bottom: 1px solid #dbdbdb;\n border-left: 1px solid #dbdbdb;\n border-right: 1px solid #dbdbdb; }\n #optimole-app .panel-heading:first-child,\n #optimole-app .panel-tabs:first-child,\n #optimole-app .panel-block:first-child {\n border-top: 1px solid #dbdbdb; }\n #optimole-app .panel-heading {\n background-color: whitesmoke;\n border-radius: 4px 4px 0 0;\n color: #363636;\n font-size: 1.25em;\n font-weight: 300;\n line-height: 1.25;\n padding: 0.5em 0.75em; }\n #optimole-app .panel-tabs {\n -ms-flex-align: end;\n align-items: flex-end;\n display: -ms-flexbox;\n display: flex;\n font-size: 0.875em;\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .panel-tabs a {\n border-bottom: 1px solid #dbdbdb;\n margin-bottom: -1px;\n padding: 0.5em; }\n #optimole-app .panel-tabs a.is-active {\n border-bottom-color: #4a4a4a;\n color: #363636; }\n #optimole-app .panel-list a {\n color: #4a4a4a; }\n #optimole-app .panel-list a:hover {\n color: #3273dc; }\n #optimole-app .panel-block {\n -ms-flex-align: center;\n align-items: center;\n color: #363636;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: start;\n justify-content: flex-start;\n padding: 0.5em 0.75em; }\n #optimole-app .panel-block input[type=\"checkbox\"] {\n margin-right: 0.75em; }\n #optimole-app .panel-block > .control {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1;\n width: 100%; }\n #optimole-app .panel-block.is-wrapped {\n -ms-flex-wrap: wrap;\n flex-wrap: wrap; }\n #optimole-app .panel-block.is-active {\n border-left-color: #3273dc;\n color: #363636; }\n #optimole-app .panel-block.is-active .panel-icon {\n color: #3273dc; }\n #optimole-app a.panel-block,\n #optimole-app label.panel-block {\n cursor: pointer; }\n #optimole-app a.panel-block:hover,\n #optimole-app label.panel-block:hover {\n background-color: whitesmoke; }\n #optimole-app .panel-icon {\n display: inline-block;\n font-size: 14px;\n height: 1em;\n line-height: 1em;\n text-align: center;\n vertical-align: top;\n width: 1em;\n color: #7a7a7a;\n margin-right: 0.75em; }\n #optimole-app .panel-icon .fa {\n font-size: inherit;\n line-height: inherit; }\n #optimole-app .tabs {\n -webkit-overflow-scrolling: touch;\n -ms-flex-align: stretch;\n align-items: stretch;\n display: -ms-flexbox;\n display: flex;\n font-size: 1rem;\n -ms-flex-pack: justify;\n justify-content: space-between;\n overflow: hidden;\n overflow-x: auto;\n white-space: nowrap; }\n #optimole-app .tabs a {\n -ms-flex-align: center;\n align-items: center;\n border-bottom-color: #dbdbdb;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n color: #4a4a4a;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center;\n margin-bottom: -1px;\n padding: 0.5em 1em;\n vertical-align: top; }\n #optimole-app .tabs a:hover {\n border-bottom-color: #363636;\n color: #363636; }\n #optimole-app .tabs li {\n display: block; }\n #optimole-app .tabs li.is-active a {\n border-bottom-color: #3273dc;\n color: #3273dc; }\n #optimole-app .tabs ul {\n -ms-flex-align: center;\n align-items: center;\n border-bottom-color: #dbdbdb;\n border-bottom-style: solid;\n border-bottom-width: 1px;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n -ms-flex-pack: start;\n justify-content: flex-start; }\n #optimole-app .tabs ul.is-left {\n padding-right: 0.75em; }\n #optimole-app .tabs ul.is-center {\n -ms-flex: none;\n flex: none;\n -ms-flex-pack: center;\n justify-content: center;\n padding-left: 0.75em;\n padding-right: 0.75em; }\n #optimole-app .tabs ul.is-right {\n -ms-flex-pack: end;\n justify-content: flex-end;\n padding-left: 0.75em; }\n #optimole-app .tabs .icon:first-child {\n margin-right: 0.5em; }\n #optimole-app .tabs .icon:last-child {\n margin-left: 0.5em; }\n #optimole-app .tabs.is-centered ul {\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .tabs.is-right ul {\n -ms-flex-pack: end;\n justify-content: flex-end; }\n #optimole-app .tabs.is-boxed a {\n border: 1px solid transparent;\n border-radius: 4px 4px 0 0; }\n #optimole-app .tabs.is-boxed a:hover {\n background-color: whitesmoke;\n border-bottom-color: #dbdbdb; }\n #optimole-app .tabs.is-boxed li.is-active a {\n background-color: white;\n border-color: #dbdbdb;\n border-bottom-color: transparent !important; }\n #optimole-app .tabs.is-fullwidth li {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 0;\n flex-shrink: 0; }\n #optimole-app .tabs.is-toggle a {\n border-color: #dbdbdb;\n border-style: solid;\n border-width: 1px;\n margin-bottom: 0;\n position: relative; }\n #optimole-app .tabs.is-toggle a:hover {\n background-color: whitesmoke;\n border-color: #b5b5b5;\n z-index: 2; }\n #optimole-app .tabs.is-toggle li + li {\n margin-left: -1px; }\n #optimole-app .tabs.is-toggle li:first-child a {\n border-radius: 4px 0 0 4px; }\n #optimole-app .tabs.is-toggle li:last-child a {\n border-radius: 0 4px 4px 0; }\n #optimole-app .tabs.is-toggle li.is-active a {\n background-color: #3273dc;\n border-color: #3273dc;\n color: #fff;\n z-index: 1; }\n #optimole-app .tabs.is-toggle ul {\n border-bottom: none; }\n #optimole-app .tabs.is-toggle.is-toggle-rounded li:first-child a {\n border-bottom-left-radius: 290486px;\n border-top-left-radius: 290486px;\n padding-left: 1.25em; }\n #optimole-app .tabs.is-toggle.is-toggle-rounded li:last-child a {\n border-bottom-right-radius: 290486px;\n border-top-right-radius: 290486px;\n padding-right: 1.25em; }\n #optimole-app .tabs.is-small {\n font-size: 0.75rem; }\n #optimole-app .tabs.is-medium {\n font-size: 1.25rem; }\n #optimole-app .tabs.is-large {\n font-size: 1.5rem; }\n #optimole-app .column {\n display: block;\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1;\n padding: 0.75rem; }\n .columns.is-mobile > #optimole-app .column.is-narrow {\n -ms-flex: none;\n flex: none; }\n .columns.is-mobile > #optimole-app .column.is-full {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n .columns.is-mobile > #optimole-app .column.is-three-quarters {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n .columns.is-mobile > #optimole-app .column.is-two-thirds {\n -ms-flex: none;\n flex: none;\n width: 66.6666%; }\n .columns.is-mobile > #optimole-app .column.is-half {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n .columns.is-mobile > #optimole-app .column.is-one-third {\n -ms-flex: none;\n flex: none;\n width: 33.3333%; }\n .columns.is-mobile > #optimole-app .column.is-one-quarter {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n .columns.is-mobile > #optimole-app .column.is-one-fifth {\n -ms-flex: none;\n flex: none;\n width: 20%; }\n .columns.is-mobile > #optimole-app .column.is-two-fifths {\n -ms-flex: none;\n flex: none;\n width: 40%; }\n .columns.is-mobile > #optimole-app .column.is-three-fifths {\n -ms-flex: none;\n flex: none;\n width: 60%; }\n .columns.is-mobile > #optimole-app .column.is-four-fifths {\n -ms-flex: none;\n flex: none;\n width: 80%; }\n .columns.is-mobile > #optimole-app .column.is-offset-three-quarters {\n margin-left: 75%; }\n .columns.is-mobile > #optimole-app .column.is-offset-two-thirds {\n margin-left: 66.6666%; }\n .columns.is-mobile > #optimole-app .column.is-offset-half {\n margin-left: 50%; }\n .columns.is-mobile > #optimole-app .column.is-offset-one-third {\n margin-left: 33.3333%; }\n .columns.is-mobile > #optimole-app .column.is-offset-one-quarter {\n margin-left: 25%; }\n .columns.is-mobile > #optimole-app .column.is-offset-one-fifth {\n margin-left: 20%; }\n .columns.is-mobile > #optimole-app .column.is-offset-two-fifths {\n margin-left: 40%; }\n .columns.is-mobile > #optimole-app .column.is-offset-three-fifths {\n margin-left: 60%; }\n .columns.is-mobile > #optimole-app .column.is-offset-four-fifths {\n margin-left: 80%; }\n .columns.is-mobile > #optimole-app .column.is-1 {\n -ms-flex: none;\n flex: none;\n width: 8.33333%; }\n .columns.is-mobile > #optimole-app .column.is-offset-1 {\n margin-left: 8.33333%; }\n .columns.is-mobile > #optimole-app .column.is-2 {\n -ms-flex: none;\n flex: none;\n width: 16.66667%; }\n .columns.is-mobile > #optimole-app .column.is-offset-2 {\n margin-left: 16.66667%; }\n .columns.is-mobile > #optimole-app .column.is-3 {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n .columns.is-mobile > #optimole-app .column.is-offset-3 {\n margin-left: 25%; }\n .columns.is-mobile > #optimole-app .column.is-4 {\n -ms-flex: none;\n flex: none;\n width: 33.33333%; }\n .columns.is-mobile > #optimole-app .column.is-offset-4 {\n margin-left: 33.33333%; }\n .columns.is-mobile > #optimole-app .column.is-5 {\n -ms-flex: none;\n flex: none;\n width: 41.66667%; }\n .columns.is-mobile > #optimole-app .column.is-offset-5 {\n margin-left: 41.66667%; }\n .columns.is-mobile > #optimole-app .column.is-6 {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n .columns.is-mobile > #optimole-app .column.is-offset-6 {\n margin-left: 50%; }\n .columns.is-mobile > #optimole-app .column.is-7 {\n -ms-flex: none;\n flex: none;\n width: 58.33333%; }\n .columns.is-mobile > #optimole-app .column.is-offset-7 {\n margin-left: 58.33333%; }\n .columns.is-mobile > #optimole-app .column.is-8 {\n -ms-flex: none;\n flex: none;\n width: 66.66667%; }\n .columns.is-mobile > #optimole-app .column.is-offset-8 {\n margin-left: 66.66667%; }\n .columns.is-mobile > #optimole-app .column.is-9 {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n .columns.is-mobile > #optimole-app .column.is-offset-9 {\n margin-left: 75%; }\n .columns.is-mobile > #optimole-app .column.is-10 {\n -ms-flex: none;\n flex: none;\n width: 83.33333%; }\n .columns.is-mobile > #optimole-app .column.is-offset-10 {\n margin-left: 83.33333%; }\n .columns.is-mobile > #optimole-app .column.is-11 {\n -ms-flex: none;\n flex: none;\n width: 91.66667%; }\n .columns.is-mobile > #optimole-app .column.is-offset-11 {\n margin-left: 91.66667%; }\n .columns.is-mobile > #optimole-app .column.is-12 {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n .columns.is-mobile > #optimole-app .column.is-offset-12 {\n margin-left: 100%; }\n @media screen and (max-width: 768px) {\n #optimole-app .column.is-narrow-mobile {\n -ms-flex: none;\n flex: none; }\n #optimole-app .column.is-full-mobile {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-three-quarters-mobile {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-two-thirds-mobile {\n -ms-flex: none;\n flex: none;\n width: 66.6666%; }\n #optimole-app .column.is-half-mobile {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-one-third-mobile {\n -ms-flex: none;\n flex: none;\n width: 33.3333%; }\n #optimole-app .column.is-one-quarter-mobile {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-one-fifth-mobile {\n -ms-flex: none;\n flex: none;\n width: 20%; }\n #optimole-app .column.is-two-fifths-mobile {\n -ms-flex: none;\n flex: none;\n width: 40%; }\n #optimole-app .column.is-three-fifths-mobile {\n -ms-flex: none;\n flex: none;\n width: 60%; }\n #optimole-app .column.is-four-fifths-mobile {\n -ms-flex: none;\n flex: none;\n width: 80%; }\n #optimole-app .column.is-offset-three-quarters-mobile {\n margin-left: 75%; }\n #optimole-app .column.is-offset-two-thirds-mobile {\n margin-left: 66.6666%; }\n #optimole-app .column.is-offset-half-mobile {\n margin-left: 50%; }\n #optimole-app .column.is-offset-one-third-mobile {\n margin-left: 33.3333%; }\n #optimole-app .column.is-offset-one-quarter-mobile {\n margin-left: 25%; }\n #optimole-app .column.is-offset-one-fifth-mobile {\n margin-left: 20%; }\n #optimole-app .column.is-offset-two-fifths-mobile {\n margin-left: 40%; }\n #optimole-app .column.is-offset-three-fifths-mobile {\n margin-left: 60%; }\n #optimole-app .column.is-offset-four-fifths-mobile {\n margin-left: 80%; }\n #optimole-app .column.is-1-mobile {\n -ms-flex: none;\n flex: none;\n width: 8.33333%; }\n #optimole-app .column.is-offset-1-mobile {\n margin-left: 8.33333%; }\n #optimole-app .column.is-2-mobile {\n -ms-flex: none;\n flex: none;\n width: 16.66667%; }\n #optimole-app .column.is-offset-2-mobile {\n margin-left: 16.66667%; }\n #optimole-app .column.is-3-mobile {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-offset-3-mobile {\n margin-left: 25%; }\n #optimole-app .column.is-4-mobile {\n -ms-flex: none;\n flex: none;\n width: 33.33333%; }\n #optimole-app .column.is-offset-4-mobile {\n margin-left: 33.33333%; }\n #optimole-app .column.is-5-mobile {\n -ms-flex: none;\n flex: none;\n width: 41.66667%; }\n #optimole-app .column.is-offset-5-mobile {\n margin-left: 41.66667%; }\n #optimole-app .column.is-6-mobile {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-offset-6-mobile {\n margin-left: 50%; }\n #optimole-app .column.is-7-mobile {\n -ms-flex: none;\n flex: none;\n width: 58.33333%; }\n #optimole-app .column.is-offset-7-mobile {\n margin-left: 58.33333%; }\n #optimole-app .column.is-8-mobile {\n -ms-flex: none;\n flex: none;\n width: 66.66667%; }\n #optimole-app .column.is-offset-8-mobile {\n margin-left: 66.66667%; }\n #optimole-app .column.is-9-mobile {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-offset-9-mobile {\n margin-left: 75%; }\n #optimole-app .column.is-10-mobile {\n -ms-flex: none;\n flex: none;\n width: 83.33333%; }\n #optimole-app .column.is-offset-10-mobile {\n margin-left: 83.33333%; }\n #optimole-app .column.is-11-mobile {\n -ms-flex: none;\n flex: none;\n width: 91.66667%; }\n #optimole-app .column.is-offset-11-mobile {\n margin-left: 91.66667%; }\n #optimole-app .column.is-12-mobile {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-offset-12-mobile {\n margin-left: 100%; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .column.is-narrow, #optimole-app .column.is-narrow-tablet {\n -ms-flex: none;\n flex: none; }\n #optimole-app .column.is-full, #optimole-app .column.is-full-tablet {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-three-quarters, #optimole-app .column.is-three-quarters-tablet {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-two-thirds, #optimole-app .column.is-two-thirds-tablet {\n -ms-flex: none;\n flex: none;\n width: 66.6666%; }\n #optimole-app .column.is-half, #optimole-app .column.is-half-tablet {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-one-third, #optimole-app .column.is-one-third-tablet {\n -ms-flex: none;\n flex: none;\n width: 33.3333%; }\n #optimole-app .column.is-one-quarter, #optimole-app .column.is-one-quarter-tablet {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-one-fifth, #optimole-app .column.is-one-fifth-tablet {\n -ms-flex: none;\n flex: none;\n width: 20%; }\n #optimole-app .column.is-two-fifths, #optimole-app .column.is-two-fifths-tablet {\n -ms-flex: none;\n flex: none;\n width: 40%; }\n #optimole-app .column.is-three-fifths, #optimole-app .column.is-three-fifths-tablet {\n -ms-flex: none;\n flex: none;\n width: 60%; }\n #optimole-app .column.is-four-fifths, #optimole-app .column.is-four-fifths-tablet {\n -ms-flex: none;\n flex: none;\n width: 80%; }\n #optimole-app .column.is-offset-three-quarters, #optimole-app .column.is-offset-three-quarters-tablet {\n margin-left: 75%; }\n #optimole-app .column.is-offset-two-thirds, #optimole-app .column.is-offset-two-thirds-tablet {\n margin-left: 66.6666%; }\n #optimole-app .column.is-offset-half, #optimole-app .column.is-offset-half-tablet {\n margin-left: 50%; }\n #optimole-app .column.is-offset-one-third, #optimole-app .column.is-offset-one-third-tablet {\n margin-left: 33.3333%; }\n #optimole-app .column.is-offset-one-quarter, #optimole-app .column.is-offset-one-quarter-tablet {\n margin-left: 25%; }\n #optimole-app .column.is-offset-one-fifth, #optimole-app .column.is-offset-one-fifth-tablet {\n margin-left: 20%; }\n #optimole-app .column.is-offset-two-fifths, #optimole-app .column.is-offset-two-fifths-tablet {\n margin-left: 40%; }\n #optimole-app .column.is-offset-three-fifths, #optimole-app .column.is-offset-three-fifths-tablet {\n margin-left: 60%; }\n #optimole-app .column.is-offset-four-fifths, #optimole-app .column.is-offset-four-fifths-tablet {\n margin-left: 80%; }\n #optimole-app .column.is-1, #optimole-app .column.is-1-tablet {\n -ms-flex: none;\n flex: none;\n width: 8.33333%; }\n #optimole-app .column.is-offset-1, #optimole-app .column.is-offset-1-tablet {\n margin-left: 8.33333%; }\n #optimole-app .column.is-2, #optimole-app .column.is-2-tablet {\n -ms-flex: none;\n flex: none;\n width: 16.66667%; }\n #optimole-app .column.is-offset-2, #optimole-app .column.is-offset-2-tablet {\n margin-left: 16.66667%; }\n #optimole-app .column.is-3, #optimole-app .column.is-3-tablet {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-offset-3, #optimole-app .column.is-offset-3-tablet {\n margin-left: 25%; }\n #optimole-app .column.is-4, #optimole-app .column.is-4-tablet {\n -ms-flex: none;\n flex: none;\n width: 33.33333%; }\n #optimole-app .column.is-offset-4, #optimole-app .column.is-offset-4-tablet {\n margin-left: 33.33333%; }\n #optimole-app .column.is-5, #optimole-app .column.is-5-tablet {\n -ms-flex: none;\n flex: none;\n width: 41.66667%; }\n #optimole-app .column.is-offset-5, #optimole-app .column.is-offset-5-tablet {\n margin-left: 41.66667%; }\n #optimole-app .column.is-6, #optimole-app .column.is-6-tablet {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-offset-6, #optimole-app .column.is-offset-6-tablet {\n margin-left: 50%; }\n #optimole-app .column.is-7, #optimole-app .column.is-7-tablet {\n -ms-flex: none;\n flex: none;\n width: 58.33333%; }\n #optimole-app .column.is-offset-7, #optimole-app .column.is-offset-7-tablet {\n margin-left: 58.33333%; }\n #optimole-app .column.is-8, #optimole-app .column.is-8-tablet {\n -ms-flex: none;\n flex: none;\n width: 66.66667%; }\n #optimole-app .column.is-offset-8, #optimole-app .column.is-offset-8-tablet {\n margin-left: 66.66667%; }\n #optimole-app .column.is-9, #optimole-app .column.is-9-tablet {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-offset-9, #optimole-app .column.is-offset-9-tablet {\n margin-left: 75%; }\n #optimole-app .column.is-10, #optimole-app .column.is-10-tablet {\n -ms-flex: none;\n flex: none;\n width: 83.33333%; }\n #optimole-app .column.is-offset-10, #optimole-app .column.is-offset-10-tablet {\n margin-left: 83.33333%; }\n #optimole-app .column.is-11, #optimole-app .column.is-11-tablet {\n -ms-flex: none;\n flex: none;\n width: 91.66667%; }\n #optimole-app .column.is-offset-11, #optimole-app .column.is-offset-11-tablet {\n margin-left: 91.66667%; }\n #optimole-app .column.is-12, #optimole-app .column.is-12-tablet {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-offset-12, #optimole-app .column.is-offset-12-tablet {\n margin-left: 100%; } }\n @media screen and (max-width: 1087px) {\n #optimole-app .column.is-narrow-touch {\n -ms-flex: none;\n flex: none; }\n #optimole-app .column.is-full-touch {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-three-quarters-touch {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-two-thirds-touch {\n -ms-flex: none;\n flex: none;\n width: 66.6666%; }\n #optimole-app .column.is-half-touch {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-one-third-touch {\n -ms-flex: none;\n flex: none;\n width: 33.3333%; }\n #optimole-app .column.is-one-quarter-touch {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-one-fifth-touch {\n -ms-flex: none;\n flex: none;\n width: 20%; }\n #optimole-app .column.is-two-fifths-touch {\n -ms-flex: none;\n flex: none;\n width: 40%; }\n #optimole-app .column.is-three-fifths-touch {\n -ms-flex: none;\n flex: none;\n width: 60%; }\n #optimole-app .column.is-four-fifths-touch {\n -ms-flex: none;\n flex: none;\n width: 80%; }\n #optimole-app .column.is-offset-three-quarters-touch {\n margin-left: 75%; }\n #optimole-app .column.is-offset-two-thirds-touch {\n margin-left: 66.6666%; }\n #optimole-app .column.is-offset-half-touch {\n margin-left: 50%; }\n #optimole-app .column.is-offset-one-third-touch {\n margin-left: 33.3333%; }\n #optimole-app .column.is-offset-one-quarter-touch {\n margin-left: 25%; }\n #optimole-app .column.is-offset-one-fifth-touch {\n margin-left: 20%; }\n #optimole-app .column.is-offset-two-fifths-touch {\n margin-left: 40%; }\n #optimole-app .column.is-offset-three-fifths-touch {\n margin-left: 60%; }\n #optimole-app .column.is-offset-four-fifths-touch {\n margin-left: 80%; }\n #optimole-app .column.is-1-touch {\n -ms-flex: none;\n flex: none;\n width: 8.33333%; }\n #optimole-app .column.is-offset-1-touch {\n margin-left: 8.33333%; }\n #optimole-app .column.is-2-touch {\n -ms-flex: none;\n flex: none;\n width: 16.66667%; }\n #optimole-app .column.is-offset-2-touch {\n margin-left: 16.66667%; }\n #optimole-app .column.is-3-touch {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-offset-3-touch {\n margin-left: 25%; }\n #optimole-app .column.is-4-touch {\n -ms-flex: none;\n flex: none;\n width: 33.33333%; }\n #optimole-app .column.is-offset-4-touch {\n margin-left: 33.33333%; }\n #optimole-app .column.is-5-touch {\n -ms-flex: none;\n flex: none;\n width: 41.66667%; }\n #optimole-app .column.is-offset-5-touch {\n margin-left: 41.66667%; }\n #optimole-app .column.is-6-touch {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-offset-6-touch {\n margin-left: 50%; }\n #optimole-app .column.is-7-touch {\n -ms-flex: none;\n flex: none;\n width: 58.33333%; }\n #optimole-app .column.is-offset-7-touch {\n margin-left: 58.33333%; }\n #optimole-app .column.is-8-touch {\n -ms-flex: none;\n flex: none;\n width: 66.66667%; }\n #optimole-app .column.is-offset-8-touch {\n margin-left: 66.66667%; }\n #optimole-app .column.is-9-touch {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-offset-9-touch {\n margin-left: 75%; }\n #optimole-app .column.is-10-touch {\n -ms-flex: none;\n flex: none;\n width: 83.33333%; }\n #optimole-app .column.is-offset-10-touch {\n margin-left: 83.33333%; }\n #optimole-app .column.is-11-touch {\n -ms-flex: none;\n flex: none;\n width: 91.66667%; }\n #optimole-app .column.is-offset-11-touch {\n margin-left: 91.66667%; }\n #optimole-app .column.is-12-touch {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-offset-12-touch {\n margin-left: 100%; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .column.is-narrow-desktop {\n -ms-flex: none;\n flex: none; }\n #optimole-app .column.is-full-desktop {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-three-quarters-desktop {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-two-thirds-desktop {\n -ms-flex: none;\n flex: none;\n width: 66.6666%; }\n #optimole-app .column.is-half-desktop {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-one-third-desktop {\n -ms-flex: none;\n flex: none;\n width: 33.3333%; }\n #optimole-app .column.is-one-quarter-desktop {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-one-fifth-desktop {\n -ms-flex: none;\n flex: none;\n width: 20%; }\n #optimole-app .column.is-two-fifths-desktop {\n -ms-flex: none;\n flex: none;\n width: 40%; }\n #optimole-app .column.is-three-fifths-desktop {\n -ms-flex: none;\n flex: none;\n width: 60%; }\n #optimole-app .column.is-four-fifths-desktop {\n -ms-flex: none;\n flex: none;\n width: 80%; }\n #optimole-app .column.is-offset-three-quarters-desktop {\n margin-left: 75%; }\n #optimole-app .column.is-offset-two-thirds-desktop {\n margin-left: 66.6666%; }\n #optimole-app .column.is-offset-half-desktop {\n margin-left: 50%; }\n #optimole-app .column.is-offset-one-third-desktop {\n margin-left: 33.3333%; }\n #optimole-app .column.is-offset-one-quarter-desktop {\n margin-left: 25%; }\n #optimole-app .column.is-offset-one-fifth-desktop {\n margin-left: 20%; }\n #optimole-app .column.is-offset-two-fifths-desktop {\n margin-left: 40%; }\n #optimole-app .column.is-offset-three-fifths-desktop {\n margin-left: 60%; }\n #optimole-app .column.is-offset-four-fifths-desktop {\n margin-left: 80%; }\n #optimole-app .column.is-1-desktop {\n -ms-flex: none;\n flex: none;\n width: 8.33333%; }\n #optimole-app .column.is-offset-1-desktop {\n margin-left: 8.33333%; }\n #optimole-app .column.is-2-desktop {\n -ms-flex: none;\n flex: none;\n width: 16.66667%; }\n #optimole-app .column.is-offset-2-desktop {\n margin-left: 16.66667%; }\n #optimole-app .column.is-3-desktop {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-offset-3-desktop {\n margin-left: 25%; }\n #optimole-app .column.is-4-desktop {\n -ms-flex: none;\n flex: none;\n width: 33.33333%; }\n #optimole-app .column.is-offset-4-desktop {\n margin-left: 33.33333%; }\n #optimole-app .column.is-5-desktop {\n -ms-flex: none;\n flex: none;\n width: 41.66667%; }\n #optimole-app .column.is-offset-5-desktop {\n margin-left: 41.66667%; }\n #optimole-app .column.is-6-desktop {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-offset-6-desktop {\n margin-left: 50%; }\n #optimole-app .column.is-7-desktop {\n -ms-flex: none;\n flex: none;\n width: 58.33333%; }\n #optimole-app .column.is-offset-7-desktop {\n margin-left: 58.33333%; }\n #optimole-app .column.is-8-desktop {\n -ms-flex: none;\n flex: none;\n width: 66.66667%; }\n #optimole-app .column.is-offset-8-desktop {\n margin-left: 66.66667%; }\n #optimole-app .column.is-9-desktop {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-offset-9-desktop {\n margin-left: 75%; }\n #optimole-app .column.is-10-desktop {\n -ms-flex: none;\n flex: none;\n width: 83.33333%; }\n #optimole-app .column.is-offset-10-desktop {\n margin-left: 83.33333%; }\n #optimole-app .column.is-11-desktop {\n -ms-flex: none;\n flex: none;\n width: 91.66667%; }\n #optimole-app .column.is-offset-11-desktop {\n margin-left: 91.66667%; }\n #optimole-app .column.is-12-desktop {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-offset-12-desktop {\n margin-left: 100%; } }\n @media screen and (min-width: 1280px) {\n #optimole-app .column.is-narrow-widescreen {\n -ms-flex: none;\n flex: none; }\n #optimole-app .column.is-full-widescreen {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-three-quarters-widescreen {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-two-thirds-widescreen {\n -ms-flex: none;\n flex: none;\n width: 66.6666%; }\n #optimole-app .column.is-half-widescreen {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-one-third-widescreen {\n -ms-flex: none;\n flex: none;\n width: 33.3333%; }\n #optimole-app .column.is-one-quarter-widescreen {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-one-fifth-widescreen {\n -ms-flex: none;\n flex: none;\n width: 20%; }\n #optimole-app .column.is-two-fifths-widescreen {\n -ms-flex: none;\n flex: none;\n width: 40%; }\n #optimole-app .column.is-three-fifths-widescreen {\n -ms-flex: none;\n flex: none;\n width: 60%; }\n #optimole-app .column.is-four-fifths-widescreen {\n -ms-flex: none;\n flex: none;\n width: 80%; }\n #optimole-app .column.is-offset-three-quarters-widescreen {\n margin-left: 75%; }\n #optimole-app .column.is-offset-two-thirds-widescreen {\n margin-left: 66.6666%; }\n #optimole-app .column.is-offset-half-widescreen {\n margin-left: 50%; }\n #optimole-app .column.is-offset-one-third-widescreen {\n margin-left: 33.3333%; }\n #optimole-app .column.is-offset-one-quarter-widescreen {\n margin-left: 25%; }\n #optimole-app .column.is-offset-one-fifth-widescreen {\n margin-left: 20%; }\n #optimole-app .column.is-offset-two-fifths-widescreen {\n margin-left: 40%; }\n #optimole-app .column.is-offset-three-fifths-widescreen {\n margin-left: 60%; }\n #optimole-app .column.is-offset-four-fifths-widescreen {\n margin-left: 80%; }\n #optimole-app .column.is-1-widescreen {\n -ms-flex: none;\n flex: none;\n width: 8.33333%; }\n #optimole-app .column.is-offset-1-widescreen {\n margin-left: 8.33333%; }\n #optimole-app .column.is-2-widescreen {\n -ms-flex: none;\n flex: none;\n width: 16.66667%; }\n #optimole-app .column.is-offset-2-widescreen {\n margin-left: 16.66667%; }\n #optimole-app .column.is-3-widescreen {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-offset-3-widescreen {\n margin-left: 25%; }\n #optimole-app .column.is-4-widescreen {\n -ms-flex: none;\n flex: none;\n width: 33.33333%; }\n #optimole-app .column.is-offset-4-widescreen {\n margin-left: 33.33333%; }\n #optimole-app .column.is-5-widescreen {\n -ms-flex: none;\n flex: none;\n width: 41.66667%; }\n #optimole-app .column.is-offset-5-widescreen {\n margin-left: 41.66667%; }\n #optimole-app .column.is-6-widescreen {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-offset-6-widescreen {\n margin-left: 50%; }\n #optimole-app .column.is-7-widescreen {\n -ms-flex: none;\n flex: none;\n width: 58.33333%; }\n #optimole-app .column.is-offset-7-widescreen {\n margin-left: 58.33333%; }\n #optimole-app .column.is-8-widescreen {\n -ms-flex: none;\n flex: none;\n width: 66.66667%; }\n #optimole-app .column.is-offset-8-widescreen {\n margin-left: 66.66667%; }\n #optimole-app .column.is-9-widescreen {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-offset-9-widescreen {\n margin-left: 75%; }\n #optimole-app .column.is-10-widescreen {\n -ms-flex: none;\n flex: none;\n width: 83.33333%; }\n #optimole-app .column.is-offset-10-widescreen {\n margin-left: 83.33333%; }\n #optimole-app .column.is-11-widescreen {\n -ms-flex: none;\n flex: none;\n width: 91.66667%; }\n #optimole-app .column.is-offset-11-widescreen {\n margin-left: 91.66667%; }\n #optimole-app .column.is-12-widescreen {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-offset-12-widescreen {\n margin-left: 100%; } }\n @media screen and (min-width: 1472px) {\n #optimole-app .column.is-narrow-fullhd {\n -ms-flex: none;\n flex: none; }\n #optimole-app .column.is-full-fullhd {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-three-quarters-fullhd {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-two-thirds-fullhd {\n -ms-flex: none;\n flex: none;\n width: 66.6666%; }\n #optimole-app .column.is-half-fullhd {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-one-third-fullhd {\n -ms-flex: none;\n flex: none;\n width: 33.3333%; }\n #optimole-app .column.is-one-quarter-fullhd {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-one-fifth-fullhd {\n -ms-flex: none;\n flex: none;\n width: 20%; }\n #optimole-app .column.is-two-fifths-fullhd {\n -ms-flex: none;\n flex: none;\n width: 40%; }\n #optimole-app .column.is-three-fifths-fullhd {\n -ms-flex: none;\n flex: none;\n width: 60%; }\n #optimole-app .column.is-four-fifths-fullhd {\n -ms-flex: none;\n flex: none;\n width: 80%; }\n #optimole-app .column.is-offset-three-quarters-fullhd {\n margin-left: 75%; }\n #optimole-app .column.is-offset-two-thirds-fullhd {\n margin-left: 66.6666%; }\n #optimole-app .column.is-offset-half-fullhd {\n margin-left: 50%; }\n #optimole-app .column.is-offset-one-third-fullhd {\n margin-left: 33.3333%; }\n #optimole-app .column.is-offset-one-quarter-fullhd {\n margin-left: 25%; }\n #optimole-app .column.is-offset-one-fifth-fullhd {\n margin-left: 20%; }\n #optimole-app .column.is-offset-two-fifths-fullhd {\n margin-left: 40%; }\n #optimole-app .column.is-offset-three-fifths-fullhd {\n margin-left: 60%; }\n #optimole-app .column.is-offset-four-fifths-fullhd {\n margin-left: 80%; }\n #optimole-app .column.is-1-fullhd {\n -ms-flex: none;\n flex: none;\n width: 8.33333%; }\n #optimole-app .column.is-offset-1-fullhd {\n margin-left: 8.33333%; }\n #optimole-app .column.is-2-fullhd {\n -ms-flex: none;\n flex: none;\n width: 16.66667%; }\n #optimole-app .column.is-offset-2-fullhd {\n margin-left: 16.66667%; }\n #optimole-app .column.is-3-fullhd {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .column.is-offset-3-fullhd {\n margin-left: 25%; }\n #optimole-app .column.is-4-fullhd {\n -ms-flex: none;\n flex: none;\n width: 33.33333%; }\n #optimole-app .column.is-offset-4-fullhd {\n margin-left: 33.33333%; }\n #optimole-app .column.is-5-fullhd {\n -ms-flex: none;\n flex: none;\n width: 41.66667%; }\n #optimole-app .column.is-offset-5-fullhd {\n margin-left: 41.66667%; }\n #optimole-app .column.is-6-fullhd {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .column.is-offset-6-fullhd {\n margin-left: 50%; }\n #optimole-app .column.is-7-fullhd {\n -ms-flex: none;\n flex: none;\n width: 58.33333%; }\n #optimole-app .column.is-offset-7-fullhd {\n margin-left: 58.33333%; }\n #optimole-app .column.is-8-fullhd {\n -ms-flex: none;\n flex: none;\n width: 66.66667%; }\n #optimole-app .column.is-offset-8-fullhd {\n margin-left: 66.66667%; }\n #optimole-app .column.is-9-fullhd {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .column.is-offset-9-fullhd {\n margin-left: 75%; }\n #optimole-app .column.is-10-fullhd {\n -ms-flex: none;\n flex: none;\n width: 83.33333%; }\n #optimole-app .column.is-offset-10-fullhd {\n margin-left: 83.33333%; }\n #optimole-app .column.is-11-fullhd {\n -ms-flex: none;\n flex: none;\n width: 91.66667%; }\n #optimole-app .column.is-offset-11-fullhd {\n margin-left: 91.66667%; }\n #optimole-app .column.is-12-fullhd {\n -ms-flex: none;\n flex: none;\n width: 100%; }\n #optimole-app .column.is-offset-12-fullhd {\n margin-left: 100%; } }\n #optimole-app .columns {\n margin-left: -0.75rem;\n margin-right: -0.75rem;\n margin-top: -0.75rem; }\n #optimole-app .columns:last-child {\n margin-bottom: -0.75rem; }\n #optimole-app .columns:not(:last-child) {\n margin-bottom: calc(1.5rem - 0.75rem); }\n #optimole-app .columns.is-centered {\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .columns.is-gapless {\n margin-left: 0;\n margin-right: 0;\n margin-top: 0; }\n #optimole-app .columns.is-gapless > .column {\n margin: 0;\n padding: 0 !important; }\n #optimole-app .columns.is-gapless:not(:last-child) {\n margin-bottom: 1.5rem; }\n #optimole-app .columns.is-gapless:last-child {\n margin-bottom: 0; }\n #optimole-app .columns.is-mobile {\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .columns.is-multiline {\n -ms-flex-wrap: wrap;\n flex-wrap: wrap; }\n #optimole-app .columns.is-vcentered {\n -ms-flex-align: center;\n align-items: center; }\n @media screen and (min-width: 769px), print {\n #optimole-app .columns:not(.is-desktop) {\n display: -ms-flexbox;\n display: flex; } }\n @media screen and (min-width: 1088px) {\n #optimole-app .columns.is-desktop {\n display: -ms-flexbox;\n display: flex; } }\n #optimole-app .columns.is-variable {\n --columnGap: 0.75rem;\n margin-left: calc(-1 * var(--columnGap));\n margin-right: calc(-1 * var(--columnGap)); }\n #optimole-app .columns.is-variable .column {\n padding-left: var(--columnGap);\n padding-right: var(--columnGap); }\n #optimole-app .columns.is-variable.is-0 {\n --columnGap: 0rem; }\n #optimole-app .columns.is-variable.is-1 {\n --columnGap: 0.25rem; }\n #optimole-app .columns.is-variable.is-2 {\n --columnGap: 0.5rem; }\n #optimole-app .columns.is-variable.is-3 {\n --columnGap: 0.75rem; }\n #optimole-app .columns.is-variable.is-4 {\n --columnGap: 1rem; }\n #optimole-app .columns.is-variable.is-5 {\n --columnGap: 1.25rem; }\n #optimole-app .columns.is-variable.is-6 {\n --columnGap: 1.5rem; }\n #optimole-app .columns.is-variable.is-7 {\n --columnGap: 1.75rem; }\n #optimole-app .columns.is-variable.is-8 {\n --columnGap: 2rem; }\n #optimole-app .tile {\n -ms-flex-align: stretch;\n align-items: stretch;\n display: block;\n -ms-flex-preferred-size: 0;\n flex-basis: 0;\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1;\n min-height: -webkit-min-content;\n min-height: -moz-min-content;\n min-height: min-content; }\n #optimole-app .tile.is-ancestor {\n margin-left: -0.75rem;\n margin-right: -0.75rem;\n margin-top: -0.75rem; }\n #optimole-app .tile.is-ancestor:last-child {\n margin-bottom: -0.75rem; }\n #optimole-app .tile.is-ancestor:not(:last-child) {\n margin-bottom: 0.75rem; }\n #optimole-app .tile.is-child {\n margin: 0 !important; }\n #optimole-app .tile.is-parent {\n padding: 0.75rem; }\n #optimole-app .tile.is-vertical {\n -ms-flex-direction: column;\n flex-direction: column; }\n #optimole-app .tile.is-vertical > .tile.is-child:not(:last-child) {\n margin-bottom: 1.5rem !important; }\n @media screen and (min-width: 769px), print {\n #optimole-app .tile:not(.is-child) {\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .tile.is-1 {\n -ms-flex: none;\n flex: none;\n width: 8.33333%; }\n #optimole-app .tile.is-2 {\n -ms-flex: none;\n flex: none;\n width: 16.66667%; }\n #optimole-app .tile.is-3 {\n -ms-flex: none;\n flex: none;\n width: 25%; }\n #optimole-app .tile.is-4 {\n -ms-flex: none;\n flex: none;\n width: 33.33333%; }\n #optimole-app .tile.is-5 {\n -ms-flex: none;\n flex: none;\n width: 41.66667%; }\n #optimole-app .tile.is-6 {\n -ms-flex: none;\n flex: none;\n width: 50%; }\n #optimole-app .tile.is-7 {\n -ms-flex: none;\n flex: none;\n width: 58.33333%; }\n #optimole-app .tile.is-8 {\n -ms-flex: none;\n flex: none;\n width: 66.66667%; }\n #optimole-app .tile.is-9 {\n -ms-flex: none;\n flex: none;\n width: 75%; }\n #optimole-app .tile.is-10 {\n -ms-flex: none;\n flex: none;\n width: 83.33333%; }\n #optimole-app .tile.is-11 {\n -ms-flex: none;\n flex: none;\n width: 91.66667%; }\n #optimole-app .tile.is-12 {\n -ms-flex: none;\n flex: none;\n width: 100%; } }\n #optimole-app .hero {\n -ms-flex-align: stretch;\n align-items: stretch;\n display: -ms-flexbox;\n display: flex;\n -ms-flex-direction: column;\n flex-direction: column;\n -ms-flex-pack: justify;\n justify-content: space-between; }\n #optimole-app .hero .navbar {\n background: none; }\n #optimole-app .hero .tabs ul {\n border-bottom: none; }\n #optimole-app .hero.is-white {\n background-color: white;\n color: #0a0a0a; }\n #optimole-app .hero.is-white a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-white strong {\n color: inherit; }\n #optimole-app .hero.is-white .title {\n color: #0a0a0a; }\n #optimole-app .hero.is-white .subtitle {\n color: rgba(10, 10, 10, 0.9); }\n #optimole-app .hero.is-white .subtitle a:not(.button),\n #optimole-app .hero.is-white .subtitle strong {\n color: #0a0a0a; }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-white .navbar-menu {\n background-color: white; } }\n #optimole-app .hero.is-white .navbar-item,\n #optimole-app .hero.is-white .navbar-link {\n color: rgba(10, 10, 10, 0.7); }\n #optimole-app .hero.is-white a.navbar-item:hover, #optimole-app .hero.is-white a.navbar-item.is-active,\n #optimole-app .hero.is-white .navbar-link:hover,\n #optimole-app .hero.is-white .navbar-link.is-active {\n background-color: #f2f2f2;\n color: #0a0a0a; }\n #optimole-app .hero.is-white .tabs a {\n color: #0a0a0a;\n opacity: 0.9; }\n #optimole-app .hero.is-white .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-white .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-white .tabs.is-boxed a, #optimole-app .hero.is-white .tabs.is-toggle a {\n color: #0a0a0a; }\n #optimole-app .hero.is-white .tabs.is-boxed a:hover, #optimole-app .hero.is-white .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-white .tabs.is-boxed li.is-active a, #optimole-app .hero.is-white .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-white .tabs.is-toggle li.is-active a, #optimole-app .hero.is-white .tabs.is-toggle li.is-active a:hover {\n background-color: #0a0a0a;\n border-color: #0a0a0a;\n color: white; }\n #optimole-app .hero.is-white.is-bold {\n background-image: linear-gradient(141deg, #e6e6e6 0%, white 71%, white 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-white.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, #e6e6e6 0%, white 71%, white 100%); } }\n #optimole-app .hero.is-black {\n background-color: #0a0a0a;\n color: white; }\n #optimole-app .hero.is-black a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-black strong {\n color: inherit; }\n #optimole-app .hero.is-black .title {\n color: white; }\n #optimole-app .hero.is-black .subtitle {\n color: rgba(255, 255, 255, 0.9); }\n #optimole-app .hero.is-black .subtitle a:not(.button),\n #optimole-app .hero.is-black .subtitle strong {\n color: white; }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-black .navbar-menu {\n background-color: #0a0a0a; } }\n #optimole-app .hero.is-black .navbar-item,\n #optimole-app .hero.is-black .navbar-link {\n color: rgba(255, 255, 255, 0.7); }\n #optimole-app .hero.is-black a.navbar-item:hover, #optimole-app .hero.is-black a.navbar-item.is-active,\n #optimole-app .hero.is-black .navbar-link:hover,\n #optimole-app .hero.is-black .navbar-link.is-active {\n background-color: black;\n color: white; }\n #optimole-app .hero.is-black .tabs a {\n color: white;\n opacity: 0.9; }\n #optimole-app .hero.is-black .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-black .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-black .tabs.is-boxed a, #optimole-app .hero.is-black .tabs.is-toggle a {\n color: white; }\n #optimole-app .hero.is-black .tabs.is-boxed a:hover, #optimole-app .hero.is-black .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-black .tabs.is-boxed li.is-active a, #optimole-app .hero.is-black .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-black .tabs.is-toggle li.is-active a, #optimole-app .hero.is-black .tabs.is-toggle li.is-active a:hover {\n background-color: white;\n border-color: white;\n color: #0a0a0a; }\n #optimole-app .hero.is-black.is-bold {\n background-image: linear-gradient(141deg, black 0%, #0a0a0a 71%, #181616 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-black.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, black 0%, #0a0a0a 71%, #181616 100%); } }\n #optimole-app .hero.is-light {\n background-color: whitesmoke;\n color: #363636; }\n #optimole-app .hero.is-light a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-light strong {\n color: inherit; }\n #optimole-app .hero.is-light .title {\n color: #363636; }\n #optimole-app .hero.is-light .subtitle {\n color: rgba(54, 54, 54, 0.9); }\n #optimole-app .hero.is-light .subtitle a:not(.button),\n #optimole-app .hero.is-light .subtitle strong {\n color: #363636; }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-light .navbar-menu {\n background-color: whitesmoke; } }\n #optimole-app .hero.is-light .navbar-item,\n #optimole-app .hero.is-light .navbar-link {\n color: rgba(54, 54, 54, 0.7); }\n #optimole-app .hero.is-light a.navbar-item:hover, #optimole-app .hero.is-light a.navbar-item.is-active,\n #optimole-app .hero.is-light .navbar-link:hover,\n #optimole-app .hero.is-light .navbar-link.is-active {\n background-color: #e8e8e8;\n color: #363636; }\n #optimole-app .hero.is-light .tabs a {\n color: #363636;\n opacity: 0.9; }\n #optimole-app .hero.is-light .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-light .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-light .tabs.is-boxed a, #optimole-app .hero.is-light .tabs.is-toggle a {\n color: #363636; }\n #optimole-app .hero.is-light .tabs.is-boxed a:hover, #optimole-app .hero.is-light .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-light .tabs.is-boxed li.is-active a, #optimole-app .hero.is-light .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-light .tabs.is-toggle li.is-active a, #optimole-app .hero.is-light .tabs.is-toggle li.is-active a:hover {\n background-color: #363636;\n border-color: #363636;\n color: whitesmoke; }\n #optimole-app .hero.is-light.is-bold {\n background-image: linear-gradient(141deg, #dfd8d9 0%, whitesmoke 71%, white 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-light.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, #dfd8d9 0%, whitesmoke 71%, white 100%); } }\n #optimole-app .hero.is-dark {\n background-color: #363636;\n color: whitesmoke; }\n #optimole-app .hero.is-dark a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-dark strong {\n color: inherit; }\n #optimole-app .hero.is-dark .title {\n color: whitesmoke; }\n #optimole-app .hero.is-dark .subtitle {\n color: rgba(245, 245, 245, 0.9); }\n #optimole-app .hero.is-dark .subtitle a:not(.button),\n #optimole-app .hero.is-dark .subtitle strong {\n color: whitesmoke; }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-dark .navbar-menu {\n background-color: #363636; } }\n #optimole-app .hero.is-dark .navbar-item,\n #optimole-app .hero.is-dark .navbar-link {\n color: rgba(245, 245, 245, 0.7); }\n #optimole-app .hero.is-dark a.navbar-item:hover, #optimole-app .hero.is-dark a.navbar-item.is-active,\n #optimole-app .hero.is-dark .navbar-link:hover,\n #optimole-app .hero.is-dark .navbar-link.is-active {\n background-color: #292929;\n color: whitesmoke; }\n #optimole-app .hero.is-dark .tabs a {\n color: whitesmoke;\n opacity: 0.9; }\n #optimole-app .hero.is-dark .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-dark .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-dark .tabs.is-boxed a, #optimole-app .hero.is-dark .tabs.is-toggle a {\n color: whitesmoke; }\n #optimole-app .hero.is-dark .tabs.is-boxed a:hover, #optimole-app .hero.is-dark .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-dark .tabs.is-boxed li.is-active a, #optimole-app .hero.is-dark .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-dark .tabs.is-toggle li.is-active a, #optimole-app .hero.is-dark .tabs.is-toggle li.is-active a:hover {\n background-color: whitesmoke;\n border-color: whitesmoke;\n color: #363636; }\n #optimole-app .hero.is-dark.is-bold {\n background-image: linear-gradient(141deg, #1f191a 0%, #363636 71%, #46403f 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-dark.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, #1f191a 0%, #363636 71%, #46403f 100%); } }\n #optimole-app .hero.is-primary {\n background-color: #e7602a;\n color: #fff; }\n #optimole-app .hero.is-primary a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-primary strong {\n color: inherit; }\n #optimole-app .hero.is-primary .title {\n color: #fff; }\n #optimole-app .hero.is-primary .subtitle {\n color: rgba(255, 255, 255, 0.9); }\n #optimole-app .hero.is-primary .subtitle a:not(.button),\n #optimole-app .hero.is-primary .subtitle strong {\n color: #fff; }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-primary .navbar-menu {\n background-color: #e7602a; } }\n #optimole-app .hero.is-primary .navbar-item,\n #optimole-app .hero.is-primary .navbar-link {\n color: rgba(255, 255, 255, 0.7); }\n #optimole-app .hero.is-primary a.navbar-item:hover, #optimole-app .hero.is-primary a.navbar-item.is-active,\n #optimole-app .hero.is-primary .navbar-link:hover,\n #optimole-app .hero.is-primary .navbar-link.is-active {\n background-color: #de5119;\n color: #fff; }\n #optimole-app .hero.is-primary .tabs a {\n color: #fff;\n opacity: 0.9; }\n #optimole-app .hero.is-primary .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-primary .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-primary .tabs.is-boxed a, #optimole-app .hero.is-primary .tabs.is-toggle a {\n color: #fff; }\n #optimole-app .hero.is-primary .tabs.is-boxed a:hover, #optimole-app .hero.is-primary .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-primary .tabs.is-boxed li.is-active a, #optimole-app .hero.is-primary .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-primary .tabs.is-toggle li.is-active a, #optimole-app .hero.is-primary .tabs.is-toggle li.is-active a:hover {\n background-color: #fff;\n border-color: #fff;\n color: #e7602a; }\n #optimole-app .hero.is-primary.is-bold {\n background-image: linear-gradient(141deg, #d3230b 0%, #e7602a 71%, #ef8d3c 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-primary.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, #d3230b 0%, #e7602a 71%, #ef8d3c 100%); } }\n #optimole-app .hero.is-link {\n background-color: #3273dc;\n color: #fff; }\n #optimole-app .hero.is-link a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-link strong {\n color: inherit; }\n #optimole-app .hero.is-link .title {\n color: #fff; }\n #optimole-app .hero.is-link .subtitle {\n color: rgba(255, 255, 255, 0.9); }\n #optimole-app .hero.is-link .subtitle a:not(.button),\n #optimole-app .hero.is-link .subtitle strong {\n color: #fff; }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-link .navbar-menu {\n background-color: #3273dc; } }\n #optimole-app .hero.is-link .navbar-item,\n #optimole-app .hero.is-link .navbar-link {\n color: rgba(255, 255, 255, 0.7); }\n #optimole-app .hero.is-link a.navbar-item:hover, #optimole-app .hero.is-link a.navbar-item.is-active,\n #optimole-app .hero.is-link .navbar-link:hover,\n #optimole-app .hero.is-link .navbar-link.is-active {\n background-color: #2366d1;\n color: #fff; }\n #optimole-app .hero.is-link .tabs a {\n color: #fff;\n opacity: 0.9; }\n #optimole-app .hero.is-link .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-link .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-link .tabs.is-boxed a, #optimole-app .hero.is-link .tabs.is-toggle a {\n color: #fff; }\n #optimole-app .hero.is-link .tabs.is-boxed a:hover, #optimole-app .hero.is-link .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-link .tabs.is-boxed li.is-active a, #optimole-app .hero.is-link .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-link .tabs.is-toggle li.is-active a, #optimole-app .hero.is-link .tabs.is-toggle li.is-active a:hover {\n background-color: #fff;\n border-color: #fff;\n color: #3273dc; }\n #optimole-app .hero.is-link.is-bold {\n background-image: linear-gradient(141deg, #1577c6 0%, #3273dc 71%, #4366e5 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-link.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, #1577c6 0%, #3273dc 71%, #4366e5 100%); } }\n #optimole-app .hero.is-info {\n background-color: #008ec2;\n color: #fff; }\n #optimole-app .hero.is-info a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-info strong {\n color: inherit; }\n #optimole-app .hero.is-info .title {\n color: #fff; }\n #optimole-app .hero.is-info .subtitle {\n color: rgba(255, 255, 255, 0.9); }\n #optimole-app .hero.is-info .subtitle a:not(.button),\n #optimole-app .hero.is-info .subtitle strong {\n color: #fff; }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-info .navbar-menu {\n background-color: #008ec2; } }\n #optimole-app .hero.is-info .navbar-item,\n #optimole-app .hero.is-info .navbar-link {\n color: rgba(255, 255, 255, 0.7); }\n #optimole-app .hero.is-info a.navbar-item:hover, #optimole-app .hero.is-info a.navbar-item.is-active,\n #optimole-app .hero.is-info .navbar-link:hover,\n #optimole-app .hero.is-info .navbar-link.is-active {\n background-color: #007ba9;\n color: #fff; }\n #optimole-app .hero.is-info .tabs a {\n color: #fff;\n opacity: 0.9; }\n #optimole-app .hero.is-info .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-info .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-info .tabs.is-boxed a, #optimole-app .hero.is-info .tabs.is-toggle a {\n color: #fff; }\n #optimole-app .hero.is-info .tabs.is-boxed a:hover, #optimole-app .hero.is-info .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-info .tabs.is-boxed li.is-active a, #optimole-app .hero.is-info .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-info .tabs.is-toggle li.is-active a, #optimole-app .hero.is-info .tabs.is-toggle li.is-active a:hover {\n background-color: #fff;\n border-color: #fff;\n color: #008ec2; }\n #optimole-app .hero.is-info.is-bold {\n background-image: linear-gradient(141deg, #00818f 0%, #008ec2 71%, #007cdc 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-info.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, #00818f 0%, #008ec2 71%, #007cdc 100%); } }\n #optimole-app .hero.is-success {\n background-color: #34a85e;\n color: #fff; }\n #optimole-app .hero.is-success a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-success strong {\n color: inherit; }\n #optimole-app .hero.is-success .title {\n color: #fff; }\n #optimole-app .hero.is-success .subtitle {\n color: rgba(255, 255, 255, 0.9); }\n #optimole-app .hero.is-success .subtitle a:not(.button),\n #optimole-app .hero.is-success .subtitle strong {\n color: #fff; }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-success .navbar-menu {\n background-color: #34a85e; } }\n #optimole-app .hero.is-success .navbar-item,\n #optimole-app .hero.is-success .navbar-link {\n color: rgba(255, 255, 255, 0.7); }\n #optimole-app .hero.is-success a.navbar-item:hover, #optimole-app .hero.is-success a.navbar-item.is-active,\n #optimole-app .hero.is-success .navbar-link:hover,\n #optimole-app .hero.is-success .navbar-link.is-active {\n background-color: #2e9553;\n color: #fff; }\n #optimole-app .hero.is-success .tabs a {\n color: #fff;\n opacity: 0.9; }\n #optimole-app .hero.is-success .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-success .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-success .tabs.is-boxed a, #optimole-app .hero.is-success .tabs.is-toggle a {\n color: #fff; }\n #optimole-app .hero.is-success .tabs.is-boxed a:hover, #optimole-app .hero.is-success .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-success .tabs.is-boxed li.is-active a, #optimole-app .hero.is-success .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-success .tabs.is-toggle li.is-active a, #optimole-app .hero.is-success .tabs.is-toggle li.is-active a:hover {\n background-color: #fff;\n border-color: #fff;\n color: #34a85e; }\n #optimole-app .hero.is-success.is-bold {\n background-image: linear-gradient(141deg, #1f8a34 0%, #34a85e 71%, #34c27f 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-success.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, #1f8a34 0%, #34a85e 71%, #34c27f 100%); } }\n #optimole-app .hero.is-warning {\n background-color: #ffdd57;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .hero.is-warning a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-warning strong {\n color: inherit; }\n #optimole-app .hero.is-warning .title {\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .hero.is-warning .subtitle {\n color: rgba(0, 0, 0, 0.9); }\n #optimole-app .hero.is-warning .subtitle a:not(.button),\n #optimole-app .hero.is-warning .subtitle strong {\n color: rgba(0, 0, 0, 0.7); }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-warning .navbar-menu {\n background-color: #ffdd57; } }\n #optimole-app .hero.is-warning .navbar-item,\n #optimole-app .hero.is-warning .navbar-link {\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .hero.is-warning a.navbar-item:hover, #optimole-app .hero.is-warning a.navbar-item.is-active,\n #optimole-app .hero.is-warning .navbar-link:hover,\n #optimole-app .hero.is-warning .navbar-link.is-active {\n background-color: #ffd83d;\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .hero.is-warning .tabs a {\n color: rgba(0, 0, 0, 0.7);\n opacity: 0.9; }\n #optimole-app .hero.is-warning .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-warning .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-warning .tabs.is-boxed a, #optimole-app .hero.is-warning .tabs.is-toggle a {\n color: rgba(0, 0, 0, 0.7); }\n #optimole-app .hero.is-warning .tabs.is-boxed a:hover, #optimole-app .hero.is-warning .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-warning .tabs.is-boxed li.is-active a, #optimole-app .hero.is-warning .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-warning .tabs.is-toggle li.is-active a, #optimole-app .hero.is-warning .tabs.is-toggle li.is-active a:hover {\n background-color: rgba(0, 0, 0, 0.7);\n border-color: rgba(0, 0, 0, 0.7);\n color: #ffdd57; }\n #optimole-app .hero.is-warning.is-bold {\n background-image: linear-gradient(141deg, #ffaf24 0%, #ffdd57 71%, #fffa70 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-warning.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, #ffaf24 0%, #ffdd57 71%, #fffa70 100%); } }\n #optimole-app .hero.is-danger {\n background-color: #d54222;\n color: #fff; }\n #optimole-app .hero.is-danger a:not(.button):not(.dropdown-item):not(.tag),\n #optimole-app .hero.is-danger strong {\n color: inherit; }\n #optimole-app .hero.is-danger .title {\n color: #fff; }\n #optimole-app .hero.is-danger .subtitle {\n color: rgba(255, 255, 255, 0.9); }\n #optimole-app .hero.is-danger .subtitle a:not(.button),\n #optimole-app .hero.is-danger .subtitle strong {\n color: #fff; }\n @media screen and (max-width: 1087px) {\n #optimole-app .hero.is-danger .navbar-menu {\n background-color: #d54222; } }\n #optimole-app .hero.is-danger .navbar-item,\n #optimole-app .hero.is-danger .navbar-link {\n color: rgba(255, 255, 255, 0.7); }\n #optimole-app .hero.is-danger a.navbar-item:hover, #optimole-app .hero.is-danger a.navbar-item.is-active,\n #optimole-app .hero.is-danger .navbar-link:hover,\n #optimole-app .hero.is-danger .navbar-link.is-active {\n background-color: #bf3b1e;\n color: #fff; }\n #optimole-app .hero.is-danger .tabs a {\n color: #fff;\n opacity: 0.9; }\n #optimole-app .hero.is-danger .tabs a:hover {\n opacity: 1; }\n #optimole-app .hero.is-danger .tabs li.is-active a {\n opacity: 1; }\n #optimole-app .hero.is-danger .tabs.is-boxed a, #optimole-app .hero.is-danger .tabs.is-toggle a {\n color: #fff; }\n #optimole-app .hero.is-danger .tabs.is-boxed a:hover, #optimole-app .hero.is-danger .tabs.is-toggle a:hover {\n background-color: rgba(10, 10, 10, 0.1); }\n #optimole-app .hero.is-danger .tabs.is-boxed li.is-active a, #optimole-app .hero.is-danger .tabs.is-boxed li.is-active a:hover, #optimole-app .hero.is-danger .tabs.is-toggle li.is-active a, #optimole-app .hero.is-danger .tabs.is-toggle li.is-active a:hover {\n background-color: #fff;\n border-color: #fff;\n color: #d54222; }\n #optimole-app .hero.is-danger.is-bold {\n background-image: linear-gradient(141deg, #b31311 0%, #d54222 71%, #e46c2c 100%); }\n @media screen and (max-width: 768px) {\n #optimole-app .hero.is-danger.is-bold .navbar-menu {\n background-image: linear-gradient(141deg, #b31311 0%, #d54222 71%, #e46c2c 100%); } }\n #optimole-app .hero.is-small .hero-body {\n padding-bottom: 1.5rem;\n padding-top: 1.5rem; }\n @media screen and (min-width: 769px), print {\n #optimole-app .hero.is-medium .hero-body {\n padding-bottom: 9rem;\n padding-top: 9rem; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .hero.is-large .hero-body {\n padding-bottom: 18rem;\n padding-top: 18rem; } }\n #optimole-app .hero.is-halfheight .hero-body, #optimole-app .hero.is-fullheight .hero-body {\n -ms-flex-align: center;\n align-items: center;\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .hero.is-halfheight .hero-body > .container, #optimole-app .hero.is-fullheight .hero-body > .container {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 1;\n flex-shrink: 1; }\n #optimole-app .hero.is-halfheight {\n min-height: 50vh; }\n #optimole-app .hero.is-fullheight {\n min-height: 100vh; }\n #optimole-app .hero-video {\n overflow: hidden; }\n #optimole-app .hero-video video {\n left: 50%;\n min-height: 100%;\n min-width: 100%;\n position: absolute;\n top: 50%;\n transform: translate3d(-50%, -50%, 0); }\n #optimole-app .hero-video.is-transparent {\n opacity: 0.3; }\n @media screen and (max-width: 768px) {\n #optimole-app .hero-video {\n display: none; } }\n #optimole-app .hero-buttons {\n margin-top: 1.5rem; }\n @media screen and (max-width: 768px) {\n #optimole-app .hero-buttons .button {\n display: -ms-flexbox;\n display: flex; }\n #optimole-app .hero-buttons .button:not(:last-child) {\n margin-bottom: 0.75rem; } }\n @media screen and (min-width: 769px), print {\n #optimole-app .hero-buttons {\n display: -ms-flexbox;\n display: flex;\n -ms-flex-pack: center;\n justify-content: center; }\n #optimole-app .hero-buttons .button:not(:last-child) {\n margin-right: 1.5rem; } }\n #optimole-app .hero-head,\n #optimole-app .hero-foot {\n -ms-flex-positive: 0;\n flex-grow: 0;\n -ms-flex-negative: 0;\n flex-shrink: 0; }\n #optimole-app .hero-body {\n -ms-flex-positive: 1;\n flex-grow: 1;\n -ms-flex-negative: 0;\n flex-shrink: 0;\n padding: 3rem 1.5rem; }\n #optimole-app .section {\n padding: 3rem 1.5rem; }\n @media screen and (min-width: 1088px) {\n #optimole-app .section.is-medium {\n padding: 9rem 1.5rem; }\n #optimole-app .section.is-large {\n padding: 18rem 1.5rem; } }\n #optimole-app .footer {\n background-color: #fafafa;\n padding: 3rem 1.5rem 6rem; }\n #optimole-app .card {\n transition: all 750ms ease-in-out;\n border: 0;\n border-radius: .1875rem;\n box-shadow: 0 1px 15px 1px rgba(39, 39, 39, 0.1); }\n #optimole-app .logo {\n margin-bottom: 10px; }\n #optimole-app .logo img {\n max-width: 180px;\n margin: 0 auto; }\n #optimole-app .vue-js-switch {\n -ms-flex-item-align: center;\n -ms-grid-row-align: center;\n align-self: center; }\n #optimole-app .api-key-control {\n padding: 0 15px 0 0; }\n #optimole-app .api-key-field .button.is-danger {\n padding-left: 20px;\n padding-right: 20px; }\n #optimole-app .api-key-label {\n -ms-flex-item-align: center;\n -ms-grid-row-align: center;\n align-self: center;\n margin: 0.5em 10px 0.5em 0;\n font-size: 1em; }\n #optimole-app .header {\n padding: 0 1.5rem 0; }\n #optimole-app .header.level {\n margin-bottom: 0; }\n #optimole-app .account img {\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px; }\n #optimole-app .account .label {\n margin-bottom: 0; }\n #optimole-app .optimized-images table td, #optimole-app .optimized-images table th {\n vertical-align: middle; }\n #optimole-app .media-diff {\n position: relative;\n margin: 0 auto; }\n #optimole-app .media-diff video, #optimole-app .media-diff img {\n display: block;\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%; }\n #optimole-app .origin-wrapper {\n position: absolute;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n overflow: hidden;\n z-index: 1;\n transform: translateZ(0);\n will-change: width; }\n #optimole-app .handle {\n position: absolute;\n top: 0;\n bottom: 0;\n color: rgba(255, 255, 255, 0.8);\n background-color: rgba(255, 255, 255, 0.8);\n width: 2px;\n cursor: ew-resize;\n transform: translateX(-50%) translateZ(0);\n z-index: 2;\n will-change: left;\n left: 200px; }\n #optimole-app .cursor {\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translateX(-50%) translateZ(0); }\n #optimole-app .cursor .circle {\n background-color: rgba(255, 255, 255, 0.8);\n width: 24px;\n height: 24px;\n border-radius: 50%; }\n\n.fade-enter-active, .fade-leave-active {\n transition: opacity .5s; }\n\n.fade-enter, .fade-leave-to {\n opacity: 0; }\n\n.media_page_optimole #wpbody-content > * {\n display: none !important; }\n\n.media_page_optimole #wpbody-content > #optimole-app {\n display: block !important; }\n\n#optimole-app img.optml-image {\n float: left;\n max-width: 100px;\n width: auto;\n margin: auto; }\n\n.optml-ratio-feedback .emoji {\n font-size: 1.5em; }\n\n.optml-ratio-feedback {\n float: right;\n padding-right: 20px; }\n\n.optml-image-heading {\n text-align: left; }\n\nth.optml-image-ratio-heading {\n text-align: right !important;\n font-size: 150%; }\n\n#optimole-app .tabs a {\n margin-bottom: -4px; }\n\n#optimole-app .is-tab {\n min-height: 700px; }\n", ""]); |
| 13513 |
|
| 13514 |
// exports |
| 13515 |
|
| 13516 |
|
| 13517 |
/***/ }), |
| 13518 |
/* 13 */ |
| 13519 |
/***/ (function(module, exports, __webpack_require__) { |
| 13520 |
|
| 13521 |
"use strict"; |
| 13522 |
|
| 13523 |
|
| 13524 |
var _appHeader = __webpack_require__(14); |
| 13525 |
|
| 13526 |
var _appHeader2 = _interopRequireDefault(_appHeader); |
| 13527 |
|
| 13528 |
var _cdnDetails = __webpack_require__(19); |
| 13529 |
|
| 13530 |
var _cdnDetails2 = _interopRequireDefault(_cdnDetails); |
| 13531 |
|
| 13532 |
var _connectLayout = __webpack_require__(24); |
| 13533 |
|
| 13534 |
var _connectLayout2 = _interopRequireDefault(_connectLayout); |
| 13535 |
|
| 13536 |
var _lastImages = __webpack_require__(31); |
| 13537 |
|
| 13538 |
var _lastImages2 = _interopRequireDefault(_lastImages); |
| 13539 |
|
| 13540 |
var _apiKeyForm = __webpack_require__(5); |
| 13541 |
|
| 13542 |
var _apiKeyForm2 = _interopRequireDefault(_apiKeyForm); |
| 13543 |
|
| 13544 |
var _options = __webpack_require__(36); |
| 13545 |
|
| 13546 |
var _options2 = _interopRequireDefault(_options); |
| 13547 |
|
| 13548 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
| 13549 |
|
| 13550 |
// <template> |
| 13551 |
// <div class="card"> |
| 13552 |
// <app-header></app-header> |
| 13553 |
// <div class="card-content"> |
| 13554 |
// <div class="content"> |
| 13555 |
// <connect-layout v-if="! this.$store.state.connected"></connect-layout> |
| 13556 |
// <transition name="fade" mode="out-in"> |
| 13557 |
// <div v-if="this.$store.state.connected"> |
| 13558 |
// <div class="tabs is-left is-boxed is-medium"> |
| 13559 |
// <ul class="is-marginless"> |
| 13560 |
// <li :class="tab === 'dashboard' ? 'is-active' : ''"> |
| 13561 |
// <a @click="changeTab('dashboard')" class="is-size-6-mobile"> |
| 13562 |
// <span class="icon is-size-6-mobile dashicons dashicons-admin-home"></span> |
| 13563 |
// <span class="is-size-6-mobile ">{{strings.dashboard_menu_item}}</span> |
| 13564 |
// </a> |
| 13565 |
// </li> |
| 13566 |
// |
| 13567 |
// <li :class="tab === 'settings' ? 'is-active' : ''" > |
| 13568 |
// <a @click="changeTab('settings')" class="is-size-6-mobile"> |
| 13569 |
// <span class="icon is-size-6-mobile dashicons dashicons-admin-settings"></span> |
| 13570 |
// <span class="is-size-6-mobile">{{strings.settings_menu_item}}</span> |
| 13571 |
// </a> |
| 13572 |
// </li> |
| 13573 |
// </ul> |
| 13574 |
// </div> |
| 13575 |
// |
| 13576 |
// <div class="is-tab" v-if="tab === 'dashboard' "> |
| 13577 |
// <api-key-form></api-key-form> |
| 13578 |
// <cdn-details v-if="this.$store.state.userData"></cdn-details> |
| 13579 |
// <hr/> |
| 13580 |
// <last-images :status="fetchStatus"></last-images> |
| 13581 |
// </div> |
| 13582 |
// <div class="is-tab" v-if=" tab === 'settings'" > |
| 13583 |
// <options></options> |
| 13584 |
// </div> |
| 13585 |
// </div> |
| 13586 |
// </transition> |
| 13587 |
// </div> |
| 13588 |
// </div> |
| 13589 |
// |
| 13590 |
// <div class="level-right"> |
| 13591 |
// <p class="level-item"><a href="https://optimole.com" target="_blank">Optimole v{{strings.version}}</a></p> |
| 13592 |
// <p class="level-item"><a href="https://optimole.com/terms/" target="_blank">{{strings.terms_menu}}</a></p> |
| 13593 |
// <p class="level-item"><a href="https://optimole.com/privacy-policy/" target="_blank">{{strings.privacy_menu}}</a> |
| 13594 |
// </p> |
| 13595 |
// <p class="level-item"><a :href="'https://speedtest.optimole.com/?url=' + home " target="_blank">{{strings.testdrive_menu}}</a> |
| 13596 |
// </p> |
| 13597 |
// </div> |
| 13598 |
// </div> |
| 13599 |
// </template> |
| 13600 |
// |
| 13601 |
// <script> |
| 13602 |
module.exports = { |
| 13603 |
name: 'app', |
| 13604 |
data: function data() { |
| 13605 |
return { |
| 13606 |
strings: optimoleDashboardApp.strings, |
| 13607 |
home: optimoleDashboardApp.home_url, |
| 13608 |
fetchStatus: false, |
| 13609 |
tab: 'dashboard' |
| 13610 |
}; |
| 13611 |
}, |
| 13612 |
|
| 13613 |
components: { |
| 13614 |
AppHeader: _appHeader2.default, |
| 13615 |
Options: _options2.default, |
| 13616 |
ConnectLayout: _connectLayout2.default, |
| 13617 |
ApiKeyForm: _apiKeyForm2.default, |
| 13618 |
CdnDetails: _cdnDetails2.default, |
| 13619 |
LastImages: _lastImages2.default |
| 13620 |
}, |
| 13621 |
mounted: function mounted() { |
| 13622 |
var self = this; |
| 13623 |
if (this.$store.state.connected) { |
| 13624 |
this.$store.dispatch('retrieveOptimizedImages', { waitTime: 0, component: null }); |
| 13625 |
self.fetchStatus = true; |
| 13626 |
} |
| 13627 |
}, |
| 13628 |
|
| 13629 |
methods: { |
| 13630 |
changeTab: function changeTab(value) { |
| 13631 |
this.tab = value; |
| 13632 |
} |
| 13633 |
} |
| 13634 |
// </script> |
| 13635 |
// <style lang="sass-loader"> |
| 13636 |
// @import '../../css/style.scss'; |
| 13637 |
// #optimole-app .tabs a{ |
| 13638 |
// margin-bottom: -4px; |
| 13639 |
// } |
| 13640 |
// #optimole-app .is-tab{ |
| 13641 |
// min-height: 700px; |
| 13642 |
// } |
| 13643 |
// </style> |
| 13644 |
|
| 13645 |
}; |
| 13646 |
|
| 13647 |
/***/ }), |
| 13648 |
/* 14 */ |
| 13649 |
/***/ (function(module, exports, __webpack_require__) { |
| 13650 |
|
| 13651 |
var __vue_script__, __vue_template__ |
| 13652 |
__webpack_require__(15) |
| 13653 |
__vue_script__ = __webpack_require__(17) |
| 13654 |
__vue_template__ = __webpack_require__(18) |
| 13655 |
module.exports = __vue_script__ || {} |
| 13656 |
if (module.exports.__esModule) module.exports = module.exports.default |
| 13657 |
if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ } |
| 13658 |
if (false) {(function () { module.hot.accept() |
| 13659 |
var hotAPI = require("vue-hot-reload-api") |
| 13660 |
hotAPI.install(require("vue"), true) |
| 13661 |
if (!hotAPI.compatible) return |
| 13662 |
var id = "D:\\local\\optimolewp\\app\\public\\wp-content\\plugins\\optimole-wp\\assets\\vue\\components\\app-header.vue" |
| 13663 |
if (!module.hot.data) { |
| 13664 |
hotAPI.createRecord(id, module.exports) |
| 13665 |
} else { |
| 13666 |
hotAPI.update(id, module.exports, __vue_template__) |
| 13667 |
} |
| 13668 |
})()} |
| 13669 |
|
| 13670 |
/***/ }), |
| 13671 |
/* 15 */ |
| 13672 |
/***/ (function(module, exports, __webpack_require__) { |
| 13673 |
|
| 13674 |
// style-loader: Adds some css to the DOM by adding a <style> tag |
| 13675 |
|
| 13676 |
// load the styles |
| 13677 |
var content = __webpack_require__(16); |
| 13678 |
if(typeof content === 'string') content = [[module.i, content, '']]; |
| 13679 |
// add the styles to the DOM |
| 13680 |
var update = __webpack_require__(1)(content, {}); |
| 13681 |
if(content.locals) module.exports = content.locals; |
| 13682 |
// Hot Module Replacement |
| 13683 |
if(false) { |
| 13684 |
// When the styles change, update the <style> tags |
| 13685 |
if(!content.locals) { |
| 13686 |
module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-1f2f7f0a&file=app-header.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./app-header.vue", function() { |
| 13687 |
var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-1f2f7f0a&file=app-header.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./app-header.vue"); |
| 13688 |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; |
| 13689 |
update(newContent); |
| 13690 |
}); |
| 13691 |
} |
| 13692 |
// When the module is disposed, remove the <style> tags |
| 13693 |
module.hot.dispose(function() { update(); }); |
| 13694 |
} |
| 13695 |
|
| 13696 |
/***/ }), |
| 13697 |
/* 16 */ |
| 13698 |
/***/ (function(module, exports, __webpack_require__) { |
| 13699 |
|
| 13700 |
exports = module.exports = __webpack_require__(0)(); |
| 13701 |
// imports |
| 13702 |
|
| 13703 |
|
| 13704 |
// module |
| 13705 |
exports.push([module.i, "\n\t@media ( min-width: 769px ) {\n\t\t#optimole-app hr[_v-1f2f7f0a] {\n\t\t\tmargin: 0;\n\t\t}\n\t}\n", ""]); |
| 13706 |
|
| 13707 |
// exports |
| 13708 |
|
| 13709 |
|
| 13710 |
/***/ }), |
| 13711 |
/* 17 */ |
| 13712 |
/***/ (function(module, exports, __webpack_require__) { |
| 13713 |
|
| 13714 |
"use strict"; |
| 13715 |
|
| 13716 |
|
| 13717 |
Object.defineProperty(exports, "__esModule", { |
| 13718 |
value: true |
| 13719 |
}); |
| 13720 |
// <template> |
| 13721 |
// <div> |
| 13722 |
// <div class="header has-text-centered level"> |
| 13723 |
// |
| 13724 |
// <div class="level-left"> |
| 13725 |
// <a class="logo level-item" href="https://optimole.com" target="_blank"> |
| 13726 |
// <figure class="media"> |
| 13727 |
// <img :src="logo" :alt="strings.optimole + ' ' + strings.service_details"> |
| 13728 |
// </figure> |
| 13729 |
// </a> |
| 13730 |
// <h3 class="has-text-centered has-text-grey-dark is-size-4 level-item"> |
| 13731 |
// <span class="has-text-weight-semibold"> |
| 13732 |
// {{strings.service_details}} |
| 13733 |
// </span> |
| 13734 |
// </h3> |
| 13735 |
// </div> |
| 13736 |
// <div class="level-right"> |
| 13737 |
// <div class="tags has-addons level-item"> |
| 13738 |
// <span class="tag is-dark">{{strings.status}}</span> |
| 13739 |
// <span v-if="connected" class="tag is-success">{{strings.connected}}</span> |
| 13740 |
// <span v-else class="tag is-danger">{{strings.not_connected}}</span> |
| 13741 |
// </div> |
| 13742 |
// </div> |
| 13743 |
// |
| 13744 |
// </div> |
| 13745 |
// <hr/> |
| 13746 |
// </div> |
| 13747 |
// </template> |
| 13748 |
// |
| 13749 |
// <script> |
| 13750 |
exports.default = { |
| 13751 |
name: "app-header", |
| 13752 |
data: function data() { |
| 13753 |
return { |
| 13754 |
logo: optimoleDashboardApp.assets_url + 'img/logo.png', |
| 13755 |
strings: optimoleDashboardApp.strings |
| 13756 |
}; |
| 13757 |
}, |
| 13758 |
|
| 13759 |
computed: { |
| 13760 |
connected: function connected() { |
| 13761 |
return this.$store.state.connected; |
| 13762 |
} |
| 13763 |
} |
| 13764 |
// </script> |
| 13765 |
// |
| 13766 |
// <style scoped> |
| 13767 |
// @media ( min-width: 769px ) { |
| 13768 |
// #optimole-app hr { |
| 13769 |
// margin: 0; |
| 13770 |
// } |
| 13771 |
// } |
| 13772 |
// </style> |
| 13773 |
|
| 13774 |
}; |
| 13775 |
|
| 13776 |
/***/ }), |
| 13777 |
/* 18 */ |
| 13778 |
/***/ (function(module, exports) { |
| 13779 |
|
| 13780 |
module.exports = "\n\t<div _v-1f2f7f0a=\"\">\n\t\t<div class=\"header has-text-centered level\" _v-1f2f7f0a=\"\">\n\t\t\t\n\t\t\t<div class=\"level-left\" _v-1f2f7f0a=\"\">\n\t\t\t\t<a class=\"logo level-item\" href=\"https://optimole.com\" target=\"_blank\" _v-1f2f7f0a=\"\">\n\t\t\t\t\t<figure class=\"media\" _v-1f2f7f0a=\"\">\n\t\t\t\t\t\t<img :src=\"logo\" :alt=\"strings.optimole + ' ' + strings.service_details\" _v-1f2f7f0a=\"\">\n\t\t\t\t\t</figure>\n\t\t\t\t</a>\n\t\t\t\t<h3 class=\"has-text-centered has-text-grey-dark is-size-4 level-item\" _v-1f2f7f0a=\"\">\n\t\t\t\t\t<span class=\"has-text-weight-semibold\" _v-1f2f7f0a=\"\">\n\t\t\t\t\t{{strings.service_details}}\n\t\t\t\t\t</span>\n\t\t\t\t</h3>\n\t\t\t</div>\n\t\t\t<div class=\"level-right\" _v-1f2f7f0a=\"\">\n\t\t\t\t<div class=\"tags has-addons level-item\" _v-1f2f7f0a=\"\">\n\t\t\t\t\t<span class=\"tag is-dark\" _v-1f2f7f0a=\"\">{{strings.status}}</span>\n\t\t\t\t\t<span v-if=\"connected\" class=\"tag is-success\" _v-1f2f7f0a=\"\">{{strings.connected}}</span>\n\t\t\t\t\t<span v-else=\"\" class=\"tag is-danger\" _v-1f2f7f0a=\"\">{{strings.not_connected}}</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t\n\t\t</div>\n\t\t<hr _v-1f2f7f0a=\"\">\n\t</div>\n"; |
| 13781 |
|
| 13782 |
/***/ }), |
| 13783 |
/* 19 */ |
| 13784 |
/***/ (function(module, exports, __webpack_require__) { |
| 13785 |
|
| 13786 |
var __vue_script__, __vue_template__ |
| 13787 |
__webpack_require__(20) |
| 13788 |
__vue_script__ = __webpack_require__(22) |
| 13789 |
__vue_template__ = __webpack_require__(23) |
| 13790 |
module.exports = __vue_script__ || {} |
| 13791 |
if (module.exports.__esModule) module.exports = module.exports.default |
| 13792 |
if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ } |
| 13793 |
if (false) {(function () { module.hot.accept() |
| 13794 |
var hotAPI = require("vue-hot-reload-api") |
| 13795 |
hotAPI.install(require("vue"), true) |
| 13796 |
if (!hotAPI.compatible) return |
| 13797 |
var id = "D:\\local\\optimolewp\\app\\public\\wp-content\\plugins\\optimole-wp\\assets\\vue\\components\\cdn-details.vue" |
| 13798 |
if (!module.hot.data) { |
| 13799 |
hotAPI.createRecord(id, module.exports) |
| 13800 |
} else { |
| 13801 |
hotAPI.update(id, module.exports, __vue_template__) |
| 13802 |
} |
| 13803 |
})()} |
| 13804 |
|
| 13805 |
/***/ }), |
| 13806 |
/* 20 */ |
| 13807 |
/***/ (function(module, exports, __webpack_require__) { |
| 13808 |
|
| 13809 |
// style-loader: Adds some css to the DOM by adding a <style> tag |
| 13810 |
|
| 13811 |
// load the styles |
| 13812 |
var content = __webpack_require__(21); |
| 13813 |
if(typeof content === 'string') content = [[module.i, content, '']]; |
| 13814 |
// add the styles to the DOM |
| 13815 |
var update = __webpack_require__(1)(content, {}); |
| 13816 |
if(content.locals) module.exports = content.locals; |
| 13817 |
// Hot Module Replacement |
| 13818 |
if(false) { |
| 13819 |
// When the styles change, update the <style> tags |
| 13820 |
if(!content.locals) { |
| 13821 |
module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-c05eee60&file=cdn-details.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./cdn-details.vue", function() { |
| 13822 |
var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-c05eee60&file=cdn-details.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./cdn-details.vue"); |
| 13823 |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; |
| 13824 |
update(newContent); |
| 13825 |
}); |
| 13826 |
} |
| 13827 |
// When the module is disposed, remove the <style> tags |
| 13828 |
module.hot.dispose(function() { update(); }); |
| 13829 |
} |
| 13830 |
|
| 13831 |
/***/ }), |
| 13832 |
/* 21 */ |
| 13833 |
/***/ (function(module, exports, __webpack_require__) { |
| 13834 |
|
| 13835 |
exports = module.exports = __webpack_require__(0)(); |
| 13836 |
// imports |
| 13837 |
|
| 13838 |
|
| 13839 |
// module |
| 13840 |
exports.push([module.i, "\n\t#optimole-app .label[_v-c05eee60] {\n\t\tmargin-top: 0;\n\t}\n", ""]); |
| 13841 |
|
| 13842 |
// exports |
| 13843 |
|
| 13844 |
|
| 13845 |
/***/ }), |
| 13846 |
/* 22 */ |
| 13847 |
/***/ (function(module, exports, __webpack_require__) { |
| 13848 |
|
| 13849 |
"use strict"; |
| 13850 |
|
| 13851 |
|
| 13852 |
Object.defineProperty(exports, "__esModule", { |
| 13853 |
value: true |
| 13854 |
}); |
| 13855 |
// <template> |
| 13856 |
// <div class="cdn-details"> |
| 13857 |
// <hr/> |
| 13858 |
// <div class="account level has-text-centered"> |
| 13859 |
// <div class="level-left"> |
| 13860 |
// <span class="label level-item">{{strings.logged_in_as}}:</span> |
| 13861 |
// <p class="details level-item tags has-addons"> |
| 13862 |
// <span class="tag is-light">{{userData.display_name}}</span> |
| 13863 |
// <span class="tag is-paddingless"><img :src="userData.picture" class="image is-24x24 is-rounded" :alt="userData.display_name"></span> |
| 13864 |
// </p> |
| 13865 |
// </div> |
| 13866 |
// <div class="level-right"> |
| 13867 |
// <span class="label level-item">{{strings.private_cdn_url}}:</span> |
| 13868 |
// <p class="details level-item tag is-light">{{userData.cdn_key}}.i.optimole.com</p> |
| 13869 |
// </div> |
| 13870 |
// </div> |
| 13871 |
// <hr/> |
| 13872 |
// <div class="level stats"> |
| 13873 |
// <div class="level-left"> |
| 13874 |
// <div class="level-item"> |
| 13875 |
// <div class="tags has-addons"> |
| 13876 |
// <span class="tag is-info">{{strings.usage}}:</span> |
| 13877 |
// <span class="tag">{{this.userData.usage_pretty}}</span> |
| 13878 |
// </div> |
| 13879 |
// </div> |
| 13880 |
// </div> |
| 13881 |
// <h4 class="level-item is-size-5 is-marginless has-text-grey"> |
| 13882 |
// {{computedPercentage()}}% |
| 13883 |
// </h4> |
| 13884 |
// <div class="level-right"> |
| 13885 |
// <div class="level-item"> |
| 13886 |
// <div class="tags has-addons"> |
| 13887 |
// <span class="tag is-info">{{strings.quota}}:</span> |
| 13888 |
// <span class="tag">{{this.userData.quota_pretty}}</span> |
| 13889 |
// </div> |
| 13890 |
// </div> |
| 13891 |
// </div> |
| 13892 |
// </div> |
| 13893 |
// <progress class="progress is-success" :value="this.userData.usage" :max="this.userData.quota">60%</progress> |
| 13894 |
// |
| 13895 |
// </div> |
| 13896 |
// </template> |
| 13897 |
// |
| 13898 |
// <script> |
| 13899 |
exports.default = { |
| 13900 |
name: "cdn-details", |
| 13901 |
data: function data() { |
| 13902 |
return { |
| 13903 |
userData: this.$store.state.userData, |
| 13904 |
strings: optimoleDashboardApp.strings |
| 13905 |
}; |
| 13906 |
}, |
| 13907 |
|
| 13908 |
methods: { |
| 13909 |
computedPercentage: function computedPercentage() { |
| 13910 |
return (this.userData.usage / this.userData.quota * 100).toFixed(2); |
| 13911 |
} |
| 13912 |
} |
| 13913 |
// </script> |
| 13914 |
// |
| 13915 |
// <style scoped> |
| 13916 |
// #optimole-app .label { |
| 13917 |
// margin-top: 0; |
| 13918 |
// } |
| 13919 |
// </style> |
| 13920 |
|
| 13921 |
}; |
| 13922 |
|
| 13923 |
/***/ }), |
| 13924 |
/* 23 */ |
| 13925 |
/***/ (function(module, exports) { |
| 13926 |
|
| 13927 |
module.exports = "\n\t<div class=\"cdn-details\" _v-c05eee60=\"\">\n\t\t<hr _v-c05eee60=\"\">\n\t\t<div class=\"account level has-text-centered\" _v-c05eee60=\"\">\n\t\t\t<div class=\"level-left\" _v-c05eee60=\"\">\n\t\t\t\t<span class=\"label level-item\" _v-c05eee60=\"\">{{strings.logged_in_as}}:</span>\n\t\t\t\t<p class=\"details level-item tags has-addons\" _v-c05eee60=\"\">\n\t\t\t\t\t<span class=\"tag is-light\" _v-c05eee60=\"\">{{userData.display_name}}</span>\n\t\t\t\t\t<span class=\"tag is-paddingless\" _v-c05eee60=\"\"><img :src=\"userData.picture\" class=\"image is-24x24 is-rounded\" :alt=\"userData.display_name\" _v-c05eee60=\"\"></span>\n\t\t\t\t</p>\n\t\t\t</div>\n\t\t\t<div class=\"level-right\" _v-c05eee60=\"\">\n\t\t\t\t<span class=\"label level-item\" _v-c05eee60=\"\">{{strings.private_cdn_url}}:</span>\n\t\t\t\t<p class=\"details level-item tag is-light\" _v-c05eee60=\"\">{{userData.cdn_key}}.i.optimole.com</p>\n\t\t\t</div>\n\t\t</div>\n\t\t<hr _v-c05eee60=\"\">\n\t\t<div class=\"level stats\" _v-c05eee60=\"\">\n\t\t\t<div class=\"level-left\" _v-c05eee60=\"\">\n\t\t\t\t<div class=\"level-item\" _v-c05eee60=\"\">\n\t\t\t\t\t<div class=\"tags has-addons\" _v-c05eee60=\"\">\n\t\t\t\t\t\t<span class=\"tag is-info\" _v-c05eee60=\"\">{{strings.usage}}:</span>\n\t\t\t\t\t\t<span class=\"tag\" _v-c05eee60=\"\">{{this.userData.usage_pretty}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<h4 class=\"level-item is-size-5 is-marginless has-text-grey\" _v-c05eee60=\"\">\n\t\t\t\t{{computedPercentage()}}%\n\t\t\t</h4>\n\t\t\t<div class=\"level-right\" _v-c05eee60=\"\">\n\t\t\t\t<div class=\"level-item\" _v-c05eee60=\"\">\n\t\t\t\t\t<div class=\"tags has-addons\" _v-c05eee60=\"\">\n\t\t\t\t\t\t<span class=\"tag is-info\" _v-c05eee60=\"\">{{strings.quota}}:</span>\n\t\t\t\t\t\t<span class=\"tag\" _v-c05eee60=\"\">{{this.userData.quota_pretty}}</span>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<progress class=\"progress is-success\" :value=\"this.userData.usage\" :max=\"this.userData.quota\" _v-c05eee60=\"\">60%</progress>\n\n\t</div>\n"; |
| 13928 |
|
| 13929 |
/***/ }), |
| 13930 |
/* 24 */ |
| 13931 |
/***/ (function(module, exports, __webpack_require__) { |
| 13932 |
|
| 13933 |
var __vue_script__, __vue_template__ |
| 13934 |
__webpack_require__(25) |
| 13935 |
__vue_script__ = __webpack_require__(27) |
| 13936 |
__vue_template__ = __webpack_require__(30) |
| 13937 |
module.exports = __vue_script__ || {} |
| 13938 |
if (module.exports.__esModule) module.exports = module.exports.default |
| 13939 |
if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ } |
| 13940 |
if (false) {(function () { module.hot.accept() |
| 13941 |
var hotAPI = require("vue-hot-reload-api") |
| 13942 |
hotAPI.install(require("vue"), true) |
| 13943 |
if (!hotAPI.compatible) return |
| 13944 |
var id = "D:\\local\\optimolewp\\app\\public\\wp-content\\plugins\\optimole-wp\\assets\\vue\\components\\connect-layout.vue" |
| 13945 |
if (!module.hot.data) { |
| 13946 |
hotAPI.createRecord(id, module.exports) |
| 13947 |
} else { |
| 13948 |
hotAPI.update(id, module.exports, __vue_template__) |
| 13949 |
} |
| 13950 |
})()} |
| 13951 |
|
| 13952 |
/***/ }), |
| 13953 |
/* 25 */ |
| 13954 |
/***/ (function(module, exports, __webpack_require__) { |
| 13955 |
|
| 13956 |
// style-loader: Adds some css to the DOM by adding a <style> tag |
| 13957 |
|
| 13958 |
// load the styles |
| 13959 |
var content = __webpack_require__(26); |
| 13960 |
if(typeof content === 'string') content = [[module.i, content, '']]; |
| 13961 |
// add the styles to the DOM |
| 13962 |
var update = __webpack_require__(1)(content, {}); |
| 13963 |
if(content.locals) module.exports = content.locals; |
| 13964 |
// Hot Module Replacement |
| 13965 |
if(false) { |
| 13966 |
// When the styles change, update the <style> tags |
| 13967 |
if(!content.locals) { |
| 13968 |
module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-3494772f&file=connect-layout.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./connect-layout.vue", function() { |
| 13969 |
var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-3494772f&file=connect-layout.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./connect-layout.vue"); |
| 13970 |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; |
| 13971 |
update(newContent); |
| 13972 |
}); |
| 13973 |
} |
| 13974 |
// When the module is disposed, remove the <style> tags |
| 13975 |
module.hot.dispose(function() { update(); }); |
| 13976 |
} |
| 13977 |
|
| 13978 |
/***/ }), |
| 13979 |
/* 26 */ |
| 13980 |
/***/ (function(module, exports, __webpack_require__) { |
| 13981 |
|
| 13982 |
exports = module.exports = __webpack_require__(0)(); |
| 13983 |
// imports |
| 13984 |
|
| 13985 |
|
| 13986 |
// module |
| 13987 |
exports.push([module.i, "\n\tinput[_v-3494772f],.notification .delete[_v-3494772f] {\n\t\tbox-sizing: border-box !important;\n\t}\n\n", ""]); |
| 13988 |
|
| 13989 |
// exports |
| 13990 |
|
| 13991 |
|
| 13992 |
/***/ }), |
| 13993 |
/* 27 */ |
| 13994 |
/***/ (function(module, exports, __webpack_require__) { |
| 13995 |
|
| 13996 |
"use strict"; |
| 13997 |
|
| 13998 |
|
| 13999 |
Object.defineProperty(exports, "__esModule", { |
| 14000 |
value: true |
| 14001 |
}); |
| 14002 |
|
| 14003 |
var _apiKeyForm = __webpack_require__(5); |
| 14004 |
|
| 14005 |
var _apiKeyForm2 = _interopRequireDefault(_apiKeyForm); |
| 14006 |
|
| 14007 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
| 14008 |
|
| 14009 |
exports.default = { |
| 14010 |
name: 'connect-layout', |
| 14011 |
components: { ApiKeyForm: _apiKeyForm2.default }, |
| 14012 |
data: function data() { |
| 14013 |
return { |
| 14014 |
email: optimoleDashboardApp.current_user.email, |
| 14015 |
strings: optimoleDashboardApp.strings, |
| 14016 |
showApiKey: false, |
| 14017 |
error: false, |
| 14018 |
from_register: false |
| 14019 |
}; |
| 14020 |
}, |
| 14021 |
|
| 14022 |
computed: { |
| 14023 |
isLoading: function isLoading() { |
| 14024 |
return this.$store.state.loading; |
| 14025 |
} |
| 14026 |
}, |
| 14027 |
methods: { |
| 14028 |
toggleApiForm: function toggleApiForm() { |
| 14029 |
this.error = false; |
| 14030 |
this.from_register = false; |
| 14031 |
this.showApiKey = !this.showApiKey; |
| 14032 |
}, |
| 14033 |
registerAccount: function registerAccount() { |
| 14034 |
var _this = this; |
| 14035 |
|
| 14036 |
this.error = false; |
| 14037 |
this.$store.dispatch('registerOptimole', { |
| 14038 |
email: this.email |
| 14039 |
}).then(function (response) { |
| 14040 |
if (response.code === 'success') { |
| 14041 |
_this.showApiKey = true; |
| 14042 |
_this.from_register = true; |
| 14043 |
} else { |
| 14044 |
_this.error = true; |
| 14045 |
} |
| 14046 |
}); |
| 14047 |
} |
| 14048 |
} |
| 14049 |
// </script> |
| 14050 |
// <style scoped> |
| 14051 |
// input,.notification .delete { |
| 14052 |
// box-sizing: border-box !important; |
| 14053 |
// } |
| 14054 |
// |
| 14055 |
// </style> |
| 14056 |
|
| 14057 |
}; // <template> |
| 14058 |
// <section class="is-clearfix"> |
| 14059 |
// <nav class="breadcrumb" aria-label="breadcrumbs" v-if="showApiKey"> |
| 14060 |
// <ul> |
| 14061 |
// <li><a @click="toggleApiForm" href="#">{{strings.back_to_register}}</a></li> |
| 14062 |
// <li class="is-active is-marginless" v-if="showApiKey"><a href="#" aria-current="page">{{strings.back_to_connect}}</a> |
| 14063 |
// </li> |
| 14064 |
// </ul> |
| 14065 |
// </nav> |
| 14066 |
// <div class="section" v-if="showApiKey"> |
| 14067 |
// <div class="notification is-success" v-if="from_register"> |
| 14068 |
// {{strings.notification_message_register}} |
| 14069 |
// </div> |
| 14070 |
// <api-key-form></api-key-form> |
| 14071 |
// <hr/> |
| 14072 |
// <div class="columns"> |
| 14073 |
// |
| 14074 |
// <div class="column columns is-marginless is-vcentered "> |
| 14075 |
// |
| 14076 |
// <span class="dashicons dashicons-share column is-2 is-size-3 is-paddingless"></span> |
| 14077 |
// <div class="is-pulled-left column is-10 is-paddingless"> |
| 14078 |
// <p class="title is-size-5 ">1. {{strings.step_one_api_title}}</p> |
| 14079 |
// <p class="subtitle is-size-6" v-html="strings.step_one_api_desc"></p> |
| 14080 |
// </div> |
| 14081 |
// </div> |
| 14082 |
// <div class="column is columns is-vcentered is-marginless"> |
| 14083 |
// |
| 14084 |
// <span class="dashicons dashicons-admin-plugins column is-2 is-size-3 is-paddingless"></span> |
| 14085 |
// <div class="is-pulled-left column is-10 is-paddingless"> |
| 14086 |
// <p class="title is-size-5">2. {{strings.step_two_api_title}}</p> |
| 14087 |
// <p class="subtitle is-size-6">{{strings.step_two_api_desc}}</p> |
| 14088 |
// </div> |
| 14089 |
// </div> |
| 14090 |
// </div> |
| 14091 |
// |
| 14092 |
// </div> |
| 14093 |
// <div class="columns is-vcentered is-desktop " v-else > |
| 14094 |
// <div class="column has-text-left is-fluid is-hidden-touch"> |
| 14095 |
// <div class="hero"> |
| 14096 |
// <div class="hero-body content"> |
| 14097 |
// <p class="title">{{strings.account_needed_heading}}</p> |
| 14098 |
// <p class="subtitle " v-html="strings.account_needed_title"></p> |
| 14099 |
// <div class=" is-hidden-touch"> |
| 14100 |
// <div class="columns is-vcentered "> |
| 14101 |
// <div class=" is-narrow is-hidden-touch column"> |
| 14102 |
// <span class="dashicons icon dashicons-format-image is-size-4 "></span> |
| 14103 |
// </div> |
| 14104 |
// <div class="column"> |
| 14105 |
// <p class="subtitle column is-size-6 is-vcentered has-text-left"><br/> |
| 14106 |
// {{strings.account_needed_subtitle_1}}</p> |
| 14107 |
// </div> |
| 14108 |
// </div> |
| 14109 |
// <div class="columns is-vcentered"> |
| 14110 |
// <div class=" is-narrow is-hidden-touch column"> |
| 14111 |
// <span class="dashicons icon dashicons-plus is-size-4 "></span> |
| 14112 |
// </div> |
| 14113 |
// <div class="column"> |
| 14114 |
// <p class="subtitle column is-size-6 is-vcentered has-text-left"><br/> |
| 14115 |
// {{strings.account_needed_subtitle_2}}</p> |
| 14116 |
// </div> |
| 14117 |
// </div> |
| 14118 |
// </div> |
| 14119 |
// </div> |
| 14120 |
// </div> |
| 14121 |
// </div> |
| 14122 |
// <div class="column "> |
| 14123 |
// <p v-html="strings.account_needed_title" class="is-size-6 has-text-centered is-hidden-desktop"></p> |
| 14124 |
// <div class="field "> |
| 14125 |
// <label for="optml-email" class="label title is-size-5 is-12">{{strings.email_address_label}} |
| 14126 |
// :</label> |
| 14127 |
// <div class="control is-12 is-small has-icons-left "> |
| 14128 |
// <input name="optml-email" id="optml-email" class="input is-medium is-fullwidth is-danger" |
| 14129 |
// type="email" |
| 14130 |
// v-model="email"/> |
| 14131 |
// <span class="icon is-small is-left dashicons dashicons-email"></span> |
| 14132 |
// |
| 14133 |
// </div> |
| 14134 |
// |
| 14135 |
// <p class="help is-danger" v-if="error" v-html="strings.error_register"></p> |
| 14136 |
// </div> |
| 14137 |
// <div class="field is-desktop "> |
| 14138 |
// <div class="control columns "> |
| 14139 |
// <div class="column has-text-centered-mobile"> |
| 14140 |
// <button @click="registerAccount" class="button is-small is-primary " |
| 14141 |
// :class="isLoading ? 'is-loading' :'' "> |
| 14142 |
// <span class="icon dashicons dashicons-admin-users"></span> |
| 14143 |
// <span>{{strings.register_btn}}</span> |
| 14144 |
// </button> |
| 14145 |
// </div> |
| 14146 |
// <div class="column has-text-centered-mobile has-text-right"> |
| 14147 |
// <button @click="toggleApiForm" class="button is-small is-outlined is-info"> |
| 14148 |
// <span class="icon dashicons dashicons-admin-network is-small"></span> |
| 14149 |
// <span>{{strings.api_exists}}</span> |
| 14150 |
// </button> |
| 14151 |
// </div> |
| 14152 |
// </div> |
| 14153 |
// </div> |
| 14154 |
// </div> |
| 14155 |
// </div> |
| 14156 |
// </section> |
| 14157 |
// </template> |
| 14158 |
// |
| 14159 |
// <script> |
| 14160 |
|
| 14161 |
/***/ }), |
| 14162 |
/* 28 */ |
| 14163 |
/***/ (function(module, exports, __webpack_require__) { |
| 14164 |
|
| 14165 |
"use strict"; |
| 14166 |
|
| 14167 |
|
| 14168 |
Object.defineProperty(exports, "__esModule", { |
| 14169 |
value: true |
| 14170 |
}); |
| 14171 |
// <template> |
| 14172 |
// <div> |
| 14173 |
// <div class="field has-addons api-key-field"> |
| 14174 |
// <label v-if="isConnected" |
| 14175 |
// class="label api-key-label has-text-grey-dark">{{strings.api_key_placeholder}}:</label> |
| 14176 |
// <div class="control is-expanded api-key-control"> |
| 14177 |
// <input :type="isConnected ? 'password' : 'text'" :disabled="isConnected" name="api_key" class="input is-small" |
| 14178 |
// :class="validKey ? '' : 'is-danger'" :placeholder="strings.api_key_placeholder" |
| 14179 |
// v-model="apiKey"> |
| 14180 |
// </div> |
| 14181 |
// <div class="control"> |
| 14182 |
// <button v-if="! isConnected" class="button button is-success is-small" |
| 14183 |
// @click="connect" :class="{ 'is-loading' : this.$store.state.isConnecting }"> |
| 14184 |
// <span class="icon"><i class="dashicons dashicons-admin-plugins"></i></span> |
| 14185 |
// <span>{{strings.connect_btn}}</span> |
| 14186 |
// </button> |
| 14187 |
// <button v-else class="button is-danger is-small" @click="disconnect" |
| 14188 |
// :class="{ 'is-loading' : this.$store.state.isConnecting }"> |
| 14189 |
// <span class="icon"><i class="dashicons dashicons-dismiss"></i></span> |
| 14190 |
// <span>{{strings.disconnect_btn}}</span> |
| 14191 |
// </button> |
| 14192 |
// </div> |
| 14193 |
// </div> |
| 14194 |
// <p v-if="! validKey" class="help is-danger"> |
| 14195 |
// {{strings.invalid_key}} |
| 14196 |
// </p> |
| 14197 |
// </div> |
| 14198 |
// </template> |
| 14199 |
// |
| 14200 |
// <script> |
| 14201 |
exports.default = { |
| 14202 |
name: 'api-key-form', |
| 14203 |
data: function data() { |
| 14204 |
return { |
| 14205 |
apiKey: this.$store.state.apiKey ? this.$store.state.apiKey : '', |
| 14206 |
connected: this.$store.state.connected, |
| 14207 |
strings: optimoleDashboardApp.strings, |
| 14208 |
isLoading: false |
| 14209 |
}; |
| 14210 |
}, |
| 14211 |
|
| 14212 |
mounted: function mounted() {}, |
| 14213 |
|
| 14214 |
computed: { |
| 14215 |
validKey: function validKey() { |
| 14216 |
return this.$store.state.apiKeyValidity; |
| 14217 |
}, |
| 14218 |
isConnected: function isConnected() { |
| 14219 |
return this.$store.state.connected; |
| 14220 |
} |
| 14221 |
}, |
| 14222 |
methods: { |
| 14223 |
connect: function connect() { |
| 14224 |
this.$store.dispatch('connectOptimole', { |
| 14225 |
req: 'Connect to OptiMole', |
| 14226 |
apiKey: this.apiKey |
| 14227 |
}); |
| 14228 |
}, |
| 14229 |
disconnect: function disconnect() { |
| 14230 |
this.apiKey = ''; |
| 14231 |
this.$store.dispatch('disconnectOptimole', { |
| 14232 |
req: 'Disconnect from OptiMole' |
| 14233 |
}); |
| 14234 |
} |
| 14235 |
} |
| 14236 |
// </script> |
| 14237 |
|
| 14238 |
}; |
| 14239 |
|
| 14240 |
/***/ }), |
| 14241 |
/* 29 */ |
| 14242 |
/***/ (function(module, exports) { |
| 14243 |
|
| 14244 |
module.exports = "\n\t<div>\n\t\t<div class=\"field has-addons api-key-field\">\n\t\t\t<label v-if=\"isConnected\"\n\t\t\t\t\tclass=\"label api-key-label has-text-grey-dark\">{{strings.api_key_placeholder}}:</label>\n\t\t\t<div class=\"control is-expanded api-key-control\">\n\t\t\t\t<input :type=\"isConnected ? 'password' : 'text'\" :disabled=\"isConnected\" name=\"api_key\" class=\"input is-small\"\n\t\t\t\t\t\t:class=\"validKey ? '' : 'is-danger'\" :placeholder=\"strings.api_key_placeholder\"\n\t\t\t\t\t\tv-model=\"apiKey\">\n\t\t\t</div>\n\t\t\t<div class=\"control\">\n\t\t\t\t<button v-if=\"! isConnected\" class=\"button button is-success is-small\"\n\t\t\t\t\t\t@click=\"connect\" :class=\"{ 'is-loading' : this.$store.state.isConnecting }\">\n\t\t\t\t\t<span class=\"icon\"><i class=\"dashicons dashicons-admin-plugins\"></i></span>\n\t\t\t\t\t<span>{{strings.connect_btn}}</span>\n\t\t\t\t</button>\n\t\t\t\t<button v-else class=\"button is-danger is-small\" @click=\"disconnect\"\n\t\t\t\t\t\t:class=\"{ 'is-loading' : this.$store.state.isConnecting }\">\n\t\t\t\t\t<span class=\"icon\"><i class=\"dashicons dashicons-dismiss\"></i></span>\n\t\t\t\t\t<span>{{strings.disconnect_btn}}</span>\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t\t<p v-if=\"! validKey\" class=\"help is-danger\">\n\t\t\t{{strings.invalid_key}}\n\t\t</p>\n\t</div>\n"; |
| 14245 |
|
| 14246 |
/***/ }), |
| 14247 |
/* 30 */ |
| 14248 |
/***/ (function(module, exports) { |
| 14249 |
|
| 14250 |
module.exports = "\n\t<section class=\"is-clearfix\" _v-3494772f=\"\">\n\t\t<nav class=\"breadcrumb\" aria-label=\"breadcrumbs\" v-if=\"showApiKey\" _v-3494772f=\"\">\n\t\t\t<ul _v-3494772f=\"\">\n\t\t\t\t<li _v-3494772f=\"\"><a @click=\"toggleApiForm\" href=\"#\" _v-3494772f=\"\">{{strings.back_to_register}}</a></li>\n\t\t\t\t<li class=\"is-active is-marginless\" v-if=\"showApiKey\" _v-3494772f=\"\"><a href=\"#\" aria-current=\"page\" _v-3494772f=\"\">{{strings.back_to_connect}}</a>\n\t\t\t\t</li>\n\t\t\t</ul>\n\t\t</nav>\n\t\t<div class=\"section\" v-if=\"showApiKey\" _v-3494772f=\"\">\n\t\t\t<div class=\"notification is-success\" v-if=\"from_register\" _v-3494772f=\"\">\n\t\t\t\t{{strings.notification_message_register}}\n\t\t\t</div>\n\t\t\t<api-key-form _v-3494772f=\"\"></api-key-form>\n\t\t\t<hr _v-3494772f=\"\">\n\t\t\t<div class=\"columns\" _v-3494772f=\"\">\n\t\t\t\t\n\t\t\t\t<div class=\"column columns is-marginless is-vcentered \" _v-3494772f=\"\">\n\t\t\t\t\t\n\t\t\t\t\t<span class=\"dashicons dashicons-share column is-2 is-size-3 is-paddingless\" _v-3494772f=\"\"></span>\n\t\t\t\t\t<div class=\"is-pulled-left column is-10 is-paddingless\" _v-3494772f=\"\">\n\t\t\t\t\t\t<p class=\"title is-size-5 \" _v-3494772f=\"\">1. {{strings.step_one_api_title}}</p>\n\t\t\t\t\t\t<p class=\"subtitle is-size-6\" v-html=\"strings.step_one_api_desc\" _v-3494772f=\"\"></p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"column is columns is-vcentered is-marginless\" _v-3494772f=\"\">\n\t\t\t\t\t\n\t\t\t\t\t<span class=\"dashicons dashicons-admin-plugins column is-2 is-size-3 is-paddingless\" _v-3494772f=\"\"></span>\n\t\t\t\t\t<div class=\"is-pulled-left column is-10 is-paddingless\" _v-3494772f=\"\">\n\t\t\t\t\t\t<p class=\"title is-size-5\" _v-3494772f=\"\">2. {{strings.step_two_api_title}}</p>\n\t\t\t\t\t\t<p class=\"subtitle is-size-6\" _v-3494772f=\"\">{{strings.step_two_api_desc}}</p>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\n\t\t</div>\n\t\t<div class=\"columns is-vcentered is-desktop \" v-else=\"\" _v-3494772f=\"\">\n\t\t\t<div class=\"column has-text-left is-fluid is-hidden-touch\" _v-3494772f=\"\">\n\t\t\t\t<div class=\"hero\" _v-3494772f=\"\">\n\t\t\t\t\t<div class=\"hero-body content\" _v-3494772f=\"\">\n\t\t\t\t\t\t<p class=\"title\" _v-3494772f=\"\">{{strings.account_needed_heading}}</p>\n\t\t\t\t\t\t<p class=\"subtitle \" v-html=\"strings.account_needed_title\" _v-3494772f=\"\"></p>\n\t\t\t\t\t\t<div class=\" is-hidden-touch\" _v-3494772f=\"\">\n\t\t\t\t\t\t\t<div class=\"columns is-vcentered \" _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t<div class=\" is-narrow is-hidden-touch column\" _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t\t<span class=\"dashicons icon dashicons-format-image is-size-4 \" _v-3494772f=\"\"></span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"column\" _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t\t<p class=\"subtitle column is-size-6 is-vcentered has-text-left\" _v-3494772f=\"\"><br _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t\t\t{{strings.account_needed_subtitle_1}}</p>\n\t\t\t\t\t\t\t\t</div>\n\t \t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"columns is-vcentered\" _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t<div class=\" is-narrow is-hidden-touch column\" _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t\t<span class=\"dashicons icon dashicons-plus is-size-4 \" _v-3494772f=\"\"></span>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class=\"column\" _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t\t<p class=\"subtitle column is-size-6 is-vcentered has-text-left\" _v-3494772f=\"\"><br _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t\t\t{{strings.account_needed_subtitle_2}}</p>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div class=\"column \" _v-3494772f=\"\">\n\t\t\t\t<p v-html=\"strings.account_needed_title\" class=\"is-size-6 has-text-centered is-hidden-desktop\" _v-3494772f=\"\"></p>\n\t\t\t\t<div class=\"field \" _v-3494772f=\"\">\n\t\t\t\t\t<label for=\"optml-email\" class=\"label title is-size-5 is-12\" _v-3494772f=\"\">{{strings.email_address_label}}\n\t\t\t\t\t\t:</label>\n\t\t\t\t\t<div class=\"control is-12 is-small has-icons-left \" _v-3494772f=\"\">\n\t\t\t\t\t\t<input name=\"optml-email\" id=\"optml-email\" class=\"input is-medium is-fullwidth is-danger\" type=\"email\" v-model=\"email\" _v-3494772f=\"\">\n\t\t\t\t\t\t<span class=\"icon is-small is-left dashicons dashicons-email\" _v-3494772f=\"\"></span>\n\t\t\t\t\t\n\t\t\t\t\t</div>\n\t\t\t\t\t\n\t\t\t\t\t<p class=\"help is-danger\" v-if=\"error\" v-html=\"strings.error_register\" _v-3494772f=\"\"></p>\n\t\t\t\t</div>\n\t\t\t\t<div class=\"field is-desktop \" _v-3494772f=\"\">\n\t\t\t\t\t<div class=\"control columns \" _v-3494772f=\"\">\n\t\t\t\t\t\t<div class=\"column has-text-centered-mobile\" _v-3494772f=\"\">\n\t\t\t\t\t\t\t<button @click=\"registerAccount\" class=\"button is-small is-primary \" :class=\"isLoading ? 'is-loading' :'' \" _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t<span class=\"icon dashicons dashicons-admin-users\" _v-3494772f=\"\"></span>\n\t\t\t\t\t\t\t\t<span _v-3494772f=\"\">{{strings.register_btn}}</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"column has-text-centered-mobile has-text-right\" _v-3494772f=\"\">\n\t\t\t\t\t\t\t<button @click=\"toggleApiForm\" class=\"button is-small is-outlined is-info\" _v-3494772f=\"\">\n\t\t\t\t\t\t\t\t<span class=\"icon dashicons dashicons-admin-network is-small\" _v-3494772f=\"\"></span>\n\t\t\t\t\t\t\t\t<span _v-3494772f=\"\">{{strings.api_exists}}</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t</section>\n"; |
| 14251 |
|
| 14252 |
/***/ }), |
| 14253 |
/* 31 */ |
| 14254 |
/***/ (function(module, exports, __webpack_require__) { |
| 14255 |
|
| 14256 |
var __vue_script__, __vue_template__ |
| 14257 |
__webpack_require__(32) |
| 14258 |
__vue_script__ = __webpack_require__(34) |
| 14259 |
__vue_template__ = __webpack_require__(35) |
| 14260 |
module.exports = __vue_script__ || {} |
| 14261 |
if (module.exports.__esModule) module.exports = module.exports.default |
| 14262 |
if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ } |
| 14263 |
if (false) {(function () { module.hot.accept() |
| 14264 |
var hotAPI = require("vue-hot-reload-api") |
| 14265 |
hotAPI.install(require("vue"), true) |
| 14266 |
if (!hotAPI.compatible) return |
| 14267 |
var id = "D:\\local\\optimolewp\\app\\public\\wp-content\\plugins\\optimole-wp\\assets\\vue\\components\\last-images.vue" |
| 14268 |
if (!module.hot.data) { |
| 14269 |
hotAPI.createRecord(id, module.exports) |
| 14270 |
} else { |
| 14271 |
hotAPI.update(id, module.exports, __vue_template__) |
| 14272 |
} |
| 14273 |
})()} |
| 14274 |
|
| 14275 |
/***/ }), |
| 14276 |
/* 32 */ |
| 14277 |
/***/ (function(module, exports, __webpack_require__) { |
| 14278 |
|
| 14279 |
// style-loader: Adds some css to the DOM by adding a <style> tag |
| 14280 |
|
| 14281 |
// load the styles |
| 14282 |
var content = __webpack_require__(33); |
| 14283 |
if(typeof content === 'string') content = [[module.i, content, '']]; |
| 14284 |
// add the styles to the DOM |
| 14285 |
var update = __webpack_require__(1)(content, {}); |
| 14286 |
if(content.locals) module.exports = content.locals; |
| 14287 |
// Hot Module Replacement |
| 14288 |
if(false) { |
| 14289 |
// When the styles change, update the <style> tags |
| 14290 |
if(!content.locals) { |
| 14291 |
module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-3e27d73d&file=last-images.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./last-images.vue", function() { |
| 14292 |
var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-3e27d73d&file=last-images.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./last-images.vue"); |
| 14293 |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; |
| 14294 |
update(newContent); |
| 14295 |
}); |
| 14296 |
} |
| 14297 |
// When the module is disposed, remove the <style> tags |
| 14298 |
module.hot.dispose(function() { update(); }); |
| 14299 |
} |
| 14300 |
|
| 14301 |
/***/ }), |
| 14302 |
/* 33 */ |
| 14303 |
/***/ (function(module, exports, __webpack_require__) { |
| 14304 |
|
| 14305 |
exports = module.exports = __webpack_require__(0)(); |
| 14306 |
// imports |
| 14307 |
|
| 14308 |
|
| 14309 |
// module |
| 14310 |
exports.push([module.i, "\n\t.loader[_v-3e27d73d] {\n\t\tmargin: 0 auto;\n\t\tfont-size: 10em;\n\t\tborder-left: 2px solid #888 !important;\n\t\tborder-bottom: 2px solid #888 !important;\n\t\tmargin-top: 0.2em;\n\t}\n\t\n\t.progress[_v-3e27d73d]::-webkit-progress-value {\n\t\ttransition: width 0.5s ease;\n\t}\n", ""]); |
| 14311 |
|
| 14312 |
// exports |
| 14313 |
|
| 14314 |
|
| 14315 |
/***/ }), |
| 14316 |
/* 34 */ |
| 14317 |
/***/ (function(module, exports, __webpack_require__) { |
| 14318 |
|
| 14319 |
"use strict"; |
| 14320 |
|
| 14321 |
|
| 14322 |
Object.defineProperty(exports, "__esModule", { |
| 14323 |
value: true |
| 14324 |
}); |
| 14325 |
// <template> |
| 14326 |
// <div> |
| 14327 |
// <div class="optimized-images" v-if="! loading "> |
| 14328 |
// <div v-if="!noImages"> |
| 14329 |
// <h3 class="has-text-centered">{{strings.last}} {{strings.optimized_images}}</h3> |
| 14330 |
// <table class="table is-striped is-hoverable is-fullwidth"> |
| 14331 |
// <thead> |
| 14332 |
// <tr> |
| 14333 |
// <th class="optml-image-heading">{{strings.image}}</th> |
| 14334 |
// <th class="optml-image-ratio-heading">{{strings.compression}}</th> |
| 14335 |
// </tr> |
| 14336 |
// </thead> |
| 14337 |
// <tbody> |
| 14338 |
// <tr v-for="(item, index) in imageData"> |
| 14339 |
// <td><a :href="item.url" target="_blank"><img :src="item.url" class="optml-image"/></a></td> |
| 14340 |
// <td><p |
| 14341 |
// class="optml-ratio-feedback" |
| 14342 |
// v-html="compressionRate(item.ex_size_raw, item.new_size_raw)"></p> |
| 14343 |
// </td> |
| 14344 |
// </tr> |
| 14345 |
// </tbody> |
| 14346 |
// </table> |
| 14347 |
// </div> |
| 14348 |
// </div> |
| 14349 |
// <div v-else> |
| 14350 |
// <iframe width="1" height="1" :src="home_url" style="visibility: hidden"></iframe> |
| 14351 |
// <h6 class="has-text-centered">{{strings.loading_latest_images}}</h6> |
| 14352 |
// <progress class="progress is-large" :value="startTime" :max="maxTime"></progress> |
| 14353 |
// </div> |
| 14354 |
// <table class="table is-striped is-hoverable is-fullwidth" v-if="noImages"> |
| 14355 |
// <thead> |
| 14356 |
// <tr> |
| 14357 |
// <th class="optml-image-heading has-text-centered" v-html="strings.no_images_found"></th> |
| 14358 |
// </tr> |
| 14359 |
// </thead> |
| 14360 |
// </table> |
| 14361 |
// </div> |
| 14362 |
// </template> |
| 14363 |
// |
| 14364 |
// <script> |
| 14365 |
|
| 14366 |
exports.default = { |
| 14367 |
name: "last-images", |
| 14368 |
data: function data() { |
| 14369 |
return { |
| 14370 |
loading: true, |
| 14371 |
startTime: 0, |
| 14372 |
maxTime: 20, |
| 14373 |
noImages: false, |
| 14374 |
home_url: optimoleDashboardApp.home_url, |
| 14375 |
strings: optimoleDashboardApp.strings.latest_images |
| 14376 |
}; |
| 14377 |
}, |
| 14378 |
|
| 14379 |
props: { |
| 14380 |
status: status |
| 14381 |
}, |
| 14382 |
mounted: function mounted() { |
| 14383 |
if (this.$store.state.optimizedImages.length > 0) { |
| 14384 |
this.loading = false; |
| 14385 |
return; |
| 14386 |
} |
| 14387 |
this.doProgressBar(); |
| 14388 |
this.$store.dispatch('retrieveOptimizedImages', { waitTime: this.maxTime * 1000, component: this }); |
| 14389 |
}, |
| 14390 |
|
| 14391 |
watch: { |
| 14392 |
imageData: function imageData() { |
| 14393 |
var _this = this; |
| 14394 |
|
| 14395 |
if (this.imageData.length > 0) { |
| 14396 |
this.startTime = this.maxTime; |
| 14397 |
setTimeout(function () { |
| 14398 |
_this.loading = false; |
| 14399 |
}, 1000); |
| 14400 |
} |
| 14401 |
} |
| 14402 |
}, |
| 14403 |
computed: { |
| 14404 |
imageData: function imageData() { |
| 14405 |
|
| 14406 |
return this.$store.state.optimizedImages !== null ? this.$store.state.optimizedImages : []; |
| 14407 |
} |
| 14408 |
}, |
| 14409 |
methods: { |
| 14410 |
doProgressBar: function doProgressBar() { |
| 14411 |
if (this.startTime === this.maxTime) { |
| 14412 |
return; |
| 14413 |
} |
| 14414 |
this.startTime++; |
| 14415 |
//console.log(this.startTime); |
| 14416 |
setTimeout(this.doProgressBar, 1000); |
| 14417 |
}, |
| 14418 |
compressionRate: function compressionRate(oldSize, newSize) { |
| 14419 |
var value = (parseFloat(oldSize / newSize * 100) - 100).toFixed(1); |
| 14420 |
if (value < 1) { |
| 14421 |
return this.strings.same_size; |
| 14422 |
} |
| 14423 |
if (value > 1 && value < 25) { |
| 14424 |
return this.strings.small_optimization.replace('{ratio}', value.toString() + '%'); |
| 14425 |
} |
| 14426 |
if (value > 25 && value < 100) { |
| 14427 |
return this.strings.medium_optimization.replace('{ratio}', value.toString() + '%'); |
| 14428 |
} |
| 14429 |
if (value > 100) { |
| 14430 |
return this.strings.big_optimization.replace('{ratio}', (Math.floor(value / 10 + 10) / 10).toFixed(1).toString() + 'x'); |
| 14431 |
} |
| 14432 |
} |
| 14433 |
} |
| 14434 |
// </script> |
| 14435 |
// |
| 14436 |
// <style scoped> |
| 14437 |
// .loader { |
| 14438 |
// margin: 0 auto; |
| 14439 |
// font-size: 10em; |
| 14440 |
// border-left: 2px solid #888 !important; |
| 14441 |
// border-bottom: 2px solid #888 !important; |
| 14442 |
// margin-top: 0.2em; |
| 14443 |
// } |
| 14444 |
// |
| 14445 |
// .progress::-webkit-progress-value { |
| 14446 |
// transition: width 0.5s ease; |
| 14447 |
// } |
| 14448 |
// </style> |
| 14449 |
|
| 14450 |
}; |
| 14451 |
|
| 14452 |
/***/ }), |
| 14453 |
/* 35 */ |
| 14454 |
/***/ (function(module, exports) { |
| 14455 |
|
| 14456 |
module.exports = "\n\t<div _v-3e27d73d=\"\">\n\t\t<div class=\"optimized-images\" v-if=\"! loading \" _v-3e27d73d=\"\">\n\t\t\t<div v-if=\"!noImages\" _v-3e27d73d=\"\">\n\t\t\t\t<h3 class=\"has-text-centered\" _v-3e27d73d=\"\">{{strings.last}} {{strings.optimized_images}}</h3>\n\t\t\t\t<table class=\"table is-striped is-hoverable is-fullwidth\" _v-3e27d73d=\"\">\n\t\t\t\t\t<thead _v-3e27d73d=\"\">\n\t\t\t\t\t<tr _v-3e27d73d=\"\">\n\t\t\t\t\t\t<th class=\"optml-image-heading\" _v-3e27d73d=\"\">{{strings.image}}</th>\n\t\t\t\t\t\t<th class=\"optml-image-ratio-heading\" _v-3e27d73d=\"\">{{strings.compression}}</th>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</thead>\n\t\t\t\t\t<tbody _v-3e27d73d=\"\">\n\t\t\t\t\t<tr v-for=\"(item, index) in imageData\" _v-3e27d73d=\"\">\n\t\t\t\t\t\t<td _v-3e27d73d=\"\"><a :href=\"item.url\" target=\"_blank\" _v-3e27d73d=\"\"><img :src=\"item.url\" class=\"optml-image\" _v-3e27d73d=\"\"></a></td>\n\t\t\t\t\t\t<td _v-3e27d73d=\"\"><p class=\"optml-ratio-feedback\" v-html=\"compressionRate(item.ex_size_raw, item.new_size_raw)\" _v-3e27d73d=\"\"></p>\n\t\t\t\t\t\t</td>\n\t\t\t\t\t</tr>\n\t\t\t\t\t</tbody>\n\t\t\t\t</table>\n\t\t\t</div>\n\t\t</div>\n\t\t<div v-else=\"\" _v-3e27d73d=\"\">\n\t\t\t<iframe width=\"1\" height=\"1\" :src=\"home_url\" style=\"visibility: hidden\" _v-3e27d73d=\"\"></iframe>\n\t\t\t<h6 class=\"has-text-centered\" _v-3e27d73d=\"\">{{strings.loading_latest_images}}</h6>\n\t\t\t<progress class=\"progress is-large\" :value=\"startTime\" :max=\"maxTime\" _v-3e27d73d=\"\"></progress>\n\t\t</div>\n\t\t<table class=\"table is-striped is-hoverable is-fullwidth\" v-if=\"noImages\" _v-3e27d73d=\"\">\n\t\t\t<thead _v-3e27d73d=\"\">\n\t\t\t<tr _v-3e27d73d=\"\">\n\t\t\t\t<th class=\"optml-image-heading has-text-centered\" v-html=\"strings.no_images_found\" _v-3e27d73d=\"\"></th>\n\t\t\t</tr>\n\t\t\t</thead>\n\t\t</table>\n\t</div>\n"; |
| 14457 |
|
| 14458 |
/***/ }), |
| 14459 |
/* 36 */ |
| 14460 |
/***/ (function(module, exports, __webpack_require__) { |
| 14461 |
|
| 14462 |
var __vue_script__, __vue_template__ |
| 14463 |
__webpack_require__(37) |
| 14464 |
__vue_script__ = __webpack_require__(39) |
| 14465 |
__vue_template__ = __webpack_require__(45) |
| 14466 |
module.exports = __vue_script__ || {} |
| 14467 |
if (module.exports.__esModule) module.exports = module.exports.default |
| 14468 |
if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ } |
| 14469 |
if (false) {(function () { module.hot.accept() |
| 14470 |
var hotAPI = require("vue-hot-reload-api") |
| 14471 |
hotAPI.install(require("vue"), true) |
| 14472 |
if (!hotAPI.compatible) return |
| 14473 |
var id = "D:\\local\\optimolewp\\app\\public\\wp-content\\plugins\\optimole-wp\\assets\\vue\\components\\options.vue" |
| 14474 |
if (!module.hot.data) { |
| 14475 |
hotAPI.createRecord(id, module.exports) |
| 14476 |
} else { |
| 14477 |
hotAPI.update(id, module.exports, __vue_template__) |
| 14478 |
} |
| 14479 |
})()} |
| 14480 |
|
| 14481 |
/***/ }), |
| 14482 |
/* 37 */ |
| 14483 |
/***/ (function(module, exports, __webpack_require__) { |
| 14484 |
|
| 14485 |
// style-loader: Adds some css to the DOM by adding a <style> tag |
| 14486 |
|
| 14487 |
// load the styles |
| 14488 |
var content = __webpack_require__(38); |
| 14489 |
if(typeof content === 'string') content = [[module.i, content, '']]; |
| 14490 |
// add the styles to the DOM |
| 14491 |
var update = __webpack_require__(1)(content, {}); |
| 14492 |
if(content.locals) module.exports = content.locals; |
| 14493 |
// Hot Module Replacement |
| 14494 |
if(false) { |
| 14495 |
// When the styles change, update the <style> tags |
| 14496 |
if(!content.locals) { |
| 14497 |
module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-d718d868&file=options.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./options.vue", function() { |
| 14498 |
var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-d718d868&file=options.vue&scoped=true!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./options.vue"); |
| 14499 |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; |
| 14500 |
update(newContent); |
| 14501 |
}); |
| 14502 |
} |
| 14503 |
// When the module is disposed, remove the <style> tags |
| 14504 |
module.hot.dispose(function() { update(); }); |
| 14505 |
} |
| 14506 |
|
| 14507 |
/***/ }), |
| 14508 |
/* 38 */ |
| 14509 |
/***/ (function(module, exports, __webpack_require__) { |
| 14510 |
|
| 14511 |
exports = module.exports = __webpack_require__(0)(); |
| 14512 |
// imports |
| 14513 |
|
| 14514 |
|
| 14515 |
// module |
| 14516 |
exports.push([module.i, "\n\t.saving--option[_v-d718d868] {\n\t\topacity: .75;\n\t}\n\t\n\t#optimole-app .notification[_v-d718d868] {\n\t\tpadding: 0.5rem;\n\t}\n\t\n\t#optimole-app .image[_v-d718d868] {\n\t\ttext-align: center;\n\t}\n\t\n\t#optimole-app .visual-compare img[_v-d718d868] {\n\t\twidth: 100%;\n\t}\n\t\n\t#optimole-app .image img[_v-d718d868] {\n\t\t\n\t\tmax-height: 300px;\n\t\twidth: auto;\n\t\t\n\t}\n\t\n\t.field[_v-d718d868]:nth-child(even) {\n\t\t-ms-flex-pack: end;\n\t\t justify-content: flex-end;\n\t}\n", ""]); |
| 14517 |
|
| 14518 |
// exports |
| 14519 |
|
| 14520 |
|
| 14521 |
/***/ }), |
| 14522 |
/* 39 */ |
| 14523 |
/***/ (function(module, exports, __webpack_require__) { |
| 14524 |
|
| 14525 |
"use strict"; |
| 14526 |
|
| 14527 |
|
| 14528 |
Object.defineProperty(exports, "__esModule", { |
| 14529 |
value: true |
| 14530 |
}); |
| 14531 |
|
| 14532 |
var _image_diff = __webpack_require__(40); |
| 14533 |
|
| 14534 |
var _image_diff2 = _interopRequireDefault(_image_diff); |
| 14535 |
|
| 14536 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
| 14537 |
|
| 14538 |
exports.default = { |
| 14539 |
name: "options", |
| 14540 |
components: { Image_diff: _image_diff2.default }, |
| 14541 |
data: function data() { |
| 14542 |
return { |
| 14543 |
strings: optimoleDashboardApp.strings.options_strings, |
| 14544 |
adminBarItem: optimoleDashboardApp.admin_bar_item, |
| 14545 |
imageReplacer: optimoleDashboardApp.image_replacer, |
| 14546 |
quality_saved: optimoleDashboardApp.quality, |
| 14547 |
showNotification: false, |
| 14548 |
loading_images: false, |
| 14549 |
loading_quality: false |
| 14550 |
}; |
| 14551 |
}, |
| 14552 |
|
| 14553 |
mounted: function mounted() { |
| 14554 |
this.updateSampleImage(this.quality_saved); |
| 14555 |
}, |
| 14556 |
methods: { |
| 14557 |
toggleOption: function toggleOption(optionKey) { |
| 14558 |
var _this = this; |
| 14559 |
|
| 14560 |
this.$store.dispatch('updateSetting', { |
| 14561 |
req: 'Toggle ' + optionKey, |
| 14562 |
option_key: optionKey, |
| 14563 |
type: 'toggle' |
| 14564 |
}).then(function (response) { |
| 14565 |
_this.showNotification = true; |
| 14566 |
setTimeout(function () { |
| 14567 |
_this.showNotification = false; |
| 14568 |
}, 1000); |
| 14569 |
}, function (response) {}); |
| 14570 |
}, |
| 14571 |
changeQuality: function changeQuality(value) { |
| 14572 |
|
| 14573 |
this.updateSampleImage(value); |
| 14574 |
this.quality_saved = value; |
| 14575 |
}, |
| 14576 |
updateSampleImage: function updateSampleImage(value) { |
| 14577 |
var _this2 = this; |
| 14578 |
|
| 14579 |
this.$store.dispatch('sampleRate', { |
| 14580 |
quality: value, |
| 14581 |
component: this |
| 14582 |
}).then(function (response) { |
| 14583 |
|
| 14584 |
setTimeout(function () { |
| 14585 |
_this2.showNotification = false; |
| 14586 |
}, 1000); |
| 14587 |
}, function (response) {}); |
| 14588 |
}, |
| 14589 |
saveQuality: function saveQuality() { |
| 14590 |
var _this3 = this; |
| 14591 |
|
| 14592 |
this.loading_quality = true; |
| 14593 |
this.$store.dispatch('updateSetting', { |
| 14594 |
option_key: 'quality', |
| 14595 |
option_value: this.quality_saved, |
| 14596 |
type: 'enum' |
| 14597 |
}).then(function () { |
| 14598 |
_this3.loading_quality = false; |
| 14599 |
//Force recompute of showSaveQuality |
| 14600 |
optimoleDashboardApp.quality = _this3.quality_saved; |
| 14601 |
_this3.quality_saved = ''; |
| 14602 |
_this3.quality_saved = optimoleDashboardApp.quality; |
| 14603 |
}, function () { |
| 14604 |
_this3.loading_quality = false; |
| 14605 |
}); |
| 14606 |
} |
| 14607 |
}, |
| 14608 |
computed: { |
| 14609 |
adminBarItemStatus: { |
| 14610 |
set: function set(value) { |
| 14611 |
this.adminBarItem = value; |
| 14612 |
if (value) { |
| 14613 |
document.getElementById("wp-admin-bar-optml_image_quota").style.display = 'block'; |
| 14614 |
} else { |
| 14615 |
document.getElementById("wp-admin-bar-optml_image_quota").style.display = 'none'; |
| 14616 |
} |
| 14617 |
}, |
| 14618 |
get: function get() { |
| 14619 |
return !(this.adminBarItem === 'disabled'); |
| 14620 |
} |
| 14621 |
}, |
| 14622 |
showSaveQuality: function showSaveQuality() { |
| 14623 |
return this.quality_saved !== optimoleDashboardApp.quality; |
| 14624 |
}, |
| 14625 |
sample_images: function sample_images() { |
| 14626 |
return this.$store.state.sample_rate; |
| 14627 |
}, |
| 14628 |
imageReplacerStatus: function imageReplacerStatus() { |
| 14629 |
return !(this.imageReplacer === 'disabled'); |
| 14630 |
} |
| 14631 |
} |
| 14632 |
// </script> |
| 14633 |
// |
| 14634 |
// <style scoped> |
| 14635 |
// .saving--option { |
| 14636 |
// opacity: .75; |
| 14637 |
// } |
| 14638 |
// |
| 14639 |
// #optimole-app .notification { |
| 14640 |
// padding: 0.5rem; |
| 14641 |
// } |
| 14642 |
// |
| 14643 |
// #optimole-app .image { |
| 14644 |
// text-align: center; |
| 14645 |
// } |
| 14646 |
// |
| 14647 |
// #optimole-app .visual-compare img { |
| 14648 |
// width: 100%; |
| 14649 |
// } |
| 14650 |
// |
| 14651 |
// #optimole-app .image img { |
| 14652 |
// |
| 14653 |
// max-height: 300px; |
| 14654 |
// width: auto; |
| 14655 |
// |
| 14656 |
// } |
| 14657 |
// |
| 14658 |
// .field:nth-child(even) { |
| 14659 |
// justify-content: flex-end; |
| 14660 |
// } |
| 14661 |
// </style> |
| 14662 |
|
| 14663 |
}; // <template> |
| 14664 |
// <div class=" container " :class="{ 'saving--option' : this.$store.state.loading }"> |
| 14665 |
// <div class="columns" v-if="showNotification"> |
| 14666 |
// <div class="notification column is-one-quarter is-success"> |
| 14667 |
// {{strings.option_saved}} |
| 14668 |
// </div> |
| 14669 |
// </div> |
| 14670 |
// |
| 14671 |
// <div class="field columns"> |
| 14672 |
// <label class="label column has-text-grey-dark"> |
| 14673 |
// {{strings.enable_image_replace}} |
| 14674 |
// <p class="is-italic has-text-weight-normal"> |
| 14675 |
// {{strings.replacer_desc}} |
| 14676 |
// </p> |
| 14677 |
// </label> |
| 14678 |
// <div class="column "> |
| 14679 |
// <toggle-button @change="toggleOption('image_replacer')" :class="'has-text-dark'" |
| 14680 |
// :value="imageReplacerStatus" |
| 14681 |
// :disabled="this.$store.state.loading" |
| 14682 |
// :labels="{checked: strings.enabled, unchecked: strings.disabled}" |
| 14683 |
// :width="80" |
| 14684 |
// :height="25" |
| 14685 |
// color="#008ec2"></toggle-button> |
| 14686 |
// </div> |
| 14687 |
// |
| 14688 |
// </div> |
| 14689 |
// <div class="field is-fullwidth columns"> |
| 14690 |
// <label class="label column has-text-grey-dark"> |
| 14691 |
// {{strings.toggle_ab_item}} |
| 14692 |
// <p class="is-italic has-text-weight-normal"> |
| 14693 |
// {{strings.admin_bar_desc}} |
| 14694 |
// </p> |
| 14695 |
// </label> |
| 14696 |
// |
| 14697 |
// <div class="column "> |
| 14698 |
// <toggle-button :class="'has-text-dark'" @change="toggleOption('admin_bar_item')" |
| 14699 |
// v-model="adminBarItemStatus" |
| 14700 |
// :disabled="this.$store.state.loading" |
| 14701 |
// :labels="{checked: strings.show, unchecked: strings.hide}" |
| 14702 |
// :width="80" |
| 14703 |
// :height="25" |
| 14704 |
// color="#008ec2"></toggle-button> |
| 14705 |
// </div> |
| 14706 |
// </div> |
| 14707 |
// <div class="field columns"> |
| 14708 |
// <label class="label column has-text-grey-dark"> |
| 14709 |
// {{strings.quality_title}} |
| 14710 |
// <p class="is-italic has-text-weight-normal"> |
| 14711 |
// {{strings.quality_desc}} |
| 14712 |
// </p> |
| 14713 |
// </label> |
| 14714 |
// <div class="column buttons "> |
| 14715 |
// <div class="field columns "> |
| 14716 |
// <div class="column field has-addons"> |
| 14717 |
// <p class="control"> |
| 14718 |
// <a @click="changeQuality('auto')" :class="{ 'is-info':( quality_saved === 'auto' ) }" |
| 14719 |
// class="button is-small is-rounded"> |
| 14720 |
// <span class="icon is-small dashicons-admin-customizer dashicons"></span> |
| 14721 |
// <span>{{strings.auto_q_title}}</span> |
| 14722 |
// </a> |
| 14723 |
// </p> |
| 14724 |
// |
| 14725 |
// <p class="control"> |
| 14726 |
// <a @click="changeQuality('low')" :class="{ 'is-info':( quality_saved === 'low' ) }" |
| 14727 |
// class="button is-small"> |
| 14728 |
// <span class="icon is-small dashicons dashicons-arrow-right"></span> |
| 14729 |
// <span>{{strings.low_q_title}}</span> |
| 14730 |
// </a> |
| 14731 |
// </p> |
| 14732 |
// |
| 14733 |
// <p class="control"> |
| 14734 |
// <a @click="changeQuality('medium')" :class="{ 'is-info':( quality_saved === 'medium' ) }" |
| 14735 |
// class="button is-small"> |
| 14736 |
// <span class="icon is-small dashicons dashicons-controls-play"></span> |
| 14737 |
// <span>{{strings.medium_q_title}}</span> |
| 14738 |
// </a> |
| 14739 |
// </p> |
| 14740 |
// <p class="control"> |
| 14741 |
// <a @click="changeQuality('high')" :class="{ 'is-info':( quality_saved === 'high' ) }" |
| 14742 |
// class="button is-rounded is-small"> |
| 14743 |
// <span class="icon is-small dashicons dashicons-controls-forward"></span> |
| 14744 |
// <span>{{strings.high_q_title}}</span> |
| 14745 |
// </a> |
| 14746 |
// </p> |
| 14747 |
// </div> |
| 14748 |
// <p class="control column " v-if="showSaveQuality"> |
| 14749 |
// <a @click="saveQuality()" class="button is-small is-success " |
| 14750 |
// :class="{'is-loading':loading_quality}"> |
| 14751 |
// <span class="dashicons dashicons-yes icon"></span> |
| 14752 |
// <span> {{strings.save_quality_btn}}</span> |
| 14753 |
// </a> |
| 14754 |
// </p> |
| 14755 |
// </div> |
| 14756 |
// </div> |
| 14757 |
// </div> |
| 14758 |
// <div v-if="loading_images" class="has-text-centered subtitle ">{{strings.sample_image_loading}}<span |
| 14759 |
// class="loader has-text-black-bis icon is-small"></span></div> |
| 14760 |
// <div v-else-if="sample_images.id"> |
| 14761 |
// <p class="title has-text-centered is-5 is-size-6-mobile">{{strings.quality_slider_desc}}</p> |
| 14762 |
// <div class="columns is-centered is-vcentered is-multiline is-mobile"> |
| 14763 |
// |
| 14764 |
// <div class="column visual-compare is-half-fullhd is-half-desktop is-three-quarters-touch is-12-mobile "> |
| 14765 |
// |
| 14766 |
// <Image_diff class="is-fullwidth" value="50" :first_label="strings.image_1_label" |
| 14767 |
// :second_label="strings.image_2_label"> |
| 14768 |
// <img slot="first" :src="sample_images.original"> |
| 14769 |
// <img slot="second" :src="sample_images.optimized"> |
| 14770 |
// |
| 14771 |
// </Image_diff> |
| 14772 |
// </div> |
| 14773 |
// |
| 14774 |
// </div> |
| 14775 |
// </div> |
| 14776 |
// <div v-else> |
| 14777 |
// <p class="title has-text-centered is-5 is-size-6-mobile">{{strings.no_images_found}}</p></div> |
| 14778 |
// </div> |
| 14779 |
// |
| 14780 |
// </template> |
| 14781 |
// |
| 14782 |
// <script> |
| 14783 |
|
| 14784 |
/***/ }), |
| 14785 |
/* 40 */ |
| 14786 |
/***/ (function(module, exports, __webpack_require__) { |
| 14787 |
|
| 14788 |
var __vue_script__, __vue_template__ |
| 14789 |
__webpack_require__(41) |
| 14790 |
__vue_script__ = __webpack_require__(43) |
| 14791 |
__vue_template__ = __webpack_require__(44) |
| 14792 |
module.exports = __vue_script__ || {} |
| 14793 |
if (module.exports.__esModule) module.exports = module.exports.default |
| 14794 |
if (__vue_template__) { (typeof module.exports === "function" ? module.exports.options : module.exports).template = __vue_template__ } |
| 14795 |
if (false) {(function () { module.hot.accept() |
| 14796 |
var hotAPI = require("vue-hot-reload-api") |
| 14797 |
hotAPI.install(require("vue"), true) |
| 14798 |
if (!hotAPI.compatible) return |
| 14799 |
var id = "D:\\local\\optimolewp\\app\\public\\wp-content\\plugins\\optimole-wp\\assets\\vue\\components\\image_diff.vue" |
| 14800 |
if (!module.hot.data) { |
| 14801 |
hotAPI.createRecord(id, module.exports) |
| 14802 |
} else { |
| 14803 |
hotAPI.update(id, module.exports, __vue_template__) |
| 14804 |
} |
| 14805 |
})()} |
| 14806 |
|
| 14807 |
/***/ }), |
| 14808 |
/* 41 */ |
| 14809 |
/***/ (function(module, exports, __webpack_require__) { |
| 14810 |
|
| 14811 |
// style-loader: Adds some css to the DOM by adding a <style> tag |
| 14812 |
|
| 14813 |
// load the styles |
| 14814 |
var content = __webpack_require__(42); |
| 14815 |
if(typeof content === 'string') content = [[module.i, content, '']]; |
| 14816 |
// add the styles to the DOM |
| 14817 |
var update = __webpack_require__(1)(content, {}); |
| 14818 |
if(content.locals) module.exports = content.locals; |
| 14819 |
// Hot Module Replacement |
| 14820 |
if(false) { |
| 14821 |
// When the styles change, update the <style> tags |
| 14822 |
if(!content.locals) { |
| 14823 |
module.hot.accept("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-66ecc92b&file=image_diff.vue!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./image_diff.vue", function() { |
| 14824 |
var newContent = require("!!../../../node_modules/css-loader/index.js!../../../node_modules/vue-loader/lib/style-rewriter.js?id=_v-66ecc92b&file=image_diff.vue!../../../node_modules/vue-loader/lib/selector.js?type=style&index=0!../../../node_modules/eslint-loader/index.js!../../../node_modules/eslint-loader/index.js!./image_diff.vue"); |
| 14825 |
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']]; |
| 14826 |
update(newContent); |
| 14827 |
}); |
| 14828 |
} |
| 14829 |
// When the module is disposed, remove the <style> tags |
| 14830 |
module.hot.dispose(function() { update(); }); |
| 14831 |
} |
| 14832 |
|
| 14833 |
/***/ }), |
| 14834 |
/* 42 */ |
| 14835 |
/***/ (function(module, exports, __webpack_require__) { |
| 14836 |
|
| 14837 |
exports = module.exports = __webpack_require__(0)(); |
| 14838 |
// imports |
| 14839 |
|
| 14840 |
|
| 14841 |
// module |
| 14842 |
exports.push([module.i, "\r\n\t:root {\r\n\t\t--handle-bg: #4a4a4a;\r\n\t\t--handle-width: 30px;\r\n\t\t--handle-height: 30px;\r\n\t\t--handle-chevron-size: 20px;\r\n\t\t\r\n\t\t--handle-line-bg: #4a4a4a;\r\n\t\t--handle-line-width: 2px;\r\n\t\t--handle-line-height: 100%;\r\n\t\t\r\n\t\t--z-index-handle: 5;\r\n\t\t--z-index-handle-line: 4;\r\n\t\t--z-index-range-input: 6;\r\n\t}\r\n\t\r\n\t.compare-wrapper {\r\n\t\tposition: relative;\r\n\t}\r\n\t\r\n\t.compare,\r\n\t.compare__content {\r\n\t\tposition: relative;\r\n\t\theight: 100%;\r\n\t}\r\n\t\r\n\t.compare-overlay.initial,\r\n\t.compare__content.initial {\r\n\t\topacity: 0.2;\r\n\t}\r\n\t\r\n\t.compare-overlay,\r\n\t.compare__content {\r\n\t\ttransition: opacity .3s ease-in-out;\r\n\t}\r\n\t\r\n\t.compare-overlay {\r\n\t\tposition: absolute;\r\n\t\toverflow: hidden;\r\n\t\theight: 100%;\r\n\t\ttop: 0;\r\n\t}\r\n\t\r\n\t.compare-overlay__content {\r\n\t\tposition: relative;\r\n\t\theight: 100%;\r\n\t\twidth: 100%;\r\n\t}\r\n\t\r\n\t.handle__arrow {\r\n\t\tposition: absolute;\r\n\t\twidth: var(--handle-chevron-size);\r\n\t}\r\n\t\r\n\t.handle__arrow--l {\r\n\t\tleft: 0;\r\n\t}\r\n\t\r\n\t.handle__arrow--r {\r\n\t\tright: 0;\r\n\t}\r\n\t\r\n\t.handle-wrap {\r\n\t\tdisplay: -ms-flexbox;\r\n\t\tdisplay: flex;\r\n\t\t-ms-flex-align: center;\r\n\t\t align-items: center;\r\n\t\t-ms-flex-pack: center;\r\n\t\t justify-content: center;\r\n\t\tposition: absolute;\r\n\t\ttop: 50%;\r\n\t\theight: 100%;\r\n\t\ttransform: translate(-50%, -50%);\r\n\t\tz-index: var(--z-index-handle);\r\n\t}\r\n\t\r\n\t.handle-icon {\r\n\t\tdisplay: -ms-flexbox;\r\n\t\tdisplay: flex;\r\n\t\t-ms-flex-align: center;\r\n\t\t align-items: center;\r\n\t\t-ms-flex-pack: center;\r\n\t\t justify-content: center;\r\n\t\tcolor: white;\r\n\t\tbackground: var(--handle-bg);\r\n\t\tborder-radius: 50%;\r\n\t\twidth: var(--handle-width);\r\n\t\theight: var(--handle-height);\r\n\t}\r\n\t\r\n\t.handle-line {\r\n\t\tcontent: '';\r\n\t\tposition: absolute;\r\n\t\ttop: 0;\r\n\t\twidth: var(--handle-line-width);\r\n\t\theight: 100%;\r\n\t\tbackground: var(--handle-line-bg);\r\n\t\tz-index: var(--z-index-handle-line);\r\n\t\tpointer-events: none;\r\n\t\t-webkit-user-select: none;\r\n\t\t -moz-user-select: none;\r\n\t\t -ms-user-select: none;\r\n\t\t user-select: none;\r\n\t}\r\n\t\r\n\t.compare__range {\r\n\t\tposition: absolute;\r\n\t\tcursor: ew-resize;\r\n\t\tleft: calc(var(--handle-width) / -2);\r\n\t\twidth: calc(100% + var(--handle-width));\r\n\t\ttransform: translatey(-50%);\r\n\t\ttop: calc(50%);\r\n\t\tz-index: var(--z-index-range-input);\r\n\t\t-webkit-appearance: none;\r\n\t\theight: var(--handle-height);\r\n\t\t/* debugging purposes only */\r\n\t\tbackground: rgba(0, 0, 0, .4);\r\n\t\topacity: .0;\r\n\t}\r\n\t\r\n\t.object-fit-cover {\r\n\t\t-o-object-fit: cover;\r\n\t\t object-fit: cover;\r\n\t}\r\n\t\r\n\t.compare_optimized {\r\n\t\tright: 5px;\r\n\t}\r\n\t\r\n\t.compare_original {\r\n\t\tleft: 5px;\r\n\t}\r\n\t\r\n\t.compare_label {\r\n\t\tposition: absolute;\r\n\t\tz-index: 999;\r\n\t\tbackground: #444;\r\n\t\topacity: 0.6;\r\n\t\tpadding: 0.5rem;\r\n\t\tborder-radius: 0.2rem;\r\n\t\tcolor: #fff;\r\n\t\ttop: 10px;\r\n\t\t\r\n\t}\r\n", ""]); |
| 14843 |
|
| 14844 |
// exports |
| 14845 |
|
| 14846 |
|
| 14847 |
/***/ }), |
| 14848 |
/* 43 */ |
| 14849 |
/***/ (function(module, exports, __webpack_require__) { |
| 14850 |
|
| 14851 |
"use strict"; |
| 14852 |
|
| 14853 |
|
| 14854 |
Object.defineProperty(exports, "__esModule", { |
| 14855 |
value: true |
| 14856 |
}); |
| 14857 |
// <template> |
| 14858 |
// <div class="compare-wrapper" @mouseenter="removeInitial"> |
| 14859 |
// <div class="compare"> |
| 14860 |
// |
| 14861 |
// <span class="compare_label compare_original">{{this.first_label}}</span> |
| 14862 |
// <span class="compare_label compare_optimized">{{this.second_label}}</span> |
| 14863 |
// <div class="compare__content " :class="{'initial':!initial}" :style="{'width': width}"> |
| 14864 |
// <slot name="first"></slot> |
| 14865 |
// |
| 14866 |
// </div> |
| 14867 |
// |
| 14868 |
// <resize-observer @notify="handleResize"></resize-observer> |
| 14869 |
// <div class="handle-wrap" :style="{left:`calc(${compareWidth + '%'} - var(--handle-line-width) / 2`}"> |
| 14870 |
// <div class="handle-icon"> |
| 14871 |
// <svg class="handle__arrow handle__arrow--l" xmlns="http://www.w3.org/2000/svg" width="24" |
| 14872 |
// height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" |
| 14873 |
// stroke-linecap="round" stroke-linejoin="round"> |
| 14874 |
// <polyline points="15 18 9 12 15 6"></polyline> |
| 14875 |
// </svg> |
| 14876 |
// <svg class="handle__arrow handle__arrow--r" xmlns="http://www.w3.org/2000/svg" width="24" |
| 14877 |
// height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" |
| 14878 |
// stroke-linecap="round" stroke-linejoin="round"> |
| 14879 |
// <polyline points="9 18 15 12 9 6"></polyline> |
| 14880 |
// </svg> |
| 14881 |
// |
| 14882 |
// </div> |
| 14883 |
// <span class="handle-line"></span> |
| 14884 |
// </div> |
| 14885 |
// |
| 14886 |
// <div class="compare-overlay" :class="{'initial':!initial}" :style="{width:`calc(${compareWidth + '%'})`}"> |
| 14887 |
// <div class="compare-overlay__content" :style="{ 'width': width}"> |
| 14888 |
// <slot name="second"></slot> |
| 14889 |
// </div> |
| 14890 |
// </div> |
| 14891 |
// |
| 14892 |
// </div> |
| 14893 |
// <input type="range" min="0" max="100" :step="step" class="compare__range" :value="compareWidth" |
| 14894 |
// @input="handleInput" tabindex="-1"> |
| 14895 |
// |
| 14896 |
// </div> |
| 14897 |
// </template> |
| 14898 |
// <script> |
| 14899 |
|
| 14900 |
exports.default = { |
| 14901 |
name: 'image_diff', |
| 14902 |
props: { |
| 14903 |
value: { default: 50 }, |
| 14904 |
first_label: { |
| 14905 |
type: String, |
| 14906 |
default: '' |
| 14907 |
}, |
| 14908 |
second_label: { |
| 14909 |
type: String, |
| 14910 |
default: '' |
| 14911 |
}, |
| 14912 |
step: { default: '.1' } |
| 14913 |
}, |
| 14914 |
data: function data() { |
| 14915 |
return { |
| 14916 |
width: null, |
| 14917 |
initial: false, |
| 14918 |
compareWidth: this.value |
| 14919 |
}; |
| 14920 |
}, |
| 14921 |
|
| 14922 |
watch: { |
| 14923 |
value: function value() { |
| 14924 |
this.compareWidth = this.value; |
| 14925 |
} |
| 14926 |
}, |
| 14927 |
mounted: function mounted() { |
| 14928 |
this.width = this.getContainerWidth(); |
| 14929 |
}, |
| 14930 |
|
| 14931 |
methods: { |
| 14932 |
removeInitial: function removeInitial() { |
| 14933 |
this.initial = true; |
| 14934 |
}, |
| 14935 |
handleInput: function handleInput(e) { |
| 14936 |
this.compareWidth = e.target.value; |
| 14937 |
this.$emit('input', e.target.value); |
| 14938 |
}, |
| 14939 |
handleResize: function handleResize() { |
| 14940 |
var w = this.getContainerWidth(); |
| 14941 |
if (w === this.width) return; |
| 14942 |
this.width = w; |
| 14943 |
}, |
| 14944 |
getContainerWidth: function getContainerWidth() { |
| 14945 |
return window.getComputedStyle(this.$el, null).getPropertyValue('width'); |
| 14946 |
} |
| 14947 |
} |
| 14948 |
// </script> |
| 14949 |
// <style> |
| 14950 |
// :root { |
| 14951 |
// --handle-bg: #4a4a4a; |
| 14952 |
// --handle-width: 30px; |
| 14953 |
// --handle-height: 30px; |
| 14954 |
// --handle-chevron-size: 20px; |
| 14955 |
// |
| 14956 |
// --handle-line-bg: #4a4a4a; |
| 14957 |
// --handle-line-width: 2px; |
| 14958 |
// --handle-line-height: 100%; |
| 14959 |
// |
| 14960 |
// --z-index-handle: 5; |
| 14961 |
// --z-index-handle-line: 4; |
| 14962 |
// --z-index-range-input: 6; |
| 14963 |
// } |
| 14964 |
// |
| 14965 |
// .compare-wrapper { |
| 14966 |
// position: relative; |
| 14967 |
// } |
| 14968 |
// |
| 14969 |
// .compare, |
| 14970 |
// .compare__content { |
| 14971 |
// position: relative; |
| 14972 |
// height: 100%; |
| 14973 |
// } |
| 14974 |
// |
| 14975 |
// .compare-overlay.initial, |
| 14976 |
// .compare__content.initial { |
| 14977 |
// opacity: 0.2; |
| 14978 |
// } |
| 14979 |
// |
| 14980 |
// .compare-overlay, |
| 14981 |
// .compare__content { |
| 14982 |
// -webkit-transition: opacity .3s ease-in-out; |
| 14983 |
// -moz-transition: opacity .3s ease-in-out; |
| 14984 |
// -ms-transition: opacity .3s ease-in-out; |
| 14985 |
// -o-transition: opacity .3s ease-in-out; |
| 14986 |
// transition: opacity .3s ease-in-out; |
| 14987 |
// } |
| 14988 |
// |
| 14989 |
// .compare-overlay { |
| 14990 |
// position: absolute; |
| 14991 |
// overflow: hidden; |
| 14992 |
// height: 100%; |
| 14993 |
// top: 0; |
| 14994 |
// } |
| 14995 |
// |
| 14996 |
// .compare-overlay__content { |
| 14997 |
// position: relative; |
| 14998 |
// height: 100%; |
| 14999 |
// width: 100%; |
| 15000 |
// } |
| 15001 |
// |
| 15002 |
// .handle__arrow { |
| 15003 |
// position: absolute; |
| 15004 |
// width: var(--handle-chevron-size); |
| 15005 |
// } |
| 15006 |
// |
| 15007 |
// .handle__arrow--l { |
| 15008 |
// left: 0; |
| 15009 |
// } |
| 15010 |
// |
| 15011 |
// .handle__arrow--r { |
| 15012 |
// right: 0; |
| 15013 |
// } |
| 15014 |
// |
| 15015 |
// .handle-wrap { |
| 15016 |
// display: flex; |
| 15017 |
// align-items: center; |
| 15018 |
// justify-content: center; |
| 15019 |
// position: absolute; |
| 15020 |
// top: 50%; |
| 15021 |
// height: 100%; |
| 15022 |
// transform: translate(-50%, -50%); |
| 15023 |
// z-index: var(--z-index-handle); |
| 15024 |
// } |
| 15025 |
// |
| 15026 |
// .handle-icon { |
| 15027 |
// display: flex; |
| 15028 |
// align-items: center; |
| 15029 |
// justify-content: center; |
| 15030 |
// color: white; |
| 15031 |
// background: var(--handle-bg); |
| 15032 |
// border-radius: 50%; |
| 15033 |
// width: var(--handle-width); |
| 15034 |
// height: var(--handle-height); |
| 15035 |
// } |
| 15036 |
// |
| 15037 |
// .handle-line { |
| 15038 |
// content: ''; |
| 15039 |
// position: absolute; |
| 15040 |
// top: 0; |
| 15041 |
// width: var(--handle-line-width); |
| 15042 |
// height: 100%; |
| 15043 |
// background: var(--handle-line-bg); |
| 15044 |
// z-index: var(--z-index-handle-line); |
| 15045 |
// pointer-events: none; |
| 15046 |
// user-select: none; |
| 15047 |
// } |
| 15048 |
// |
| 15049 |
// .compare__range { |
| 15050 |
// position: absolute; |
| 15051 |
// cursor: ew-resize; |
| 15052 |
// left: calc(var(--handle-width) / -2); |
| 15053 |
// width: calc(100% + var(--handle-width)); |
| 15054 |
// transform: translatey(-50%); |
| 15055 |
// top: calc(50%); |
| 15056 |
// z-index: var(--z-index-range-input); |
| 15057 |
// -webkit-appearance: none; |
| 15058 |
// height: var(--handle-height); |
| 15059 |
// /* debugging purposes only */ |
| 15060 |
// background: rgba(0, 0, 0, .4); |
| 15061 |
// opacity: .0; |
| 15062 |
// } |
| 15063 |
// |
| 15064 |
// .object-fit-cover { |
| 15065 |
// object-fit: cover; |
| 15066 |
// } |
| 15067 |
// |
| 15068 |
// .compare_optimized { |
| 15069 |
// right: 5px; |
| 15070 |
// } |
| 15071 |
// |
| 15072 |
// .compare_original { |
| 15073 |
// left: 5px; |
| 15074 |
// } |
| 15075 |
// |
| 15076 |
// .compare_label { |
| 15077 |
// position: absolute; |
| 15078 |
// z-index: 999; |
| 15079 |
// background: #444; |
| 15080 |
// opacity: 0.6; |
| 15081 |
// padding: 0.5rem; |
| 15082 |
// border-radius: 0.2rem; |
| 15083 |
// color: #fff; |
| 15084 |
// top: 10px; |
| 15085 |
// |
| 15086 |
// } |
| 15087 |
// </style> |
| 15088 |
|
| 15089 |
}; |
| 15090 |
|
| 15091 |
/***/ }), |
| 15092 |
/* 44 */ |
| 15093 |
/***/ (function(module, exports) { |
| 15094 |
|
| 15095 |
module.exports = "\r\n\t<div class=\"compare-wrapper\" @mouseenter=\"removeInitial\">\r\n\t\t<div class=\"compare\">\r\n\t\t\t\r\n\t\t\t<span class=\"compare_label compare_original\">{{this.first_label}}</span>\r\n\t\t\t<span class=\"compare_label compare_optimized\">{{this.second_label}}</span>\r\n\t\t\t<div class=\"compare__content \" :class=\"{'initial':!initial}\" :style=\"{'width': width}\">\r\n\t\t\t\t<slot name=\"first\"></slot>\r\n\t\t\t\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<resize-observer @notify=\"handleResize\"></resize-observer>\r\n\t\t\t<div class=\"handle-wrap\" :style=\"{left:`calc(${compareWidth + '%'} - var(--handle-line-width) / 2`}\">\r\n\t\t\t\t<div class=\"handle-icon\">\r\n\t\t\t\t\t<svg class=\"handle__arrow handle__arrow--l\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\"\r\n\t\t\t\t\t height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\r\n\t\t\t\t\t stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n\t\t\t\t\t\t<polyline points=\"15 18 9 12 15 6\"></polyline>\r\n\t\t\t\t\t</svg>\r\n\t\t\t\t\t<svg class=\"handle__arrow handle__arrow--r\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\"\r\n\t\t\t\t\t height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"\r\n\t\t\t\t\t stroke-linecap=\"round\" stroke-linejoin=\"round\">\r\n\t\t\t\t\t\t<polyline points=\"9 18 15 12 9 6\"></polyline>\r\n\t\t\t\t\t</svg>\r\n\t\t\t\t\r\n\t\t\t\t</div>\r\n\t\t\t\t<span class=\"handle-line\"></span>\r\n\t\t\t</div>\r\n\t\t\t\r\n\t\t\t<div class=\"compare-overlay\" :class=\"{'initial':!initial}\" :style=\"{width:`calc(${compareWidth + '%'})`}\">\r\n\t\t\t\t<div class=\"compare-overlay__content\" :style=\"{ 'width': width}\">\r\n\t\t\t\t\t<slot name=\"second\"></slot>\r\n\t\t\t\t</div>\r\n\t\t\t</div>\r\n\t\t\r\n\t\t</div>\r\n\t\t<input type=\"range\" min=\"0\" max=\"100\" :step=\"step\" class=\"compare__range\" :value=\"compareWidth\"\r\n\t\t @input=\"handleInput\" tabindex=\"-1\">\r\n\t\r\n\t</div>\r\n"; |
| 15096 |
|
| 15097 |
/***/ }), |
| 15098 |
/* 45 */ |
| 15099 |
/***/ (function(module, exports) { |
| 15100 |
|
| 15101 |
module.exports = "\n\t<div class=\" container \" :class=\"{ 'saving--option' : this.$store.state.loading }\" _v-d718d868=\"\">\n\t\t<div class=\"columns\" v-if=\"showNotification\" _v-d718d868=\"\">\n\t\t\t<div class=\"notification column is-one-quarter is-success\" _v-d718d868=\"\">\n\t\t\t\t{{strings.option_saved}}\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<div class=\"field columns\" _v-d718d868=\"\">\n\t\t\t<label class=\"label column has-text-grey-dark\" _v-d718d868=\"\">\n\t\t\t\t{{strings.enable_image_replace}}\n\t\t\t\t<p class=\"is-italic has-text-weight-normal\" _v-d718d868=\"\">\n\t\t\t\t\t{{strings.replacer_desc}}\n\t\t\t\t</p>\n\t\t\t</label>\n\t\t\t<div class=\"column \" _v-d718d868=\"\">\n\t\t\t\t<toggle-button @change=\"toggleOption('image_replacer')\" :class=\"'has-text-dark'\" :value=\"imageReplacerStatus\" :disabled=\"this.$store.state.loading\" :labels=\"{checked: strings.enabled, unchecked: strings.disabled}\" :width=\"80\" :height=\"25\" color=\"#008ec2\" _v-d718d868=\"\"></toggle-button>\n\t\t\t</div>\n\t\t\n\t\t</div>\n\t\t<div class=\"field is-fullwidth columns\" _v-d718d868=\"\">\n\t\t\t<label class=\"label column has-text-grey-dark\" _v-d718d868=\"\">\n\t\t\t\t{{strings.toggle_ab_item}}\n\t\t\t\t<p class=\"is-italic has-text-weight-normal\" _v-d718d868=\"\">\n\t\t\t\t\t{{strings.admin_bar_desc}}\n\t\t\t\t</p>\n\t\t\t</label>\n\t\t\t\n\t\t\t<div class=\"column \" _v-d718d868=\"\">\n\t\t\t\t<toggle-button :class=\"'has-text-dark'\" @change=\"toggleOption('admin_bar_item')\" v-model=\"adminBarItemStatus\" :disabled=\"this.$store.state.loading\" :labels=\"{checked: strings.show, unchecked: strings.hide}\" :width=\"80\" :height=\"25\" color=\"#008ec2\" _v-d718d868=\"\"></toggle-button>\n\t\t\t</div>\n\t\t</div>\n\t\t<div class=\"field columns\" _v-d718d868=\"\">\n\t\t\t<label class=\"label column has-text-grey-dark\" _v-d718d868=\"\">\n\t\t\t\t{{strings.quality_title}}\n\t\t\t\t<p class=\"is-italic has-text-weight-normal\" _v-d718d868=\"\">\n\t\t\t\t\t{{strings.quality_desc}}\n\t\t\t\t</p>\n\t\t\t</label>\n\t\t\t<div class=\"column buttons \" _v-d718d868=\"\">\n\t\t\t\t<div class=\"field columns \" _v-d718d868=\"\">\n\t\t\t\t\t<div class=\"column field has-addons\" _v-d718d868=\"\">\n\t\t\t\t\t\t<p class=\"control\" _v-d718d868=\"\">\n\t\t\t\t\t\t\t<a @click=\"changeQuality('auto')\" :class=\"{ 'is-info':( quality_saved === 'auto' ) }\" class=\"button is-small is-rounded\" _v-d718d868=\"\">\n\t\t\t\t\t\t\t\t<span class=\"icon is-small dashicons-admin-customizer dashicons\" _v-d718d868=\"\"></span>\n\t\t\t\t\t\t\t\t<span _v-d718d868=\"\">{{strings.auto_q_title}}</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p class=\"control\" _v-d718d868=\"\">\n\t\t\t\t\t\t\t<a @click=\"changeQuality('low')\" :class=\"{ 'is-info':( quality_saved === 'low' ) }\" class=\"button is-small\" _v-d718d868=\"\">\n\t\t\t\t\t\t\t\t<span class=\"icon is-small dashicons dashicons-arrow-right\" _v-d718d868=\"\"></span>\n\t\t\t\t\t\t\t\t<span _v-d718d868=\"\">{{strings.low_q_title}}</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<p class=\"control\" _v-d718d868=\"\">\n\t\t\t\t\t\t\t<a @click=\"changeQuality('medium')\" :class=\"{ 'is-info':( quality_saved === 'medium' ) }\" class=\"button is-small\" _v-d718d868=\"\">\n\t\t\t\t\t\t\t\t<span class=\"icon is-small dashicons dashicons-controls-play\" _v-d718d868=\"\"></span>\n\t\t\t\t\t\t\t\t<span _v-d718d868=\"\">{{strings.medium_q_title}}</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t\t<p class=\"control\" _v-d718d868=\"\">\n\t\t\t\t\t\t\t<a @click=\"changeQuality('high')\" :class=\"{ 'is-info':( quality_saved === 'high' ) }\" class=\"button is-rounded is-small\" _v-d718d868=\"\">\n\t\t\t\t\t\t\t\t<span class=\"icon is-small dashicons dashicons-controls-forward\" _v-d718d868=\"\"></span>\n\t\t\t\t\t\t\t\t<span _v-d718d868=\"\">{{strings.high_q_title}}</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\t\t\t\t\t<p class=\"control column \" v-if=\"showSaveQuality\" _v-d718d868=\"\">\n\t\t\t\t\t\t<a @click=\"saveQuality()\" class=\"button is-small is-success \" :class=\"{'is-loading':loading_quality}\" _v-d718d868=\"\">\n\t\t\t\t\t\t\t<span class=\"dashicons dashicons-yes icon\" _v-d718d868=\"\"></span>\n\t\t\t\t\t\t\t<span _v-d718d868=\"\">\t{{strings.save_quality_btn}}</span>\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<div v-if=\"loading_images\" class=\"has-text-centered subtitle \" _v-d718d868=\"\">{{strings.sample_image_loading}}<span class=\"loader has-text-black-bis icon is-small\" _v-d718d868=\"\"></span></div>\n\t\t<div v-else-if=\"sample_images.id\" _v-d718d868=\"\">\n\t\t\t<p class=\"title has-text-centered is-5 is-size-6-mobile\" _v-d718d868=\"\">{{strings.quality_slider_desc}}</p>\n\t\t\t<div class=\"columns is-centered is-vcentered is-multiline is-mobile\" _v-d718d868=\"\">\n\t\t\t\t\n\t\t\t\t<div class=\"column visual-compare is-half-fullhd is-half-desktop is-three-quarters-touch is-12-mobile \" _v-d718d868=\"\">\n\t\t\t\t\t\n\t\t\t\t\t<image_diff class=\"is-fullwidth\" value=\"50\" :first_label=\"strings.image_1_label\" :second_label=\"strings.image_2_label\" _v-d718d868=\"\">\n\t\t\t\t\t\t<img slot=\"first\" :src=\"sample_images.original\" _v-d718d868=\"\">\n\t\t\t\t\t\t<img slot=\"second\" :src=\"sample_images.optimized\" _v-d718d868=\"\">\n\t\t\t\t\t\n\t\t\t\t\t</image_diff>\n\t\t\t\t</div>\n\t\t\t\n\t\t\t</div>\n\t\t</div>\n\t\t<div v-else=\"\" _v-d718d868=\"\">\n\t\t\t<p class=\"title has-text-centered is-5 is-size-6-mobile\" _v-d718d868=\"\">{{strings.no_images_found}}</p></div>\n\t</div>\n\n"; |
| 15102 |
|
| 15103 |
/***/ }), |
| 15104 |
/* 46 */ |
| 15105 |
/***/ (function(module, exports) { |
| 15106 |
|
| 15107 |
module.exports = "\n\t<div class=\"card\">\n\t\t<app-header></app-header>\n\t\t<div class=\"card-content\">\n\t\t\t<div class=\"content\">\n\t\t\t\t<connect-layout v-if=\"! this.$store.state.connected\"></connect-layout>\n\t\t\t\t<transition name=\"fade\" mode=\"out-in\">\n\t\t\t\t\t<div v-if=\"this.$store.state.connected\">\n\t\t\t\t\t\t<div class=\"tabs is-left is-boxed is-medium\">\n\t\t\t\t\t\t\t<ul class=\"is-marginless\">\n\t\t\t\t\t\t\t\t<li :class=\"tab === 'dashboard' ? 'is-active' : ''\">\n\t\t\t\t\t\t\t\t\t<a @click=\"changeTab('dashboard')\" class=\"is-size-6-mobile\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"icon is-size-6-mobile dashicons dashicons-admin-home\"></span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"is-size-6-mobile \">{{strings.dashboard_menu_item}}</span>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t<li :class=\"tab === 'settings' ? 'is-active' : ''\" >\n\t\t\t\t\t\t\t\t\t<a @click=\"changeTab('settings')\" class=\"is-size-6-mobile\">\n\t\t\t\t\t\t\t\t\t\t<span class=\"icon is-size-6-mobile dashicons dashicons-admin-settings\"></span>\n\t\t\t\t\t\t\t\t\t\t<span class=\"is-size-6-mobile\">{{strings.settings_menu_item}}</span>\n\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<div class=\"is-tab\" v-if=\"tab === 'dashboard' \">\n\t\t\t\t\t\t\t<api-key-form></api-key-form>\n\t\t\t\t\t\t\t<cdn-details v-if=\"this.$store.state.userData\"></cdn-details>\n\t\t\t\t\t\t\t<hr/>\n\t\t\t\t\t\t\t<last-images :status=\"fetchStatus\"></last-images>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"is-tab\" v-if=\" tab === 'settings'\" >\n\t\t\t\t\t\t\t<options></options>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</transition>\n\t\t\t</div>\n\t\t</div>\n\t\t\n\t\t<div class=\"level-right\">\n\t\t\t<p class=\"level-item\"><a href=\"https://optimole.com\" target=\"_blank\">Optimole v{{strings.version}}</a></p>\n\t\t\t<p class=\"level-item\"><a href=\"https://optimole.com/terms/\" target=\"_blank\">{{strings.terms_menu}}</a></p>\n\t\t\t<p class=\"level-item\"><a href=\"https://optimole.com/privacy-policy/\" target=\"_blank\">{{strings.privacy_menu}}</a>\n\t\t\t</p>\n\t\t\t<p class=\"level-item\"><a :href=\"'https://speedtest.optimole.com/?url=' + home \" target=\"_blank\">{{strings.testdrive_menu}}</a>\n\t\t\t</p>\n\t\t</div>\n\t</div>\n"; |
| 15108 |
|
| 15109 |
/***/ }), |
| 15110 |
/* 47 */ |
| 15111 |
/***/ (function(module, exports, __webpack_require__) { |
| 15112 |
|
| 15113 |
"use strict"; |
| 15114 |
|
| 15115 |
|
| 15116 |
Object.defineProperty(exports, "__esModule", { |
| 15117 |
value: true |
| 15118 |
}); |
| 15119 |
|
| 15120 |
var _vue = __webpack_require__(2); |
| 15121 |
|
| 15122 |
var _vue2 = _interopRequireDefault(_vue); |
| 15123 |
|
| 15124 |
var _vuex = __webpack_require__(48); |
| 15125 |
|
| 15126 |
var _vuex2 = _interopRequireDefault(_vuex); |
| 15127 |
|
| 15128 |
var _vueResource = __webpack_require__(6); |
| 15129 |
|
| 15130 |
var _vueResource2 = _interopRequireDefault(_vueResource); |
| 15131 |
|
| 15132 |
var _mutations = __webpack_require__(50); |
| 15133 |
|
| 15134 |
var _mutations2 = _interopRequireDefault(_mutations); |
| 15135 |
|
| 15136 |
var _actions = __webpack_require__(51); |
| 15137 |
|
| 15138 |
var _actions2 = _interopRequireDefault(_actions); |
| 15139 |
|
| 15140 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
| 15141 |
|
| 15142 |
_vue2.default.use(_vuex2.default); /* global optimoleDashboardApp */ |
| 15143 |
/*jshint esversion: 6 */ |
| 15144 |
|
| 15145 |
_vue2.default.use(_vueResource2.default); |
| 15146 |
|
| 15147 |
var store = new _vuex2.default.Store({ |
| 15148 |
state: { |
| 15149 |
isConnecting: false, |
| 15150 |
loading: false, |
| 15151 |
quality: optimoleDashboardApp.quality, |
| 15152 |
connected: optimoleDashboardApp.connection_status === 'yes', |
| 15153 |
apiKey: optimoleDashboardApp.api_key ? optimoleDashboardApp.api_key : '', |
| 15154 |
apiKeyValidity: true, |
| 15155 |
sample_rate: {}, |
| 15156 |
userData: optimoleDashboardApp.user_data ? optimoleDashboardApp.user_data : null, |
| 15157 |
optimizedImages: [] |
| 15158 |
}, |
| 15159 |
mutations: _mutations2.default, |
| 15160 |
actions: _actions2.default |
| 15161 |
}); |
| 15162 |
|
| 15163 |
exports.default = store; |
| 15164 |
|
| 15165 |
/***/ }), |
| 15166 |
/* 48 */ |
| 15167 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
| 15168 |
|
| 15169 |
"use strict"; |
| 15170 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); |
| 15171 |
/* WEBPACK VAR INJECTION */(function(process) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Store", function() { return Store; }); |
| 15172 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; }); |
| 15173 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapState", function() { return mapState; }); |
| 15174 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapMutations", function() { return mapMutations; }); |
| 15175 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapGetters", function() { return mapGetters; }); |
| 15176 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "mapActions", function() { return mapActions; }); |
| 15177 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createNamespacedHelpers", function() { return createNamespacedHelpers; }); |
| 15178 |
/** |
| 15179 |
* vuex v2.5.0 |
| 15180 |
* (c) 2017 Evan You |
| 15181 |
* @license MIT |
| 15182 |
*/ |
| 15183 |
var applyMixin = function (Vue) { |
| 15184 |
var version = Number(Vue.version.split('.')[0]); |
| 15185 |
|
| 15186 |
if (version >= 2) { |
| 15187 |
Vue.mixin({ beforeCreate: vuexInit }); |
| 15188 |
} else { |
| 15189 |
// override init and inject vuex init procedure |
| 15190 |
// for 1.x backwards compatibility. |
| 15191 |
var _init = Vue.prototype._init; |
| 15192 |
Vue.prototype._init = function (options) { |
| 15193 |
if ( options === void 0 ) options = {}; |
| 15194 |
|
| 15195 |
options.init = options.init |
| 15196 |
? [vuexInit].concat(options.init) |
| 15197 |
: vuexInit; |
| 15198 |
_init.call(this, options); |
| 15199 |
}; |
| 15200 |
} |
| 15201 |
|
| 15202 |
/** |
| 15203 |
* Vuex init hook, injected into each instances init hooks list. |
| 15204 |
*/ |
| 15205 |
|
| 15206 |
function vuexInit () { |
| 15207 |
var options = this.$options; |
| 15208 |
// store injection |
| 15209 |
if (options.store) { |
| 15210 |
this.$store = typeof options.store === 'function' |
| 15211 |
? options.store() |
| 15212 |
: options.store; |
| 15213 |
} else if (options.parent && options.parent.$store) { |
| 15214 |
this.$store = options.parent.$store; |
| 15215 |
} |
| 15216 |
} |
| 15217 |
}; |
| 15218 |
|
| 15219 |
var devtoolHook = |
| 15220 |
typeof window !== 'undefined' && |
| 15221 |
window.__VUE_DEVTOOLS_GLOBAL_HOOK__; |
| 15222 |
|
| 15223 |
function devtoolPlugin (store) { |
| 15224 |
if (!devtoolHook) { return } |
| 15225 |
|
| 15226 |
store._devtoolHook = devtoolHook; |
| 15227 |
|
| 15228 |
devtoolHook.emit('vuex:init', store); |
| 15229 |
|
| 15230 |
devtoolHook.on('vuex:travel-to-state', function (targetState) { |
| 15231 |
store.replaceState(targetState); |
| 15232 |
}); |
| 15233 |
|
| 15234 |
store.subscribe(function (mutation, state) { |
| 15235 |
devtoolHook.emit('vuex:mutation', mutation, state); |
| 15236 |
}); |
| 15237 |
} |
| 15238 |
|
| 15239 |
/** |
| 15240 |
* Get the first item that pass the test |
| 15241 |
* by second argument function |
| 15242 |
* |
| 15243 |
* @param {Array} list |
| 15244 |
* @param {Function} f |
| 15245 |
* @return {*} |
| 15246 |
*/ |
| 15247 |
/** |
| 15248 |
* Deep copy the given object considering circular structure. |
| 15249 |
* This function caches all nested objects and its copies. |
| 15250 |
* If it detects circular structure, use cached copy to avoid infinite loop. |
| 15251 |
* |
| 15252 |
* @param {*} obj |
| 15253 |
* @param {Array<Object>} cache |
| 15254 |
* @return {*} |
| 15255 |
*/ |
| 15256 |
|
| 15257 |
|
| 15258 |
/** |
| 15259 |
* forEach for object |
| 15260 |
*/ |
| 15261 |
function forEachValue (obj, fn) { |
| 15262 |
Object.keys(obj).forEach(function (key) { return fn(obj[key], key); }); |
| 15263 |
} |
| 15264 |
|
| 15265 |
function isObject (obj) { |
| 15266 |
return obj !== null && typeof obj === 'object' |
| 15267 |
} |
| 15268 |
|
| 15269 |
function isPromise (val) { |
| 15270 |
return val && typeof val.then === 'function' |
| 15271 |
} |
| 15272 |
|
| 15273 |
function assert (condition, msg) { |
| 15274 |
if (!condition) { throw new Error(("[vuex] " + msg)) } |
| 15275 |
} |
| 15276 |
|
| 15277 |
var Module = function Module (rawModule, runtime) { |
| 15278 |
this.runtime = runtime; |
| 15279 |
this._children = Object.create(null); |
| 15280 |
this._rawModule = rawModule; |
| 15281 |
var rawState = rawModule.state; |
| 15282 |
this.state = (typeof rawState === 'function' ? rawState() : rawState) || {}; |
| 15283 |
}; |
| 15284 |
|
| 15285 |
var prototypeAccessors$1 = { namespaced: { configurable: true } }; |
| 15286 |
|
| 15287 |
prototypeAccessors$1.namespaced.get = function () { |
| 15288 |
return !!this._rawModule.namespaced |
| 15289 |
}; |
| 15290 |
|
| 15291 |
Module.prototype.addChild = function addChild (key, module) { |
| 15292 |
this._children[key] = module; |
| 15293 |
}; |
| 15294 |
|
| 15295 |
Module.prototype.removeChild = function removeChild (key) { |
| 15296 |
delete this._children[key]; |
| 15297 |
}; |
| 15298 |
|
| 15299 |
Module.prototype.getChild = function getChild (key) { |
| 15300 |
return this._children[key] |
| 15301 |
}; |
| 15302 |
|
| 15303 |
Module.prototype.update = function update (rawModule) { |
| 15304 |
this._rawModule.namespaced = rawModule.namespaced; |
| 15305 |
if (rawModule.actions) { |
| 15306 |
this._rawModule.actions = rawModule.actions; |
| 15307 |
} |
| 15308 |
if (rawModule.mutations) { |
| 15309 |
this._rawModule.mutations = rawModule.mutations; |
| 15310 |
} |
| 15311 |
if (rawModule.getters) { |
| 15312 |
this._rawModule.getters = rawModule.getters; |
| 15313 |
} |
| 15314 |
}; |
| 15315 |
|
| 15316 |
Module.prototype.forEachChild = function forEachChild (fn) { |
| 15317 |
forEachValue(this._children, fn); |
| 15318 |
}; |
| 15319 |
|
| 15320 |
Module.prototype.forEachGetter = function forEachGetter (fn) { |
| 15321 |
if (this._rawModule.getters) { |
| 15322 |
forEachValue(this._rawModule.getters, fn); |
| 15323 |
} |
| 15324 |
}; |
| 15325 |
|
| 15326 |
Module.prototype.forEachAction = function forEachAction (fn) { |
| 15327 |
if (this._rawModule.actions) { |
| 15328 |
forEachValue(this._rawModule.actions, fn); |
| 15329 |
} |
| 15330 |
}; |
| 15331 |
|
| 15332 |
Module.prototype.forEachMutation = function forEachMutation (fn) { |
| 15333 |
if (this._rawModule.mutations) { |
| 15334 |
forEachValue(this._rawModule.mutations, fn); |
| 15335 |
} |
| 15336 |
}; |
| 15337 |
|
| 15338 |
Object.defineProperties( Module.prototype, prototypeAccessors$1 ); |
| 15339 |
|
| 15340 |
var ModuleCollection = function ModuleCollection (rawRootModule) { |
| 15341 |
// register root module (Vuex.Store options) |
| 15342 |
this.register([], rawRootModule, false); |
| 15343 |
}; |
| 15344 |
|
| 15345 |
ModuleCollection.prototype.get = function get (path) { |
| 15346 |
return path.reduce(function (module, key) { |
| 15347 |
return module.getChild(key) |
| 15348 |
}, this.root) |
| 15349 |
}; |
| 15350 |
|
| 15351 |
ModuleCollection.prototype.getNamespace = function getNamespace (path) { |
| 15352 |
var module = this.root; |
| 15353 |
return path.reduce(function (namespace, key) { |
| 15354 |
module = module.getChild(key); |
| 15355 |
return namespace + (module.namespaced ? key + '/' : '') |
| 15356 |
}, '') |
| 15357 |
}; |
| 15358 |
|
| 15359 |
ModuleCollection.prototype.update = function update$1 (rawRootModule) { |
| 15360 |
update([], this.root, rawRootModule); |
| 15361 |
}; |
| 15362 |
|
| 15363 |
ModuleCollection.prototype.register = function register (path, rawModule, runtime) { |
| 15364 |
var this$1 = this; |
| 15365 |
if ( runtime === void 0 ) runtime = true; |
| 15366 |
|
| 15367 |
if (process.env.NODE_ENV !== 'production') { |
| 15368 |
assertRawModule(path, rawModule); |
| 15369 |
} |
| 15370 |
|
| 15371 |
var newModule = new Module(rawModule, runtime); |
| 15372 |
if (path.length === 0) { |
| 15373 |
this.root = newModule; |
| 15374 |
} else { |
| 15375 |
var parent = this.get(path.slice(0, -1)); |
| 15376 |
parent.addChild(path[path.length - 1], newModule); |
| 15377 |
} |
| 15378 |
|
| 15379 |
// register nested modules |
| 15380 |
if (rawModule.modules) { |
| 15381 |
forEachValue(rawModule.modules, function (rawChildModule, key) { |
| 15382 |
this$1.register(path.concat(key), rawChildModule, runtime); |
| 15383 |
}); |
| 15384 |
} |
| 15385 |
}; |
| 15386 |
|
| 15387 |
ModuleCollection.prototype.unregister = function unregister (path) { |
| 15388 |
var parent = this.get(path.slice(0, -1)); |
| 15389 |
var key = path[path.length - 1]; |
| 15390 |
if (!parent.getChild(key).runtime) { return } |
| 15391 |
|
| 15392 |
parent.removeChild(key); |
| 15393 |
}; |
| 15394 |
|
| 15395 |
function update (path, targetModule, newModule) { |
| 15396 |
if (process.env.NODE_ENV !== 'production') { |
| 15397 |
assertRawModule(path, newModule); |
| 15398 |
} |
| 15399 |
|
| 15400 |
// update target module |
| 15401 |
targetModule.update(newModule); |
| 15402 |
|
| 15403 |
// update nested modules |
| 15404 |
if (newModule.modules) { |
| 15405 |
for (var key in newModule.modules) { |
| 15406 |
if (!targetModule.getChild(key)) { |
| 15407 |
if (process.env.NODE_ENV !== 'production') { |
| 15408 |
console.warn( |
| 15409 |
"[vuex] trying to add a new module '" + key + "' on hot reloading, " + |
| 15410 |
'manual reload is needed' |
| 15411 |
); |
| 15412 |
} |
| 15413 |
return |
| 15414 |
} |
| 15415 |
update( |
| 15416 |
path.concat(key), |
| 15417 |
targetModule.getChild(key), |
| 15418 |
newModule.modules[key] |
| 15419 |
); |
| 15420 |
} |
| 15421 |
} |
| 15422 |
} |
| 15423 |
|
| 15424 |
var functionAssert = { |
| 15425 |
assert: function (value) { return typeof value === 'function'; }, |
| 15426 |
expected: 'function' |
| 15427 |
}; |
| 15428 |
|
| 15429 |
var objectAssert = { |
| 15430 |
assert: function (value) { return typeof value === 'function' || |
| 15431 |
(typeof value === 'object' && typeof value.handler === 'function'); }, |
| 15432 |
expected: 'function or object with "handler" function' |
| 15433 |
}; |
| 15434 |
|
| 15435 |
var assertTypes = { |
| 15436 |
getters: functionAssert, |
| 15437 |
mutations: functionAssert, |
| 15438 |
actions: objectAssert |
| 15439 |
}; |
| 15440 |
|
| 15441 |
function assertRawModule (path, rawModule) { |
| 15442 |
Object.keys(assertTypes).forEach(function (key) { |
| 15443 |
if (!rawModule[key]) { return } |
| 15444 |
|
| 15445 |
var assertOptions = assertTypes[key]; |
| 15446 |
|
| 15447 |
forEachValue(rawModule[key], function (value, type) { |
| 15448 |
assert( |
| 15449 |
assertOptions.assert(value), |
| 15450 |
makeAssertionMessage(path, key, type, value, assertOptions.expected) |
| 15451 |
); |
| 15452 |
}); |
| 15453 |
}); |
| 15454 |
} |
| 15455 |
|
| 15456 |
function makeAssertionMessage (path, key, type, value, expected) { |
| 15457 |
var buf = key + " should be " + expected + " but \"" + key + "." + type + "\""; |
| 15458 |
if (path.length > 0) { |
| 15459 |
buf += " in module \"" + (path.join('.')) + "\""; |
| 15460 |
} |
| 15461 |
buf += " is " + (JSON.stringify(value)) + "."; |
| 15462 |
return buf |
| 15463 |
} |
| 15464 |
|
| 15465 |
var Vue; // bind on install |
| 15466 |
|
| 15467 |
var Store = function Store (options) { |
| 15468 |
var this$1 = this; |
| 15469 |
if ( options === void 0 ) options = {}; |
| 15470 |
|
| 15471 |
// Auto install if it is not done yet and `window` has `Vue`. |
| 15472 |
// To allow users to avoid auto-installation in some cases, |
| 15473 |
// this code should be placed here. See #731 |
| 15474 |
if (!Vue && typeof window !== 'undefined' && window.Vue) { |
| 15475 |
install(window.Vue); |
| 15476 |
} |
| 15477 |
|
| 15478 |
if (process.env.NODE_ENV !== 'production') { |
| 15479 |
assert(Vue, "must call Vue.use(Vuex) before creating a store instance."); |
| 15480 |
assert(typeof Promise !== 'undefined', "vuex requires a Promise polyfill in this browser."); |
| 15481 |
assert(this instanceof Store, "Store must be called with the new operator."); |
| 15482 |
} |
| 15483 |
|
| 15484 |
var plugins = options.plugins; if ( plugins === void 0 ) plugins = []; |
| 15485 |
var strict = options.strict; if ( strict === void 0 ) strict = false; |
| 15486 |
|
| 15487 |
var state = options.state; if ( state === void 0 ) state = {}; |
| 15488 |
if (typeof state === 'function') { |
| 15489 |
state = state() || {}; |
| 15490 |
} |
| 15491 |
|
| 15492 |
// store internal state |
| 15493 |
this._committing = false; |
| 15494 |
this._actions = Object.create(null); |
| 15495 |
this._actionSubscribers = []; |
| 15496 |
this._mutations = Object.create(null); |
| 15497 |
this._wrappedGetters = Object.create(null); |
| 15498 |
this._modules = new ModuleCollection(options); |
| 15499 |
this._modulesNamespaceMap = Object.create(null); |
| 15500 |
this._subscribers = []; |
| 15501 |
this._watcherVM = new Vue(); |
| 15502 |
|
| 15503 |
// bind commit and dispatch to self |
| 15504 |
var store = this; |
| 15505 |
var ref = this; |
| 15506 |
var dispatch = ref.dispatch; |
| 15507 |
var commit = ref.commit; |
| 15508 |
this.dispatch = function boundDispatch (type, payload) { |
| 15509 |
return dispatch.call(store, type, payload) |
| 15510 |
}; |
| 15511 |
this.commit = function boundCommit (type, payload, options) { |
| 15512 |
return commit.call(store, type, payload, options) |
| 15513 |
}; |
| 15514 |
|
| 15515 |
// strict mode |
| 15516 |
this.strict = strict; |
| 15517 |
|
| 15518 |
// init root module. |
| 15519 |
// this also recursively registers all sub-modules |
| 15520 |
// and collects all module getters inside this._wrappedGetters |
| 15521 |
installModule(this, state, [], this._modules.root); |
| 15522 |
|
| 15523 |
// initialize the store vm, which is responsible for the reactivity |
| 15524 |
// (also registers _wrappedGetters as computed properties) |
| 15525 |
resetStoreVM(this, state); |
| 15526 |
|
| 15527 |
// apply plugins |
| 15528 |
plugins.forEach(function (plugin) { return plugin(this$1); }); |
| 15529 |
|
| 15530 |
if (Vue.config.devtools) { |
| 15531 |
devtoolPlugin(this); |
| 15532 |
} |
| 15533 |
}; |
| 15534 |
|
| 15535 |
var prototypeAccessors = { state: { configurable: true } }; |
| 15536 |
|
| 15537 |
prototypeAccessors.state.get = function () { |
| 15538 |
return this._vm._data.$$state |
| 15539 |
}; |
| 15540 |
|
| 15541 |
prototypeAccessors.state.set = function (v) { |
| 15542 |
if (process.env.NODE_ENV !== 'production') { |
| 15543 |
assert(false, "Use store.replaceState() to explicit replace store state."); |
| 15544 |
} |
| 15545 |
}; |
| 15546 |
|
| 15547 |
Store.prototype.commit = function commit (_type, _payload, _options) { |
| 15548 |
var this$1 = this; |
| 15549 |
|
| 15550 |
// check object-style commit |
| 15551 |
var ref = unifyObjectStyle(_type, _payload, _options); |
| 15552 |
var type = ref.type; |
| 15553 |
var payload = ref.payload; |
| 15554 |
var options = ref.options; |
| 15555 |
|
| 15556 |
var mutation = { type: type, payload: payload }; |
| 15557 |
var entry = this._mutations[type]; |
| 15558 |
if (!entry) { |
| 15559 |
if (process.env.NODE_ENV !== 'production') { |
| 15560 |
console.error(("[vuex] unknown mutation type: " + type)); |
| 15561 |
} |
| 15562 |
return |
| 15563 |
} |
| 15564 |
this._withCommit(function () { |
| 15565 |
entry.forEach(function commitIterator (handler) { |
| 15566 |
handler(payload); |
| 15567 |
}); |
| 15568 |
}); |
| 15569 |
this._subscribers.forEach(function (sub) { return sub(mutation, this$1.state); }); |
| 15570 |
|
| 15571 |
if ( |
| 15572 |
process.env.NODE_ENV !== 'production' && |
| 15573 |
options && options.silent |
| 15574 |
) { |
| 15575 |
console.warn( |
| 15576 |
"[vuex] mutation type: " + type + ". Silent option has been removed. " + |
| 15577 |
'Use the filter functionality in the vue-devtools' |
| 15578 |
); |
| 15579 |
} |
| 15580 |
}; |
| 15581 |
|
| 15582 |
Store.prototype.dispatch = function dispatch (_type, _payload) { |
| 15583 |
var this$1 = this; |
| 15584 |
|
| 15585 |
// check object-style dispatch |
| 15586 |
var ref = unifyObjectStyle(_type, _payload); |
| 15587 |
var type = ref.type; |
| 15588 |
var payload = ref.payload; |
| 15589 |
|
| 15590 |
var action = { type: type, payload: payload }; |
| 15591 |
var entry = this._actions[type]; |
| 15592 |
if (!entry) { |
| 15593 |
if (process.env.NODE_ENV !== 'production') { |
| 15594 |
console.error(("[vuex] unknown action type: " + type)); |
| 15595 |
} |
| 15596 |
return |
| 15597 |
} |
| 15598 |
|
| 15599 |
this._actionSubscribers.forEach(function (sub) { return sub(action, this$1.state); }); |
| 15600 |
|
| 15601 |
return entry.length > 1 |
| 15602 |
? Promise.all(entry.map(function (handler) { return handler(payload); })) |
| 15603 |
: entry[0](payload) |
| 15604 |
}; |
| 15605 |
|
| 15606 |
Store.prototype.subscribe = function subscribe (fn) { |
| 15607 |
return genericSubscribe(fn, this._subscribers) |
| 15608 |
}; |
| 15609 |
|
| 15610 |
Store.prototype.subscribeAction = function subscribeAction (fn) { |
| 15611 |
return genericSubscribe(fn, this._actionSubscribers) |
| 15612 |
}; |
| 15613 |
|
| 15614 |
Store.prototype.watch = function watch (getter, cb, options) { |
| 15615 |
var this$1 = this; |
| 15616 |
|
| 15617 |
if (process.env.NODE_ENV !== 'production') { |
| 15618 |
assert(typeof getter === 'function', "store.watch only accepts a function."); |
| 15619 |
} |
| 15620 |
return this._watcherVM.$watch(function () { return getter(this$1.state, this$1.getters); }, cb, options) |
| 15621 |
}; |
| 15622 |
|
| 15623 |
Store.prototype.replaceState = function replaceState (state) { |
| 15624 |
var this$1 = this; |
| 15625 |
|
| 15626 |
this._withCommit(function () { |
| 15627 |
this$1._vm._data.$$state = state; |
| 15628 |
}); |
| 15629 |
}; |
| 15630 |
|
| 15631 |
Store.prototype.registerModule = function registerModule (path, rawModule, options) { |
| 15632 |
if ( options === void 0 ) options = {}; |
| 15633 |
|
| 15634 |
if (typeof path === 'string') { path = [path]; } |
| 15635 |
|
| 15636 |
if (process.env.NODE_ENV !== 'production') { |
| 15637 |
assert(Array.isArray(path), "module path must be a string or an Array."); |
| 15638 |
assert(path.length > 0, 'cannot register the root module by using registerModule.'); |
| 15639 |
} |
| 15640 |
|
| 15641 |
this._modules.register(path, rawModule); |
| 15642 |
installModule(this, this.state, path, this._modules.get(path), options.preserveState); |
| 15643 |
// reset store to update getters... |
| 15644 |
resetStoreVM(this, this.state); |
| 15645 |
}; |
| 15646 |
|
| 15647 |
Store.prototype.unregisterModule = function unregisterModule (path) { |
| 15648 |
var this$1 = this; |
| 15649 |
|
| 15650 |
if (typeof path === 'string') { path = [path]; } |
| 15651 |
|
| 15652 |
if (process.env.NODE_ENV !== 'production') { |
| 15653 |
assert(Array.isArray(path), "module path must be a string or an Array."); |
| 15654 |
} |
| 15655 |
|
| 15656 |
this._modules.unregister(path); |
| 15657 |
this._withCommit(function () { |
| 15658 |
var parentState = getNestedState(this$1.state, path.slice(0, -1)); |
| 15659 |
Vue.delete(parentState, path[path.length - 1]); |
| 15660 |
}); |
| 15661 |
resetStore(this); |
| 15662 |
}; |
| 15663 |
|
| 15664 |
Store.prototype.hotUpdate = function hotUpdate (newOptions) { |
| 15665 |
this._modules.update(newOptions); |
| 15666 |
resetStore(this, true); |
| 15667 |
}; |
| 15668 |
|
| 15669 |
Store.prototype._withCommit = function _withCommit (fn) { |
| 15670 |
var committing = this._committing; |
| 15671 |
this._committing = true; |
| 15672 |
fn(); |
| 15673 |
this._committing = committing; |
| 15674 |
}; |
| 15675 |
|
| 15676 |
Object.defineProperties( Store.prototype, prototypeAccessors ); |
| 15677 |
|
| 15678 |
function genericSubscribe (fn, subs) { |
| 15679 |
if (subs.indexOf(fn) < 0) { |
| 15680 |
subs.push(fn); |
| 15681 |
} |
| 15682 |
return function () { |
| 15683 |
var i = subs.indexOf(fn); |
| 15684 |
if (i > -1) { |
| 15685 |
subs.splice(i, 1); |
| 15686 |
} |
| 15687 |
} |
| 15688 |
} |
| 15689 |
|
| 15690 |
function resetStore (store, hot) { |
| 15691 |
store._actions = Object.create(null); |
| 15692 |
store._mutations = Object.create(null); |
| 15693 |
store._wrappedGetters = Object.create(null); |
| 15694 |
store._modulesNamespaceMap = Object.create(null); |
| 15695 |
var state = store.state; |
| 15696 |
// init all modules |
| 15697 |
installModule(store, state, [], store._modules.root, true); |
| 15698 |
// reset vm |
| 15699 |
resetStoreVM(store, state, hot); |
| 15700 |
} |
| 15701 |
|
| 15702 |
function resetStoreVM (store, state, hot) { |
| 15703 |
var oldVm = store._vm; |
| 15704 |
|
| 15705 |
// bind store public getters |
| 15706 |
store.getters = {}; |
| 15707 |
var wrappedGetters = store._wrappedGetters; |
| 15708 |
var computed = {}; |
| 15709 |
forEachValue(wrappedGetters, function (fn, key) { |
| 15710 |
// use computed to leverage its lazy-caching mechanism |
| 15711 |
computed[key] = function () { return fn(store); }; |
| 15712 |
Object.defineProperty(store.getters, key, { |
| 15713 |
get: function () { return store._vm[key]; }, |
| 15714 |
enumerable: true // for local getters |
| 15715 |
}); |
| 15716 |
}); |
| 15717 |
|
| 15718 |
// use a Vue instance to store the state tree |
| 15719 |
// suppress warnings just in case the user has added |
| 15720 |
// some funky global mixins |
| 15721 |
var silent = Vue.config.silent; |
| 15722 |
Vue.config.silent = true; |
| 15723 |
store._vm = new Vue({ |
| 15724 |
data: { |
| 15725 |
$$state: state |
| 15726 |
}, |
| 15727 |
computed: computed |
| 15728 |
}); |
| 15729 |
Vue.config.silent = silent; |
| 15730 |
|
| 15731 |
// enable strict mode for new vm |
| 15732 |
if (store.strict) { |
| 15733 |
enableStrictMode(store); |
| 15734 |
} |
| 15735 |
|
| 15736 |
if (oldVm) { |
| 15737 |
if (hot) { |
| 15738 |
// dispatch changes in all subscribed watchers |
| 15739 |
// to force getter re-evaluation for hot reloading. |
| 15740 |
store._withCommit(function () { |
| 15741 |
oldVm._data.$$state = null; |
| 15742 |
}); |
| 15743 |
} |
| 15744 |
Vue.nextTick(function () { return oldVm.$destroy(); }); |
| 15745 |
} |
| 15746 |
} |
| 15747 |
|
| 15748 |
function installModule (store, rootState, path, module, hot) { |
| 15749 |
var isRoot = !path.length; |
| 15750 |
var namespace = store._modules.getNamespace(path); |
| 15751 |
|
| 15752 |
// register in namespace map |
| 15753 |
if (module.namespaced) { |
| 15754 |
store._modulesNamespaceMap[namespace] = module; |
| 15755 |
} |
| 15756 |
|
| 15757 |
// set state |
| 15758 |
if (!isRoot && !hot) { |
| 15759 |
var parentState = getNestedState(rootState, path.slice(0, -1)); |
| 15760 |
var moduleName = path[path.length - 1]; |
| 15761 |
store._withCommit(function () { |
| 15762 |
Vue.set(parentState, moduleName, module.state); |
| 15763 |
}); |
| 15764 |
} |
| 15765 |
|
| 15766 |
var local = module.context = makeLocalContext(store, namespace, path); |
| 15767 |
|
| 15768 |
module.forEachMutation(function (mutation, key) { |
| 15769 |
var namespacedType = namespace + key; |
| 15770 |
registerMutation(store, namespacedType, mutation, local); |
| 15771 |
}); |
| 15772 |
|
| 15773 |
module.forEachAction(function (action, key) { |
| 15774 |
var type = action.root ? key : namespace + key; |
| 15775 |
var handler = action.handler || action; |
| 15776 |
registerAction(store, type, handler, local); |
| 15777 |
}); |
| 15778 |
|
| 15779 |
module.forEachGetter(function (getter, key) { |
| 15780 |
var namespacedType = namespace + key; |
| 15781 |
registerGetter(store, namespacedType, getter, local); |
| 15782 |
}); |
| 15783 |
|
| 15784 |
module.forEachChild(function (child, key) { |
| 15785 |
installModule(store, rootState, path.concat(key), child, hot); |
| 15786 |
}); |
| 15787 |
} |
| 15788 |
|
| 15789 |
/** |
| 15790 |
* make localized dispatch, commit, getters and state |
| 15791 |
* if there is no namespace, just use root ones |
| 15792 |
*/ |
| 15793 |
function makeLocalContext (store, namespace, path) { |
| 15794 |
var noNamespace = namespace === ''; |
| 15795 |
|
| 15796 |
var local = { |
| 15797 |
dispatch: noNamespace ? store.dispatch : function (_type, _payload, _options) { |
| 15798 |
var args = unifyObjectStyle(_type, _payload, _options); |
| 15799 |
var payload = args.payload; |
| 15800 |
var options = args.options; |
| 15801 |
var type = args.type; |
| 15802 |
|
| 15803 |
if (!options || !options.root) { |
| 15804 |
type = namespace + type; |
| 15805 |
if (process.env.NODE_ENV !== 'production' && !store._actions[type]) { |
| 15806 |
console.error(("[vuex] unknown local action type: " + (args.type) + ", global type: " + type)); |
| 15807 |
return |
| 15808 |
} |
| 15809 |
} |
| 15810 |
|
| 15811 |
return store.dispatch(type, payload) |
| 15812 |
}, |
| 15813 |
|
| 15814 |
commit: noNamespace ? store.commit : function (_type, _payload, _options) { |
| 15815 |
var args = unifyObjectStyle(_type, _payload, _options); |
| 15816 |
var payload = args.payload; |
| 15817 |
var options = args.options; |
| 15818 |
var type = args.type; |
| 15819 |
|
| 15820 |
if (!options || !options.root) { |
| 15821 |
type = namespace + type; |
| 15822 |
if (process.env.NODE_ENV !== 'production' && !store._mutations[type]) { |
| 15823 |
console.error(("[vuex] unknown local mutation type: " + (args.type) + ", global type: " + type)); |
| 15824 |
return |
| 15825 |
} |
| 15826 |
} |
| 15827 |
|
| 15828 |
store.commit(type, payload, options); |
| 15829 |
} |
| 15830 |
}; |
| 15831 |
|
| 15832 |
// getters and state object must be gotten lazily |
| 15833 |
// because they will be changed by vm update |
| 15834 |
Object.defineProperties(local, { |
| 15835 |
getters: { |
| 15836 |
get: noNamespace |
| 15837 |
? function () { return store.getters; } |
| 15838 |
: function () { return makeLocalGetters(store, namespace); } |
| 15839 |
}, |
| 15840 |
state: { |
| 15841 |
get: function () { return getNestedState(store.state, path); } |
| 15842 |
} |
| 15843 |
}); |
| 15844 |
|
| 15845 |
return local |
| 15846 |
} |
| 15847 |
|
| 15848 |
function makeLocalGetters (store, namespace) { |
| 15849 |
var gettersProxy = {}; |
| 15850 |
|
| 15851 |
var splitPos = namespace.length; |
| 15852 |
Object.keys(store.getters).forEach(function (type) { |
| 15853 |
// skip if the target getter is not match this namespace |
| 15854 |
if (type.slice(0, splitPos) !== namespace) { return } |
| 15855 |
|
| 15856 |
// extract local getter type |
| 15857 |
var localType = type.slice(splitPos); |
| 15858 |
|
| 15859 |
// Add a port to the getters proxy. |
| 15860 |
// Define as getter property because |
| 15861 |
// we do not want to evaluate the getters in this time. |
| 15862 |
Object.defineProperty(gettersProxy, localType, { |
| 15863 |
get: function () { return store.getters[type]; }, |
| 15864 |
enumerable: true |
| 15865 |
}); |
| 15866 |
}); |
| 15867 |
|
| 15868 |
return gettersProxy |
| 15869 |
} |
| 15870 |
|
| 15871 |
function registerMutation (store, type, handler, local) { |
| 15872 |
var entry = store._mutations[type] || (store._mutations[type] = []); |
| 15873 |
entry.push(function wrappedMutationHandler (payload) { |
| 15874 |
handler.call(store, local.state, payload); |
| 15875 |
}); |
| 15876 |
} |
| 15877 |
|
| 15878 |
function registerAction (store, type, handler, local) { |
| 15879 |
var entry = store._actions[type] || (store._actions[type] = []); |
| 15880 |
entry.push(function wrappedActionHandler (payload, cb) { |
| 15881 |
var res = handler.call(store, { |
| 15882 |
dispatch: local.dispatch, |
| 15883 |
commit: local.commit, |
| 15884 |
getters: local.getters, |
| 15885 |
state: local.state, |
| 15886 |
rootGetters: store.getters, |
| 15887 |
rootState: store.state |
| 15888 |
}, payload, cb); |
| 15889 |
if (!isPromise(res)) { |
| 15890 |
res = Promise.resolve(res); |
| 15891 |
} |
| 15892 |
if (store._devtoolHook) { |
| 15893 |
return res.catch(function (err) { |
| 15894 |
store._devtoolHook.emit('vuex:error', err); |
| 15895 |
throw err |
| 15896 |
}) |
| 15897 |
} else { |
| 15898 |
return res |
| 15899 |
} |
| 15900 |
}); |
| 15901 |
} |
| 15902 |
|
| 15903 |
function registerGetter (store, type, rawGetter, local) { |
| 15904 |
if (store._wrappedGetters[type]) { |
| 15905 |
if (process.env.NODE_ENV !== 'production') { |
| 15906 |
console.error(("[vuex] duplicate getter key: " + type)); |
| 15907 |
} |
| 15908 |
return |
| 15909 |
} |
| 15910 |
store._wrappedGetters[type] = function wrappedGetter (store) { |
| 15911 |
return rawGetter( |
| 15912 |
local.state, // local state |
| 15913 |
local.getters, // local getters |
| 15914 |
store.state, // root state |
| 15915 |
store.getters // root getters |
| 15916 |
) |
| 15917 |
}; |
| 15918 |
} |
| 15919 |
|
| 15920 |
function enableStrictMode (store) { |
| 15921 |
store._vm.$watch(function () { return this._data.$$state }, function () { |
| 15922 |
if (process.env.NODE_ENV !== 'production') { |
| 15923 |
assert(store._committing, "Do not mutate vuex store state outside mutation handlers."); |
| 15924 |
} |
| 15925 |
}, { deep: true, sync: true }); |
| 15926 |
} |
| 15927 |
|
| 15928 |
function getNestedState (state, path) { |
| 15929 |
return path.length |
| 15930 |
? path.reduce(function (state, key) { return state[key]; }, state) |
| 15931 |
: state |
| 15932 |
} |
| 15933 |
|
| 15934 |
function unifyObjectStyle (type, payload, options) { |
| 15935 |
if (isObject(type) && type.type) { |
| 15936 |
options = payload; |
| 15937 |
payload = type; |
| 15938 |
type = type.type; |
| 15939 |
} |
| 15940 |
|
| 15941 |
if (process.env.NODE_ENV !== 'production') { |
| 15942 |
assert(typeof type === 'string', ("Expects string as the type, but found " + (typeof type) + ".")); |
| 15943 |
} |
| 15944 |
|
| 15945 |
return { type: type, payload: payload, options: options } |
| 15946 |
} |
| 15947 |
|
| 15948 |
function install (_Vue) { |
| 15949 |
if (Vue && _Vue === Vue) { |
| 15950 |
if (process.env.NODE_ENV !== 'production') { |
| 15951 |
console.error( |
| 15952 |
'[vuex] already installed. Vue.use(Vuex) should be called only once.' |
| 15953 |
); |
| 15954 |
} |
| 15955 |
return |
| 15956 |
} |
| 15957 |
Vue = _Vue; |
| 15958 |
applyMixin(Vue); |
| 15959 |
} |
| 15960 |
|
| 15961 |
var mapState = normalizeNamespace(function (namespace, states) { |
| 15962 |
var res = {}; |
| 15963 |
normalizeMap(states).forEach(function (ref) { |
| 15964 |
var key = ref.key; |
| 15965 |
var val = ref.val; |
| 15966 |
|
| 15967 |
res[key] = function mappedState () { |
| 15968 |
var state = this.$store.state; |
| 15969 |
var getters = this.$store.getters; |
| 15970 |
if (namespace) { |
| 15971 |
var module = getModuleByNamespace(this.$store, 'mapState', namespace); |
| 15972 |
if (!module) { |
| 15973 |
return |
| 15974 |
} |
| 15975 |
state = module.context.state; |
| 15976 |
getters = module.context.getters; |
| 15977 |
} |
| 15978 |
return typeof val === 'function' |
| 15979 |
? val.call(this, state, getters) |
| 15980 |
: state[val] |
| 15981 |
}; |
| 15982 |
// mark vuex getter for devtools |
| 15983 |
res[key].vuex = true; |
| 15984 |
}); |
| 15985 |
return res |
| 15986 |
}); |
| 15987 |
|
| 15988 |
var mapMutations = normalizeNamespace(function (namespace, mutations) { |
| 15989 |
var res = {}; |
| 15990 |
normalizeMap(mutations).forEach(function (ref) { |
| 15991 |
var key = ref.key; |
| 15992 |
var val = ref.val; |
| 15993 |
|
| 15994 |
res[key] = function mappedMutation () { |
| 15995 |
var args = [], len = arguments.length; |
| 15996 |
while ( len-- ) args[ len ] = arguments[ len ]; |
| 15997 |
|
| 15998 |
var commit = this.$store.commit; |
| 15999 |
if (namespace) { |
| 16000 |
var module = getModuleByNamespace(this.$store, 'mapMutations', namespace); |
| 16001 |
if (!module) { |
| 16002 |
return |
| 16003 |
} |
| 16004 |
commit = module.context.commit; |
| 16005 |
} |
| 16006 |
return typeof val === 'function' |
| 16007 |
? val.apply(this, [commit].concat(args)) |
| 16008 |
: commit.apply(this.$store, [val].concat(args)) |
| 16009 |
}; |
| 16010 |
}); |
| 16011 |
return res |
| 16012 |
}); |
| 16013 |
|
| 16014 |
var mapGetters = normalizeNamespace(function (namespace, getters) { |
| 16015 |
var res = {}; |
| 16016 |
normalizeMap(getters).forEach(function (ref) { |
| 16017 |
var key = ref.key; |
| 16018 |
var val = ref.val; |
| 16019 |
|
| 16020 |
val = namespace + val; |
| 16021 |
res[key] = function mappedGetter () { |
| 16022 |
if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) { |
| 16023 |
return |
| 16024 |
} |
| 16025 |
if (process.env.NODE_ENV !== 'production' && !(val in this.$store.getters)) { |
| 16026 |
console.error(("[vuex] unknown getter: " + val)); |
| 16027 |
return |
| 16028 |
} |
| 16029 |
return this.$store.getters[val] |
| 16030 |
}; |
| 16031 |
// mark vuex getter for devtools |
| 16032 |
res[key].vuex = true; |
| 16033 |
}); |
| 16034 |
return res |
| 16035 |
}); |
| 16036 |
|
| 16037 |
var mapActions = normalizeNamespace(function (namespace, actions) { |
| 16038 |
var res = {}; |
| 16039 |
normalizeMap(actions).forEach(function (ref) { |
| 16040 |
var key = ref.key; |
| 16041 |
var val = ref.val; |
| 16042 |
|
| 16043 |
res[key] = function mappedAction () { |
| 16044 |
var args = [], len = arguments.length; |
| 16045 |
while ( len-- ) args[ len ] = arguments[ len ]; |
| 16046 |
|
| 16047 |
var dispatch = this.$store.dispatch; |
| 16048 |
if (namespace) { |
| 16049 |
var module = getModuleByNamespace(this.$store, 'mapActions', namespace); |
| 16050 |
if (!module) { |
| 16051 |
return |
| 16052 |
} |
| 16053 |
dispatch = module.context.dispatch; |
| 16054 |
} |
| 16055 |
return typeof val === 'function' |
| 16056 |
? val.apply(this, [dispatch].concat(args)) |
| 16057 |
: dispatch.apply(this.$store, [val].concat(args)) |
| 16058 |
}; |
| 16059 |
}); |
| 16060 |
return res |
| 16061 |
}); |
| 16062 |
|
| 16063 |
var createNamespacedHelpers = function (namespace) { return ({ |
| 16064 |
mapState: mapState.bind(null, namespace), |
| 16065 |
mapGetters: mapGetters.bind(null, namespace), |
| 16066 |
mapMutations: mapMutations.bind(null, namespace), |
| 16067 |
mapActions: mapActions.bind(null, namespace) |
| 16068 |
}); }; |
| 16069 |
|
| 16070 |
function normalizeMap (map) { |
| 16071 |
return Array.isArray(map) |
| 16072 |
? map.map(function (key) { return ({ key: key, val: key }); }) |
| 16073 |
: Object.keys(map).map(function (key) { return ({ key: key, val: map[key] }); }) |
| 16074 |
} |
| 16075 |
|
| 16076 |
function normalizeNamespace (fn) { |
| 16077 |
return function (namespace, map) { |
| 16078 |
if (typeof namespace !== 'string') { |
| 16079 |
map = namespace; |
| 16080 |
namespace = ''; |
| 16081 |
} else if (namespace.charAt(namespace.length - 1) !== '/') { |
| 16082 |
namespace += '/'; |
| 16083 |
} |
| 16084 |
return fn(namespace, map) |
| 16085 |
} |
| 16086 |
} |
| 16087 |
|
| 16088 |
function getModuleByNamespace (store, helper, namespace) { |
| 16089 |
var module = store._modulesNamespaceMap[namespace]; |
| 16090 |
if (process.env.NODE_ENV !== 'production' && !module) { |
| 16091 |
console.error(("[vuex] module namespace not found in " + helper + "(): " + namespace)); |
| 16092 |
} |
| 16093 |
return module |
| 16094 |
} |
| 16095 |
|
| 16096 |
var index_esm = { |
| 16097 |
Store: Store, |
| 16098 |
install: install, |
| 16099 |
version: '2.5.0', |
| 16100 |
mapState: mapState, |
| 16101 |
mapMutations: mapMutations, |
| 16102 |
mapGetters: mapGetters, |
| 16103 |
mapActions: mapActions, |
| 16104 |
createNamespacedHelpers: createNamespacedHelpers |
| 16105 |
}; |
| 16106 |
|
| 16107 |
|
| 16108 |
/* harmony default export */ __webpack_exports__["default"] = (index_esm); |
| 16109 |
|
| 16110 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(4))) |
| 16111 |
|
| 16112 |
/***/ }), |
| 16113 |
/* 49 */ |
| 16114 |
/***/ (function(module, exports) { |
| 16115 |
|
| 16116 |
/* (ignored) */ |
| 16117 |
|
| 16118 |
/***/ }), |
| 16119 |
/* 50 */ |
| 16120 |
/***/ (function(module, exports, __webpack_require__) { |
| 16121 |
|
| 16122 |
"use strict"; |
| 16123 |
|
| 16124 |
|
| 16125 |
Object.defineProperty(exports, "__esModule", { |
| 16126 |
value: true |
| 16127 |
}); |
| 16128 |
/* jshint esversion: 6 */ |
| 16129 |
var toggleLoading = function toggleLoading(state, data) { |
| 16130 |
state.loading = data; |
| 16131 |
}; |
| 16132 |
var toggleConnecting = function toggleConnecting(state, data) { |
| 16133 |
state.isConnecting = data; |
| 16134 |
}; |
| 16135 |
var toggleKeyValidity = function toggleKeyValidity(state, data) { |
| 16136 |
state.apiKeyValidity = data; |
| 16137 |
}; |
| 16138 |
var toggleConnectedToOptml = function toggleConnectedToOptml(state, data) { |
| 16139 |
state.connected = data; |
| 16140 |
}; |
| 16141 |
var updateUserData = function updateUserData(state, data) { |
| 16142 |
state.userData = data; |
| 16143 |
}; |
| 16144 |
var updateApiKey = function updateApiKey(state, data) { |
| 16145 |
state.apiKey = data; |
| 16146 |
}; |
| 16147 |
var updateOptimizedImages = function updateOptimizedImages(state, data) { |
| 16148 |
state.optimizedImages = data.body.data; |
| 16149 |
}; |
| 16150 |
var updateSampleRate = function updateSampleRate(state, data) { |
| 16151 |
state.sample_rate = data; |
| 16152 |
}; |
| 16153 |
|
| 16154 |
exports.default = { |
| 16155 |
toggleLoading: toggleLoading, |
| 16156 |
toggleConnecting: toggleConnecting, |
| 16157 |
toggleKeyValidity: toggleKeyValidity, |
| 16158 |
toggleConnectedToOptml: toggleConnectedToOptml, |
| 16159 |
updateUserData: updateUserData, |
| 16160 |
updateApiKey: updateApiKey, |
| 16161 |
updateSampleRate: updateSampleRate, |
| 16162 |
updateOptimizedImages: updateOptimizedImages |
| 16163 |
}; |
| 16164 |
|
| 16165 |
/***/ }), |
| 16166 |
/* 51 */ |
| 16167 |
/***/ (function(module, exports, __webpack_require__) { |
| 16168 |
|
| 16169 |
"use strict"; |
| 16170 |
|
| 16171 |
|
| 16172 |
Object.defineProperty(exports, "__esModule", { |
| 16173 |
value: true |
| 16174 |
}); |
| 16175 |
|
| 16176 |
var _vue = __webpack_require__(2); |
| 16177 |
|
| 16178 |
var _vue2 = _interopRequireDefault(_vue); |
| 16179 |
|
| 16180 |
var _vueResource = __webpack_require__(6); |
| 16181 |
|
| 16182 |
var _vueResource2 = _interopRequireDefault(_vueResource); |
| 16183 |
|
| 16184 |
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } |
| 16185 |
|
| 16186 |
/* jshint esversion: 6 */ |
| 16187 |
/* global optimoleDashboardApp */ |
| 16188 |
_vue2.default.use(_vueResource2.default); |
| 16189 |
|
| 16190 |
var connectOptimole = function connectOptimole(_ref, data) { |
| 16191 |
var commit = _ref.commit, |
| 16192 |
state = _ref.state; |
| 16193 |
|
| 16194 |
commit('toggleConnecting', true); |
| 16195 |
_vue2.default.http({ |
| 16196 |
url: optimoleDashboardApp.root + '/connect', |
| 16197 |
method: 'POST', |
| 16198 |
headers: { 'X-WP-Nonce': optimoleDashboardApp.nonce }, |
| 16199 |
params: { 'req': data.req }, |
| 16200 |
body: { |
| 16201 |
'api_key': data.apiKey |
| 16202 |
}, |
| 16203 |
responseType: 'json' |
| 16204 |
}).then(function (response) { |
| 16205 |
commit('toggleConnecting', false); |
| 16206 |
if (response.body.code === 'success') { |
| 16207 |
commit('toggleKeyValidity', true); |
| 16208 |
commit('toggleConnectedToOptml', true); |
| 16209 |
commit('updateApiKey', data.apiKey); |
| 16210 |
commit('updateUserData', response.body.data); |
| 16211 |
console.log('%c OptiMole API connection successful.', 'color: #59B278'); |
| 16212 |
} else { |
| 16213 |
commit('toggleKeyValidity', false); |
| 16214 |
console.log('%c Invalid API Key.', 'color: #E7602A'); |
| 16215 |
} |
| 16216 |
}); |
| 16217 |
}; |
| 16218 |
|
| 16219 |
var registerOptimole = function registerOptimole(_ref2, data) { |
| 16220 |
var commit = _ref2.commit, |
| 16221 |
state = _ref2.state; |
| 16222 |
|
| 16223 |
|
| 16224 |
commit('toggleLoading', true); |
| 16225 |
return _vue2.default.http({ |
| 16226 |
url: optimoleDashboardApp.root + '/register', |
| 16227 |
method: 'POST', |
| 16228 |
headers: { 'X-WP-Nonce': optimoleDashboardApp.nonce }, |
| 16229 |
params: { 'req': data.req }, |
| 16230 |
body: { |
| 16231 |
'email': data.email |
| 16232 |
}, |
| 16233 |
responseType: 'json' |
| 16234 |
}).then(function (response) { |
| 16235 |
commit('toggleLoading', false); |
| 16236 |
return response.data; |
| 16237 |
}, function (response) { |
| 16238 |
commit('toggleLoading', false); |
| 16239 |
return response.data; |
| 16240 |
}); |
| 16241 |
}; |
| 16242 |
|
| 16243 |
var disconnectOptimole = function disconnectOptimole(_ref3, data) { |
| 16244 |
var commit = _ref3.commit, |
| 16245 |
state = _ref3.state; |
| 16246 |
|
| 16247 |
commit('toggleLoading', true, 'loading'); |
| 16248 |
_vue2.default.http({ |
| 16249 |
url: optimoleDashboardApp.root + '/disconnect', |
| 16250 |
method: 'GET', |
| 16251 |
headers: { 'X-WP-Nonce': optimoleDashboardApp.nonce }, |
| 16252 |
params: { 'req': data.req }, |
| 16253 |
responseType: 'json' |
| 16254 |
}).then(function (response) { |
| 16255 |
commit('updateUserData', null); |
| 16256 |
commit('toggleLoading', false); |
| 16257 |
commit('updateApiKey', ''); |
| 16258 |
if (response.ok) { |
| 16259 |
commit('toggleConnectedToOptml', false); |
| 16260 |
console.log('%c Disconnected from OptiMole API.', 'color: #59B278'); |
| 16261 |
} else { |
| 16262 |
console.error(response); |
| 16263 |
} |
| 16264 |
}); |
| 16265 |
}; |
| 16266 |
|
| 16267 |
var updateSetting = function updateSetting(_ref4, data) { |
| 16268 |
var commit = _ref4.commit, |
| 16269 |
state = _ref4.state; |
| 16270 |
|
| 16271 |
|
| 16272 |
return _vue2.default.http({ |
| 16273 |
url: optimoleDashboardApp.root + '/update_option', |
| 16274 |
method: 'POST', |
| 16275 |
headers: { 'X-WP-Nonce': optimoleDashboardApp.nonce }, |
| 16276 |
params: { |
| 16277 |
'req': data.req, |
| 16278 |
'option_key': data.option_key, |
| 16279 |
'option_value': data.option_value ? data.option_value : null, |
| 16280 |
'type': data.type ? data.type : '' |
| 16281 |
}, |
| 16282 |
responseType: 'json' |
| 16283 |
}); |
| 16284 |
}; |
| 16285 |
var sampleRate = function sampleRate(_ref5, data) { |
| 16286 |
var commit = _ref5.commit, |
| 16287 |
state = _ref5.state; |
| 16288 |
|
| 16289 |
|
| 16290 |
data.component.loading_images = true; |
| 16291 |
return _vue2.default.http({ |
| 16292 |
url: optimoleDashboardApp.root + '/images-sample-rate', |
| 16293 |
method: 'POST', |
| 16294 |
headers: { 'X-WP-Nonce': optimoleDashboardApp.nonce }, |
| 16295 |
params: { |
| 16296 |
'quality': data.quality |
| 16297 |
}, |
| 16298 |
responseType: 'json' |
| 16299 |
}).then(function (response) { |
| 16300 |
|
| 16301 |
data.component.loading_images = false; |
| 16302 |
if (response.body.code === 'success') { |
| 16303 |
commit('updateSampleRate', response.body.data); |
| 16304 |
} |
| 16305 |
}); |
| 16306 |
}; |
| 16307 |
|
| 16308 |
var retrieveOptimizedImages = function retrieveOptimizedImages(_ref6, data) { |
| 16309 |
var commit = _ref6.commit, |
| 16310 |
state = _ref6.state; |
| 16311 |
|
| 16312 |
var self = this; |
| 16313 |
|
| 16314 |
setTimeout(function () { |
| 16315 |
|
| 16316 |
if (self.state.optimizedImages.length > 0) { |
| 16317 |
console.log('%c Images already exsist.', 'color: #59B278'); |
| 16318 |
return false; |
| 16319 |
} |
| 16320 |
_vue2.default.http({ |
| 16321 |
url: optimoleDashboardApp.root + '/poll_optimized_images', |
| 16322 |
method: 'GET', |
| 16323 |
headers: { 'X-WP-Nonce': optimoleDashboardApp.nonce }, |
| 16324 |
params: { 'req': 'Get Optimized Images' }, |
| 16325 |
responseType: 'json', |
| 16326 |
timeout: 10000 |
| 16327 |
}).then(function (response) { |
| 16328 |
if (response.body.code === 'success') { |
| 16329 |
commit('updateOptimizedImages', response); |
| 16330 |
if (data.component !== null) { |
| 16331 |
data.component.loading = false; |
| 16332 |
data.component.startTime = data.component.maxTime; |
| 16333 |
if (response.body.data.length === 0) { |
| 16334 |
data.component.noImages = true; |
| 16335 |
} |
| 16336 |
} |
| 16337 |
console.log('%c Images Fetched.', 'color: #59B278'); |
| 16338 |
} else { |
| 16339 |
component.noImages = true; |
| 16340 |
data.component.loading = false; |
| 16341 |
console.log('%c No images available.', 'color: #E7602A'); |
| 16342 |
} |
| 16343 |
}); |
| 16344 |
}, data.waitTime); |
| 16345 |
}; |
| 16346 |
|
| 16347 |
exports.default = { |
| 16348 |
connectOptimole: connectOptimole, |
| 16349 |
registerOptimole: registerOptimole, |
| 16350 |
disconnectOptimole: disconnectOptimole, |
| 16351 |
updateSetting: updateSetting, |
| 16352 |
sampleRate: sampleRate, |
| 16353 |
retrieveOptimizedImages: retrieveOptimizedImages |
| 16354 |
}; |
| 16355 |
|
| 16356 |
/***/ }), |
| 16357 |
/* 52 */ |
| 16358 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
| 16359 |
|
| 16360 |
"use strict"; |
| 16361 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); |
| 16362 |
/* WEBPACK VAR INJECTION */(function(global) {/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "install", function() { return install; }); |
| 16363 |
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "ResizeObserver", function() { return ResizeObserver; }); |
| 16364 |
function getInternetExplorerVersion() { |
| 16365 |
var ua = window.navigator.userAgent; |
| 16366 |
|
| 16367 |
var msie = ua.indexOf('MSIE '); |
| 16368 |
if (msie > 0) { |
| 16369 |
// IE 10 or older => return version number |
| 16370 |
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); |
| 16371 |
} |
| 16372 |
|
| 16373 |
var trident = ua.indexOf('Trident/'); |
| 16374 |
if (trident > 0) { |
| 16375 |
// IE 11 => return version number |
| 16376 |
var rv = ua.indexOf('rv:'); |
| 16377 |
return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); |
| 16378 |
} |
| 16379 |
|
| 16380 |
var edge = ua.indexOf('Edge/'); |
| 16381 |
if (edge > 0) { |
| 16382 |
// Edge (IE 12+) => return version number |
| 16383 |
return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); |
| 16384 |
} |
| 16385 |
|
| 16386 |
// other browser |
| 16387 |
return -1; |
| 16388 |
} |
| 16389 |
|
| 16390 |
var isIE = void 0; |
| 16391 |
|
| 16392 |
function initCompat() { |
| 16393 |
if (!initCompat.init) { |
| 16394 |
initCompat.init = true; |
| 16395 |
isIE = getInternetExplorerVersion() !== -1; |
| 16396 |
} |
| 16397 |
} |
| 16398 |
|
| 16399 |
var ResizeObserver = { render: function render() { |
| 16400 |
var _vm = this;var _h = _vm.$createElement;var _c = _vm._self._c || _h;return _c('div', { staticClass: "resize-observer", attrs: { "tabindex": "-1" } }); |
| 16401 |
}, staticRenderFns: [], _scopeId: 'data-v-b329ee4c', |
| 16402 |
name: 'resize-observer', |
| 16403 |
|
| 16404 |
methods: { |
| 16405 |
notify: function notify() { |
| 16406 |
this.$emit('notify'); |
| 16407 |
}, |
| 16408 |
addResizeHandlers: function addResizeHandlers() { |
| 16409 |
this._resizeObject.contentDocument.defaultView.addEventListener('resize', this.notify); |
| 16410 |
if (this._w !== this.$el.offsetWidth || this._h !== this.$el.offsetHeight) { |
| 16411 |
this.notify(); |
| 16412 |
} |
| 16413 |
}, |
| 16414 |
removeResizeHandlers: function removeResizeHandlers() { |
| 16415 |
if (this._resizeObject && this._resizeObject.onload) { |
| 16416 |
if (!isIE && this._resizeObject.contentDocument) { |
| 16417 |
this._resizeObject.contentDocument.defaultView.removeEventListener('resize', this.notify); |
| 16418 |
} |
| 16419 |
delete this._resizeObject.onload; |
| 16420 |
} |
| 16421 |
} |
| 16422 |
}, |
| 16423 |
|
| 16424 |
mounted: function mounted() { |
| 16425 |
var _this = this; |
| 16426 |
|
| 16427 |
initCompat(); |
| 16428 |
this.$nextTick(function () { |
| 16429 |
_this._w = _this.$el.offsetWidth; |
| 16430 |
_this._h = _this.$el.offsetHeight; |
| 16431 |
}); |
| 16432 |
var object = document.createElement('object'); |
| 16433 |
this._resizeObject = object; |
| 16434 |
object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;'); |
| 16435 |
object.setAttribute('aria-hidden', 'true'); |
| 16436 |
object.setAttribute('tabindex', -1); |
| 16437 |
object.onload = this.addResizeHandlers; |
| 16438 |
object.type = 'text/html'; |
| 16439 |
if (isIE) { |
| 16440 |
this.$el.appendChild(object); |
| 16441 |
} |
| 16442 |
object.data = 'about:blank'; |
| 16443 |
if (!isIE) { |
| 16444 |
this.$el.appendChild(object); |
| 16445 |
} |
| 16446 |
}, |
| 16447 |
beforeDestroy: function beforeDestroy() { |
| 16448 |
this.removeResizeHandlers(); |
| 16449 |
} |
| 16450 |
}; |
| 16451 |
|
| 16452 |
// Install the components |
| 16453 |
function install(Vue) { |
| 16454 |
Vue.component('resize-observer', ResizeObserver); |
| 16455 |
/* -- Add more components here -- */ |
| 16456 |
} |
| 16457 |
|
| 16458 |
/* -- Plugin definition & Auto-install -- */ |
| 16459 |
/* You shouldn't have to modify the code below */ |
| 16460 |
|
| 16461 |
// Plugin |
| 16462 |
var plugin = { |
| 16463 |
// eslint-disable-next-line no-undef |
| 16464 |
version: "0.4.4", |
| 16465 |
install: install |
| 16466 |
}; |
| 16467 |
|
| 16468 |
// Auto-install |
| 16469 |
var GlobalVue = null; |
| 16470 |
if (typeof window !== 'undefined') { |
| 16471 |
GlobalVue = window.Vue; |
| 16472 |
} else if (typeof global !== 'undefined') { |
| 16473 |
GlobalVue = global.Vue; |
| 16474 |
} |
| 16475 |
if (GlobalVue) { |
| 16476 |
GlobalVue.use(plugin); |
| 16477 |
} |
| 16478 |
|
| 16479 |
|
| 16480 |
/* harmony default export */ __webpack_exports__["default"] = (plugin); |
| 16481 |
|
| 16482 |
/* WEBPACK VAR INJECTION */}.call(__webpack_exports__, __webpack_require__(3))) |
| 16483 |
|
| 16484 |
/***/ }), |
| 16485 |
/* 53 */ |
| 16486 |
/***/ (function(module, exports, __webpack_require__) { |
| 16487 |
|
| 16488 |
(function webpackUniversalModuleDefinition(root, factory) { |
| 16489 |
if(true) |
| 16490 |
module.exports = factory(__webpack_require__(2)); |
| 16491 |
else if(typeof define === 'function' && define.amd) |
| 16492 |
define(["vue"], factory); |
| 16493 |
else if(typeof exports === 'object') |
| 16494 |
exports["vue-js-toggle-button"] = factory(require("vue")); |
| 16495 |
else |
| 16496 |
root["vue-js-toggle-button"] = factory(root["vue"]); |
| 16497 |
})(this, function(__WEBPACK_EXTERNAL_MODULE_1__) { |
| 16498 |
return /******/ (function(modules) { // webpackBootstrap |
| 16499 |
/******/ // The module cache |
| 16500 |
/******/ var installedModules = {}; |
| 16501 |
/******/ |
| 16502 |
/******/ // The require function |
| 16503 |
/******/ function __webpack_require__(moduleId) { |
| 16504 |
/******/ |
| 16505 |
/******/ // Check if module is in cache |
| 16506 |
/******/ if(installedModules[moduleId]) { |
| 16507 |
/******/ return installedModules[moduleId].exports; |
| 16508 |
/******/ } |
| 16509 |
/******/ // Create a new module (and put it into the cache) |
| 16510 |
/******/ var module = installedModules[moduleId] = { |
| 16511 |
/******/ i: moduleId, |
| 16512 |
/******/ l: false, |
| 16513 |
/******/ exports: {} |
| 16514 |
/******/ }; |
| 16515 |
/******/ |
| 16516 |
/******/ // Execute the module function |
| 16517 |
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); |
| 16518 |
/******/ |
| 16519 |
/******/ // Flag the module as loaded |
| 16520 |
/******/ module.l = true; |
| 16521 |
/******/ |
| 16522 |
/******/ // Return the exports of the module |
| 16523 |
/******/ return module.exports; |
| 16524 |
/******/ } |
| 16525 |
/******/ |
| 16526 |
/******/ |
| 16527 |
/******/ // expose the modules object (__webpack_modules__) |
| 16528 |
/******/ __webpack_require__.m = modules; |
| 16529 |
/******/ |
| 16530 |
/******/ // expose the module cache |
| 16531 |
/******/ __webpack_require__.c = installedModules; |
| 16532 |
/******/ |
| 16533 |
/******/ // identity function for calling harmony imports with the correct context |
| 16534 |
/******/ __webpack_require__.i = function(value) { return value; }; |
| 16535 |
/******/ |
| 16536 |
/******/ // define getter function for harmony exports |
| 16537 |
/******/ __webpack_require__.d = function(exports, name, getter) { |
| 16538 |
/******/ if(!__webpack_require__.o(exports, name)) { |
| 16539 |
/******/ Object.defineProperty(exports, name, { |
| 16540 |
/******/ configurable: false, |
| 16541 |
/******/ enumerable: true, |
| 16542 |
/******/ get: getter |
| 16543 |
/******/ }); |
| 16544 |
/******/ } |
| 16545 |
/******/ }; |
| 16546 |
/******/ |
| 16547 |
/******/ // getDefaultExport function for compatibility with non-harmony modules |
| 16548 |
/******/ __webpack_require__.n = function(module) { |
| 16549 |
/******/ var getter = module && module.__esModule ? |
| 16550 |
/******/ function getDefault() { return module['default']; } : |
| 16551 |
/******/ function getModuleExports() { return module; }; |
| 16552 |
/******/ __webpack_require__.d(getter, 'a', getter); |
| 16553 |
/******/ return getter; |
| 16554 |
/******/ }; |
| 16555 |
/******/ |
| 16556 |
/******/ // Object.prototype.hasOwnProperty.call |
| 16557 |
/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; |
| 16558 |
/******/ |
| 16559 |
/******/ // __webpack_public_path__ |
| 16560 |
/******/ __webpack_require__.p = "/dist/"; |
| 16561 |
/******/ |
| 16562 |
/******/ // Load entry module and return exports |
| 16563 |
/******/ return __webpack_require__(__webpack_require__.s = 3); |
| 16564 |
/******/ }) |
| 16565 |
/************************************************************************/ |
| 16566 |
/******/ ([ |
| 16567 |
/* 0 */ |
| 16568 |
/***/ (function(module, exports, __webpack_require__) { |
| 16569 |
|
| 16570 |
|
| 16571 |
/* styles */ |
| 16572 |
__webpack_require__(8) |
| 16573 |
|
| 16574 |
var Component = __webpack_require__(6)( |
| 16575 |
/* script */ |
| 16576 |
__webpack_require__(2), |
| 16577 |
/* template */ |
| 16578 |
__webpack_require__(7), |
| 16579 |
/* scopeId */ |
| 16580 |
"data-v-25adc6c0", |
| 16581 |
/* cssModules */ |
| 16582 |
null |
| 16583 |
) |
| 16584 |
|
| 16585 |
module.exports = Component.exports |
| 16586 |
|
| 16587 |
|
| 16588 |
/***/ }), |
| 16589 |
/* 1 */ |
| 16590 |
/***/ (function(module, exports) { |
| 16591 |
|
| 16592 |
module.exports = __WEBPACK_EXTERNAL_MODULE_1__; |
| 16593 |
|
| 16594 |
/***/ }), |
| 16595 |
/* 2 */ |
| 16596 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
| 16597 |
|
| 16598 |
"use strict"; |
| 16599 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); |
| 16600 |
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; |
| 16601 |
|
| 16602 |
// |
| 16603 |
// |
| 16604 |
// |
| 16605 |
// |
| 16606 |
// |
| 16607 |
// |
| 16608 |
// |
| 16609 |
// |
| 16610 |
// |
| 16611 |
// |
| 16612 |
// |
| 16613 |
// |
| 16614 |
// |
| 16615 |
// |
| 16616 |
// |
| 16617 |
// |
| 16618 |
// |
| 16619 |
// |
| 16620 |
// |
| 16621 |
// |
| 16622 |
// |
| 16623 |
// |
| 16624 |
// |
| 16625 |
// |
| 16626 |
// |
| 16627 |
// |
| 16628 |
|
| 16629 |
var constants = { |
| 16630 |
colorChecked: '#75C791', |
| 16631 |
colorUnchecked: '#bfcbd9', |
| 16632 |
cssColors: false, |
| 16633 |
labelChecked: 'on', |
| 16634 |
labelUnchecked: 'off', |
| 16635 |
width: 50, |
| 16636 |
height: 22, |
| 16637 |
margin: 3, |
| 16638 |
switchColor: '#fff' |
| 16639 |
}; |
| 16640 |
|
| 16641 |
var contains = function contains(object, title) { |
| 16642 |
return (typeof object === 'undefined' ? 'undefined' : _typeof(object)) === 'object' && object.hasOwnProperty(title); |
| 16643 |
}; |
| 16644 |
|
| 16645 |
var px = function px(v) { |
| 16646 |
return v + 'px'; |
| 16647 |
}; |
| 16648 |
|
| 16649 |
/* harmony default export */ __webpack_exports__["default"] = ({ |
| 16650 |
name: 'ToggleButton', |
| 16651 |
props: { |
| 16652 |
value: { |
| 16653 |
type: Boolean, |
| 16654 |
default: false |
| 16655 |
}, |
| 16656 |
disabled: { |
| 16657 |
type: Boolean, |
| 16658 |
default: false |
| 16659 |
}, |
| 16660 |
name: { |
| 16661 |
type: String |
| 16662 |
}, |
| 16663 |
sync: { |
| 16664 |
type: Boolean, |
| 16665 |
default: false |
| 16666 |
}, |
| 16667 |
speed: { |
| 16668 |
type: Number, |
| 16669 |
default: 300 |
| 16670 |
}, |
| 16671 |
color: { |
| 16672 |
type: [String, Object], |
| 16673 |
validator: function validator(value) { |
| 16674 |
return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' ? value.checked || value.unchecked : typeof value === 'string'; |
| 16675 |
} |
| 16676 |
}, |
| 16677 |
switchColor: { |
| 16678 |
type: [String, Object], |
| 16679 |
validator: function validator(value) { |
| 16680 |
return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' ? value.checked || value.unchecked : typeof value === 'string'; |
| 16681 |
} |
| 16682 |
}, |
| 16683 |
cssColors: { |
| 16684 |
type: Boolean, |
| 16685 |
default: false |
| 16686 |
}, |
| 16687 |
labels: { |
| 16688 |
type: [Boolean, Object], |
| 16689 |
default: false, |
| 16690 |
validator: function validator(value) { |
| 16691 |
return (typeof value === 'undefined' ? 'undefined' : _typeof(value)) === 'object' ? value.checked || value.unchecked : typeof value === 'boolean'; |
| 16692 |
} |
| 16693 |
}, |
| 16694 |
height: { |
| 16695 |
type: Number, |
| 16696 |
default: constants.height |
| 16697 |
}, |
| 16698 |
width: { |
| 16699 |
type: Number, |
| 16700 |
default: constants.width |
| 16701 |
} |
| 16702 |
}, |
| 16703 |
computed: { |
| 16704 |
className: function className() { |
| 16705 |
var toggled = this.toggled, |
| 16706 |
disabled = this.disabled; |
| 16707 |
|
| 16708 |
|
| 16709 |
return ['vue-js-switch', { toggled: toggled, disabled: disabled }]; |
| 16710 |
}, |
| 16711 |
ariaChecked: function ariaChecked() { |
| 16712 |
return this.toggled.toString(); |
| 16713 |
}, |
| 16714 |
coreStyle: function coreStyle() { |
| 16715 |
return { |
| 16716 |
width: px(this.width), |
| 16717 |
height: px(this.height), |
| 16718 |
backgroundColor: this.cssColors ? null : this.disabled ? this.colorDisabled : this.colorCurrent, |
| 16719 |
borderRadius: px(Math.round(this.height / 2)) |
| 16720 |
}; |
| 16721 |
}, |
| 16722 |
buttonRadius: function buttonRadius() { |
| 16723 |
return this.height - constants.margin * 2; |
| 16724 |
}, |
| 16725 |
distance: function distance() { |
| 16726 |
return px(this.width - this.height + constants.margin); |
| 16727 |
}, |
| 16728 |
buttonStyle: function buttonStyle() { |
| 16729 |
return { |
| 16730 |
width: px(this.buttonRadius), |
| 16731 |
height: px(this.buttonRadius), |
| 16732 |
transition: 'transform ' + this.speed + 'ms', |
| 16733 |
transform: this.toggled ? 'translate3d(' + this.distance + ', 3px, 0px)' : null, |
| 16734 |
background: this.switchColor ? this.switchColorCurrent : undefined |
| 16735 |
}; |
| 16736 |
}, |
| 16737 |
labelStyle: function labelStyle() { |
| 16738 |
return { |
| 16739 |
lineHeight: px(this.height) |
| 16740 |
}; |
| 16741 |
}, |
| 16742 |
colorChecked: function colorChecked() { |
| 16743 |
var color = this.color; |
| 16744 |
|
| 16745 |
|
| 16746 |
if ((typeof color === 'undefined' ? 'undefined' : _typeof(color)) !== 'object') { |
| 16747 |
return color || constants.colorChecked; |
| 16748 |
} |
| 16749 |
|
| 16750 |
return contains(color, 'checked') ? color.checked : constants.colorChecked; |
| 16751 |
}, |
| 16752 |
colorUnchecked: function colorUnchecked() { |
| 16753 |
var color = this.color; |
| 16754 |
|
| 16755 |
|
| 16756 |
return contains(color, 'unchecked') ? color.unchecked : constants.colorUnchecked; |
| 16757 |
}, |
| 16758 |
colorDisabled: function colorDisabled() { |
| 16759 |
var color = this.color; |
| 16760 |
|
| 16761 |
|
| 16762 |
return contains(color, 'disabled') ? color.disabled : this.colorCurrent; |
| 16763 |
}, |
| 16764 |
colorCurrent: function colorCurrent() { |
| 16765 |
return this.toggled ? this.colorChecked : this.colorUnchecked; |
| 16766 |
}, |
| 16767 |
labelChecked: function labelChecked() { |
| 16768 |
return contains(this.labels, 'checked') ? this.labels.checked : constants.labelChecked; |
| 16769 |
}, |
| 16770 |
labelUnchecked: function labelUnchecked() { |
| 16771 |
return contains(this.labels, 'unchecked') ? this.labels.unchecked : constants.labelUnchecked; |
| 16772 |
}, |
| 16773 |
switchColorChecked: function switchColorChecked() { |
| 16774 |
var switchColor = this.switchColor; |
| 16775 |
|
| 16776 |
|
| 16777 |
return contains(switchColor, 'checked') ? switchColor.checked : constants.switchColor; |
| 16778 |
}, |
| 16779 |
switchColorUnchecked: function switchColorUnchecked() { |
| 16780 |
var switchColor = this.switchColor; |
| 16781 |
|
| 16782 |
|
| 16783 |
return contains(switchColor, 'unchecked') ? switchColor.unchecked : constants.switchColor; |
| 16784 |
}, |
| 16785 |
switchColorCurrent: function switchColorCurrent() { |
| 16786 |
var switchColor = this.switchColor; |
| 16787 |
|
| 16788 |
|
| 16789 |
if ((typeof switchColor === 'undefined' ? 'undefined' : _typeof(switchColor)) !== 'object') { |
| 16790 |
return switchColor || constants.switchColor; |
| 16791 |
} |
| 16792 |
|
| 16793 |
return this.toggled ? this.switchColorChecked : this.switchColorUnchecked; |
| 16794 |
} |
| 16795 |
}, |
| 16796 |
watch: { |
| 16797 |
value: function value(_value) { |
| 16798 |
if (this.sync) { |
| 16799 |
this.toggled = !!_value; |
| 16800 |
} |
| 16801 |
} |
| 16802 |
}, |
| 16803 |
data: function data() { |
| 16804 |
return { |
| 16805 |
toggled: !!this.value |
| 16806 |
}; |
| 16807 |
}, |
| 16808 |
|
| 16809 |
methods: { |
| 16810 |
toggle: function toggle(event) { |
| 16811 |
this.toggled = !this.toggled; |
| 16812 |
this.$emit('input', this.toggled); |
| 16813 |
this.$emit('change', { |
| 16814 |
value: this.toggled, |
| 16815 |
srcEvent: event |
| 16816 |
}); |
| 16817 |
} |
| 16818 |
} |
| 16819 |
}); |
| 16820 |
|
| 16821 |
/***/ }), |
| 16822 |
/* 3 */ |
| 16823 |
/***/ (function(module, __webpack_exports__, __webpack_require__) { |
| 16824 |
|
| 16825 |
"use strict"; |
| 16826 |
Object.defineProperty(__webpack_exports__, "__esModule", { value: true }); |
| 16827 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue__ = __webpack_require__(1); |
| 16828 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0_vue__); |
| 16829 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Button_vue__ = __webpack_require__(0); |
| 16830 |
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Button_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_1__Button_vue__); |
| 16831 |
|
| 16832 |
|
| 16833 |
|
| 16834 |
var plugin = { |
| 16835 |
install: function install(Vue, options) { |
| 16836 |
Vue.component('ToggleButton', __WEBPACK_IMPORTED_MODULE_1__Button_vue___default.a); |
| 16837 |
} |
| 16838 |
}; |
| 16839 |
|
| 16840 |
/* harmony default export */ __webpack_exports__["default"] = (plugin); |
| 16841 |
|
| 16842 |
/***/ }), |
| 16843 |
/* 4 */ |
| 16844 |
/***/ (function(module, exports, __webpack_require__) { |
| 16845 |
|
| 16846 |
exports = module.exports = __webpack_require__(5)(); |
| 16847 |
// imports |
| 16848 |
|
| 16849 |
|
| 16850 |
// module |
| 16851 |
exports.push([module.i, ".vue-js-switch[data-v-25adc6c0]{display:inline-block;position:relative;overflow:hidden;vertical-align:middle;user-select:none;font-size:10px;cursor:pointer}.vue-js-switch .v-switch-input[data-v-25adc6c0]{display:none}.vue-js-switch .v-switch-label[data-v-25adc6c0]{position:absolute;top:0;font-weight:600;color:#fff}.vue-js-switch .v-switch-label.v-left[data-v-25adc6c0]{left:10px}.vue-js-switch .v-switch-label.v-right[data-v-25adc6c0]{right:10px}.vue-js-switch .v-switch-core[data-v-25adc6c0]{display:block;position:relative;box-sizing:border-box;outline:0;margin:0;transition:border-color .3s,background-color .3s;user-select:none}.vue-js-switch .v-switch-core .v-switch-button[data-v-25adc6c0]{display:block;position:absolute;overflow:hidden;top:0;left:0;transform:translate3d(3px,3px,0);border-radius:100%;background-color:#fff}.vue-js-switch.disabled[data-v-25adc6c0]{pointer-events:none;opacity:.6}", ""]); |
| 16852 |
|
| 16853 |
// exports |
| 16854 |
|
| 16855 |
|
| 16856 |
/***/ }), |
| 16857 |
/* 5 */ |
| 16858 |
/***/ (function(module, exports) { |
| 16859 |
|
| 16860 |
/* |
| 16861 |
MIT License http://www.opensource.org/licenses/mit-license.php |
| 16862 |
Author Tobias Koppers @sokra |
| 16863 |
*/ |
| 16864 |
// css base code, injected by the css-loader |
| 16865 |
module.exports = function() { |
| 16866 |
var list = []; |
| 16867 |
|
| 16868 |
// return the list of modules as css string |
| 16869 |
list.toString = function toString() { |
| 16870 |
var result = []; |
| 16871 |
for(var i = 0; i < this.length; i++) { |
| 16872 |
var item = this[i]; |
| 16873 |
if(item[2]) { |
| 16874 |
result.push("@media " + item[2] + "{" + item[1] + "}"); |
| 16875 |
} else { |
| 16876 |
result.push(item[1]); |
| 16877 |
} |
| 16878 |
} |
| 16879 |
return result.join(""); |
| 16880 |
}; |
| 16881 |
|
| 16882 |
// import a list of modules into the list |
| 16883 |
list.i = function(modules, mediaQuery) { |
| 16884 |
if(typeof modules === "string") |
| 16885 |
modules = [[null, modules, ""]]; |
| 16886 |
var alreadyImportedModules = {}; |
| 16887 |
for(var i = 0; i < this.length; i++) { |
| 16888 |
var id = this[i][0]; |
| 16889 |
if(typeof id === "number") |
| 16890 |
alreadyImportedModules[id] = true; |
| 16891 |
} |
| 16892 |
for(i = 0; i < modules.length; i++) { |
| 16893 |
var item = modules[i]; |
| 16894 |
// skip already imported module |
| 16895 |
// this implementation is not 100% perfect for weird media query combinations |
| 16896 |
// when a module is imported multiple times with different media queries. |
| 16897 |
// I hope this will never occur (Hey this way we have smaller bundles) |
| 16898 |
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) { |
| 16899 |
if(mediaQuery && !item[2]) { |
| 16900 |
item[2] = mediaQuery; |
| 16901 |
} else if(mediaQuery) { |
| 16902 |
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")"; |
| 16903 |
} |
| 16904 |
list.push(item); |
| 16905 |
} |
| 16906 |
} |
| 16907 |
}; |
| 16908 |
return list; |
| 16909 |
}; |
| 16910 |
|
| 16911 |
|
| 16912 |
/***/ }), |
| 16913 |
/* 6 */ |
| 16914 |
/***/ (function(module, exports) { |
| 16915 |
|
| 16916 |
// this module is a runtime utility for cleaner component module output and will |
| 16917 |
// be included in the final webpack user bundle |
| 16918 |
|
| 16919 |
module.exports = function normalizeComponent ( |
| 16920 |
rawScriptExports, |
| 16921 |
compiledTemplate, |
| 16922 |
scopeId, |
| 16923 |
cssModules |
| 16924 |
) { |
| 16925 |
var esModule |
| 16926 |
var scriptExports = rawScriptExports = rawScriptExports || {} |
| 16927 |
|
| 16928 |
// ES6 modules interop |
| 16929 |
var type = typeof rawScriptExports.default |
| 16930 |
if (type === 'object' || type === 'function') { |
| 16931 |
esModule = rawScriptExports |
| 16932 |
scriptExports = rawScriptExports.default |
| 16933 |
} |
| 16934 |
|
| 16935 |
// Vue.extend constructor export interop |
| 16936 |
var options = typeof scriptExports === 'function' |
| 16937 |
? scriptExports.options |
| 16938 |
: scriptExports |
| 16939 |
|
| 16940 |
// render functions |
| 16941 |
if (compiledTemplate) { |
| 16942 |
options.render = compiledTemplate.render |
| 16943 |
options.staticRenderFns = compiledTemplate.staticRenderFns |
| 16944 |
} |
| 16945 |
|
| 16946 |
// scopedId |
| 16947 |
if (scopeId) { |
| 16948 |
options._scopeId = scopeId |
| 16949 |
} |
| 16950 |
|
| 16951 |
// inject cssModules |
| 16952 |
if (cssModules) { |
| 16953 |
var computed = Object.create(options.computed || null) |
| 16954 |
Object.keys(cssModules).forEach(function (key) { |
| 16955 |
var module = cssModules[key] |
| 16956 |
computed[key] = function () { return module } |
| 16957 |
}) |
| 16958 |
options.computed = computed |
| 16959 |
} |
| 16960 |
|
| 16961 |
return { |
| 16962 |
esModule: esModule, |
| 16963 |
exports: scriptExports, |
| 16964 |
options: options |
| 16965 |
} |
| 16966 |
} |
| 16967 |
|
| 16968 |
|
| 16969 |
/***/ }), |
| 16970 |
/* 7 */ |
| 16971 |
/***/ (function(module, exports) { |
| 16972 |
|
| 16973 |
module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; |
| 16974 |
return _c('label', { |
| 16975 |
class: _vm.className, |
| 16976 |
attrs: { |
| 16977 |
"role": "checkbox", |
| 16978 |
"aria-checked": _vm.ariaChecked |
| 16979 |
} |
| 16980 |
}, [_c('input', { |
| 16981 |
staticClass: "v-switch-input", |
| 16982 |
attrs: { |
| 16983 |
"type": "checkbox", |
| 16984 |
"name": _vm.name |
| 16985 |
}, |
| 16986 |
on: { |
| 16987 |
"change": function($event) { |
| 16988 |
$event.stopPropagation(); |
| 16989 |
return _vm.toggle($event) |
| 16990 |
} |
| 16991 |
} |
| 16992 |
}), _vm._v(" "), _c('div', { |
| 16993 |
staticClass: "v-switch-core", |
| 16994 |
style: (_vm.coreStyle) |
| 16995 |
}, [_c('div', { |
| 16996 |
staticClass: "v-switch-button", |
| 16997 |
style: (_vm.buttonStyle) |
| 16998 |
})]), _vm._v(" "), (_vm.labels) ? [(_vm.toggled) ? _c('span', { |
| 16999 |
staticClass: "v-switch-label v-left", |
| 17000 |
style: (_vm.labelStyle), |
| 17001 |
domProps: { |
| 17002 |
"innerHTML": _vm._s(_vm.labelChecked) |
| 17003 |
} |
| 17004 |
}) : _c('span', { |
| 17005 |
staticClass: "v-switch-label v-right", |
| 17006 |
style: (_vm.labelStyle), |
| 17007 |
domProps: { |
| 17008 |
"innerHTML": _vm._s(_vm.labelUnchecked) |
| 17009 |
} |
| 17010 |
})] : _vm._e()], 2) |
| 17011 |
},staticRenderFns: []} |
| 17012 |
|
| 17013 |
/***/ }), |
| 17014 |
/* 8 */ |
| 17015 |
/***/ (function(module, exports, __webpack_require__) { |
| 17016 |
|
| 17017 |
// style-loader: Adds some css to the DOM by adding a <style> tag |
| 17018 |
|
| 17019 |
// load the styles |
| 17020 |
var content = __webpack_require__(4); |
| 17021 |
if(typeof content === 'string') content = [[module.i, content, '']]; |
| 17022 |
if(content.locals) module.exports = content.locals; |
| 17023 |
// add the styles to the DOM |
| 17024 |
var update = __webpack_require__(9)("2283861f", content, true); |
| 17025 |
|
| 17026 |
/***/ }), |
| 17027 |
/* 9 */ |
| 17028 |
/***/ (function(module, exports, __webpack_require__) { |
| 17029 |
|
| 17030 |
/* |
| 17031 |
MIT License http://www.opensource.org/licenses/mit-license.php |
| 17032 |
Author Tobias Koppers @sokra |
| 17033 |
Modified by Evan You @yyx990803 |
| 17034 |
*/ |
| 17035 |
|
| 17036 |
var hasDocument = typeof document !== 'undefined' |
| 17037 |
|
| 17038 |
if (typeof DEBUG !== 'undefined' && DEBUG) { |
| 17039 |
if (!hasDocument) { |
| 17040 |
throw new Error( |
| 17041 |
'vue-style-loader cannot be used in a non-browser environment. ' + |
| 17042 |
"Use { target: 'node' } in your Webpack config to indicate a server-rendering environment." |
| 17043 |
) } |
| 17044 |
} |
| 17045 |
|
| 17046 |
var listToStyles = __webpack_require__(10) |
| 17047 |
|
| 17048 |
/* |
| 17049 |
type StyleObject = { |
| 17050 |
id: number; |
| 17051 |
parts: Array<StyleObjectPart> |
| 17052 |
} |
| 17053 |
|
| 17054 |
type StyleObjectPart = { |
| 17055 |
css: string; |
| 17056 |
media: string; |
| 17057 |
sourceMap: ?string |
| 17058 |
} |
| 17059 |
*/ |
| 17060 |
|
| 17061 |
var stylesInDom = {/* |
| 17062 |
[id: number]: { |
| 17063 |
id: number, |
| 17064 |
refs: number, |
| 17065 |
parts: Array<(obj?: StyleObjectPart) => void> |
| 17066 |
} |
| 17067 |
*/} |
| 17068 |
|
| 17069 |
var head = hasDocument && (document.head || document.getElementsByTagName('head')[0]) |
| 17070 |
var singletonElement = null |
| 17071 |
var singletonCounter = 0 |
| 17072 |
var isProduction = false |
| 17073 |
var noop = function () {} |
| 17074 |
|
| 17075 |
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style> |
| 17076 |
// tags it will allow on a page |
| 17077 |
var isOldIE = typeof navigator !== 'undefined' && /msie [6-9]\b/.test(navigator.userAgent.toLowerCase()) |
| 17078 |
|
| 17079 |
module.exports = function (parentId, list, _isProduction) { |
| 17080 |
isProduction = _isProduction |
| 17081 |
|
| 17082 |
var styles = listToStyles(parentId, list) |
| 17083 |
addStylesToDom(styles) |
| 17084 |
|
| 17085 |
return function update (newList) { |
| 17086 |
var mayRemove = [] |
| 17087 |
for (var i = 0; i < styles.length; i++) { |
| 17088 |
var item = styles[i] |
| 17089 |
var domStyle = stylesInDom[item.id] |
| 17090 |
domStyle.refs-- |
| 17091 |
mayRemove.push(domStyle) |
| 17092 |
} |
| 17093 |
if (newList) { |
| 17094 |
styles = listToStyles(parentId, newList) |
| 17095 |
addStylesToDom(styles) |
| 17096 |
} else { |
| 17097 |
styles = [] |
| 17098 |
} |
| 17099 |
for (var i = 0; i < mayRemove.length; i++) { |
| 17100 |
var domStyle = mayRemove[i] |
| 17101 |
if (domStyle.refs === 0) { |
| 17102 |
for (var j = 0; j < domStyle.parts.length; j++) { |
| 17103 |
domStyle.parts[j]() |
| 17104 |
} |
| 17105 |
delete stylesInDom[domStyle.id] |
| 17106 |
} |
| 17107 |
} |
| 17108 |
} |
| 17109 |
} |
| 17110 |
|
| 17111 |
function addStylesToDom (styles /* Array<StyleObject> */) { |
| 17112 |
for (var i = 0; i < styles.length; i++) { |
| 17113 |
var item = styles[i] |
| 17114 |
var domStyle = stylesInDom[item.id] |
| 17115 |
if (domStyle) { |
| 17116 |
domStyle.refs++ |
| 17117 |
for (var j = 0; j < domStyle.parts.length; j++) { |
| 17118 |
domStyle.parts[j](item.parts[j]) |
| 17119 |
} |
| 17120 |
for (; j < item.parts.length; j++) { |
| 17121 |
domStyle.parts.push(addStyle(item.parts[j])) |
| 17122 |
} |
| 17123 |
if (domStyle.parts.length > item.parts.length) { |
| 17124 |
domStyle.parts.length = item.parts.length |
| 17125 |
} |
| 17126 |
} else { |
| 17127 |
var parts = [] |
| 17128 |
for (var j = 0; j < item.parts.length; j++) { |
| 17129 |
parts.push(addStyle(item.parts[j])) |
| 17130 |
} |
| 17131 |
stylesInDom[item.id] = { id: item.id, refs: 1, parts: parts } |
| 17132 |
} |
| 17133 |
} |
| 17134 |
} |
| 17135 |
|
| 17136 |
function createStyleElement () { |
| 17137 |
var styleElement = document.createElement('style') |
| 17138 |
styleElement.type = 'text/css' |
| 17139 |
head.appendChild(styleElement) |
| 17140 |
return styleElement |
| 17141 |
} |
| 17142 |
|
| 17143 |
function addStyle (obj /* StyleObjectPart */) { |
| 17144 |
var update, remove |
| 17145 |
var styleElement = document.querySelector('style[data-vue-ssr-id~="' + obj.id + '"]') |
| 17146 |
|
| 17147 |
if (styleElement) { |
| 17148 |
if (isProduction) { |
| 17149 |
// has SSR styles and in production mode. |
| 17150 |
// simply do nothing. |
| 17151 |
return noop |
| 17152 |
} else { |
| 17153 |
// has SSR styles but in dev mode. |
| 17154 |
// for some reason Chrome can't handle source map in server-rendered |
| 17155 |
// style tags - source maps in <style> only works if the style tag is |
| 17156 |
// created and inserted dynamically. So we remove the server rendered |
| 17157 |
// styles and inject new ones. |
| 17158 |
styleElement.parentNode.removeChild(styleElement) |
| 17159 |
} |
| 17160 |
} |
| 17161 |
|
| 17162 |
if (isOldIE) { |
| 17163 |
// use singleton mode for IE9. |
| 17164 |
var styleIndex = singletonCounter++ |
| 17165 |
styleElement = singletonElement || (singletonElement = createStyleElement()) |
| 17166 |
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false) |
| 17167 |
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true) |
| 17168 |
} else { |
| 17169 |
// use multi-style-tag mode in all other cases |
| 17170 |
styleElement = createStyleElement() |
| 17171 |
update = applyToTag.bind(null, styleElement) |
| 17172 |
remove = function () { |
| 17173 |
styleElement.parentNode.removeChild(styleElement) |
| 17174 |
} |
| 17175 |
} |
| 17176 |
|
| 17177 |
update(obj) |
| 17178 |
|
| 17179 |
return function updateStyle (newObj /* StyleObjectPart */) { |
| 17180 |
if (newObj) { |
| 17181 |
if (newObj.css === obj.css && |
| 17182 |
newObj.media === obj.media && |
| 17183 |
newObj.sourceMap === obj.sourceMap) { |
| 17184 |
return |
| 17185 |
} |
| 17186 |
update(obj = newObj) |
| 17187 |
} else { |
| 17188 |
remove() |
| 17189 |
} |
| 17190 |
} |
| 17191 |
} |
| 17192 |
|
| 17193 |
var replaceText = (function () { |
| 17194 |
var textStore = [] |
| 17195 |
|
| 17196 |
return function (index, replacement) { |
| 17197 |
textStore[index] = replacement |
| 17198 |
return textStore.filter(Boolean).join('\n') |
| 17199 |
} |
| 17200 |
})() |
| 17201 |
|
| 17202 |
function applyToSingletonTag (styleElement, index, remove, obj) { |
| 17203 |
var css = remove ? '' : obj.css |
| 17204 |
|
| 17205 |
if (styleElement.styleSheet) { |
| 17206 |
styleElement.styleSheet.cssText = replaceText(index, css) |
| 17207 |
} else { |
| 17208 |
var cssNode = document.createTextNode(css) |
| 17209 |
var childNodes = styleElement.childNodes |
| 17210 |
if (childNodes[index]) styleElement.removeChild(childNodes[index]) |
| 17211 |
if (childNodes.length) { |
| 17212 |
styleElement.insertBefore(cssNode, childNodes[index]) |
| 17213 |
} else { |
| 17214 |
styleElement.appendChild(cssNode) |
| 17215 |
} |
| 17216 |
} |
| 17217 |
} |
| 17218 |
|
| 17219 |
function applyToTag (styleElement, obj) { |
| 17220 |
var css = obj.css |
| 17221 |
var media = obj.media |
| 17222 |
var sourceMap = obj.sourceMap |
| 17223 |
|
| 17224 |
if (media) { |
| 17225 |
styleElement.setAttribute('media', media) |
| 17226 |
} |
| 17227 |
|
| 17228 |
if (sourceMap) { |
| 17229 |
// https://developer.chrome.com/devtools/docs/javascript-debugging |
| 17230 |
// this makes source maps inside style tags work properly in Chrome |
| 17231 |
css += '\n/*# sourceURL=' + sourceMap.sources[0] + ' */' |
| 17232 |
// http://stackoverflow.com/a/26603875 |
| 17233 |
css += '\n/*# sourceMappingURL=data:application/json;base64,' + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + ' */' |
| 17234 |
} |
| 17235 |
|
| 17236 |
if (styleElement.styleSheet) { |
| 17237 |
styleElement.styleSheet.cssText = css |
| 17238 |
} else { |
| 17239 |
while (styleElement.firstChild) { |
| 17240 |
styleElement.removeChild(styleElement.firstChild) |
| 17241 |
} |
| 17242 |
styleElement.appendChild(document.createTextNode(css)) |
| 17243 |
} |
| 17244 |
} |
| 17245 |
|
| 17246 |
|
| 17247 |
/***/ }), |
| 17248 |
/* 10 */ |
| 17249 |
/***/ (function(module, exports) { |
| 17250 |
|
| 17251 |
/** |
| 17252 |
* Translates the list format produced by css-loader into something |
| 17253 |
* easier to manipulate. |
| 17254 |
*/ |
| 17255 |
module.exports = function listToStyles (parentId, list) { |
| 17256 |
var styles = [] |
| 17257 |
var newStyles = {} |
| 17258 |
for (var i = 0; i < list.length; i++) { |
| 17259 |
var item = list[i] |
| 17260 |
var id = item[0] |
| 17261 |
var css = item[1] |
| 17262 |
var media = item[2] |
| 17263 |
var sourceMap = item[3] |
| 17264 |
var part = { |
| 17265 |
id: parentId + ':' + i, |
| 17266 |
css: css, |
| 17267 |
media: media, |
| 17268 |
sourceMap: sourceMap |
| 17269 |
} |
| 17270 |
if (!newStyles[id]) { |
| 17271 |
styles.push(newStyles[id] = { id: id, parts: [part] }) |
| 17272 |
} else { |
| 17273 |
newStyles[id].parts.push(part) |
| 17274 |
} |
| 17275 |
} |
| 17276 |
return styles |
| 17277 |
} |
| 17278 |
|
| 17279 |
|
| 17280 |
/***/ }) |
| 17281 |
/******/ ]); |
| 17282 |
}); |
| 17283 |
//# sourceMappingURL=index.js.map |
| 17284 |
|
| 17285 |
/***/ }) |
| 17286 |
/******/ ]); |