-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
401 lines (343 loc) · 19.2 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
/******/ // Create a new module (and put it into the cache)
/******/ var module = installedModules[moduleId] = {
/******/ exports: {},
/******/ id: moduleId,
/******/ loaded: false
/******/ };
/******/ // Execute the module function
/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/ // Flag the module as loaded
/******/ module.loaded = true;
/******/ // Return the exports of the module
/******/ return module.exports;
/******/ }
/******/ // expose the modules object (__webpack_modules__)
/******/ __webpack_require__.m = modules;
/******/ // expose the module cache
/******/ __webpack_require__.c = installedModules;
/******/ // __webpack_public_path__
/******/ __webpack_require__.p = "";
/******/ // Load entry module and return exports
/******/ return __webpack_require__(0);
/******/ })
/************************************************************************/
/******/ ([
/* 0 */
/***/ function(module, exports, __webpack_require__) {
/**
* Created by Wayuki on 08-Sep-16 0008.
*/
var css = __webpack_require__(1);
/***/ },
/* 1 */
/***/ function(module, exports, __webpack_require__) {
// style-loader: Adds some css to the DOM by adding a <style> tag
// load the styles
var content = __webpack_require__(2);
if(typeof content === 'string') content = [[module.id, content, '']];
// add the styles to the DOM
var update = __webpack_require__(4)(content, {});
if(content.locals) module.exports = content.locals;
// Hot Module Replacement
if(false) {
// When the styles change, update the <style> tags
if(!content.locals) {
module.hot.accept("!!./node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./custom.css", function() {
var newContent = require("!!./node_modules/css-loader/index.js!./node_modules/postcss-loader/index.js!./custom.css");
if(typeof newContent === 'string') newContent = [[module.id, newContent, '']];
update(newContent);
});
}
// When the module is disposed, remove the <style> tags
module.hot.dispose(function() { update(); });
}
/***/ },
/* 2 */
/***/ function(module, exports, __webpack_require__) {
exports = module.exports = __webpack_require__(3)();
// imports
// module
exports.push([module.id, "@-webkit-keyframes shake {\r\n from {\r\n -webkit-transform: none;\r\n transform: none;\r\n }\r\n\r\n 20% {\r\n -webkit-transform: translate3d(-20%, 0, 0) rotate3d(0, 0, 1, -10deg);\r\n transform: translate3d(-20%, 0, 0) rotate3d(0, 0, 1, -10deg);\r\n }\r\n\r\n 40% {\r\n -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 5deg);\r\n transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 5deg);\r\n }\r\n\r\n 50% {\r\n -webkit-transform: translate3d(-10%, 0, 0) rotate3d(0, 0, 1, -10deg);\r\n transform: translate3d(-10%, 0, 0) rotate3d(0, 0, 1, -10deg);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 5deg);\r\n transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 5deg);\r\n }\r\n\r\n to {\r\n -webkit-transform: none;\r\n transform: none;\r\n }\r\n}\r\n\r\n@keyframes shake {\r\n from {\r\n -webkit-transform: none;\r\n transform: none;\r\n }\r\n\r\n 20% {\r\n -webkit-transform: translate3d(-20%, 0, 0) rotate3d(0, 0, 1, -10deg);\r\n transform: translate3d(-20%, 0, 0) rotate3d(0, 0, 1, -10deg);\r\n }\r\n\r\n 40% {\r\n -webkit-transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 5deg);\r\n transform: translate3d(20%, 0, 0) rotate3d(0, 0, 1, 5deg);\r\n }\r\n\r\n 50% {\r\n -webkit-transform: translate3d(-10%, 0, 0) rotate3d(0, 0, 1, -10deg);\r\n transform: translate3d(-10%, 0, 0) rotate3d(0, 0, 1, -10deg);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 5deg);\r\n transform: translate3d(10%, 0, 0) rotate3d(0, 0, 1, 5deg);\r\n }\r\n\r\n to {\r\n -webkit-transform: none;\r\n transform: none;\r\n }\r\n}\r\n\r\n@-webkit-keyframes shadow-shake {\r\n from {\r\n -webkit-transform: translateX(-50%);\r\n transform: translateX(-50%);\r\n }\r\n\r\n 20% {\r\n -webkit-transform: translateX(-90%);\r\n transform: translateX(-90%);\r\n }\r\n\r\n 40% {\r\n -webkit-transform: translateX(-10%);\r\n transform: translateX(-10%);\r\n }\r\n\r\n 50% {\r\n -webkit-transform: translateX(-70%);\r\n transform: translateX(-70%);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: translateX(-30%);\r\n transform: translateX(-30%);\r\n }\r\n\r\n to {\r\n -webkit-transform: translateX(-50%);\r\n transform: translateX(-50%);\r\n }\r\n}\r\n\r\n@keyframes shadow-shake {\r\n from {\r\n -webkit-transform: translateX(-50%);\r\n transform: translateX(-50%);\r\n }\r\n\r\n 20% {\r\n -webkit-transform: translateX(-90%);\r\n transform: translateX(-90%);\r\n }\r\n\r\n 40% {\r\n -webkit-transform: translateX(-10%);\r\n transform: translateX(-10%);\r\n }\r\n\r\n 50% {\r\n -webkit-transform: translateX(-70%);\r\n transform: translateX(-70%);\r\n }\r\n\r\n 60% {\r\n -webkit-transform: translateX(-30%);\r\n transform: translateX(-30%);\r\n }\r\n\r\n to {\r\n -webkit-transform: translateX(-50%);\r\n transform: translateX(-50%);\r\n }\r\n}\r\n\r\n@-webkit-keyframes shine {\r\n from {\r\n background-color: white;\r\n }\r\n\r\n 50% {\r\n background-color: red;\r\n }\r\n\r\n to {\r\n background-color: white;\r\n }\r\n}\r\n\r\n@keyframes shine {\r\n from {\r\n background-color: white;\r\n }\r\n\r\n 50% {\r\n background-color: red;\r\n }\r\n\r\n to {\r\n background-color: white;\r\n }\r\n}\r\n\r\ndiv.pokeball-container {\r\n position: absolute;\r\n z-index: 1;\r\n top: 50%;\r\n -webkit-transform: translateY(-50%);\r\n transform: translateY(-50%);\r\n left: 0;\r\n right: 0;\r\n}\r\na.pokeball {\r\n display: block;\r\n z-index: 2;\r\n -ms-flex-item-align: center;\r\n align-self: center;\r\n width: 240px;\r\n height: 240px;\r\n margin: 0 auto;\r\n border-radius: 100%;\r\n box-sizing: border-box;\r\n border: 15px solid #262122;\r\n position: relative;\r\n background: -webkit-linear-gradient(\r\n 300deg,\r\n #BA0C2F 0%,\r\n #BA0C2F 46%,\r\n #262122 46%,\r\n #262122 54%,\r\n white 54%,\r\n white 100%\r\n );\r\n background: linear-gradient(\r\n 150deg,\r\n #BA0C2F 0%,\r\n #BA0C2F 46%,\r\n #262122 46%,\r\n #262122 54%,\r\n white 54%,\r\n white 100%\r\n )\r\n\r\n/*&.triggered {*/\r\n/*cursor: pointer;*/\r\n/*animation-duration: .8s;*/\r\n/*animation-fill-mode: both;*/\r\n/*!*animation-iteration-count: infinite;*!*/\r\n/*animation-name: shake;*/\r\n/*&:after {*/\r\n/*!*animation-duration: .8s;*!*/\r\n/*!*animation-fill-mode: both;*!*/\r\n/*!*!*animation-iteration-count: infinite;*!*!*/\r\n/*!*animation-name: shine;*!*/\r\n/*background-color: red;*/\r\n/*}*/\r\n/*&+div.pokeball-shadow {*/\r\n/*animation-duration: .8s;*/\r\n/*animation-fill-mode: both;*/\r\n/*!*animation-iteration-count: infinite;*!*/\r\n/*animation-name: shadow-shake;*/\r\n/*}*/\r\n/*}*/\r\n}\r\na.pokeball:before, a.pokeball:after {\r\n content: '';\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n -webkit-transform: translate(-50%, -50%);\r\n transform: translate(-50%, -50%);\r\n}\r\na.pokeball:before {\r\n background-color: white;\r\n width: 60px;\r\n height: 60px;\r\n border-radius: 100%;\r\n border: 15px solid #262122;\r\n}\r\na.pokeball:after {\r\n background-color: white;\r\n width: 30px;\r\n height: 30px;\r\n border-radius: 100%;\r\n border: 7.5px solid #262122;\r\n -webkit-transition: background-color .5s;\r\n transition: background-color .5s;\r\n}\r\na.pokeball:hover {\r\n cursor: pointer;\r\n -webkit-animation-duration: .8s;\r\n animation-duration: .8s;\r\n -webkit-animation-fill-mode: both;\r\n animation-fill-mode: both;\r\n -webkit-animation-iteration-count: infinite;\r\n animation-iteration-count: infinite;\r\n -webkit-animation-name: shake;\r\n animation-name: shake;\r\n}\r\na.pokeball:hover:after {\r\n -webkit-animation-duration: .8s;\r\n animation-duration: .8s;\r\n -webkit-animation-fill-mode: both;\r\n animation-fill-mode: both;\r\n -webkit-animation-iteration-count: infinite;\r\n animation-iteration-count: infinite;\r\n -webkit-animation-name: shine;\r\n animation-name: shine;\r\n background-color: red;\r\n}\r\na.pokeball:hover+div.pokeball-shadow {\r\n -webkit-animation-duration: .8s;\r\n animation-duration: .8s;\r\n -webkit-animation-fill-mode: both;\r\n animation-fill-mode: both;\r\n -webkit-animation-iteration-count: infinite;\r\n animation-iteration-count: infinite;\r\n -webkit-animation-name: shadow-shake;\r\n animation-name: shadow-shake;\r\n}\r\ndiv.pokeball-shadow {\r\n width: 120px;\r\n height: 40px;\r\n background-color: rgba(38, 33, 34, 0.9);\r\n box-shadow: 0 0 10px 10px rgba(38, 33, 34, 0.9);\r\n border: 1px solid rgba(38, 33, 34, 0.9);\r\n position: absolute;\r\n bottom: -24px;\r\n left: 50%;\r\n -webkit-transform: translateX(-50%);\r\n transform: translateX(-50%);\r\n border-radius: 100%;\r\n z-index: 1;\r\n}\r\n\r\ndiv.everything-container {\r\n position: fixed;\r\n top: 0;\r\n right: 0;\r\n bottom: 0;\r\n left: 0;\r\n background-color: lightskyblue;\r\n}\r\n\r\ndiv.ground {\r\n position: absolute;\r\n left: -100%;\r\n right: -100%;\r\n bottom: -100%;\r\n top: 60%;\r\n background-color: lawngreen;\r\n border-radius: 100%;\r\n z-index: 0;\r\n box-shadow: 0 0 100px 100px lawngreen;\r\n}", ""]);
// exports
/***/ },
/* 3 */
/***/ function(module, exports) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
// css base code, injected by the css-loader
module.exports = function() {
var list = [];
// return the list of modules as css string
list.toString = function toString() {
var result = [];
for(var i = 0; i < this.length; i++) {
var item = this[i];
if(item[2]) {
result.push("@media " + item[2] + "{" + item[1] + "}");
} else {
result.push(item[1]);
}
}
return result.join("");
};
// import a list of modules into the list
list.i = function(modules, mediaQuery) {
if(typeof modules === "string")
modules = [[null, modules, ""]];
var alreadyImportedModules = {};
for(var i = 0; i < this.length; i++) {
var id = this[i][0];
if(typeof id === "number")
alreadyImportedModules[id] = true;
}
for(i = 0; i < modules.length; i++) {
var item = modules[i];
// skip already imported module
// this implementation is not 100% perfect for weird media query combinations
// when a module is imported multiple times with different media queries.
// I hope this will never occur (Hey this way we have smaller bundles)
if(typeof item[0] !== "number" || !alreadyImportedModules[item[0]]) {
if(mediaQuery && !item[2]) {
item[2] = mediaQuery;
} else if(mediaQuery) {
item[2] = "(" + item[2] + ") and (" + mediaQuery + ")";
}
list.push(item);
}
}
};
return list;
};
/***/ },
/* 4 */
/***/ function(module, exports, __webpack_require__) {
/*
MIT License http://www.opensource.org/licenses/mit-license.php
Author Tobias Koppers @sokra
*/
var stylesInDom = {},
memoize = function(fn) {
var memo;
return function () {
if (typeof memo === "undefined") memo = fn.apply(this, arguments);
return memo;
};
},
isOldIE = memoize(function() {
return /msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase());
}),
getHeadElement = memoize(function () {
return document.head || document.getElementsByTagName("head")[0];
}),
singletonElement = null,
singletonCounter = 0,
styleElementsInsertedAtTop = [];
module.exports = function(list, options) {
if(false) {
if(typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment");
}
options = options || {};
// Force single-tag solution on IE6-9, which has a hard limit on the # of <style>
// tags it will allow on a page
if (typeof options.singleton === "undefined") options.singleton = isOldIE();
// By default, add <style> tags to the bottom of <head>.
if (typeof options.insertAt === "undefined") options.insertAt = "bottom";
var styles = listToStyles(list);
addStylesToDom(styles, options);
return function update(newList) {
var mayRemove = [];
for(var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
domStyle.refs--;
mayRemove.push(domStyle);
}
if(newList) {
var newStyles = listToStyles(newList);
addStylesToDom(newStyles, options);
}
for(var i = 0; i < mayRemove.length; i++) {
var domStyle = mayRemove[i];
if(domStyle.refs === 0) {
for(var j = 0; j < domStyle.parts.length; j++)
domStyle.parts[j]();
delete stylesInDom[domStyle.id];
}
}
};
}
function addStylesToDom(styles, options) {
for(var i = 0; i < styles.length; i++) {
var item = styles[i];
var domStyle = stylesInDom[item.id];
if(domStyle) {
domStyle.refs++;
for(var j = 0; j < domStyle.parts.length; j++) {
domStyle.parts[j](item.parts[j]);
}
for(; j < item.parts.length; j++) {
domStyle.parts.push(addStyle(item.parts[j], options));
}
} else {
var parts = [];
for(var j = 0; j < item.parts.length; j++) {
parts.push(addStyle(item.parts[j], options));
}
stylesInDom[item.id] = {id: item.id, refs: 1, parts: parts};
}
}
}
function listToStyles(list) {
var styles = [];
var newStyles = {};
for(var i = 0; i < list.length; i++) {
var item = list[i];
var id = item[0];
var css = item[1];
var media = item[2];
var sourceMap = item[3];
var part = {css: css, media: media, sourceMap: sourceMap};
if(!newStyles[id])
styles.push(newStyles[id] = {id: id, parts: [part]});
else
newStyles[id].parts.push(part);
}
return styles;
}
function insertStyleElement(options, styleElement) {
var head = getHeadElement();
var lastStyleElementInsertedAtTop = styleElementsInsertedAtTop[styleElementsInsertedAtTop.length - 1];
if (options.insertAt === "top") {
if(!lastStyleElementInsertedAtTop) {
head.insertBefore(styleElement, head.firstChild);
} else if(lastStyleElementInsertedAtTop.nextSibling) {
head.insertBefore(styleElement, lastStyleElementInsertedAtTop.nextSibling);
} else {
head.appendChild(styleElement);
}
styleElementsInsertedAtTop.push(styleElement);
} else if (options.insertAt === "bottom") {
head.appendChild(styleElement);
} else {
throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");
}
}
function removeStyleElement(styleElement) {
styleElement.parentNode.removeChild(styleElement);
var idx = styleElementsInsertedAtTop.indexOf(styleElement);
if(idx >= 0) {
styleElementsInsertedAtTop.splice(idx, 1);
}
}
function createStyleElement(options) {
var styleElement = document.createElement("style");
styleElement.type = "text/css";
insertStyleElement(options, styleElement);
return styleElement;
}
function createLinkElement(options) {
var linkElement = document.createElement("link");
linkElement.rel = "stylesheet";
insertStyleElement(options, linkElement);
return linkElement;
}
function addStyle(obj, options) {
var styleElement, update, remove;
if (options.singleton) {
var styleIndex = singletonCounter++;
styleElement = singletonElement || (singletonElement = createStyleElement(options));
update = applyToSingletonTag.bind(null, styleElement, styleIndex, false);
remove = applyToSingletonTag.bind(null, styleElement, styleIndex, true);
} else if(obj.sourceMap &&
typeof URL === "function" &&
typeof URL.createObjectURL === "function" &&
typeof URL.revokeObjectURL === "function" &&
typeof Blob === "function" &&
typeof btoa === "function") {
styleElement = createLinkElement(options);
update = updateLink.bind(null, styleElement);
remove = function() {
removeStyleElement(styleElement);
if(styleElement.href)
URL.revokeObjectURL(styleElement.href);
};
} else {
styleElement = createStyleElement(options);
update = applyToTag.bind(null, styleElement);
remove = function() {
removeStyleElement(styleElement);
};
}
update(obj);
return function updateStyle(newObj) {
if(newObj) {
if(newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap)
return;
update(obj = newObj);
} else {
remove();
}
};
}
var replaceText = (function () {
var textStore = [];
return function (index, replacement) {
textStore[index] = replacement;
return textStore.filter(Boolean).join('\n');
};
})();
function applyToSingletonTag(styleElement, index, remove, obj) {
var css = remove ? "" : obj.css;
if (styleElement.styleSheet) {
styleElement.styleSheet.cssText = replaceText(index, css);
} else {
var cssNode = document.createTextNode(css);
var childNodes = styleElement.childNodes;
if (childNodes[index]) styleElement.removeChild(childNodes[index]);
if (childNodes.length) {
styleElement.insertBefore(cssNode, childNodes[index]);
} else {
styleElement.appendChild(cssNode);
}
}
}
function applyToTag(styleElement, obj) {
var css = obj.css;
var media = obj.media;
if(media) {
styleElement.setAttribute("media", media)
}
if(styleElement.styleSheet) {
styleElement.styleSheet.cssText = css;
} else {
while(styleElement.firstChild) {
styleElement.removeChild(styleElement.firstChild);
}
styleElement.appendChild(document.createTextNode(css));
}
}
function updateLink(linkElement, obj) {
var css = obj.css;
var sourceMap = obj.sourceMap;
if(sourceMap) {
// http://stackoverflow.com/a/26603875
css += "\n/*# sourceMappingURL=data:application/json;base64," + btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))) + " */";
}
var blob = new Blob([css], { type: "text/css" });
var oldSrc = linkElement.href;
linkElement.href = URL.createObjectURL(blob);
if(oldSrc)
URL.revokeObjectURL(oldSrc);
}
/***/ }
/******/ ]);