「MathJaxをデバッグしてJavaScriptの理解を深める ページ3」の版間の差分

提供:yonewiki
20行目: 20行目:
   },  
   },  
   function(t, e) {
   function(t, e) {
     if("function" != typeof e && null !== e) throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");
     if("function" != typeof e && null !== e)  
      throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");


     function r() {
     function r() {
49行目: 50行目:
     try {
     try {
       for(;
       for(;
        (void 0 === e || e-- > 0) && !(n = i.next()).done;) s.push(n.value)
          (void 0 === e || e-- > 0) && !(n = i.next()).done;
     } catch(t) {
        )  
      o = {
        s.push(n.value)
        error: t
     }  
      }
    catch(t) { o = { error: t } }  
     } finally {
     finally {  
       try {
       try { n && !n.done && (r = i.return) && r.call(i) }
        n && !n.done && (r = i.return) && r.call(i)
       finally { if(o) throw o.error }
       } finally {
        if(o) throw o.error
      }
     }
     }
     return s
     return s
65行目: 63行目:
   a = this && this.__spreadArray || function(t, e, r) {
   a = this && this.__spreadArray || function(t, e, r) {
     if(r || 2 === arguments.length)
     if(r || 2 === arguments.length)
       for(var n, o = 0, i = e.length; o < i; o++) !n && o in e || (n || (n = Array.prototype.slice.call(e, 0, o)), n[o] = e[o]);
       for(var n, o = 0, i = e.length; o < i; o++)  
        !n && o in e || (n || (n = Array.prototype.slice.call(e, 0, o)), n[o] = e[o]);
     return t.concat(n || Array.prototype.slice.call(e))
     return t.concat(n || Array.prototype.slice.call(e))
   };
   };
   Object.defineProperty(e, "__esModule", {
   Object.defineProperty(e, "__esModule", {
     value: !0
     value: !0
   }), e.Package = e.PackageError = void 0;
   }),  
  e.Package = e.PackageError = void 0;
   var l = r(235),
   var l = r(235),
     c = function(t) {
     c = function(t) {
82行目: 82行目:
   var u = function() {
   var u = function() {
     function t(e, r) {
     function t(e, r) {
       void 0 === r && (r = !1), this.isLoaded = !1, this.isLoading = !1, this.hasFailed = !1, this.dependents = [], this.dependencies = [], this.dependencyCount = 0, this.provided = [], this.name = e, this.noLoad = r, t.packages.set(e, this), this.promise = this.makePromise(this.makeDependencies())
       void 0 === r && (r = !1),  
      this.isLoaded = !1,  
      this.isLoading = !1,  
      this.hasFailed = !1,  
      this.dependents = [],  
      this.dependencies = [],  
      this.dependencyCount = 0,  
      this.provided = [],  
      this.name = e,  
      this.noLoad = r,  
      t.packages.set(e, this),  
      this.promise = this.makePromise(this.makeDependencies())
     }
     }
     return Object.defineProperty(t.prototype, "canLoad", {
     return Object.defineProperty(t.prototype, "canLoad", {
90行目: 101行目:
       enumerable: !1,
       enumerable: !1,
       configurable: !0
       configurable: !0
     }), t.resolvePath = function(t, e) {
     }),  
    t.resolvePath = function(t, e) {
       void 0 === e && (e = !0);
       void 0 === e && (e = !0);
       var r = {
       var r = {
98行目: 110行目:
       };
       };
       return l.Loader.pathFilters.execute(r), r.name
       return l.Loader.pathFilters.execute(r), r.name
     }, t.loadAll = function() {
     },  
    t.loadAll = function() {
       var t, e;
       var t, e;
       try {
       try {
105行目: 118行目:
           o.canLoad && o.load()
           o.canLoad && o.load()
         }
         }
       } catch(e) {
       }  
        t = {
      catch(e) { t = { error: e } }  
          error: e
       finally {
        }
         try { n && !n.done && (e = r.return) && e.call(r) }
       } finally {
         finally { if(t) throw t.error }
         try {
          n && !n.done && (e = r.return) && e.call(r)
         } finally {
          if(t) throw t.error
        }
       }
       }
     }, t.prototype.makeDependencies = function() {
     },  
    t.prototype.makeDependencies = function() {
       var e, r, n = [],
       var e, r, n = [],
         o = t.packages,
         o = t.packages,
122行目: 131行目:
         u = this.name,
         u = this.name,
         p = [];
         p = [];
       l.CONFIG.dependencies.hasOwnProperty(u) ? p.push.apply(p, a([], s(l.CONFIG.dependencies[u]), !1)) : "core" !== u && p.push("core");
       l.CONFIG.dependencies.hasOwnProperty(u) ?  
        p.push.apply(p, a([], s(l.CONFIG.dependencies[u]), !1))  
      :  
        "core" !== u && p.push("core");
       try {
       try {
         for(var h = i(p), f = h.next(); !f.done; f = h.next()) {
         for(var h = i(p), f = h.next(); !f.done; f = h.next()) {
           var d = f.value,
           var d = f.value,
             m = o.get(d) || new t(d, c);
             m = o.get(d) || new t(d, c);
           this.dependencies.indexOf(m) < 0 && (m.addDependent(this, c), this.dependencies.push(m), m.isLoaded || (this.dependencyCount++, n.push(m.promise)))
           this.dependencies.indexOf(m) < 0 &&  
        }
          (
      } catch(t) {
            m.addDependent(this, c),  
        e = {
            this.dependencies.push(m),  
          error: t
            m.isLoaded || (this.dependencyCount++, n.push(m.promise))
        }
           )
      } finally {
        try {
          f && !f.done && (r = h.return) && r.call(h)
        } finally {
           if(e) throw e.error
         }
         }
      }
      catch(t) { e = { error: t } }
      finally {
        try { f && !f.done && (r = h.return) && r.call(h) }
        finally { if(e) throw e.error }
       }
       }
       return n
       return n
     }, t.prototype.makePromise = function(t) {
     },  
    t.prototype.makePromise = function(t) {
       var e = this,
       var e = this,
         r = new Promise((function(t, r) {
         r = new Promise((function(t, r) {
154行目: 167行目:
         return n.failed(new c(t, e.name))
         return n.failed(new c(t, e.name))
       })), r
       })), r
     }, t.prototype.load = function() {
     },  
    t.prototype.load = function() {
       if(!this.isLoaded && !this.isLoading && !this.noLoad) {
       if(!this.isLoaded && !this.isLoading && !this.noLoad) {
         this.isLoading = !0;
         this.isLoading = !0;
160行目: 174行目:
         l.CONFIG.require ? this.loadCustom(e) : this.loadScript(e)
         l.CONFIG.require ? this.loadCustom(e) : this.loadScript(e)
       }
       }
     }, t.prototype.loadCustom = function(t) {
     },  
    t.prototype.loadCustom = function(t) {
       var e = this;
       var e = this;
       try {
       try {
172行目: 187行目:
         this.failed(t.message)
         this.failed(t.message)
       }
       }
     }, t.prototype.loadScript = function(t) {
     },  
    t.prototype.loadScript = function(t) {
       var e = this,
       var e = this,
         r = document.createElement("script");
         r = document.createElement("script");
       r.src = t, r.charset = "UTF-8", r.onload = function(t) {
       r.src = t, r.charset = "UTF-8", r.onload = function(t) {
         return e.checkLoad()
         return e.checkLoad()
       }, r.onerror = function(r) {
       },  
      r.onerror = function(r) {
         return e.failed("Can't load \"" + t + '"')
         return e.failed("Can't load \"" + t + '"')
       }, document.head.appendChild(r)
       },  
     }, t.prototype.loaded = function() {
      document.head.appendChild(r)
     },  
    t.prototype.loaded = function() {
       var t, e, r, n;
       var t, e, r, n;
       this.isLoaded = !0, this.isLoading = !1;
       this.isLoaded = !0, this.isLoading = !1;
187行目: 206行目:
           s.value.requirementSatisfied()
           s.value.requirementSatisfied()
         }
         }
       } catch(e) {
       }  
        t = {
      catch(e) { t = { error: e } }  
          error: e
       finally {
        }
         try { s && !s.done && (e = o.return) && e.call(o) }
       } finally {
         finally { if(t) throw t.error }
         try {
          s && !s.done && (e = o.return) && e.call(o)
         } finally {
          if(t) throw t.error
        }
       }
       }
       try {
       try {
202行目: 216行目:
           l.value.loaded()
           l.value.loaded()
         }
         }
       } catch(t) {
       }  
        r = {
      catch(t) { r = { error: t } }  
          error: t
       finally {
        }
         try { l && !l.done && (n = a.return) && n.call(a) }
       } finally {
         finally { if(r) throw r.error }
         try {
          l && !l.done && (n = a.return) && n.call(a)
         } finally {
          if(r) throw r.error
        }
       }
       }
       this.resolve(this.name)
       this.resolve(this.name)
     }, t.prototype.failed = function(t) {
     },  
    t.prototype.failed = function(t) {
       this.hasFailed = !0, this.isLoading = !1, this.reject(new c(t, this.name))
       this.hasFailed = !0, this.isLoading = !1, this.reject(new c(t, this.name))
     }, t.prototype.checkLoad = function() {
     },  
    t.prototype.checkLoad = function() {
       var t = this;
       var t = this;
       ((l.CONFIG[this.name] || {}).checkReady || function() {
       ((l.CONFIG[this.name] || {}).checkReady || function() {
         return Promise.resolve()
         return Promise.resolve()
       })().then((function() {
       })().
      then((function() {
         return t.loaded()
         return t.loaded()
       })).catch((function(e) {
       })).
      catch((function(e) {
         return t.failed(e)
         return t.failed(e)
       }))
       }))
     }, t.prototype.requirementSatisfied = function() {
     },  
    t.prototype.requirementSatisfied = function() {
       this.dependencyCount && (this.dependencyCount--, this.canLoad && this.load())
       this.dependencyCount && (this.dependencyCount--, this.canLoad && this.load())
     }, t.prototype.provides = function(e) {
     },  
    t.prototype.provides = function(e) {
       var r, n;
       var r, n;
       void 0 === e && (e = []);
       void 0 === e && (e = []);
234行目: 249行目:
           var a = s.value,
           var a = s.value,
             c = t.packages.get(a);
             c = t.packages.get(a);
           c || (l.CONFIG.dependencies[a] || (l.CONFIG.dependencies[a] = []), l.CONFIG.dependencies[a].push(a), (c = new t(a, !0)).isLoading = !0), this.provided.push(c)
           c ||  
        }
          (l.CONFIG.dependencies[a] ||  
      } catch(t) {
          (l.CONFIG.dependencies[a] = []),  
        r = {
          l.CONFIG.dependencies[a].push(a),  
          error: t
          (c = new t(a, !0)).isLoading = !0),  
        }
          this.provided.push(c)
      } finally {
        try {
          s && !s.done && (n = o.return) && n.call(o)
        } finally {
          if(r) throw r.error
         }
         }
      }
      catch(t) { r = { error: t } }
      finally {
        try { s && !s.done && (n = o.return) && n.call(o) }
        finally { if(r) throw r.error }
       }
       }
     }, t.prototype.addDependent = function(t, e) {
     },  
    t.prototype.addDependent = function(t, e) {
       this.dependents.push(t), e || this.checkNoLoad()
       this.dependents.push(t), e || this.checkNoLoad()
     }, t.prototype.checkNoLoad = function() {
     },  
    t.prototype.checkNoLoad = function() {
       var t, e;
       var t, e;
       if(this.noLoad) {
       if(this.noLoad) {
257行目: 274行目:
             n.value.checkNoLoad()
             n.value.checkNoLoad()
           }
           }
         } catch(e) {
         }  
          t = {
        catch(e) { t = { error: e } }  
            error: e
         finally {
          }
           try { n && !n.done && (e = r.return) && e.call(r) }
         } finally {
           finally { if(t) throw t.error }
           try {
            n && !n.done && (e = r.return) && e.call(r)
           } finally {
            if(t) throw t.error
          }
         }
         }
       }
       }
     }, t.packages = new Map, t
     },  
    t.packages = new Map, t
   }();
   }();
   e.Package = u
   e.Package = u

2022年12月1日 (木) 22:50時点における版

VScodeで簡易WebServerの元でデバッグに戻る。

概要

 MathJaxをデバッグしてJavaScriptの理解を深める ページ2の続きです。

[1] [2] [3] [4]


__webpack_modules__[265].call(r.exports, r, r.exports, __webpack_require__)

function(t, e, r) {
  var n, o = this && this.__extends || (n = function(t, e) {
    return n = Object.setPrototypeOf || {
      __proto__: []
    }
    instanceof Array && function(t, e) {
      t.__proto__ = e
    } || function(t, e) {
      for(var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r])
    }, n(t, e)
  }, 
  function(t, e) {
    if("function" != typeof e && null !== e) 
      throw new TypeError("Class extends value " + String(e) + " is not a constructor or null");

    function r() {
      this.constructor = t
    }
    n(t, e), t.prototype = null === e ? Object.create(e) : (r.prototype = e.prototype, new r)
  }),
  i = this && this.__values || function(t) {
    var e = "function" == typeof Symbol && Symbol.iterator,
      r = e && t[e],
      n = 0;
    if(r) return r.call(t);
    if(t && "number" == typeof t.length) return {
      next: function() {
        return t && n >= t.length && (t = void 0), {
          value: t && t[n++],
          done: !t
        }
      }
    };
    throw new TypeError(e ? "Object is not iterable." : "Symbol.iterator is not defined.")
  },
  s = this && this.__read || function(t, e) {
    var r = "function" == typeof Symbol && t[Symbol.iterator];
    if(!r) return t;
    var n, o, i = r.call(t),
      s = [];
    try {
      for(;
           (void 0 === e || e-- > 0) && !(n = i.next()).done;
         ) 
        s.push(n.value)
    } 
    catch(t) { o = { error: t } } 
    finally { 
      try { n && !n.done && (r = i.return) && r.call(i) } 
      finally { if(o) throw o.error }
    }
    return s
  },
  a = this && this.__spreadArray || function(t, e, r) {
    if(r || 2 === arguments.length)
      for(var n, o = 0, i = e.length; o < i; o++) 
        !n && o in e || (n || (n = Array.prototype.slice.call(e, 0, o)), n[o] = e[o]);
    return t.concat(n || Array.prototype.slice.call(e))
  };
  Object.defineProperty(e, "__esModule", {
    value: !0
  }), 
  e.Package = e.PackageError = void 0;
  var l = r(235),
    c = function(t) {
      function e(e, r) {
        var n = t.call(this, e) || this;
        return n.package = r, n
      }
      return o(e, t), e
    }(Error);
  e.PackageError = c;
  var u = function() {
    function t(e, r) {
      void 0 === r && (r = !1), 
      this.isLoaded = !1, 
      this.isLoading = !1, 
      this.hasFailed = !1, 
      this.dependents = [], 
      this.dependencies = [], 
      this.dependencyCount = 0, 
      this.provided = [], 
      this.name = e, 
      this.noLoad = r, 
      t.packages.set(e, this), 
      this.promise = this.makePromise(this.makeDependencies())
    }
    return Object.defineProperty(t.prototype, "canLoad", {
      get: function() {
        return 0 === this.dependencyCount && !this.noLoad && !this.isLoading && !this.hasFailed
      },
      enumerable: !1,
      configurable: !0
    }), 
    t.resolvePath = function(t, e) {
      void 0 === e && (e = !0);
      var r = {
        name: t,
        original: t,
        addExtension: e
      };
      return l.Loader.pathFilters.execute(r), r.name
    }, 
    t.loadAll = function() {
      var t, e;
      try {
        for(var r = i(this.packages.values()), n = r.next(); !n.done; n = r.next()) {
          var o = n.value;
          o.canLoad && o.load()
        }
      } 
      catch(e) { t = { error: e } } 
      finally {
        try { n && !n.done && (e = r.return) && e.call(r) } 
        finally { if(t) throw t.error }
      }
    }, 
    t.prototype.makeDependencies = function() {
      var e, r, n = [],
        o = t.packages,
        c = this.noLoad,
        u = this.name,
        p = [];
      l.CONFIG.dependencies.hasOwnProperty(u) ? 
        p.push.apply(p, a([], s(l.CONFIG.dependencies[u]), !1)) 
      : 
        "core" !== u && p.push("core");
      try {
        for(var h = i(p), f = h.next(); !f.done; f = h.next()) {
          var d = f.value,
            m = o.get(d) || new t(d, c);
          this.dependencies.indexOf(m) < 0 && 
          (
            m.addDependent(this, c), 
            this.dependencies.push(m), 
            m.isLoaded || (this.dependencyCount++, n.push(m.promise))
          )
        }
      } 
      catch(t) { e = { error: t } } 
      finally { 
        try { f && !f.done && (r = h.return) && r.call(h) } 
        finally { if(e) throw e.error }
      }
      return n
    }, 
    t.prototype.makePromise = function(t) {
      var e = this,
        r = new Promise((function(t, r) {
          e.resolve = t, e.reject = r
        })),
        n = l.CONFIG[this.name] || {};
      return n.ready && (r = r.then((function(t) {
        return n.ready(e.name)
      }))), t.length && (t.push(r), r = Promise.all(t).then((function(t) {
        return t.join(", ")
      }))), n.failed && r.catch((function(t) {
        return n.failed(new c(t, e.name))
      })), r
    }, 
    t.prototype.load = function() {
      if(!this.isLoaded && !this.isLoading && !this.noLoad) {
        this.isLoading = !0;
        var e = t.resolvePath(this.name);
        l.CONFIG.require ? this.loadCustom(e) : this.loadScript(e)
      }
    }, 
    t.prototype.loadCustom = function(t) {
      var e = this;
      try {
        var r = l.CONFIG.require(t);
        r instanceof Promise ? r.then((function() {
          return e.checkLoad()
        })).catch((function(r) {
          return e.failed("Can't load \"" + t + '"\n' + r.message.trim())
        })) : this.checkLoad()
      } catch(t) {
        this.failed(t.message)
      }
    }, 
    t.prototype.loadScript = function(t) {
      var e = this,
        r = document.createElement("script");
      r.src = t, r.charset = "UTF-8", r.onload = function(t) {
        return e.checkLoad()
      }, 
      r.onerror = function(r) {
        return e.failed("Can't load \"" + t + '"')
      }, 
      document.head.appendChild(r)
    }, 
    t.prototype.loaded = function() {
      var t, e, r, n;
      this.isLoaded = !0, this.isLoading = !1;
      try {
        for(var o = i(this.dependents), s = o.next(); !s.done; s = o.next()) {
          s.value.requirementSatisfied()
        }
      } 
      catch(e) { t = { error: e } } 
      finally {
        try { s && !s.done && (e = o.return) && e.call(o) } 
        finally { if(t) throw t.error }
      }
      try {
        for(var a = i(this.provided), l = a.next(); !l.done; l = a.next()) {
          l.value.loaded()
        }
      } 
      catch(t) { r = { error: t } } 
      finally {
        try { l && !l.done && (n = a.return) && n.call(a) } 
        finally { if(r) throw r.error }
      }
      this.resolve(this.name)
    }, 
    t.prototype.failed = function(t) {
      this.hasFailed = !0, this.isLoading = !1, this.reject(new c(t, this.name))
    }, 
    t.prototype.checkLoad = function() {
      var t = this;
      ((l.CONFIG[this.name] || {}).checkReady || function() {
        return Promise.resolve()
      })().
      then((function() {
        return t.loaded()
      })).
      catch((function(e) {
        return t.failed(e)
      }))
    }, 
    t.prototype.requirementSatisfied = function() {
      this.dependencyCount && (this.dependencyCount--, this.canLoad && this.load())
    }, 
    t.prototype.provides = function(e) {
      var r, n;
      void 0 === e && (e = []);
      try {
        for(var o = i(e), s = o.next(); !s.done; s = o.next()) {
          var a = s.value,
            c = t.packages.get(a);
          c || 
          (l.CONFIG.dependencies[a] || 
          (l.CONFIG.dependencies[a] = []), 
          l.CONFIG.dependencies[a].push(a), 
          (c = new t(a, !0)).isLoading = !0), 
          this.provided.push(c)
        }
      } 
      catch(t) { r = { error: t } } 
      finally {
        try { s && !s.done && (n = o.return) && n.call(o) } 
        finally { if(r) throw r.error }
      }
    }, 
    t.prototype.addDependent = function(t, e) {
      this.dependents.push(t), e || this.checkNoLoad()
    }, 
    t.prototype.checkNoLoad = function() {
      var t, e;
      if(this.noLoad) {
        this.noLoad = !1;
        try {
          for(var r = i(this.dependencies), n = r.next(); !n.done; n = r.next()) {
            n.value.checkNoLoad()
          }
        } 
        catch(e) { t = { error: e } } 
        finally {
          try { n && !n.done && (e = r.return) && e.call(r) } 
          finally { if(t) throw t.error }
        }
      }
    }, 
    t.packages = new Map, t
  }();
  e.Package = u
},

 

ページ

 

関連情報

 MathJax

 

VScodeで簡易WebServerの元でデバッグに戻る。