diff --git a/math1052/lecture-09.html b/math1052/lecture-09.html index 9d1baabe7..a964c412f 100644 --- a/math1052/lecture-09.html +++ b/math1052/lecture-09.html @@ -198,7 +198,7 @@
- Case 1: Two disticnt real roots + Case 1: Two distinct real roots diff --git a/math1052/lecture-10.html b/math1052/lecture-10.html index 5283f486f..a31cbf6aa 100644 --- a/math1052/lecture-10.html +++ b/math1052/lecture-10.html @@ -262,6 +262,13 @@
1.8 Simple Harmonic Motion and Damped Oscillations
+>>=1)&&(t+=t))1&n&&(r+=t);return r}},{"../internals/require-object-coercible":113,"../internals/to-integer":133}],126:[function(e,t,r){var n=e("../internals/fails"),o=e("../internals/whitespaces");t.exports=function(e){return n(function(){return!!o[e]()||"
"!="
"[e]()||o[e].name!==e})}},{"../internals/fails":50,"../internals/whitespaces":147}],127:[function(e,t,r){function n(r){return function(e){var t=String(o(e));return 1&r&&(t=t.replace(a,"")),2&r&&(t=t.replace(s,"")),t}}var o=e("../internals/require-object-coercible"),i="["+e("../internals/whitespaces")+"]",a=RegExp("^"+i+i+"*"),s=RegExp(i+i+"*$");t.exports={start:n(1),end:n(2),trim:n(3)}},{"../internals/require-object-coercible":113,"../internals/whitespaces":147}],128:[function(e,t,r){function n(e){if(S.hasOwnProperty(e)){var t=S[e];delete S[e],t()}}function o(e){return function(){n(e)}}function i(e){n(e.data)}function a(e){c.postMessage(e+"",g.protocol+"//"+g.host)}var s,l,u,c=e("../internals/global"),d=e("../internals/fails"),f=e("../internals/classof-raw"),h=e("../internals/function-bind-context"),p=e("../internals/html"),y=e("../internals/document-create-element"),m=e("../internals/engine-is-ios"),g=c.location,v=c.setImmediate,b=c.clearImmediate,_=c.process,x=c.MessageChannel,w=c.Dispatch,j=0,S={},M="onreadystatechange";v&&b||(v=function(e){for(var t=[],r=1;r >>16,e[r+1]=(65280&t[n])>>>8,e[r+2]=255&t[n],e[r+3]=(4278190080&t[n])>>>24},A._toImageData=function(e){return e instanceof ImageData?e:e.getContext("2d").getImageData(0,0,e.width,e.height)},A._createImageData=function(e,t){return A._tmpCanvas=document.createElement("canvas"),A._tmpCtx=A._tmpCanvas.getContext("2d"),this._tmpCtx.createImageData(e,t)},A.apply=function(e,t,r){var n=e.getContext("2d"),o=n.getImageData(0,0,e.width,e.height),i=t(o,r);i instanceof ImageData?n.putImageData(i,0,0,0,0,e.width,e.height):n.putImageData(o,0,0,0,0,e.width,e.height)},A.threshold=function(e,t){var r=A._toPixels(e);void 0===t&&(t=.5);for(var n=Math.floor(255*t),o=0;o>8,++v;var _=b;if(n").concat(t," ");this.dummyDOM||(this.dummyDOM=document.getElementById(n).parentNode),this.descriptions?this.descriptions.fallbackElements||(this.descriptions.fallbackElements={}):this.descriptions={fallbackElements:{}},this.descriptions.fallbackElements[e]?this.descriptions.fallbackElements[e].innerHTML!==i&&(this.descriptions.fallbackElements[e].innerHTML=i):this._describeElementHTML("fallback",e,i),r===this.LABEL&&(this.descriptions.labelElements||(this.descriptions.labelElements={}),this.descriptions.labelElements[e]?this.descriptions.labelElements[e].innerHTML!==i&&(this.descriptions.labelElements[e].innerHTML=i):this._describeElementHTML("label",e,i))}},a.default.prototype._describeHTML=function(e,t){var r=this.canvas.id;if("fallback"===e){if(this.dummyDOM.querySelector("#".concat(r+l)))this.dummyDOM.querySelector("#"+r+c).insertAdjacentHTML("beforebegin",''));else{var n='
'));else{var o=''));else{var a='
";for(var d in o[u])c+=" "}return n}(e,this.ingredients.shapes);n!==t.summary.innerHTML&&(t.summary.innerHTML=n),o!==t.map.innerHTML&&(t.map.innerHTML=o),r.details!==t.shapeDetails.innerHTML&&(t.shapeDetails.innerHTML=r.details),this._accessibleOutputs[e]=t}};var i=o.default;r.default=i},{"../core/main":264,"core-js/modules/es.array.concat":149,"core-js/modules/es.array.map":161}],246:[function(e,t,r){"use strict";e("core-js/modules/es.array.concat"),e("core-js/modules/es.array.fill"),e("core-js/modules/es.array.map"),e("core-js/modules/es.number.to-fixed"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../core/main"))&&n.__esModule?n:{default:n};function l(e,t,r){return e[0]<.4*t?e[1]<.4*r?"top left":e[1]>.6*r?"bottom left":"mid left":e[0]>.6*t?e[1]<.4*r?"top right":e[1]>.6*r?"bottom right":"mid right":e[1]<.4*r?"top middle":e[1]>.6*r?"bottom middle":"middle"}function u(e,t,r){var n=Math.floor(e[0]/t*10),o=Math.floor(e[1]/r*10);return 10===n&&--n,10===o&&--o,{locX:n,locY:o}}o.default.prototype.textOutput=function(e){o.default._validateParameters("textOutput",arguments),this._accessibleOutputs.text||(this._accessibleOutputs.text=!0,this._createOutput("textOutput","Fallback"),e===this.LABEL&&(this._accessibleOutputs.textLabel=!0,this._createOutput("textOutput","Label")))},o.default.prototype.gridOutput=function(e){o.default._validateParameters("gridOutput",arguments),this._accessibleOutputs.grid||(this._accessibleOutputs.grid=!0,this._createOutput("gridOutput","Fallback"),e===this.LABEL&&(this._accessibleOutputs.gridLabel=!0,this._createOutput("gridOutput","Label")))},o.default.prototype._addAccsOutput=function(){return this._accessibleOutputs||(this._accessibleOutputs={text:!1,grid:!1,textLabel:!1,gridLabel:!1}),this._accessibleOutputs.grid||this._accessibleOutputs.text},o.default.prototype._createOutput=function(e,t){var r,n,o,i=this.canvas.id;this.ingredients||(this.ingredients={shapes:{},colors:{background:"white",fill:"white",stroke:"black"},pShapes:""}),this.dummyDOM||(this.dummyDOM=document.getElementById(i).parentNode);var a="";"Fallback"===t?(r=i+e,n=i+"accessibleOutput",this.dummyDOM.querySelector("#".concat(n))||(this.dummyDOM.querySelector("#".concat(i,"_Description"))?this.dummyDOM.querySelector("#".concat(i,"_Description")).insertAdjacentHTML("afterend",'')):this.dummyDOM.querySelector("#".concat(i)).innerHTML=''))):"Label"===t&&(r=i+e+(a=t),n=i+"accessibleOutput"+t,this.dummyDOM.querySelector("#".concat(n))||(this.dummyDOM.querySelector("#".concat(i,"_Label"))?this.dummyDOM.querySelector("#".concat(i,"_Label")).insertAdjacentHTML("afterend",'')):this.dummyDOM.querySelector("#".concat(i)).insertAdjacentHTML("afterend",'')))),this._accessibleOutputs[r]={},"textOutput"===e?(a="#".concat(i,"gridOutput").concat(a),o='",void 0!==o[u][d]&&(c+=o[u][d]),c+=" ";n=n+c+" "):(a+="').concat(t[o][i].color," ").concat(o," ");"line"===o?a+="location = ".concat(t[o][i].pos," length = ").concat(t[o][i].length," pixels location = ".concat(t[o][i].pos," "),"point"!==o&&(a+=" area = ".concat(t[o][i].area,"% ")),a+=""),r+=a,n++}return r}(e,this.ingredients.shapes);n!==t.summary.innerHTML&&(t.summary.innerHTML=n),r.listShapes!==t.list.innerHTML&&(t.list.innerHTML=r.listShapes),o!==t.shapeDetails.innerHTML&&(t.shapeDetails.innerHTML=o),this._accessibleOutputs[e]=t}};var i=o.default;r.default=i},{"../core/main":264,"core-js/modules/es.array.concat":149}],248:[function(e,t,r){"use strict";var n,o=(n=e("./core/main"))&&n.__esModule?n:{default:n};e("./core/constants"),e("./core/environment"),e("./core/friendly_errors/stacktrace"),e("./core/friendly_errors/validate_params"),e("./core/friendly_errors/file_errors"),e("./core/friendly_errors/fes_core"),e("./core/friendly_errors/sketch_reader"),e("./core/helpers"),e("./core/legacy"),e("./core/preload"),e("./core/p5.Element"),e("./core/p5.Graphics"),e("./core/p5.Renderer"),e("./core/p5.Renderer2D"),e("./core/rendering"),e("./core/shim"),e("./core/structure"),e("./core/transform"),e("./core/shape/2d_primitives"),e("./core/shape/attributes"),e("./core/shape/curves"),e("./core/shape/vertex"),e("./accessibility/outputs"),e("./accessibility/textOutput"),e("./accessibility/gridOutput"),e("./accessibility/color_namer"),e("./color/color_conversion"),e("./color/creating_reading"),e("./color/p5.Color"),e("./color/setting"),e("./data/p5.TypedDict"),e("./data/local_storage.js"),e("./dom/dom"),e("./accessibility/describe"),e("./events/acceleration"),e("./events/keyboard"),e("./events/mouse"),e("./events/touch"),e("./image/filters"),e("./image/image"),e("./image/loading_displaying"),e("./image/p5.Image"),e("./image/pixels"),e("./io/files"),e("./io/p5.Table"),e("./io/p5.TableRow"),e("./io/p5.XML"),e("./math/calculation"),e("./math/math"),e("./math/noise"),e("./math/p5.Vector"),e("./math/random"),e("./math/trigonometry"),e("./typography/attributes"),e("./typography/loading_displaying"),e("./typography/p5.Font"),e("./utilities/array_functions"),e("./utilities/conversion"),e("./utilities/string_functions"),e("./utilities/time_date"),e("./webgl/3d_primitives"),e("./webgl/interaction"),e("./webgl/light"),e("./webgl/loading"),e("./webgl/material"),e("./webgl/p5.Camera"),e("./webgl/p5.Geometry"),e("./webgl/p5.Matrix"),e("./webgl/p5.RendererGL.Immediate"),e("./webgl/p5.RendererGL"),e("./webgl/p5.RendererGL.Retained"),e("./webgl/p5.Shader"),e("./webgl/p5.RenderBuffer"),e("./webgl/p5.Texture"),e("./webgl/text"),e("./core/init"),t.exports=o.default},{"./accessibility/color_namer":243,"./accessibility/describe":244,"./accessibility/gridOutput":245,"./accessibility/outputs":246,"./accessibility/textOutput":247,"./color/color_conversion":249,"./color/creating_reading":250,"./color/p5.Color":251,"./color/setting":252,"./core/constants":253,"./core/environment":254,"./core/friendly_errors/fes_core":255,"./core/friendly_errors/file_errors":256,"./core/friendly_errors/sketch_reader":257,"./core/friendly_errors/stacktrace":258,"./core/friendly_errors/validate_params":259,"./core/helpers":260,"./core/init":261,"./core/legacy":263,"./core/main":264,"./core/p5.Element":265,"./core/p5.Graphics":266,"./core/p5.Renderer":267,"./core/p5.Renderer2D":268,"./core/preload":269,"./core/rendering":270,"./core/shape/2d_primitives":271,"./core/shape/attributes":272,"./core/shape/curves":273,"./core/shape/vertex":274,"./core/shim":275,"./core/structure":276,"./core/transform":277,"./data/local_storage.js":278,"./data/p5.TypedDict":279,"./dom/dom":280,"./events/acceleration":281,"./events/keyboard":282,"./events/mouse":283,"./events/touch":284,"./image/filters":285,"./image/image":286,"./image/loading_displaying":287,"./image/p5.Image":288,"./image/pixels":289,"./io/files":290,"./io/p5.Table":291,"./io/p5.TableRow":292,"./io/p5.XML":293,"./math/calculation":294,"./math/math":295,"./math/noise":296,"./math/p5.Vector":297,"./math/random":298,"./math/trigonometry":299,"./typography/attributes":300,"./typography/loading_displaying":301,"./typography/p5.Font":302,"./utilities/array_functions":303,"./utilities/conversion":304,"./utilities/string_functions":305,"./utilities/time_date":306,"./webgl/3d_primitives":307,"./webgl/interaction":308,"./webgl/light":309,"./webgl/loading":310,"./webgl/material":311,"./webgl/p5.Camera":312,"./webgl/p5.Geometry":313,"./webgl/p5.Matrix":314,"./webgl/p5.RenderBuffer":315,"./webgl/p5.RendererGL":318,"./webgl/p5.RendererGL.Immediate":316,"./webgl/p5.RendererGL.Retained":317,"./webgl/p5.Shader":319,"./webgl/p5.Texture":320,"./webgl/text":321}],249:[function(e,t,r){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,o=(n=e("../core/main"))&&n.__esModule?n:{default:n};o.default.ColorConversion={},o.default.ColorConversion._hsbaToHSLA=function(e){var t=e[0],r=e[1],n=e[2],o=(2-r)*n/2;return 0!=o&&(1==o?r=0:o<.5?r/=2-r:r=r*n/(2-2*o)),[t,r,o,e[3]]},o.default.ColorConversion._hsbaToRGBA=function(e){var t=6*e[0],r=e[1],n=e[2],o=[];if(0===r)o=[n,n,n,e[3]];else{var i,a,s,l=Math.floor(t),u=n*(1-r),c=n*(1-r*(t-l)),d=n*(1-r*(1+l-t));s=1===l?(i=c,a=n,u):2===l?(i=u,a=n,d):3===l?(i=u,a=c,n):4===l?(i=d,a=u,n):5===l?(i=n,a=u,c):(i=n,a=d,u),o=[i,a,s,e[3]]}return o},o.default.ColorConversion._hslaToHSBA=function(e){var t,r=e[0],n=e[1],o=e[2];return[r,n=2*((t=o<.5?(1+n)*o:o+n-o*n)-o)/t,t,e[3]]},o.default.ColorConversion._hslaToRGBA=function(e){var t=6*e[0],r=e[1],n=e[2],o=[];if(0===r)o=[n,n,n,e[3]];else{var i,a=2*n-(i=n<.5?(1+r)*n:n+r-n*r),s=function(e,t,r){return e<0?e+=6:6<=e&&(e-=6),e<1?t+(r-t)*e:e<3?r:e<4?t+(r-t)*(4-e):t};o=[s(2+t,a,i),s(t,a,i),s(t-2,a,i),e[3]]}return o},o.default.ColorConversion._rgbaToHSBA=function(e){var t,r,n=e[0],o=e[1],i=e[2],a=Math.max(n,o,i),s=a-Math.min(n,o,i);return 0==s?r=t=0:(r=s/a,n===a?t=(o-i)/s:o===a?t=2+(i-n)/s:i===a&&(t=4+(n-o)/s),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,a,e[3]]},o.default.ColorConversion._rgbaToHSLA=function(e){var t,r,n=e[0],o=e[1],i=e[2],a=Math.max(n,o,i),s=Math.min(n,o,i),l=a+s,u=a-s;return 0==u?r=t=0:(r=l<1?u/l:u/(2-l),n===a?t=(o-i)/u:o===a?t=2+(i-n)/u:i===a&&(t=4+(n-o)/u),t<0?t+=6:6<=t&&(t-=6)),[t/6,r,l/2,e[3]]};var i=o.default.ColorConversion;r.default=i},{"../core/main":264}],250:[function(e,t,r){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e("core-js/modules/es.array.map"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var n,d=(n=e("../core/main"))&&n.__esModule?n:{default:n},f=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}e("./p5.Color"),e("../core/friendly_errors/validate_params"),e("../core/friendly_errors/file_errors"),e("../core/friendly_errors/fes_core"),d.default.prototype.alpha=function(e){return d.default._validateParameters("alpha",arguments),this.color(e)._getAlpha()},d.default.prototype.blue=function(e){return d.default._validateParameters("blue",arguments),this.color(e)._getBlue()},d.default.prototype.brightness=function(e){return d.default._validateParameters("brightness",arguments),this.color(e)._getBrightness()},d.default.prototype.color=function(){if(d.default._validateParameters("color",arguments),arguments[0]instanceof d.default.Color)return arguments[0];var e=arguments[0]instanceof Array?arguments[0]:arguments;return new d.default.Color(this,e)},d.default.prototype.green=function(e){return d.default._validateParameters("green",arguments),this.color(e)._getGreen()},d.default.prototype.hue=function(e){return d.default._validateParameters("hue",arguments),this.color(e)._getHue()},d.default.prototype.lerpColor=function(e,t,r){d.default._validateParameters("lerpColor",arguments);var n,o,i,a,s,l,u=this._colorMode,c=this._colorMaxes;if(u===f.RGB)s=e.levels.map(function(e){return e/255}),l=t.levels.map(function(e){return e/255});else if(u===f.HSB)e._getBrightness(),t._getBrightness(),s=e.hsba,l=t.hsba;else{if(u!==f.HSL)throw new Error("".concat(u,"cannot be used for interpolation."));e._getLightness(),t._getLightness(),s=e.hsla,l=t.hsla}return r=Math.max(Math.min(r,1),0),void 0===this.lerp&&(this.lerp=function(e,t,r){return r*(t-e)+e}),n=this.lerp(s[0],l[0],r),o=this.lerp(s[1],l[1],r),i=this.lerp(s[2],l[2],r),a=this.lerp(s[3],l[3],r),n*=c[u][0],o*=c[u][1],i*=c[u][2],a*=c[u][3],this.color(n,o,i,a)},d.default.prototype.lightness=function(e){return d.default._validateParameters("lightness",arguments),this.color(e)._getLightness()},d.default.prototype.red=function(e){return d.default._validateParameters("red",arguments),this.color(e)._getRed()},d.default.prototype.saturation=function(e){return d.default._validateParameters("saturation",arguments),this.color(e)._getSaturation()};var o=d.default;r.default=o},{"../core/constants":253,"../core/friendly_errors/fes_core":255,"../core/friendly_errors/file_errors":256,"../core/friendly_errors/validate_params":259,"../core/main":264,"./p5.Color":251,"core-js/modules/es.array.map":161}],251:[function(e,t,r){"use strict";function a(e){return(a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}e("core-js/modules/es.array.join"),e("core-js/modules/es.array.map"),e("core-js/modules/es.array.slice"),e("core-js/modules/es.object.to-string"),e("core-js/modules/es.regexp.constructor"),e("core-js/modules/es.regexp.exec"),e("core-js/modules/es.regexp.to-string"),e("core-js/modules/es.string.trim"),Object.defineProperty(r,"__esModule",{value:!0}),r.default=void 0;var d=n(e("../core/main")),f=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var t=s();if(t&&t.has(e))return t.get(e);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var i=n?Object.getOwnPropertyDescriptor(e,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=e[o]}r.default=e,t&&t.set(e,r);return r}(e("../core/constants")),h=n(e("./color_conversion"));function s(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return s=function(){return e},e}function n(e){return e&&e.__esModule?e:{default:e}}d.default.Color=function(e,t){if(this._storeModeAndMaxes(e._colorMode,e._colorMaxes),this.mode!==f.RGB&&this.mode!==f.HSL&&this.mode!==f.HSB)throw new Error("".concat(this.mode," is an invalid colorMode."));return this._array=d.default.Color._parseInputs.apply(this,t),this._calculateLevels(),this},d.default.Color.prototype.toString=function(e){var t=this.levels,r=this._array,n=r[3];switch(e){case"#rrggbb":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16));case"#rrggbbaa":return"#".concat(t[0]<16?"0".concat(t[0].toString(16)):t[0].toString(16),t[1]<16?"0".concat(t[1].toString(16)):t[1].toString(16),t[2]<16?"0".concat(t[2].toString(16)):t[2].toString(16),t[3]<16?"0".concat(t[3].toString(16)):t[3].toString(16));case"#rgb":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16));case"#rgba":return"#".concat(Math.round(15*r[0]).toString(16),Math.round(15*r[1]).toString(16),Math.round(15*r[2]).toString(16),Math.round(15*r[3]).toString(16));case"rgb":return"rgb(".concat(t[0],", ",t[1],", ",t[2],")");case"rgb%":return"rgb(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%)");case"rgba%":return"rgba(".concat((100*r[0]).toPrecision(3),"%, ",(100*r[1]).toPrecision(3),"%, ",(100*r[2]).toPrecision(3),"%, ",(100*r[3]).toPrecision(3),"%)");case"hsb":case"hsv":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsb(".concat(this.hsba[0]*this.maxes[f.HSB][0],", ",this.hsba[1]*this.maxes[f.HSB][1],", ",this.hsba[2]*this.maxes[f.HSB][2],")");case"hsb%":case"hsv%":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsb(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%)");case"hsba":case"hsva":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsba(".concat(this.hsba[0]*this.maxes[f.HSB][0],", ",this.hsba[1]*this.maxes[f.HSB][1],", ",this.hsba[2]*this.maxes[f.HSB][2],", ",n,")");case"hsba%":case"hsva%":return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),"hsba(".concat((100*this.hsba[0]).toPrecision(3),"%, ",(100*this.hsba[1]).toPrecision(3),"%, ",(100*this.hsba[2]).toPrecision(3),"%, ",(100*n).toPrecision(3),"%)");case"hsl":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsl(".concat(this.hsla[0]*this.maxes[f.HSL][0],", ",this.hsla[1]*this.maxes[f.HSL][1],", ",this.hsla[2]*this.maxes[f.HSL][2],")");case"hsl%":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%)");case"hsla":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsla(".concat(this.hsla[0]*this.maxes[f.HSL][0],", ",this.hsla[1]*this.maxes[f.HSL][1],", ",this.hsla[2]*this.maxes[f.HSL][2],", ",n,")");case"hsla%":return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),"hsl(".concat((100*this.hsla[0]).toPrecision(3),"%, ",(100*this.hsla[1]).toPrecision(3),"%, ",(100*this.hsla[2]).toPrecision(3),"%, ",(100*n).toPrecision(3),"%)");case"rgba":default:return"rgba(".concat(t[0],",",t[1],",",t[2],",",n,")")}},d.default.Color.prototype.setRed=function(e){this._array[0]=e/this.maxes[f.RGB][0],this._calculateLevels()},d.default.Color.prototype.setGreen=function(e){this._array[1]=e/this.maxes[f.RGB][1],this._calculateLevels()},d.default.Color.prototype.setBlue=function(e){this._array[2]=e/this.maxes[f.RGB][2],this._calculateLevels()},d.default.Color.prototype.setAlpha=function(e){this._array[3]=e/this.maxes[this.mode][3],this._calculateLevels()},d.default.Color.prototype._calculateLevels=function(){for(var e=this._array,t=this.levels=new Array(e.length),r=e.length-1;0<=r;--r)t[r]=Math.round(255*e[r])},d.default.Color.prototype._getAlpha=function(){return this._array[3]*this.maxes[this.mode][3]},d.default.Color.prototype._storeModeAndMaxes=function(e,t){this.mode=e,this.maxes=t},d.default.Color.prototype._getMode=function(){return this.mode},d.default.Color.prototype._getMaxes=function(){return this.maxes},d.default.Color.prototype._getBlue=function(){return this._array[2]*this.maxes[f.RGB][2]},d.default.Color.prototype._getBrightness=function(){return this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),this.hsba[2]*this.maxes[f.HSB][2]},d.default.Color.prototype._getGreen=function(){return this._array[1]*this.maxes[f.RGB][1]},d.default.Color.prototype._getHue=function(){return this.mode===f.HSB?(this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),this.hsba[0]*this.maxes[f.HSB][0]):(this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),this.hsla[0]*this.maxes[f.HSL][0])},d.default.Color.prototype._getLightness=function(){return this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),this.hsla[2]*this.maxes[f.HSL][2]},d.default.Color.prototype._getRed=function(){return this._array[0]*this.maxes[f.RGB][0]},d.default.Color.prototype._getSaturation=function(){return this.mode===f.HSB?(this.hsba||(this.hsba=h.default._rgbaToHSBA(this._array)),this.hsba[1]*this.maxes[f.HSB][1]):(this.hsla||(this.hsla=h.default._rgbaToHSLA(this._array)),this.hsla[1]*this.maxes[f.HSL][1])};var p={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},o=/\s*/,i=/(\d{1,3})/,l=/((?:\d+(?:\.\d+)?)|(?:\.\d+))/,u=new RegExp("".concat(l.source,"%")),y={HEX3:/^#([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX4:/^#([a-f0-9])([a-f0-9])([a-f0-9])([a-f0-9])$/i,HEX6:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,HEX8:/^#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i,RGB:new RegExp(["^rgb\\(",i.source,",",i.source,",",i.source,"\\)$"].join(o.source),"i"),RGB_PERCENT:new RegExp(["^rgb\\(",u.source,",",u.source,",",u.source,"\\)$"].join(o.source),"i"),RGBA:new RegExp(["^rgba\\(",i.source,",",i.source,",",i.source,",",l.source,"\\)$"].join(o.source),"i"),RGBA_PERCENT:new RegExp(["^rgba\\(",u.source,",",u.source,",",u.source,",",l.source,"\\)$"].join(o.source),"i"),HSL:new RegExp(["^hsl\\(",i.source,",",u.source,",",u.source,"\\)$"].join(o.source),"i"),HSLA:new RegExp(["^hsla\\(",i.source,",",u.source,",",u.source,",",l.source,"\\)$"].join(o.source),"i"),HSB:new RegExp(["^hsb\\(",i.source,",",u.source,",",u.source,"\\)$"].join(o.source),"i"),HSBA:new RegExp(["^hsba\\(",i.source,",",u.source,",",u.source,",",l.source,"\\)$"].join(o.source),"i")};d.default.Color._parseInputs=function(e,t,r,n){var o,i=arguments.length,a=this.mode,s=this.maxes[a],l=[];if(3<=i){for(l[0]=e/s[0],l[1]=t/s[1],l[2]=r/s[2],l[3]="number"==typeof n?n/s[3]:1,o=l.length-1;0<=o;--o){var u=l[o];u<0?l[o]=0:1"].indexOf(o[0])?void 0:o[0],lineNumber:o[1],columnNumber:o[2],source:e}},this)},parseFFOrSafari:function(e){return e.stack.split("\n").filter(function(e){return!e.match(n)},this).map(function(e){if(-1"),"0"!==i[0]){o.print("
"),o.print(""),o.print("");for(var c=0;c ")}for(var f=0;f