text: parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"PEJc":[function(require,module,exports) {
  
  },{}],"Suy6":[function(require,module,exports) {
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.calc=s;var t,e=function(){function t(t,e,i){this.vertical=t,this.horizontal=e,this.height=i}return t.prototype.calc=function(t){return this.vertical*this.horizontal*this.height*t},t}(),i=function(){function t(t,e){this.diameter=t,this.height=e}return t.prototype.calc=function(t){var e=this.diameter/2;return e*e*Math.PI*this.height*t},t}(),n=function(){function t(t,e,i,n,r){this.vertical=t,this.horizontal=e,this.verticalWidth=i,this.horizontalWidth=n,this.length=r}return t.prototype.calc=function(t){return(this.vertical*this.verticalWidth*2+(this.horizontal-2*this.verticalWidth)*this.horizontalWidth)*this.length*t},t}(),r=function(){function t(t,e,i){this.diameter=t,this.height=e,this.thickness=i}return t.prototype.calc=function(t){var e=this.diameter/2,i=e-this.thickness;return(e*e-i*i)*Math.PI*this.height*t},t}(),h=function(){function t(t,e,i,n,r){this.vertical=t,this.horizontal=e,this.length=i,this.t1=n,this.t2=r}return t.prototype.calc=function(t){return((this.vertical-this.t1)*this.t2*2+this.horizontal*this.t1)*this.length*t},t}(),a=function(){function t(t,e,i,n,r){this.vertical=t,this.horizontal=e,this.length=i,this.tv=n,this.th=r}return t.prototype.calc=function(t){return((this.vertical-this.th)*this.tv+this.th*(this.horizontal-this.tv)+this.th*this.tv)*this.length*t},t}(),c=function(){function t(t,e,i,n){this.vertical=t,this.horizontal=e,this.height=i,this.thickness=n}return t.prototype.calc=function(t){return(this.vertical*this.horizontal-(this.vertical-2*this.thickness)*(this.horizontal-2*this.thickness))*this.height*t},t}();!function(t){t[t.cuboid=0]="cuboid",t[t.cylinder=1]="cylinder",t[t.hbeam=2]="hbeam",t[t.pipe=3]="pipe",t[t.channel=4]="channel",t[t.angle=5]="angle",t[t.squarePipe=6]="squarePipe"}(t||(t={}));var o=function(){function o(){}return o.prototype.getShapeType=function(){var e=document.getElementById("tab_content");if(!e)throw new Error("No tab_content");for(var i=e.getElementsByTagName("section"),n=0;n<i.length;n++)if("block"===i[n].style.display)switch(i[n].id){case"cuboid":return t.cuboid;case"cylinder":return t.cylinder;case"hbeam":return t.hbeam;case"pipe":return t.pipe;case"channel":return t.channel;case"angle":return t.angle;case"square_pipe":return t.squarePipe}throw new Error("No block element")},o.prototype.create=function(){var o=function(t){var e=document.getElementById(t),i=Number(e.value);switch(document.getElementById(t+"_unit").value){case"mm":return i/1e3;case"M":return i;default:throw new Error("unit error")}};switch(this.getShapeType()){case t.cuboid:var s=o("cuboid_vertical"),l=o("cuboid_horizontal"),u=o("cuboid_height");return new e(s,l,u);case t.cylinder:var p=o("cylinder_diameter"),d=o("cylinder_height");return new i(p,d);case t.hbeam:var v=o("hbeam_vertical"),g=o("hbeam_horizontal"),_=o("hbeam_vertical_width"),f=o("hbeam_horizontal_width"),m=o("hbeam_length");return new n(v,g,_,f,m);case t.pipe:var y=o("pipe_diameter"),b=o("pipe_height"),w=o("pipe_thickness");return new r(y,b,w);case t.channel:var z=o("channel_vertical"),E=o("channel_horizontal"),k=o("channel_length"),q=o("channel_t1"),I=o("channel_t2");return new h(z,E,k,q,I);case t.angle:var P=o("angle_vertical"),B=o("angle_horizontal"),N=o("angle_length"),W=o("angle_tv"),M=o("angle_th");return new a(P,B,N,W,M);case t.squarePipe:var T=o("square_pipe_vertical"),x=o("square_pipe_horizontal"),S=o("square_pipe_height"),j=o("square_pipe_thickness");return new c(T,x,S,j);default:throw new Error("shapeType Error")}},o}();function s(){var t=(new o).create(),e=Number(document.getElementById("blood").value),i=1e3*t.calc(e);document.getElementById("weight").value=i.toFixed(2)}
  },{}],"1VBJ":[function(require,module,exports) {
  "use strict";function e(){var e=document.getElementById("menu");document.getElementById("tab_content");if(!e)throw new Error("menu error");for(var t,n=e.getElementsByTagName("a"),l=0;l<n.length;l++)o(n[l]);function o(e){var n=e.hash.slice(1),l=document.getElementById(n);if(!l)throw new Error(n+"は存在しない");t?l.style.display="none":(t={page:l,menu:e},l.style.display="block",e.className="active"),e.onclick=function(){return t.page.style.display="none",l.style.display="block",t.page=l,t.menu=e,document.getElementById("weight").value="",!1}}}Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=e;
  },{}],"93ha":[function(require,module,exports) {
  "use strict";require("../node_modules/purecss/build/base-min.css"),require("../node_modules/purecss/build/forms-min.css"),require("../node_modules/purecss/build/buttons-min.css"),require("../css/style.css");var e=require("./shape"),r=s(require("./tab"));function s(e){return e&&e.__esModule?e:{default:e}}(0,r.default)();var c=document.getElementById("calc_button");c&&(c.onclick=e.calc);var i="service-worker.js";"serviceWorker"in navigator&&navigator.serviceWorker.register(i).then(function(e){console.log("ServiceWorker registration successful with scope: ",e.scope)}).catch(function(e){console.log("ServiceWorker registration failed: ",e)});
  },{"../node_modules/purecss/build/base-min.css":"PEJc","../node_modules/purecss/build/forms-min.css":"PEJc","../node_modules/purecss/build/buttons-min.css":"PEJc","../css/style.css":"PEJc","./shape":"Suy6","./tab":"1VBJ"}]},{},["93ha"], null)
  //# sourceMappingURL=app.f72665b5.js.map