1/*! (C) SEGA */ 2/*! 3806272fd6-r-'es6'-'x' */ 3(function () { 4 'use strict'; 5 6 /** 7 * hbl.ts â Handlebars Loader / Bootstrap 8 * 9 * This file is compiled to ES5 by Rollup + @rollup/plugin-typescript. 10 * It runs before Vue and cliche.js, setting up polyfills and loading scripts. 11 */ 12 // IIFE wrapper keeps variables out of global scope (same as original hbl.js) 13 (function (w, El, Arr, doc) { 14 // from ã¯ã³ã¹ãé«ã«ãªãï¼æåæ°å°ãªãããï¼ 15 // includes ãã³ã¹ãé«ã«ãªãï¼ä½¿ç¨æ°ãå°ãªãããï¼ 16 var CustomEventStr = 'CustomEvent'; 17 var prototype = 'prototype'; 18 var createElement = 'createElement'; 19 var setAttribute = 'setAttribute'; 20 var querySelector_ = 'querySelector'; 21 var remove_ = 'remove'; 22 var script_ = 'script'; 23 var list; 24 var isES5; 25 var commitHash; 26 var userAgent; 27 // ââ Polyfills ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 28 // el.remove() 29 if (!El[prototype][remove_]) { 30 El[prototype][remove_] = function () { 31 if (this.parentNode) 32 this.parentNode.removeChild(this); 33 }; 34 } 35 // [].includes() 36 if (!Arr[prototype].includes) { 37 Arr[prototype].includes = function (x) { 38 return this.indexOf(x) >= 0; 39 }; 40 } 41 // Array.from() 42 if (!Arr.from) { 43 Arr.from = function (obj) { 44 // eslint-disable-next-line @typescript-eslint/no-explicit-any 45 return Arr[prototype].slice.call(obj); 46 }; 47 } 48 // <template> element 49 doc[createElement]('template'); 50 // new CustomEvent() 51 if (typeof w[CustomEventStr] !== 'function') { 52 // eslint-disable-next-line @typescript-eslint/no-explicit-any 53 var CustomEventFn = function (event, params) { 54 var _a, _b; 55 params = params || { bubbles: false, cancelable: false, detail: undefined }; 56 var tempEv = doc.createEvent(CustomEventStr); 57 tempEv.initCustomEvent(event, (_a = params.bubbles) !== null && _a !== void 0 ? _a : false, (_b = params.cancelable) !== null && _b !== void 0 ? _b : false, params.detail); 58 return tempEv; 59 }; 60 // eslint-disable-next-line @typescript-eslint/no-explicit-any 61 CustomEventFn[prototype] = w.Event[prototype]; 62 w[CustomEventStr] = CustomEventFn; 63 } 64 // ââ Script loader ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 65 function insert(url, cb) { 66 var scriptEl = doc[createElement](script_); 67 if (cb) 68 scriptEl.onload = cb; 69 scriptEl[setAttribute]('src', url); 70 doc.head.appendChild(scriptEl); 71 } 72 function loadScript(remaining) { 73 var url = remaining.shift(); 74 if (!url) 75 return; 76 insert(url, function () { 77 if (remaining.length) { 78 loadScript(remaining); 79 } 80 }); 81 } 82 if (!w.fetch) { 83 insert('lib/polyfills/fetch-0.11.1.min.js'); 84 } 85 if (!w.Promise) { 86 insert('lib/polyfills/promise-7.0.4.min.js'); 87 } 88 // ââ ES6 detection ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 89 isES5 = !(function () { 90 try { 91 return eval('() => { class isES6Class { constructor(isES6) { this.isES6 = isES6; } } const isES6 = new isES6Class(true); return isES6.isES6; }'); 92 } 93 catch (_a) { 94 return false;
95 } 96 })(); 97 userAgent = w.navigator.userAgent.toLowerCase(); 98 // Android4.2ã®Chromeã ããªãããã¾ãéããªããããAndroid4.Xç³»ã®ãå ¨ã¦ES5ã«ãã 99 if (userAgent.indexOf('android 4') > -1) 100 isES5 = true; 101 // 2017-11-26 102 // iOS10ã¯safariã ãSRAã®mypageã§ES6æ§æã®ä½ããå¼ã£ãããããã䏿çã«å ¨ã¦ES5ã«ãã 103 // ãªãªã¼ã¹å¾ã«åå ç©¶æãã¦ããã¯åé¤ããäºå® 104 if (userAgent.indexOf('iphone os 10') > -1) 105 isES5 = true; 106 // ââ Commit hash ââââââââââââââââââââââââââââââââââââââââââââââââââââââââââââ 107 { 108 var meta = doc[querySelector_]('[name="git-commit-hash"]'); 109 commitHash = '?$=' + (meta ? meta.getAttribute('content') : ''); 110 } 111 // ââ Build script list and kick off loading âââââââââââââââââââââââââââââââââ 112 list = [ 113 'lib/cliche.js' + commitHash, 114 'app/app.js' + commitHash, 115 ]; 116 if (isES5) { 117 list = list.map(function (url) { return url.replace(/\.js/, '.es5.js'); }); 118 doc[querySelector_]('html').classList.add('es5'); 119 } 120 loadScript(list); 121 })(window, Element, Array, document); 122 123})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.