scripts.bcf3243b.js 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. // modules are defined as an array
  2. // [ module function, map of requires ]
  3. //
  4. // map of requires is short require name -> numeric require
  5. //
  6. // anything defined in a previous bundle is accessed via the
  7. // orig method which is the require for previous bundles
  8. parcelRequire = (function (modules, cache, entry, globalName) {
  9. // Save the require from previous bundle to this closure if any
  10. var previousRequire = typeof parcelRequire === 'function' && parcelRequire;
  11. var nodeRequire = typeof require === 'function' && require;
  12. function newRequire(name, jumped) {
  13. if (!cache[name]) {
  14. if (!modules[name]) {
  15. // if we cannot find the module within our internal map or
  16. // cache jump to the current global require ie. the last bundle
  17. // that was added to the page.
  18. var currentRequire = typeof parcelRequire === 'function' && parcelRequire;
  19. if (!jumped && currentRequire) {
  20. return currentRequire(name, true);
  21. }
  22. // If there are other bundles on this page the require from the
  23. // previous one is saved to 'previousRequire'. Repeat this as
  24. // many times as there are bundles until the module is found or
  25. // we exhaust the require chain.
  26. if (previousRequire) {
  27. return previousRequire(name, true);
  28. }
  29. // Try the node require function if it exists.
  30. if (nodeRequire && typeof name === 'string') {
  31. return nodeRequire(name);
  32. }
  33. var err = new Error('Cannot find module \'' + name + '\'');
  34. err.code = 'MODULE_NOT_FOUND';
  35. throw err;
  36. }
  37. localRequire.resolve = resolve;
  38. localRequire.cache = {};
  39. var module = cache[name] = new newRequire.Module(name);
  40. modules[name][0].call(module.exports, localRequire, module, module.exports, this);
  41. }
  42. return cache[name].exports;
  43. function localRequire(x){
  44. return newRequire(localRequire.resolve(x));
  45. }
  46. function resolve(x){
  47. return modules[name][1][x] || x;
  48. }
  49. }
  50. function Module(moduleName) {
  51. this.id = moduleName;
  52. this.bundle = newRequire;
  53. this.exports = {};
  54. }
  55. newRequire.isParcelRequire = true;
  56. newRequire.Module = Module;
  57. newRequire.modules = modules;
  58. newRequire.cache = cache;
  59. newRequire.parent = previousRequire;
  60. newRequire.register = function (id, exports) {
  61. modules[id] = [function (require, module) {
  62. module.exports = exports;
  63. }, {}];
  64. };
  65. var error;
  66. for (var i = 0; i < entry.length; i++) {
  67. try {
  68. newRequire(entry[i]);
  69. } catch (e) {
  70. // Save first error but execute all entries
  71. if (!error) {
  72. error = e;
  73. }
  74. }
  75. }
  76. if (entry.length) {
  77. // Expose entry point to Node, AMD or browser globals
  78. // Based on https://github.com/ForbesLindesay/umd/blob/master/template.js
  79. var mainExports = newRequire(entry[entry.length - 1]);
  80. // CommonJS
  81. if (typeof exports === "object" && typeof module !== "undefined") {
  82. module.exports = mainExports;
  83. // RequireJS
  84. } else if (typeof define === "function" && define.amd) {
  85. define(function () {
  86. return mainExports;
  87. });
  88. // <script>
  89. } else if (globalName) {
  90. this[globalName] = mainExports;
  91. }
  92. }
  93. // Override the current require with this new one
  94. parcelRequire = newRequire;
  95. if (error) {
  96. // throw error from earlier, _after updating parcelRequire_
  97. throw error;
  98. }
  99. return newRequire;
  100. })({"node_modules/amfe-flexible/index.js":[function(require,module,exports) {
  101. (function flexible (window, document) {
  102. var docEl = document.documentElement
  103. var dpr = window.devicePixelRatio || 1
  104. // adjust body font size
  105. function setBodyFontSize () {
  106. if (document.body) {
  107. document.body.style.fontSize = (12 * dpr) + 'px'
  108. }
  109. else {
  110. document.addEventListener('DOMContentLoaded', setBodyFontSize)
  111. }
  112. }
  113. setBodyFontSize();
  114. // set 1rem = viewWidth / 10
  115. function setRemUnit () {
  116. var rem = docEl.clientWidth / 10
  117. docEl.style.fontSize = rem + 'px'
  118. }
  119. setRemUnit()
  120. // reset rem unit on page resize
  121. window.addEventListener('resize', setRemUnit)
  122. window.addEventListener('pageshow', function (e) {
  123. if (e.persisted) {
  124. setRemUnit()
  125. }
  126. })
  127. // detect 0.5px supports
  128. if (dpr >= 2) {
  129. var fakeBody = document.createElement('body')
  130. var testElement = document.createElement('div')
  131. testElement.style.border = '.5px solid transparent'
  132. fakeBody.appendChild(testElement)
  133. docEl.appendChild(fakeBody)
  134. if (testElement.offsetHeight === 1) {
  135. docEl.classList.add('hairlines')
  136. }
  137. docEl.removeChild(fakeBody)
  138. }
  139. }(window, document))
  140. },{}],"C:/Users/Administrator.PC-20170415TVUO/AppData/Roaming/nvm/v10.6.0/node_modules/parcel-bundler/src/builtins/bundle-url.js":[function(require,module,exports) {
  141. var bundleURL = null;
  142. function getBundleURLCached() {
  143. if (!bundleURL) {
  144. bundleURL = getBundleURL();
  145. }
  146. return bundleURL;
  147. }
  148. function getBundleURL() {
  149. // Attempt to find the URL of the current script and use that as the base URL
  150. try {
  151. throw new Error();
  152. } catch (err) {
  153. var matches = ('' + err.stack).match(/(https?|file|ftp|chrome-extension|moz-extension):\/\/[^)\n]+/g);
  154. if (matches) {
  155. return getBaseURL(matches[0]);
  156. }
  157. }
  158. return '/';
  159. }
  160. function getBaseURL(url) {
  161. return ('' + url).replace(/^((?:https?|file|ftp|chrome-extension|moz-extension):\/\/.+)\/[^/]+$/, '$1') + '/';
  162. }
  163. exports.getBundleURL = getBundleURLCached;
  164. exports.getBaseURL = getBaseURL;
  165. },{}],"C:/Users/Administrator.PC-20170415TVUO/AppData/Roaming/nvm/v10.6.0/node_modules/parcel-bundler/src/builtins/css-loader.js":[function(require,module,exports) {
  166. var bundle = require('./bundle-url');
  167. function updateLink(link) {
  168. var newLink = link.cloneNode();
  169. newLink.onload = function () {
  170. link.remove();
  171. };
  172. newLink.href = link.href.split('?')[0] + '?' + Date.now();
  173. link.parentNode.insertBefore(newLink, link.nextSibling);
  174. }
  175. var cssTimeout = null;
  176. function reloadCSS() {
  177. if (cssTimeout) {
  178. return;
  179. }
  180. cssTimeout = setTimeout(function () {
  181. var links = document.querySelectorAll('link[rel="stylesheet"]');
  182. for (var i = 0; i < links.length; i++) {
  183. if (bundle.getBaseURL(links[i].href) === bundle.getBundleURL()) {
  184. updateLink(links[i]);
  185. }
  186. }
  187. cssTimeout = null;
  188. }, 50);
  189. }
  190. module.exports = reloadCSS;
  191. },{"./bundle-url":"C:/Users/Administrator.PC-20170415TVUO/AppData/Roaming/nvm/v10.6.0/node_modules/parcel-bundler/src/builtins/bundle-url.js"}],"styles/reset.css":[function(require,module,exports) {
  192. var reloadCSS = require('_css_loader');
  193. module.hot.dispose(reloadCSS);
  194. module.hot.accept(reloadCSS);
  195. },{"_css_loader":"C:/Users/Administrator.PC-20170415TVUO/AppData/Roaming/nvm/v10.6.0/node_modules/parcel-bundler/src/builtins/css-loader.js"}],"styles/index.scss":[function(require,module,exports) {
  196. var reloadCSS = require('_css_loader');
  197. module.hot.dispose(reloadCSS);
  198. module.hot.accept(reloadCSS);
  199. },{"./..\\images\\nav.png":[["nav.19a98149.png","images/nav.png"],"images/nav.png"],"./..\\images\\play.png":[["play.8ed3ebf5.png","images/play.png"],"images/play.png"],"./..\\images\\title1.png":[["title1.5a1f657e.png","images/title1.png"],"images/title1.png"],"./..\\images\\title2.png":[["title2.53b0571a.png","images/title2.png"],"images/title2.png"],"./..\\images\\title3.png":[["title3.aae81641.png","images/title3.png"],"images/title3.png"],"./..\\images\\title4.png":[["title4.9a876b00.png","images/title4.png"],"images/title4.png"],"./..\\images\\title5.png":[["title5.21676772.png","images/title5.png"],"images/title5.png"],"./..\\images\\title6.png":[["title6.6f12d040.png","images/title6.png"],"images/title6.png"],"./..\\images\\top.png":[["top.9a364590.png","images/top.png"],"images/top.png"],"_css_loader":"C:/Users/Administrator.PC-20170415TVUO/AppData/Roaming/nvm/v10.6.0/node_modules/parcel-bundler/src/builtins/css-loader.js"}],"scripts/index.js":[function(require,module,exports) {
  200. "use strict";
  201. require("amfe-flexible");
  202. require("../styles/reset.css");
  203. require("../styles/index.scss");
  204. var pxPerREM = Number(document.documentElement.getAttribute('style').match(/\d+\.?\d+/)[0]);
  205. var bottom = document.documentElement.offsetHeight + 'px';
  206. var E_top = document.querySelector('#top');
  207. function REM2Px(rem) {
  208. if (rem !== 'number') {
  209. rem = Number(rem);
  210. return rem * pxPerREM;
  211. } else {
  212. return rem;
  213. }
  214. }
  215. var nav_links = Array.from(document.querySelectorAll('.nav a'));
  216. var Heights = ['33.351351rem', '55.032432rem', '76.216216rem', bottom];
  217. nav_links.forEach(function (_link, _index) {
  218. _link.addEventListener('click', function () {
  219. var _height = Number(Heights[_index].match(/\d+\.?\d+/)[0]);
  220. window.scroll(0, REM2Px(_height));
  221. });
  222. });
  223. E_top.addEventListener('click', function () {
  224. window.scroll(0, 0);
  225. });
  226. },{"amfe-flexible":"node_modules/amfe-flexible/index.js","../styles/reset.css":"styles/reset.css","../styles/index.scss":"styles/index.scss"}],"C:/Users/Administrator.PC-20170415TVUO/AppData/Roaming/nvm/v10.6.0/node_modules/parcel-bundler/src/builtins/hmr-runtime.js":[function(require,module,exports) {
  227. var global = arguments[3];
  228. var OVERLAY_ID = '__parcel__error__overlay__';
  229. var OldModule = module.bundle.Module;
  230. function Module(moduleName) {
  231. OldModule.call(this, moduleName);
  232. this.hot = {
  233. data: module.bundle.hotData,
  234. _acceptCallbacks: [],
  235. _disposeCallbacks: [],
  236. accept: function (fn) {
  237. this._acceptCallbacks.push(fn || function () {});
  238. },
  239. dispose: function (fn) {
  240. this._disposeCallbacks.push(fn);
  241. }
  242. };
  243. module.bundle.hotData = null;
  244. }
  245. module.bundle.Module = Module;
  246. var checkedAssets, assetsToAccept;
  247. var parent = module.bundle.parent;
  248. if ((!parent || !parent.isParcelRequire) && typeof WebSocket !== 'undefined') {
  249. var hostname = "" || location.hostname;
  250. var protocol = location.protocol === 'https:' ? 'wss' : 'ws';
  251. var ws = new WebSocket(protocol + '://' + hostname + ':' + "54163" + '/');
  252. ws.onmessage = function (event) {
  253. checkedAssets = {};
  254. assetsToAccept = [];
  255. var data = JSON.parse(event.data);
  256. if (data.type === 'update') {
  257. var handled = false;
  258. data.assets.forEach(function (asset) {
  259. if (!asset.isNew) {
  260. var didAccept = hmrAcceptCheck(global.parcelRequire, asset.id);
  261. if (didAccept) {
  262. handled = true;
  263. }
  264. }
  265. }); // Enable HMR for CSS by default.
  266. handled = handled || data.assets.every(function (asset) {
  267. return asset.type === 'css' && asset.generated.js;
  268. });
  269. if (handled) {
  270. console.clear();
  271. data.assets.forEach(function (asset) {
  272. hmrApply(global.parcelRequire, asset);
  273. });
  274. assetsToAccept.forEach(function (v) {
  275. hmrAcceptRun(v[0], v[1]);
  276. });
  277. } else {
  278. window.location.reload();
  279. }
  280. }
  281. if (data.type === 'reload') {
  282. ws.close();
  283. ws.onclose = function () {
  284. location.reload();
  285. };
  286. }
  287. if (data.type === 'error-resolved') {
  288. console.log('[parcel] ✨ Error resolved');
  289. removeErrorOverlay();
  290. }
  291. if (data.type === 'error') {
  292. console.error('[parcel] 🚨 ' + data.error.message + '\n' + data.error.stack);
  293. removeErrorOverlay();
  294. var overlay = createErrorOverlay(data);
  295. document.body.appendChild(overlay);
  296. }
  297. };
  298. }
  299. function removeErrorOverlay() {
  300. var overlay = document.getElementById(OVERLAY_ID);
  301. if (overlay) {
  302. overlay.remove();
  303. }
  304. }
  305. function createErrorOverlay(data) {
  306. var overlay = document.createElement('div');
  307. overlay.id = OVERLAY_ID; // html encode message and stack trace
  308. var message = document.createElement('div');
  309. var stackTrace = document.createElement('pre');
  310. message.innerText = data.error.message;
  311. stackTrace.innerText = data.error.stack;
  312. overlay.innerHTML = '<div style="background: black; font-size: 16px; color: white; position: fixed; height: 100%; width: 100%; top: 0px; left: 0px; padding: 30px; opacity: 0.85; font-family: Menlo, Consolas, monospace; z-index: 9999;">' + '<span style="background: red; padding: 2px 4px; border-radius: 2px;">ERROR</span>' + '<span style="top: 2px; margin-left: 5px; position: relative;">🚨</span>' + '<div style="font-size: 18px; font-weight: bold; margin-top: 20px;">' + message.innerHTML + '</div>' + '<pre>' + stackTrace.innerHTML + '</pre>' + '</div>';
  313. return overlay;
  314. }
  315. function getParents(bundle, id) {
  316. var modules = bundle.modules;
  317. if (!modules) {
  318. return [];
  319. }
  320. var parents = [];
  321. var k, d, dep;
  322. for (k in modules) {
  323. for (d in modules[k][1]) {
  324. dep = modules[k][1][d];
  325. if (dep === id || Array.isArray(dep) && dep[dep.length - 1] === id) {
  326. parents.push(k);
  327. }
  328. }
  329. }
  330. if (bundle.parent) {
  331. parents = parents.concat(getParents(bundle.parent, id));
  332. }
  333. return parents;
  334. }
  335. function hmrApply(bundle, asset) {
  336. var modules = bundle.modules;
  337. if (!modules) {
  338. return;
  339. }
  340. if (modules[asset.id] || !bundle.parent) {
  341. var fn = new Function('require', 'module', 'exports', asset.generated.js);
  342. asset.isNew = !modules[asset.id];
  343. modules[asset.id] = [fn, asset.deps];
  344. } else if (bundle.parent) {
  345. hmrApply(bundle.parent, asset);
  346. }
  347. }
  348. function hmrAcceptCheck(bundle, id) {
  349. var modules = bundle.modules;
  350. if (!modules) {
  351. return;
  352. }
  353. if (!modules[id] && bundle.parent) {
  354. return hmrAcceptCheck(bundle.parent, id);
  355. }
  356. if (checkedAssets[id]) {
  357. return;
  358. }
  359. checkedAssets[id] = true;
  360. var cached = bundle.cache[id];
  361. assetsToAccept.push([bundle, id]);
  362. if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
  363. return true;
  364. }
  365. return getParents(global.parcelRequire, id).some(function (id) {
  366. return hmrAcceptCheck(global.parcelRequire, id);
  367. });
  368. }
  369. function hmrAcceptRun(bundle, id) {
  370. var cached = bundle.cache[id];
  371. bundle.hotData = {};
  372. if (cached) {
  373. cached.hot.data = bundle.hotData;
  374. }
  375. if (cached && cached.hot && cached.hot._disposeCallbacks.length) {
  376. cached.hot._disposeCallbacks.forEach(function (cb) {
  377. cb(bundle.hotData);
  378. });
  379. }
  380. delete bundle.cache[id];
  381. bundle(id);
  382. cached = bundle.cache[id];
  383. if (cached && cached.hot && cached.hot._acceptCallbacks.length) {
  384. cached.hot._acceptCallbacks.forEach(function (cb) {
  385. cb();
  386. });
  387. return true;
  388. }
  389. }
  390. },{}]},{},["C:/Users/Administrator.PC-20170415TVUO/AppData/Roaming/nvm/v10.6.0/node_modules/parcel-bundler/src/builtins/hmr-runtime.js","scripts/index.js"], null)
  391. //# sourceMappingURL=/scripts.bcf3243b.js.map