{"version":3,"file":"index-DqRJSVXK.js","sources":["../../node_modules/@vue/shared/dist/shared.esm-bundler.js","../../node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js","../../node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js","../../node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js","../../src/lang/desc/en3dgol.html?raw","../../src/lang/desc/enArtisKit Web Designer.html?raw","../../src/lang/desc/enBook Bunker.html?raw","../../src/lang/desc/enChifoumi.html?raw","../../src/lang/desc/enDraph.html?raw","../../src/lang/desc/enFlagle.html?raw","../../src/lang/desc/enFun.html?raw","../../src/lang/desc/enTempos.html?raw","../../src/lang/desc/enWordle Bot.html?raw","../../src/lang/desc/fr3dgol.html?raw","../../src/lang/desc/frArtisKit Web Designer.html?raw","../../src/lang/desc/frBook Bunker.html?raw","../../src/lang/desc/frChifoumi.html?raw","../../src/lang/desc/frDraph.html?raw","../../src/lang/desc/frFlagle.html?raw","../../src/lang/desc/frFun.html?raw","../../src/lang/desc/frTempos.html?raw","../../src/lang/desc/frWordle Bot.html?raw","../../src/lang.js","../../src/components/Card.vue","../../src/assets/img/D.webp","../../src/assets/img/bookbunker.webp","../../src/assets/img/wordleai.webp","../../src/assets/img/tempos.webp","../../src/assets/img/chifoumi.webp","../../src/assets/img/flagle.webp","../../src/assets/img/awd.webp","../../src/assets/img/fun.webp","../../src/assets/img/threedgol.webp","../../src/assets/img/fabricjs.webp","../../src/assets/img/vuejs.webp","../../src/assets/img/tailwindcss.webp","../../src/assets/img/kotlin.webp","../../src/assets/img/svelte.webp","../../src/assets/img/threejs.webp","../../src/views/projects.js","../../src/views/About.vue","../../src/assets/github.svg","../../src/assets/spotify.svg","../../src/assets/envelope-solid.svg","../../node_modules/matter-js/build/matter.js","../../src/views/Contact.vue","../../src/assets/img/badge.png","../../src/views/oo.vue","../../../../COW.webp","../../src/assets/up-arrow-icon.svg","../../src/App.vue","../../src/main.ts"],"sourcesContent":["/**\n* @vue/shared v3.5.12\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction makeMap(str) {\n const map = /* @__PURE__ */ Object.create(null);\n for (const key of str.split(\",\")) map[key] = 1;\n return (val) => val in map;\n}\n\nconst EMPTY_OBJ = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze({}) : {};\nconst EMPTY_ARR = !!(process.env.NODE_ENV !== \"production\") ? Object.freeze([]) : [];\nconst NOOP = () => {\n};\nconst NO = () => false;\nconst isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter\n(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97);\nconst isModelListener = (key) => key.startsWith(\"onUpdate:\");\nconst extend = Object.assign;\nconst remove = (arr, el) => {\n const i = arr.indexOf(el);\n if (i > -1) {\n arr.splice(i, 1);\n }\n};\nconst hasOwnProperty = Object.prototype.hasOwnProperty;\nconst hasOwn = (val, key) => hasOwnProperty.call(val, key);\nconst isArray = Array.isArray;\nconst isMap = (val) => toTypeString(val) === \"[object Map]\";\nconst isSet = (val) => toTypeString(val) === \"[object Set]\";\nconst isDate = (val) => toTypeString(val) === \"[object Date]\";\nconst isRegExp = (val) => toTypeString(val) === \"[object RegExp]\";\nconst isFunction = (val) => typeof val === \"function\";\nconst isString = (val) => typeof val === \"string\";\nconst isSymbol = (val) => typeof val === \"symbol\";\nconst isObject = (val) => val !== null && typeof val === \"object\";\nconst isPromise = (val) => {\n return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);\n};\nconst objectToString = Object.prototype.toString;\nconst toTypeString = (value) => objectToString.call(value);\nconst toRawType = (value) => {\n return toTypeString(value).slice(8, -1);\n};\nconst isPlainObject = (val) => toTypeString(val) === \"[object Object]\";\nconst isIntegerKey = (key) => isString(key) && key !== \"NaN\" && key[0] !== \"-\" && \"\" + parseInt(key, 10) === key;\nconst isReservedProp = /* @__PURE__ */ makeMap(\n // the leading comma is intentional so empty string \"\" is also included\n \",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted\"\n);\nconst isBuiltInDirective = /* @__PURE__ */ makeMap(\n \"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo\"\n);\nconst cacheStringFunction = (fn) => {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\n};\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction(\n (str) => {\n return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n }\n);\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction(\n (str) => str.replace(hyphenateRE, \"-$1\").toLowerCase()\n);\nconst capitalize = cacheStringFunction((str) => {\n return str.charAt(0).toUpperCase() + str.slice(1);\n});\nconst toHandlerKey = cacheStringFunction(\n (str) => {\n const s = str ? `on${capitalize(str)}` : ``;\n return s;\n }\n);\nconst hasChanged = (value, oldValue) => !Object.is(value, oldValue);\nconst invokeArrayFns = (fns, ...arg) => {\n for (let i = 0; i < fns.length; i++) {\n fns[i](...arg);\n }\n};\nconst def = (obj, key, value, writable = false) => {\n Object.defineProperty(obj, key, {\n configurable: true,\n enumerable: false,\n writable,\n value\n });\n};\nconst looseToNumber = (val) => {\n const n = parseFloat(val);\n return isNaN(n) ? val : n;\n};\nconst toNumber = (val) => {\n const n = isString(val) ? Number(val) : NaN;\n return isNaN(n) ? val : n;\n};\nlet _globalThis;\nconst getGlobalThis = () => {\n return _globalThis || (_globalThis = typeof globalThis !== \"undefined\" ? globalThis : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : {});\n};\nconst identRE = /^[_$a-zA-Z\\xA0-\\uFFFF][_$a-zA-Z0-9\\xA0-\\uFFFF]*$/;\nfunction genPropsAccessExp(name) {\n return identRE.test(name) ? `__props.${name}` : `__props[${JSON.stringify(name)}]`;\n}\nfunction genCacheKey(source, options) {\n return source + JSON.stringify(\n options,\n (_, val) => typeof val === \"function\" ? val.toString() : val\n );\n}\n\nconst PatchFlags = {\n \"TEXT\": 1,\n \"1\": \"TEXT\",\n \"CLASS\": 2,\n \"2\": \"CLASS\",\n \"STYLE\": 4,\n \"4\": \"STYLE\",\n \"PROPS\": 8,\n \"8\": \"PROPS\",\n \"FULL_PROPS\": 16,\n \"16\": \"FULL_PROPS\",\n \"NEED_HYDRATION\": 32,\n \"32\": \"NEED_HYDRATION\",\n \"STABLE_FRAGMENT\": 64,\n \"64\": \"STABLE_FRAGMENT\",\n \"KEYED_FRAGMENT\": 128,\n \"128\": \"KEYED_FRAGMENT\",\n \"UNKEYED_FRAGMENT\": 256,\n \"256\": \"UNKEYED_FRAGMENT\",\n \"NEED_PATCH\": 512,\n \"512\": \"NEED_PATCH\",\n \"DYNAMIC_SLOTS\": 1024,\n \"1024\": \"DYNAMIC_SLOTS\",\n \"DEV_ROOT_FRAGMENT\": 2048,\n \"2048\": \"DEV_ROOT_FRAGMENT\",\n \"CACHED\": -1,\n \"-1\": \"CACHED\",\n \"BAIL\": -2,\n \"-2\": \"BAIL\"\n};\nconst PatchFlagNames = {\n [1]: `TEXT`,\n [2]: `CLASS`,\n [4]: `STYLE`,\n [8]: `PROPS`,\n [16]: `FULL_PROPS`,\n [32]: `NEED_HYDRATION`,\n [64]: `STABLE_FRAGMENT`,\n [128]: `KEYED_FRAGMENT`,\n [256]: `UNKEYED_FRAGMENT`,\n [512]: `NEED_PATCH`,\n [1024]: `DYNAMIC_SLOTS`,\n [2048]: `DEV_ROOT_FRAGMENT`,\n [-1]: `HOISTED`,\n [-2]: `BAIL`\n};\n\nconst ShapeFlags = {\n \"ELEMENT\": 1,\n \"1\": \"ELEMENT\",\n \"FUNCTIONAL_COMPONENT\": 2,\n \"2\": \"FUNCTIONAL_COMPONENT\",\n \"STATEFUL_COMPONENT\": 4,\n \"4\": \"STATEFUL_COMPONENT\",\n \"TEXT_CHILDREN\": 8,\n \"8\": \"TEXT_CHILDREN\",\n \"ARRAY_CHILDREN\": 16,\n \"16\": \"ARRAY_CHILDREN\",\n \"SLOTS_CHILDREN\": 32,\n \"32\": \"SLOTS_CHILDREN\",\n \"TELEPORT\": 64,\n \"64\": \"TELEPORT\",\n \"SUSPENSE\": 128,\n \"128\": \"SUSPENSE\",\n \"COMPONENT_SHOULD_KEEP_ALIVE\": 256,\n \"256\": \"COMPONENT_SHOULD_KEEP_ALIVE\",\n \"COMPONENT_KEPT_ALIVE\": 512,\n \"512\": \"COMPONENT_KEPT_ALIVE\",\n \"COMPONENT\": 6,\n \"6\": \"COMPONENT\"\n};\n\nconst SlotFlags = {\n \"STABLE\": 1,\n \"1\": \"STABLE\",\n \"DYNAMIC\": 2,\n \"2\": \"DYNAMIC\",\n \"FORWARDED\": 3,\n \"3\": \"FORWARDED\"\n};\nconst slotFlagsText = {\n [1]: \"STABLE\",\n [2]: \"DYNAMIC\",\n [3]: \"FORWARDED\"\n};\n\nconst GLOBALS_ALLOWED = \"Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol\";\nconst isGloballyAllowed = /* @__PURE__ */ makeMap(GLOBALS_ALLOWED);\nconst isGloballyWhitelisted = isGloballyAllowed;\n\nconst range = 2;\nfunction generateCodeFrame(source, start = 0, end = source.length) {\n start = Math.max(0, Math.min(start, source.length));\n end = Math.max(0, Math.min(end, source.length));\n if (start > end) return \"\";\n let lines = source.split(/(\\r?\\n)/);\n const newlineSequences = lines.filter((_, idx) => idx % 2 === 1);\n lines = lines.filter((_, idx) => idx % 2 === 0);\n let count = 0;\n const res = [];\n for (let i = 0; i < lines.length; i++) {\n count += lines[i].length + (newlineSequences[i] && newlineSequences[i].length || 0);\n if (count >= start) {\n for (let j = i - range; j <= i + range || end > count; j++) {\n if (j < 0 || j >= lines.length) continue;\n const line = j + 1;\n res.push(\n `${line}${\" \".repeat(Math.max(3 - String(line).length, 0))}| ${lines[j]}`\n );\n const lineLength = lines[j].length;\n const newLineSeqLength = newlineSequences[j] && newlineSequences[j].length || 0;\n if (j === i) {\n const pad = start - (count - (lineLength + newLineSeqLength));\n const length = Math.max(\n 1,\n end > count ? lineLength - pad : end - start\n );\n res.push(` | ` + \" \".repeat(pad) + \"^\".repeat(length));\n } else if (j > i) {\n if (end > count) {\n const length = Math.max(Math.min(end - count, lineLength), 1);\n res.push(` | ` + \"^\".repeat(length));\n }\n count += lineLength + newLineSeqLength;\n }\n }\n break;\n }\n }\n return res.join(\"\\n\");\n}\n\nfunction normalizeStyle(value) {\n if (isArray(value)) {\n const res = {};\n for (let i = 0; i < value.length; i++) {\n const item = value[i];\n const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item);\n if (normalized) {\n for (const key in normalized) {\n res[key] = normalized[key];\n }\n }\n }\n return res;\n } else if (isString(value) || isObject(value)) {\n return value;\n }\n}\nconst listDelimiterRE = /;(?![^(]*\\))/g;\nconst propertyDelimiterRE = /:([^]+)/;\nconst styleCommentRE = /\\/\\*[^]*?\\*\\//g;\nfunction parseStringStyle(cssText) {\n const ret = {};\n cssText.replace(styleCommentRE, \"\").split(listDelimiterRE).forEach((item) => {\n if (item) {\n const tmp = item.split(propertyDelimiterRE);\n tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());\n }\n });\n return ret;\n}\nfunction stringifyStyle(styles) {\n let ret = \"\";\n if (!styles || isString(styles)) {\n return ret;\n }\n for (const key in styles) {\n const value = styles[key];\n if (isString(value) || typeof value === \"number\") {\n const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key);\n ret += `${normalizedKey}:${value};`;\n }\n }\n return ret;\n}\nfunction normalizeClass(value) {\n let res = \"\";\n if (isString(value)) {\n res = value;\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n const normalized = normalizeClass(value[i]);\n if (normalized) {\n res += normalized + \" \";\n }\n }\n } else if (isObject(value)) {\n for (const name in value) {\n if (value[name]) {\n res += name + \" \";\n }\n }\n }\n return res.trim();\n}\nfunction normalizeProps(props) {\n if (!props) return null;\n let { class: klass, style } = props;\n if (klass && !isString(klass)) {\n props.class = normalizeClass(klass);\n }\n if (style) {\n props.style = normalizeStyle(style);\n }\n return props;\n}\n\nconst HTML_TAGS = \"html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot\";\nconst SVG_TAGS = \"svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view\";\nconst MATH_TAGS = \"annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics\";\nconst VOID_TAGS = \"area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr\";\nconst isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);\nconst isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);\nconst isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);\nconst isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);\n\nconst specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;\nconst isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);\nconst isBooleanAttr = /* @__PURE__ */ makeMap(\n specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`\n);\nfunction includeBooleanAttr(value) {\n return !!value || value === \"\";\n}\nconst unsafeAttrCharRE = /[>/=\"'\\u0009\\u000a\\u000c\\u0020]/;\nconst attrValidationCache = {};\nfunction isSSRSafeAttrName(name) {\n if (attrValidationCache.hasOwnProperty(name)) {\n return attrValidationCache[name];\n }\n const isUnsafe = unsafeAttrCharRE.test(name);\n if (isUnsafe) {\n console.error(`unsafe attribute name: ${name}`);\n }\n return attrValidationCache[name] = !isUnsafe;\n}\nconst propsToAttrMap = {\n acceptCharset: \"accept-charset\",\n className: \"class\",\n htmlFor: \"for\",\n httpEquiv: \"http-equiv\"\n};\nconst isKnownHtmlAttr = /* @__PURE__ */ makeMap(\n `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap`\n);\nconst isKnownSvgAttr = /* @__PURE__ */ makeMap(\n `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan`\n);\nconst isKnownMathMLAttr = /* @__PURE__ */ makeMap(\n `accent,accentunder,actiontype,align,alignmentscope,altimg,altimg-height,altimg-valign,altimg-width,alttext,bevelled,close,columnsalign,columnlines,columnspan,denomalign,depth,dir,display,displaystyle,encoding,equalcolumns,equalrows,fence,fontstyle,fontweight,form,frame,framespacing,groupalign,height,href,id,indentalign,indentalignfirst,indentalignlast,indentshift,indentshiftfirst,indentshiftlast,indextype,justify,largetop,largeop,lquote,lspace,mathbackground,mathcolor,mathsize,mathvariant,maxsize,minlabelspacing,mode,other,overflow,position,rowalign,rowlines,rowspan,rquote,rspace,scriptlevel,scriptminsize,scriptsizemultiplier,selection,separator,separators,shift,side,src,stackalign,stretchy,subscriptshift,superscriptshift,symmetric,voffset,width,widths,xlink:href,xlink:show,xlink:type,xmlns`\n);\nfunction isRenderableAttrValue(value) {\n if (value == null) {\n return false;\n }\n const type = typeof value;\n return type === \"string\" || type === \"number\" || type === \"boolean\";\n}\n\nconst escapeRE = /[\"'&<>]/;\nfunction escapeHtml(string) {\n const str = \"\" + string;\n const match = escapeRE.exec(str);\n if (!match) {\n return str;\n }\n let html = \"\";\n let escaped;\n let index;\n let lastIndex = 0;\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34:\n escaped = \""\";\n break;\n case 38:\n escaped = \"&\";\n break;\n case 39:\n escaped = \"'\";\n break;\n case 60:\n escaped = \"<\";\n break;\n case 62:\n escaped = \">\";\n break;\n default:\n continue;\n }\n if (lastIndex !== index) {\n html += str.slice(lastIndex, index);\n }\n lastIndex = index + 1;\n html += escaped;\n }\n return lastIndex !== index ? html + str.slice(lastIndex, index) : html;\n}\nconst commentStripRE = /^-?>||--!>|?@[\\\\\\]^`{|}~]/g;\nfunction getEscapedCssVarName(key, doubleEscape) {\n return key.replace(\n cssVarNameEscapeSymbolsRE,\n (s) => doubleEscape ? s === '\"' ? '\\\\\\\\\\\\\"' : `\\\\\\\\${s}` : `\\\\${s}`\n );\n}\n\nfunction looseCompareArrays(a, b) {\n if (a.length !== b.length) return false;\n let equal = true;\n for (let i = 0; equal && i < a.length; i++) {\n equal = looseEqual(a[i], b[i]);\n }\n return equal;\n}\nfunction looseEqual(a, b) {\n if (a === b) return true;\n let aValidType = isDate(a);\n let bValidType = isDate(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? a.getTime() === b.getTime() : false;\n }\n aValidType = isSymbol(a);\n bValidType = isSymbol(b);\n if (aValidType || bValidType) {\n return a === b;\n }\n aValidType = isArray(a);\n bValidType = isArray(b);\n if (aValidType || bValidType) {\n return aValidType && bValidType ? looseCompareArrays(a, b) : false;\n }\n aValidType = isObject(a);\n bValidType = isObject(b);\n if (aValidType || bValidType) {\n if (!aValidType || !bValidType) {\n return false;\n }\n const aKeysCount = Object.keys(a).length;\n const bKeysCount = Object.keys(b).length;\n if (aKeysCount !== bKeysCount) {\n return false;\n }\n for (const key in a) {\n const aHasKey = a.hasOwnProperty(key);\n const bHasKey = b.hasOwnProperty(key);\n if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {\n return false;\n }\n }\n }\n return String(a) === String(b);\n}\nfunction looseIndexOf(arr, val) {\n return arr.findIndex((item) => looseEqual(item, val));\n}\n\nconst isRef = (val) => {\n return !!(val && val[\"__v_isRef\"] === true);\n};\nconst toDisplayString = (val) => {\n return isString(val) ? val : val == null ? \"\" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);\n};\nconst replacer = (_key, val) => {\n if (isRef(val)) {\n return replacer(_key, val.value);\n } else if (isMap(val)) {\n return {\n [`Map(${val.size})`]: [...val.entries()].reduce(\n (entries, [key, val2], i) => {\n entries[stringifySymbol(key, i) + \" =>\"] = val2;\n return entries;\n },\n {}\n )\n };\n } else if (isSet(val)) {\n return {\n [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v))\n };\n } else if (isSymbol(val)) {\n return stringifySymbol(val);\n } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) {\n return String(val);\n }\n return val;\n};\nconst stringifySymbol = (v, i = \"\") => {\n var _a;\n return (\n // Symbol.description in es2019+ so we need to cast here to pass\n // the lib: es2016 check\n isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v\n );\n};\n\nexport { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, cssVarNameEscapeSymbolsRE, def, escapeHtml, escapeHtmlComment, extend, genCacheKey, genPropsAccessExp, generateCodeFrame, getEscapedCssVarName, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyAllowed, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownMathMLAttr, isKnownSvgAttr, isMap, isMathMLTag, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };\n","/**\n* @vue/reactivity v3.5.12\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { hasChanged, extend, isArray, isIntegerKey, isSymbol, isMap, hasOwn, isObject, makeMap, toRawType, capitalize, def, isFunction, EMPTY_OBJ, isSet, isPlainObject, NOOP, remove } from '@vue/shared';\n\nfunction warn(msg, ...args) {\n console.warn(`[Vue warn] ${msg}`, ...args);\n}\n\nlet activeEffectScope;\nclass EffectScope {\n constructor(detached = false) {\n this.detached = detached;\n /**\n * @internal\n */\n this._active = true;\n /**\n * @internal\n */\n this.effects = [];\n /**\n * @internal\n */\n this.cleanups = [];\n this._isPaused = false;\n this.parent = activeEffectScope;\n if (!detached && activeEffectScope) {\n this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push(\n this\n ) - 1;\n }\n }\n get active() {\n return this._active;\n }\n pause() {\n if (this._active) {\n this._isPaused = true;\n let i, l;\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].pause();\n }\n }\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].pause();\n }\n }\n }\n /**\n * Resumes the effect scope, including all child scopes and effects.\n */\n resume() {\n if (this._active) {\n if (this._isPaused) {\n this._isPaused = false;\n let i, l;\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].resume();\n }\n }\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].resume();\n }\n }\n }\n }\n run(fn) {\n if (this._active) {\n const currentEffectScope = activeEffectScope;\n try {\n activeEffectScope = this;\n return fn();\n } finally {\n activeEffectScope = currentEffectScope;\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(`cannot run an inactive effect scope.`);\n }\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n on() {\n activeEffectScope = this;\n }\n /**\n * This should only be called on non-detached scopes\n * @internal\n */\n off() {\n activeEffectScope = this.parent;\n }\n stop(fromParent) {\n if (this._active) {\n let i, l;\n for (i = 0, l = this.effects.length; i < l; i++) {\n this.effects[i].stop();\n }\n for (i = 0, l = this.cleanups.length; i < l; i++) {\n this.cleanups[i]();\n }\n if (this.scopes) {\n for (i = 0, l = this.scopes.length; i < l; i++) {\n this.scopes[i].stop(true);\n }\n }\n if (!this.detached && this.parent && !fromParent) {\n const last = this.parent.scopes.pop();\n if (last && last !== this) {\n this.parent.scopes[this.index] = last;\n last.index = this.index;\n }\n }\n this.parent = void 0;\n this._active = false;\n }\n }\n}\nfunction effectScope(detached) {\n return new EffectScope(detached);\n}\nfunction getCurrentScope() {\n return activeEffectScope;\n}\nfunction onScopeDispose(fn, failSilently = false) {\n if (activeEffectScope) {\n activeEffectScope.cleanups.push(fn);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onScopeDispose() is called when there is no active effect scope to be associated with.`\n );\n }\n}\n\nlet activeSub;\nconst EffectFlags = {\n \"ACTIVE\": 1,\n \"1\": \"ACTIVE\",\n \"RUNNING\": 2,\n \"2\": \"RUNNING\",\n \"TRACKING\": 4,\n \"4\": \"TRACKING\",\n \"NOTIFIED\": 8,\n \"8\": \"NOTIFIED\",\n \"DIRTY\": 16,\n \"16\": \"DIRTY\",\n \"ALLOW_RECURSE\": 32,\n \"32\": \"ALLOW_RECURSE\",\n \"PAUSED\": 64,\n \"64\": \"PAUSED\"\n};\nconst pausedQueueEffects = /* @__PURE__ */ new WeakSet();\nclass ReactiveEffect {\n constructor(fn) {\n this.fn = fn;\n /**\n * @internal\n */\n this.deps = void 0;\n /**\n * @internal\n */\n this.depsTail = void 0;\n /**\n * @internal\n */\n this.flags = 1 | 4;\n /**\n * @internal\n */\n this.next = void 0;\n /**\n * @internal\n */\n this.cleanup = void 0;\n this.scheduler = void 0;\n if (activeEffectScope && activeEffectScope.active) {\n activeEffectScope.effects.push(this);\n }\n }\n pause() {\n this.flags |= 64;\n }\n resume() {\n if (this.flags & 64) {\n this.flags &= ~64;\n if (pausedQueueEffects.has(this)) {\n pausedQueueEffects.delete(this);\n this.trigger();\n }\n }\n }\n /**\n * @internal\n */\n notify() {\n if (this.flags & 2 && !(this.flags & 32)) {\n return;\n }\n if (!(this.flags & 8)) {\n batch(this);\n }\n }\n run() {\n if (!(this.flags & 1)) {\n return this.fn();\n }\n this.flags |= 2;\n cleanupEffect(this);\n prepareDeps(this);\n const prevEffect = activeSub;\n const prevShouldTrack = shouldTrack;\n activeSub = this;\n shouldTrack = true;\n try {\n return this.fn();\n } finally {\n if (!!(process.env.NODE_ENV !== \"production\") && activeSub !== this) {\n warn(\n \"Active effect was not restored correctly - this is likely a Vue internal bug.\"\n );\n }\n cleanupDeps(this);\n activeSub = prevEffect;\n shouldTrack = prevShouldTrack;\n this.flags &= ~2;\n }\n }\n stop() {\n if (this.flags & 1) {\n for (let link = this.deps; link; link = link.nextDep) {\n removeSub(link);\n }\n this.deps = this.depsTail = void 0;\n cleanupEffect(this);\n this.onStop && this.onStop();\n this.flags &= ~1;\n }\n }\n trigger() {\n if (this.flags & 64) {\n pausedQueueEffects.add(this);\n } else if (this.scheduler) {\n this.scheduler();\n } else {\n this.runIfDirty();\n }\n }\n /**\n * @internal\n */\n runIfDirty() {\n if (isDirty(this)) {\n this.run();\n }\n }\n get dirty() {\n return isDirty(this);\n }\n}\nlet batchDepth = 0;\nlet batchedSub;\nlet batchedComputed;\nfunction batch(sub, isComputed = false) {\n sub.flags |= 8;\n if (isComputed) {\n sub.next = batchedComputed;\n batchedComputed = sub;\n return;\n }\n sub.next = batchedSub;\n batchedSub = sub;\n}\nfunction startBatch() {\n batchDepth++;\n}\nfunction endBatch() {\n if (--batchDepth > 0) {\n return;\n }\n if (batchedComputed) {\n let e = batchedComputed;\n batchedComputed = void 0;\n while (e) {\n const next = e.next;\n e.next = void 0;\n e.flags &= ~8;\n e = next;\n }\n }\n let error;\n while (batchedSub) {\n let e = batchedSub;\n batchedSub = void 0;\n while (e) {\n const next = e.next;\n e.next = void 0;\n e.flags &= ~8;\n if (e.flags & 1) {\n try {\n ;\n e.trigger();\n } catch (err) {\n if (!error) error = err;\n }\n }\n e = next;\n }\n }\n if (error) throw error;\n}\nfunction prepareDeps(sub) {\n for (let link = sub.deps; link; link = link.nextDep) {\n link.version = -1;\n link.prevActiveLink = link.dep.activeLink;\n link.dep.activeLink = link;\n }\n}\nfunction cleanupDeps(sub) {\n let head;\n let tail = sub.depsTail;\n let link = tail;\n while (link) {\n const prev = link.prevDep;\n if (link.version === -1) {\n if (link === tail) tail = prev;\n removeSub(link);\n removeDep(link);\n } else {\n head = link;\n }\n link.dep.activeLink = link.prevActiveLink;\n link.prevActiveLink = void 0;\n link = prev;\n }\n sub.deps = head;\n sub.depsTail = tail;\n}\nfunction isDirty(sub) {\n for (let link = sub.deps; link; link = link.nextDep) {\n if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {\n return true;\n }\n }\n if (sub._dirty) {\n return true;\n }\n return false;\n}\nfunction refreshComputed(computed) {\n if (computed.flags & 4 && !(computed.flags & 16)) {\n return;\n }\n computed.flags &= ~16;\n if (computed.globalVersion === globalVersion) {\n return;\n }\n computed.globalVersion = globalVersion;\n const dep = computed.dep;\n computed.flags |= 2;\n if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {\n computed.flags &= ~2;\n return;\n }\n const prevSub = activeSub;\n const prevShouldTrack = shouldTrack;\n activeSub = computed;\n shouldTrack = true;\n try {\n prepareDeps(computed);\n const value = computed.fn(computed._value);\n if (dep.version === 0 || hasChanged(value, computed._value)) {\n computed._value = value;\n dep.version++;\n }\n } catch (err) {\n dep.version++;\n throw err;\n } finally {\n activeSub = prevSub;\n shouldTrack = prevShouldTrack;\n cleanupDeps(computed);\n computed.flags &= ~2;\n }\n}\nfunction removeSub(link, soft = false) {\n const { dep, prevSub, nextSub } = link;\n if (prevSub) {\n prevSub.nextSub = nextSub;\n link.prevSub = void 0;\n }\n if (nextSub) {\n nextSub.prevSub = prevSub;\n link.nextSub = void 0;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && dep.subsHead === link) {\n dep.subsHead = nextSub;\n }\n if (dep.subs === link) {\n dep.subs = prevSub;\n if (!prevSub && dep.computed) {\n dep.computed.flags &= ~4;\n for (let l = dep.computed.deps; l; l = l.nextDep) {\n removeSub(l, true);\n }\n }\n }\n if (!soft && !--dep.sc && dep.map) {\n dep.map.delete(dep.key);\n }\n}\nfunction removeDep(link) {\n const { prevDep, nextDep } = link;\n if (prevDep) {\n prevDep.nextDep = nextDep;\n link.prevDep = void 0;\n }\n if (nextDep) {\n nextDep.prevDep = prevDep;\n link.nextDep = void 0;\n }\n}\nfunction effect(fn, options) {\n if (fn.effect instanceof ReactiveEffect) {\n fn = fn.effect.fn;\n }\n const e = new ReactiveEffect(fn);\n if (options) {\n extend(e, options);\n }\n try {\n e.run();\n } catch (err) {\n e.stop();\n throw err;\n }\n const runner = e.run.bind(e);\n runner.effect = e;\n return runner;\n}\nfunction stop(runner) {\n runner.effect.stop();\n}\nlet shouldTrack = true;\nconst trackStack = [];\nfunction pauseTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = false;\n}\nfunction enableTracking() {\n trackStack.push(shouldTrack);\n shouldTrack = true;\n}\nfunction resetTracking() {\n const last = trackStack.pop();\n shouldTrack = last === void 0 ? true : last;\n}\nfunction onEffectCleanup(fn, failSilently = false) {\n if (activeSub instanceof ReactiveEffect) {\n activeSub.cleanup = fn;\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onEffectCleanup() was called when there was no active effect to associate with.`\n );\n }\n}\nfunction cleanupEffect(e) {\n const { cleanup } = e;\n e.cleanup = void 0;\n if (cleanup) {\n const prevSub = activeSub;\n activeSub = void 0;\n try {\n cleanup();\n } finally {\n activeSub = prevSub;\n }\n }\n}\n\nlet globalVersion = 0;\nclass Link {\n constructor(sub, dep) {\n this.sub = sub;\n this.dep = dep;\n this.version = dep.version;\n this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = void 0;\n }\n}\nclass Dep {\n constructor(computed) {\n this.computed = computed;\n this.version = 0;\n /**\n * Link between this dep and the current active effect\n */\n this.activeLink = void 0;\n /**\n * Doubly linked list representing the subscribing effects (tail)\n */\n this.subs = void 0;\n /**\n * For object property deps cleanup\n */\n this.map = void 0;\n this.key = void 0;\n /**\n * Subscriber counter\n */\n this.sc = 0;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.subsHead = void 0;\n }\n }\n track(debugInfo) {\n if (!activeSub || !shouldTrack || activeSub === this.computed) {\n return;\n }\n let link = this.activeLink;\n if (link === void 0 || link.sub !== activeSub) {\n link = this.activeLink = new Link(activeSub, this);\n if (!activeSub.deps) {\n activeSub.deps = activeSub.depsTail = link;\n } else {\n link.prevDep = activeSub.depsTail;\n activeSub.depsTail.nextDep = link;\n activeSub.depsTail = link;\n }\n addSub(link);\n } else if (link.version === -1) {\n link.version = this.version;\n if (link.nextDep) {\n const next = link.nextDep;\n next.prevDep = link.prevDep;\n if (link.prevDep) {\n link.prevDep.nextDep = next;\n }\n link.prevDep = activeSub.depsTail;\n link.nextDep = void 0;\n activeSub.depsTail.nextDep = link;\n activeSub.depsTail = link;\n if (activeSub.deps === link) {\n activeSub.deps = next;\n }\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") && activeSub.onTrack) {\n activeSub.onTrack(\n extend(\n {\n effect: activeSub\n },\n debugInfo\n )\n );\n }\n return link;\n }\n trigger(debugInfo) {\n this.version++;\n globalVersion++;\n this.notify(debugInfo);\n }\n notify(debugInfo) {\n startBatch();\n try {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n for (let head = this.subsHead; head; head = head.nextSub) {\n if (head.sub.onTrigger && !(head.sub.flags & 8)) {\n head.sub.onTrigger(\n extend(\n {\n effect: head.sub\n },\n debugInfo\n )\n );\n }\n }\n }\n for (let link = this.subs; link; link = link.prevSub) {\n if (link.sub.notify()) {\n ;\n link.sub.dep.notify();\n }\n }\n } finally {\n endBatch();\n }\n }\n}\nfunction addSub(link) {\n link.dep.sc++;\n if (link.sub.flags & 4) {\n const computed = link.dep.computed;\n if (computed && !link.dep.subs) {\n computed.flags |= 4 | 16;\n for (let l = computed.deps; l; l = l.nextDep) {\n addSub(l);\n }\n }\n const currentTail = link.dep.subs;\n if (currentTail !== link) {\n link.prevSub = currentTail;\n if (currentTail) currentTail.nextSub = link;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && link.dep.subsHead === void 0) {\n link.dep.subsHead = link;\n }\n link.dep.subs = link;\n }\n}\nconst targetMap = /* @__PURE__ */ new WeakMap();\nconst ITERATE_KEY = Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Object iterate\" : \"\"\n);\nconst MAP_KEY_ITERATE_KEY = Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Map keys iterate\" : \"\"\n);\nconst ARRAY_ITERATE_KEY = Symbol(\n !!(process.env.NODE_ENV !== \"production\") ? \"Array iterate\" : \"\"\n);\nfunction track(target, type, key) {\n if (shouldTrack && activeSub) {\n let depsMap = targetMap.get(target);\n if (!depsMap) {\n targetMap.set(target, depsMap = /* @__PURE__ */ new Map());\n }\n let dep = depsMap.get(key);\n if (!dep) {\n depsMap.set(key, dep = new Dep());\n dep.map = depsMap;\n dep.key = key;\n }\n if (!!(process.env.NODE_ENV !== \"production\")) {\n dep.track({\n target,\n type,\n key\n });\n } else {\n dep.track();\n }\n }\n}\nfunction trigger(target, type, key, newValue, oldValue, oldTarget) {\n const depsMap = targetMap.get(target);\n if (!depsMap) {\n globalVersion++;\n return;\n }\n const run = (dep) => {\n if (dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n dep.trigger({\n target,\n type,\n key,\n newValue,\n oldValue,\n oldTarget\n });\n } else {\n dep.trigger();\n }\n }\n };\n startBatch();\n if (type === \"clear\") {\n depsMap.forEach(run);\n } else {\n const targetIsArray = isArray(target);\n const isArrayIndex = targetIsArray && isIntegerKey(key);\n if (targetIsArray && key === \"length\") {\n const newLength = Number(newValue);\n depsMap.forEach((dep, key2) => {\n if (key2 === \"length\" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {\n run(dep);\n }\n });\n } else {\n if (key !== void 0 || depsMap.has(void 0)) {\n run(depsMap.get(key));\n }\n if (isArrayIndex) {\n run(depsMap.get(ARRAY_ITERATE_KEY));\n }\n switch (type) {\n case \"add\":\n if (!targetIsArray) {\n run(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n run(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n } else if (isArrayIndex) {\n run(depsMap.get(\"length\"));\n }\n break;\n case \"delete\":\n if (!targetIsArray) {\n run(depsMap.get(ITERATE_KEY));\n if (isMap(target)) {\n run(depsMap.get(MAP_KEY_ITERATE_KEY));\n }\n }\n break;\n case \"set\":\n if (isMap(target)) {\n run(depsMap.get(ITERATE_KEY));\n }\n break;\n }\n }\n }\n endBatch();\n}\nfunction getDepFromReactive(object, key) {\n const depMap = targetMap.get(object);\n return depMap && depMap.get(key);\n}\n\nfunction reactiveReadArray(array) {\n const raw = toRaw(array);\n if (raw === array) return raw;\n track(raw, \"iterate\", ARRAY_ITERATE_KEY);\n return isShallow(array) ? raw : raw.map(toReactive);\n}\nfunction shallowReadArray(arr) {\n track(arr = toRaw(arr), \"iterate\", ARRAY_ITERATE_KEY);\n return arr;\n}\nconst arrayInstrumentations = {\n __proto__: null,\n [Symbol.iterator]() {\n return iterator(this, Symbol.iterator, toReactive);\n },\n concat(...args) {\n return reactiveReadArray(this).concat(\n ...args.map((x) => isArray(x) ? reactiveReadArray(x) : x)\n );\n },\n entries() {\n return iterator(this, \"entries\", (value) => {\n value[1] = toReactive(value[1]);\n return value;\n });\n },\n every(fn, thisArg) {\n return apply(this, \"every\", fn, thisArg, void 0, arguments);\n },\n filter(fn, thisArg) {\n return apply(this, \"filter\", fn, thisArg, (v) => v.map(toReactive), arguments);\n },\n find(fn, thisArg) {\n return apply(this, \"find\", fn, thisArg, toReactive, arguments);\n },\n findIndex(fn, thisArg) {\n return apply(this, \"findIndex\", fn, thisArg, void 0, arguments);\n },\n findLast(fn, thisArg) {\n return apply(this, \"findLast\", fn, thisArg, toReactive, arguments);\n },\n findLastIndex(fn, thisArg) {\n return apply(this, \"findLastIndex\", fn, thisArg, void 0, arguments);\n },\n // flat, flatMap could benefit from ARRAY_ITERATE but are not straight-forward to implement\n forEach(fn, thisArg) {\n return apply(this, \"forEach\", fn, thisArg, void 0, arguments);\n },\n includes(...args) {\n return searchProxy(this, \"includes\", args);\n },\n indexOf(...args) {\n return searchProxy(this, \"indexOf\", args);\n },\n join(separator) {\n return reactiveReadArray(this).join(separator);\n },\n // keys() iterator only reads `length`, no optimisation required\n lastIndexOf(...args) {\n return searchProxy(this, \"lastIndexOf\", args);\n },\n map(fn, thisArg) {\n return apply(this, \"map\", fn, thisArg, void 0, arguments);\n },\n pop() {\n return noTracking(this, \"pop\");\n },\n push(...args) {\n return noTracking(this, \"push\", args);\n },\n reduce(fn, ...args) {\n return reduce(this, \"reduce\", fn, args);\n },\n reduceRight(fn, ...args) {\n return reduce(this, \"reduceRight\", fn, args);\n },\n shift() {\n return noTracking(this, \"shift\");\n },\n // slice could use ARRAY_ITERATE but also seems to beg for range tracking\n some(fn, thisArg) {\n return apply(this, \"some\", fn, thisArg, void 0, arguments);\n },\n splice(...args) {\n return noTracking(this, \"splice\", args);\n },\n toReversed() {\n return reactiveReadArray(this).toReversed();\n },\n toSorted(comparer) {\n return reactiveReadArray(this).toSorted(comparer);\n },\n toSpliced(...args) {\n return reactiveReadArray(this).toSpliced(...args);\n },\n unshift(...args) {\n return noTracking(this, \"unshift\", args);\n },\n values() {\n return iterator(this, \"values\", toReactive);\n }\n};\nfunction iterator(self, method, wrapValue) {\n const arr = shallowReadArray(self);\n const iter = arr[method]();\n if (arr !== self && !isShallow(self)) {\n iter._next = iter.next;\n iter.next = () => {\n const result = iter._next();\n if (result.value) {\n result.value = wrapValue(result.value);\n }\n return result;\n };\n }\n return iter;\n}\nconst arrayProto = Array.prototype;\nfunction apply(self, method, fn, thisArg, wrappedRetFn, args) {\n const arr = shallowReadArray(self);\n const needsWrap = arr !== self && !isShallow(self);\n const methodFn = arr[method];\n if (methodFn !== arrayProto[method]) {\n const result2 = methodFn.apply(self, args);\n return needsWrap ? toReactive(result2) : result2;\n }\n let wrappedFn = fn;\n if (arr !== self) {\n if (needsWrap) {\n wrappedFn = function(item, index) {\n return fn.call(this, toReactive(item), index, self);\n };\n } else if (fn.length > 2) {\n wrappedFn = function(item, index) {\n return fn.call(this, item, index, self);\n };\n }\n }\n const result = methodFn.call(arr, wrappedFn, thisArg);\n return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;\n}\nfunction reduce(self, method, fn, args) {\n const arr = shallowReadArray(self);\n let wrappedFn = fn;\n if (arr !== self) {\n if (!isShallow(self)) {\n wrappedFn = function(acc, item, index) {\n return fn.call(this, acc, toReactive(item), index, self);\n };\n } else if (fn.length > 3) {\n wrappedFn = function(acc, item, index) {\n return fn.call(this, acc, item, index, self);\n };\n }\n }\n return arr[method](wrappedFn, ...args);\n}\nfunction searchProxy(self, method, args) {\n const arr = toRaw(self);\n track(arr, \"iterate\", ARRAY_ITERATE_KEY);\n const res = arr[method](...args);\n if ((res === -1 || res === false) && isProxy(args[0])) {\n args[0] = toRaw(args[0]);\n return arr[method](...args);\n }\n return res;\n}\nfunction noTracking(self, method, args = []) {\n pauseTracking();\n startBatch();\n const res = toRaw(self)[method].apply(self, args);\n endBatch();\n resetTracking();\n return res;\n}\n\nconst isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);\nconst builtInSymbols = new Set(\n /* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== \"arguments\" && key !== \"caller\").map((key) => Symbol[key]).filter(isSymbol)\n);\nfunction hasOwnProperty(key) {\n if (!isSymbol(key)) key = String(key);\n const obj = toRaw(this);\n track(obj, \"has\", key);\n return obj.hasOwnProperty(key);\n}\nclass BaseReactiveHandler {\n constructor(_isReadonly = false, _isShallow = false) {\n this._isReadonly = _isReadonly;\n this._isShallow = _isShallow;\n }\n get(target, key, receiver) {\n const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_isShallow\") {\n return isShallow2;\n } else if (key === \"__v_raw\") {\n if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype\n // this means the receiver is a user proxy of the reactive proxy\n Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {\n return target;\n }\n return;\n }\n const targetIsArray = isArray(target);\n if (!isReadonly2) {\n let fn;\n if (targetIsArray && (fn = arrayInstrumentations[key])) {\n return fn;\n }\n if (key === \"hasOwnProperty\") {\n return hasOwnProperty;\n }\n }\n const res = Reflect.get(\n target,\n key,\n // if this is a proxy wrapping a ref, return methods using the raw ref\n // as receiver so that we don't have to call `toRaw` on the ref in all\n // its class methods\n isRef(target) ? target : receiver\n );\n if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {\n return res;\n }\n if (!isReadonly2) {\n track(target, \"get\", key);\n }\n if (isShallow2) {\n return res;\n }\n if (isRef(res)) {\n return targetIsArray && isIntegerKey(key) ? res : res.value;\n }\n if (isObject(res)) {\n return isReadonly2 ? readonly(res) : reactive(res);\n }\n return res;\n }\n}\nclass MutableReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(false, isShallow2);\n }\n set(target, key, value, receiver) {\n let oldValue = target[key];\n if (!this._isShallow) {\n const isOldValueReadonly = isReadonly(oldValue);\n if (!isShallow(value) && !isReadonly(value)) {\n oldValue = toRaw(oldValue);\n value = toRaw(value);\n }\n if (!isArray(target) && isRef(oldValue) && !isRef(value)) {\n if (isOldValueReadonly) {\n return false;\n } else {\n oldValue.value = value;\n return true;\n }\n }\n }\n const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);\n const result = Reflect.set(\n target,\n key,\n value,\n isRef(target) ? target : receiver\n );\n if (target === toRaw(receiver)) {\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n }\n return result;\n }\n deleteProperty(target, key) {\n const hadKey = hasOwn(target, key);\n const oldValue = target[key];\n const result = Reflect.deleteProperty(target, key);\n if (result && hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n }\n has(target, key) {\n const result = Reflect.has(target, key);\n if (!isSymbol(key) || !builtInSymbols.has(key)) {\n track(target, \"has\", key);\n }\n return result;\n }\n ownKeys(target) {\n track(\n target,\n \"iterate\",\n isArray(target) ? \"length\" : ITERATE_KEY\n );\n return Reflect.ownKeys(target);\n }\n}\nclass ReadonlyReactiveHandler extends BaseReactiveHandler {\n constructor(isShallow2 = false) {\n super(true, isShallow2);\n }\n set(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Set operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n deleteProperty(target, key) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `Delete operation on key \"${String(key)}\" failed: target is readonly.`,\n target\n );\n }\n return true;\n }\n}\nconst mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler();\nconst readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler();\nconst shallowReactiveHandlers = /* @__PURE__ */ new MutableReactiveHandler(true);\nconst shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);\n\nconst toShallow = (value) => value;\nconst getProto = (v) => Reflect.getPrototypeOf(v);\nfunction createIterableMethod(method, isReadonly2, isShallow2) {\n return function(...args) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const targetIsMap = isMap(rawTarget);\n const isPair = method === \"entries\" || method === Symbol.iterator && targetIsMap;\n const isKeyOnly = method === \"keys\" && targetIsMap;\n const innerIterator = target[method](...args);\n const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;\n !isReadonly2 && track(\n rawTarget,\n \"iterate\",\n isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY\n );\n return {\n // iterator protocol\n next() {\n const { value, done } = innerIterator.next();\n return done ? { value, done } : {\n value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),\n done\n };\n },\n // iterable protocol\n [Symbol.iterator]() {\n return this;\n }\n };\n };\n}\nfunction createReadonlyMethod(type) {\n return function(...args) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const key = args[0] ? `on key \"${args[0]}\" ` : ``;\n warn(\n `${capitalize(type)} operation ${key}failed: target is readonly.`,\n toRaw(this)\n );\n }\n return type === \"delete\" ? false : type === \"clear\" ? void 0 : this;\n };\n}\nfunction createInstrumentations(readonly, shallow) {\n const instrumentations = {\n get(key) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!readonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"get\", key);\n }\n track(rawTarget, \"get\", rawKey);\n }\n const { has } = getProto(rawTarget);\n const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n if (has.call(rawTarget, key)) {\n return wrap(target.get(key));\n } else if (has.call(rawTarget, rawKey)) {\n return wrap(target.get(rawKey));\n } else if (target !== rawTarget) {\n target.get(key);\n }\n },\n get size() {\n const target = this[\"__v_raw\"];\n !readonly && track(toRaw(target), \"iterate\", ITERATE_KEY);\n return Reflect.get(target, \"size\", target);\n },\n has(key) {\n const target = this[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const rawKey = toRaw(key);\n if (!readonly) {\n if (hasChanged(key, rawKey)) {\n track(rawTarget, \"has\", key);\n }\n track(rawTarget, \"has\", rawKey);\n }\n return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);\n },\n forEach(callback, thisArg) {\n const observed = this;\n const target = observed[\"__v_raw\"];\n const rawTarget = toRaw(target);\n const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;\n !readonly && track(rawTarget, \"iterate\", ITERATE_KEY);\n return target.forEach((value, key) => {\n return callback.call(thisArg, wrap(value), wrap(key), observed);\n });\n }\n };\n extend(\n instrumentations,\n readonly ? {\n add: createReadonlyMethod(\"add\"),\n set: createReadonlyMethod(\"set\"),\n delete: createReadonlyMethod(\"delete\"),\n clear: createReadonlyMethod(\"clear\")\n } : {\n add(value) {\n if (!shallow && !isShallow(value) && !isReadonly(value)) {\n value = toRaw(value);\n }\n const target = toRaw(this);\n const proto = getProto(target);\n const hadKey = proto.has.call(target, value);\n if (!hadKey) {\n target.add(value);\n trigger(target, \"add\", value, value);\n }\n return this;\n },\n set(key, value) {\n if (!shallow && !isShallow(value) && !isReadonly(value)) {\n value = toRaw(value);\n }\n const target = toRaw(this);\n const { has, get } = getProto(target);\n let hadKey = has.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has, key);\n }\n const oldValue = get.call(target, key);\n target.set(key, value);\n if (!hadKey) {\n trigger(target, \"add\", key, value);\n } else if (hasChanged(value, oldValue)) {\n trigger(target, \"set\", key, value, oldValue);\n }\n return this;\n },\n delete(key) {\n const target = toRaw(this);\n const { has, get } = getProto(target);\n let hadKey = has.call(target, key);\n if (!hadKey) {\n key = toRaw(key);\n hadKey = has.call(target, key);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n checkIdentityKeys(target, has, key);\n }\n const oldValue = get ? get.call(target, key) : void 0;\n const result = target.delete(key);\n if (hadKey) {\n trigger(target, \"delete\", key, void 0, oldValue);\n }\n return result;\n },\n clear() {\n const target = toRaw(this);\n const hadItems = target.size !== 0;\n const oldTarget = !!(process.env.NODE_ENV !== \"production\") ? isMap(target) ? new Map(target) : new Set(target) : void 0;\n const result = target.clear();\n if (hadItems) {\n trigger(\n target,\n \"clear\",\n void 0,\n void 0,\n oldTarget\n );\n }\n return result;\n }\n }\n );\n const iteratorMethods = [\n \"keys\",\n \"values\",\n \"entries\",\n Symbol.iterator\n ];\n iteratorMethods.forEach((method) => {\n instrumentations[method] = createIterableMethod(method, readonly, shallow);\n });\n return instrumentations;\n}\nfunction createInstrumentationGetter(isReadonly2, shallow) {\n const instrumentations = createInstrumentations(isReadonly2, shallow);\n return (target, key, receiver) => {\n if (key === \"__v_isReactive\") {\n return !isReadonly2;\n } else if (key === \"__v_isReadonly\") {\n return isReadonly2;\n } else if (key === \"__v_raw\") {\n return target;\n }\n return Reflect.get(\n hasOwn(instrumentations, key) && key in target ? instrumentations : target,\n key,\n receiver\n );\n };\n}\nconst mutableCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, false)\n};\nconst shallowCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(false, true)\n};\nconst readonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, false)\n};\nconst shallowReadonlyCollectionHandlers = {\n get: /* @__PURE__ */ createInstrumentationGetter(true, true)\n};\nfunction checkIdentityKeys(target, has, key) {\n const rawKey = toRaw(key);\n if (rawKey !== key && has.call(target, rawKey)) {\n const type = toRawType(target);\n warn(\n `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`\n );\n }\n}\n\nconst reactiveMap = /* @__PURE__ */ new WeakMap();\nconst shallowReactiveMap = /* @__PURE__ */ new WeakMap();\nconst readonlyMap = /* @__PURE__ */ new WeakMap();\nconst shallowReadonlyMap = /* @__PURE__ */ new WeakMap();\nfunction targetTypeMap(rawType) {\n switch (rawType) {\n case \"Object\":\n case \"Array\":\n return 1 /* COMMON */;\n case \"Map\":\n case \"Set\":\n case \"WeakMap\":\n case \"WeakSet\":\n return 2 /* COLLECTION */;\n default:\n return 0 /* INVALID */;\n }\n}\nfunction getTargetType(value) {\n return value[\"__v_skip\"] || !Object.isExtensible(value) ? 0 /* INVALID */ : targetTypeMap(toRawType(value));\n}\nfunction reactive(target) {\n if (isReadonly(target)) {\n return target;\n }\n return createReactiveObject(\n target,\n false,\n mutableHandlers,\n mutableCollectionHandlers,\n reactiveMap\n );\n}\nfunction shallowReactive(target) {\n return createReactiveObject(\n target,\n false,\n shallowReactiveHandlers,\n shallowCollectionHandlers,\n shallowReactiveMap\n );\n}\nfunction readonly(target) {\n return createReactiveObject(\n target,\n true,\n readonlyHandlers,\n readonlyCollectionHandlers,\n readonlyMap\n );\n}\nfunction shallowReadonly(target) {\n return createReactiveObject(\n target,\n true,\n shallowReadonlyHandlers,\n shallowReadonlyCollectionHandlers,\n shallowReadonlyMap\n );\n}\nfunction createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {\n if (!isObject(target)) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\n `value cannot be made ${isReadonly2 ? \"readonly\" : \"reactive\"}: ${String(\n target\n )}`\n );\n }\n return target;\n }\n if (target[\"__v_raw\"] && !(isReadonly2 && target[\"__v_isReactive\"])) {\n return target;\n }\n const existingProxy = proxyMap.get(target);\n if (existingProxy) {\n return existingProxy;\n }\n const targetType = getTargetType(target);\n if (targetType === 0 /* INVALID */) {\n return target;\n }\n const proxy = new Proxy(\n target,\n targetType === 2 /* COLLECTION */ ? collectionHandlers : baseHandlers\n );\n proxyMap.set(target, proxy);\n return proxy;\n}\nfunction isReactive(value) {\n if (isReadonly(value)) {\n return isReactive(value[\"__v_raw\"]);\n }\n return !!(value && value[\"__v_isReactive\"]);\n}\nfunction isReadonly(value) {\n return !!(value && value[\"__v_isReadonly\"]);\n}\nfunction isShallow(value) {\n return !!(value && value[\"__v_isShallow\"]);\n}\nfunction isProxy(value) {\n return value ? !!value[\"__v_raw\"] : false;\n}\nfunction toRaw(observed) {\n const raw = observed && observed[\"__v_raw\"];\n return raw ? toRaw(raw) : observed;\n}\nfunction markRaw(value) {\n if (!hasOwn(value, \"__v_skip\") && Object.isExtensible(value)) {\n def(value, \"__v_skip\", true);\n }\n return value;\n}\nconst toReactive = (value) => isObject(value) ? reactive(value) : value;\nconst toReadonly = (value) => isObject(value) ? readonly(value) : value;\n\nfunction isRef(r) {\n return r ? r[\"__v_isRef\"] === true : false;\n}\nfunction ref(value) {\n return createRef(value, false);\n}\nfunction shallowRef(value) {\n return createRef(value, true);\n}\nfunction createRef(rawValue, shallow) {\n if (isRef(rawValue)) {\n return rawValue;\n }\n return new RefImpl(rawValue, shallow);\n}\nclass RefImpl {\n constructor(value, isShallow2) {\n this.dep = new Dep();\n this[\"__v_isRef\"] = true;\n this[\"__v_isShallow\"] = false;\n this._rawValue = isShallow2 ? value : toRaw(value);\n this._value = isShallow2 ? value : toReactive(value);\n this[\"__v_isShallow\"] = isShallow2;\n }\n get value() {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n });\n } else {\n this.dep.track();\n }\n return this._value;\n }\n set value(newValue) {\n const oldValue = this._rawValue;\n const useDirectValue = this[\"__v_isShallow\"] || isShallow(newValue) || isReadonly(newValue);\n newValue = useDirectValue ? newValue : toRaw(newValue);\n if (hasChanged(newValue, oldValue)) {\n this._rawValue = newValue;\n this._value = useDirectValue ? newValue : toReactive(newValue);\n if (!!(process.env.NODE_ENV !== \"production\")) {\n this.dep.trigger({\n target: this,\n type: \"set\",\n key: \"value\",\n newValue,\n oldValue\n });\n } else {\n this.dep.trigger();\n }\n }\n }\n}\nfunction triggerRef(ref2) {\n if (ref2.dep) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n ref2.dep.trigger({\n target: ref2,\n type: \"set\",\n key: \"value\",\n newValue: ref2._value\n });\n } else {\n ref2.dep.trigger();\n }\n }\n}\nfunction unref(ref2) {\n return isRef(ref2) ? ref2.value : ref2;\n}\nfunction toValue(source) {\n return isFunction(source) ? source() : unref(source);\n}\nconst shallowUnwrapHandlers = {\n get: (target, key, receiver) => key === \"__v_raw\" ? target : unref(Reflect.get(target, key, receiver)),\n set: (target, key, value, receiver) => {\n const oldValue = target[key];\n if (isRef(oldValue) && !isRef(value)) {\n oldValue.value = value;\n return true;\n } else {\n return Reflect.set(target, key, value, receiver);\n }\n }\n};\nfunction proxyRefs(objectWithRefs) {\n return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);\n}\nclass CustomRefImpl {\n constructor(factory) {\n this[\"__v_isRef\"] = true;\n this._value = void 0;\n const dep = this.dep = new Dep();\n const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));\n this._get = get;\n this._set = set;\n }\n get value() {\n return this._value = this._get();\n }\n set value(newVal) {\n this._set(newVal);\n }\n}\nfunction customRef(factory) {\n return new CustomRefImpl(factory);\n}\nfunction toRefs(object) {\n if (!!(process.env.NODE_ENV !== \"production\") && !isProxy(object)) {\n warn(`toRefs() expects a reactive object but received a plain one.`);\n }\n const ret = isArray(object) ? new Array(object.length) : {};\n for (const key in object) {\n ret[key] = propertyToRef(object, key);\n }\n return ret;\n}\nclass ObjectRefImpl {\n constructor(_object, _key, _defaultValue) {\n this._object = _object;\n this._key = _key;\n this._defaultValue = _defaultValue;\n this[\"__v_isRef\"] = true;\n this._value = void 0;\n }\n get value() {\n const val = this._object[this._key];\n return this._value = val === void 0 ? this._defaultValue : val;\n }\n set value(newVal) {\n this._object[this._key] = newVal;\n }\n get dep() {\n return getDepFromReactive(toRaw(this._object), this._key);\n }\n}\nclass GetterRefImpl {\n constructor(_getter) {\n this._getter = _getter;\n this[\"__v_isRef\"] = true;\n this[\"__v_isReadonly\"] = true;\n this._value = void 0;\n }\n get value() {\n return this._value = this._getter();\n }\n}\nfunction toRef(source, key, defaultValue) {\n if (isRef(source)) {\n return source;\n } else if (isFunction(source)) {\n return new GetterRefImpl(source);\n } else if (isObject(source) && arguments.length > 1) {\n return propertyToRef(source, key, defaultValue);\n } else {\n return ref(source);\n }\n}\nfunction propertyToRef(source, key, defaultValue) {\n const val = source[key];\n return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue);\n}\n\nclass ComputedRefImpl {\n constructor(fn, setter, isSSR) {\n this.fn = fn;\n this.setter = setter;\n /**\n * @internal\n */\n this._value = void 0;\n /**\n * @internal\n */\n this.dep = new Dep(this);\n /**\n * @internal\n */\n this.__v_isRef = true;\n // TODO isolatedDeclarations \"__v_isReadonly\"\n // A computed is also a subscriber that tracks other deps\n /**\n * @internal\n */\n this.deps = void 0;\n /**\n * @internal\n */\n this.depsTail = void 0;\n /**\n * @internal\n */\n this.flags = 16;\n /**\n * @internal\n */\n this.globalVersion = globalVersion - 1;\n /**\n * @internal\n */\n this.next = void 0;\n // for backwards compat\n this.effect = this;\n this[\"__v_isReadonly\"] = !setter;\n this.isSSR = isSSR;\n }\n /**\n * @internal\n */\n notify() {\n this.flags |= 16;\n if (!(this.flags & 8) && // avoid infinite self recursion\n activeSub !== this) {\n batch(this, true);\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\")) ;\n }\n get value() {\n const link = !!(process.env.NODE_ENV !== \"production\") ? this.dep.track({\n target: this,\n type: \"get\",\n key: \"value\"\n }) : this.dep.track();\n refreshComputed(this);\n if (link) {\n link.version = this.dep.version;\n }\n return this._value;\n }\n set value(newValue) {\n if (this.setter) {\n this.setter(newValue);\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn(\"Write operation failed: computed value is readonly\");\n }\n }\n}\nfunction computed(getterOrOptions, debugOptions, isSSR = false) {\n let getter;\n let setter;\n if (isFunction(getterOrOptions)) {\n getter = getterOrOptions;\n } else {\n getter = getterOrOptions.get;\n setter = getterOrOptions.set;\n }\n const cRef = new ComputedRefImpl(getter, setter, isSSR);\n if (!!(process.env.NODE_ENV !== \"production\") && debugOptions && !isSSR) {\n cRef.onTrack = debugOptions.onTrack;\n cRef.onTrigger = debugOptions.onTrigger;\n }\n return cRef;\n}\n\nconst TrackOpTypes = {\n \"GET\": \"get\",\n \"HAS\": \"has\",\n \"ITERATE\": \"iterate\"\n};\nconst TriggerOpTypes = {\n \"SET\": \"set\",\n \"ADD\": \"add\",\n \"DELETE\": \"delete\",\n \"CLEAR\": \"clear\"\n};\nconst ReactiveFlags = {\n \"SKIP\": \"__v_skip\",\n \"IS_REACTIVE\": \"__v_isReactive\",\n \"IS_READONLY\": \"__v_isReadonly\",\n \"IS_SHALLOW\": \"__v_isShallow\",\n \"RAW\": \"__v_raw\",\n \"IS_REF\": \"__v_isRef\"\n};\n\nconst WatchErrorCodes = {\n \"WATCH_GETTER\": 2,\n \"2\": \"WATCH_GETTER\",\n \"WATCH_CALLBACK\": 3,\n \"3\": \"WATCH_CALLBACK\",\n \"WATCH_CLEANUP\": 4,\n \"4\": \"WATCH_CLEANUP\"\n};\nconst INITIAL_WATCHER_VALUE = {};\nconst cleanupMap = /* @__PURE__ */ new WeakMap();\nlet activeWatcher = void 0;\nfunction getCurrentWatcher() {\n return activeWatcher;\n}\nfunction onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {\n if (owner) {\n let cleanups = cleanupMap.get(owner);\n if (!cleanups) cleanupMap.set(owner, cleanups = []);\n cleanups.push(cleanupFn);\n } else if (!!(process.env.NODE_ENV !== \"production\") && !failSilently) {\n warn(\n `onWatcherCleanup() was called when there was no active watcher to associate with.`\n );\n }\n}\nfunction watch(source, cb, options = EMPTY_OBJ) {\n const { immediate, deep, once, scheduler, augmentJob, call } = options;\n const warnInvalidSource = (s) => {\n (options.onWarn || warn)(\n `Invalid watch source: `,\n s,\n `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`\n );\n };\n const reactiveGetter = (source2) => {\n if (deep) return source2;\n if (isShallow(source2) || deep === false || deep === 0)\n return traverse(source2, 1);\n return traverse(source2);\n };\n let effect;\n let getter;\n let cleanup;\n let boundCleanup;\n let forceTrigger = false;\n let isMultiSource = false;\n if (isRef(source)) {\n getter = () => source.value;\n forceTrigger = isShallow(source);\n } else if (isReactive(source)) {\n getter = () => reactiveGetter(source);\n forceTrigger = true;\n } else if (isArray(source)) {\n isMultiSource = true;\n forceTrigger = source.some((s) => isReactive(s) || isShallow(s));\n getter = () => source.map((s) => {\n if (isRef(s)) {\n return s.value;\n } else if (isReactive(s)) {\n return reactiveGetter(s);\n } else if (isFunction(s)) {\n return call ? call(s, 2) : s();\n } else {\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(s);\n }\n });\n } else if (isFunction(source)) {\n if (cb) {\n getter = call ? () => call(source, 2) : source;\n } else {\n getter = () => {\n if (cleanup) {\n pauseTracking();\n try {\n cleanup();\n } finally {\n resetTracking();\n }\n }\n const currentEffect = activeWatcher;\n activeWatcher = effect;\n try {\n return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);\n } finally {\n activeWatcher = currentEffect;\n }\n };\n }\n } else {\n getter = NOOP;\n !!(process.env.NODE_ENV !== \"production\") && warnInvalidSource(source);\n }\n if (cb && deep) {\n const baseGetter = getter;\n const depth = deep === true ? Infinity : deep;\n getter = () => traverse(baseGetter(), depth);\n }\n const scope = getCurrentScope();\n const watchHandle = () => {\n effect.stop();\n if (scope) {\n remove(scope.effects, effect);\n }\n };\n if (once && cb) {\n const _cb = cb;\n cb = (...args) => {\n _cb(...args);\n watchHandle();\n };\n }\n let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;\n const job = (immediateFirstRun) => {\n if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {\n return;\n }\n if (cb) {\n const newValue = effect.run();\n if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {\n if (cleanup) {\n cleanup();\n }\n const currentWatcher = activeWatcher;\n activeWatcher = effect;\n try {\n const args = [\n newValue,\n // pass undefined as the old value when it's changed for the first time\n oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,\n boundCleanup\n ];\n call ? call(cb, 3, args) : (\n // @ts-expect-error\n cb(...args)\n );\n oldValue = newValue;\n } finally {\n activeWatcher = currentWatcher;\n }\n }\n } else {\n effect.run();\n }\n };\n if (augmentJob) {\n augmentJob(job);\n }\n effect = new ReactiveEffect(getter);\n effect.scheduler = scheduler ? () => scheduler(job, false) : job;\n boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);\n cleanup = effect.onStop = () => {\n const cleanups = cleanupMap.get(effect);\n if (cleanups) {\n if (call) {\n call(cleanups, 4);\n } else {\n for (const cleanup2 of cleanups) cleanup2();\n }\n cleanupMap.delete(effect);\n }\n };\n if (!!(process.env.NODE_ENV !== \"production\")) {\n effect.onTrack = options.onTrack;\n effect.onTrigger = options.onTrigger;\n }\n if (cb) {\n if (immediate) {\n job(true);\n } else {\n oldValue = effect.run();\n }\n } else if (scheduler) {\n scheduler(job.bind(null, true), true);\n } else {\n effect.run();\n }\n watchHandle.pause = effect.pause.bind(effect);\n watchHandle.resume = effect.resume.bind(effect);\n watchHandle.stop = watchHandle;\n return watchHandle;\n}\nfunction traverse(value, depth = Infinity, seen) {\n if (depth <= 0 || !isObject(value) || value[\"__v_skip\"]) {\n return value;\n }\n seen = seen || /* @__PURE__ */ new Set();\n if (seen.has(value)) {\n return value;\n }\n seen.add(value);\n depth--;\n if (isRef(value)) {\n traverse(value.value, depth, seen);\n } else if (isArray(value)) {\n for (let i = 0; i < value.length; i++) {\n traverse(value[i], depth, seen);\n }\n } else if (isSet(value) || isMap(value)) {\n value.forEach((v) => {\n traverse(v, depth, seen);\n });\n } else if (isPlainObject(value)) {\n for (const key in value) {\n traverse(value[key], depth, seen);\n }\n for (const key of Object.getOwnPropertySymbols(value)) {\n if (Object.prototype.propertyIsEnumerable.call(value, key)) {\n traverse(value[key], depth, seen);\n }\n }\n }\n return value;\n}\n\nexport { ARRAY_ITERATE_KEY, EffectFlags, EffectScope, ITERATE_KEY, MAP_KEY_ITERATE_KEY, ReactiveEffect, ReactiveFlags, TrackOpTypes, TriggerOpTypes, WatchErrorCodes, computed, customRef, effect, effectScope, enableTracking, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onEffectCleanup, onScopeDispose, onWatcherCleanup, pauseTracking, proxyRefs, reactive, reactiveReadArray, readonly, ref, resetTracking, shallowReactive, shallowReadArray, shallowReadonly, shallowRef, stop, toRaw, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref, watch };\n","/**\n* @vue/runtime-core v3.5.12\n* (c) 2018-present Yuxi (Evan) You and Vue contributors\n* @license MIT\n**/\nimport { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';\nexport { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';\nimport { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isSymbol, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';\nexport { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';\n\nconst stack = [];\nfunction pushWarningContext(vnode) {\n stack.push(vnode);\n}\nfunction popWarningContext() {\n stack.pop();\n}\nlet isWarning = false;\nfunction warn$1(msg, ...args) {\n if (isWarning) return;\n isWarning = true;\n pauseTracking();\n const instance = stack.length ? stack[stack.length - 1].component : null;\n const appWarnHandler = instance && instance.appContext.config.warnHandler;\n const trace = getComponentTrace();\n if (appWarnHandler) {\n callWithErrorHandling(\n appWarnHandler,\n instance,\n 11,\n [\n // eslint-disable-next-line no-restricted-syntax\n msg + args.map((a) => {\n var _a, _b;\n return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);\n }).join(\"\"),\n instance && instance.proxy,\n trace.map(\n ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`\n ).join(\"\\n\"),\n trace\n ]\n );\n } else {\n const warnArgs = [`[Vue warn]: ${msg}`, ...args];\n if (trace.length && // avoid spamming console during tests\n true) {\n warnArgs.push(`\n`, ...formatTrace(trace));\n }\n console.warn(...warnArgs);\n }\n resetTracking();\n isWarning = false;\n}\nfunction getComponentTrace() {\n let currentVNode = stack[stack.length - 1];\n if (!currentVNode) {\n return [];\n }\n const normalizedStack = [];\n while (currentVNode) {\n const last = normalizedStack[0];\n if (last && last.vnode === currentVNode) {\n last.recurseCount++;\n } else {\n normalizedStack.push({\n vnode: currentVNode,\n recurseCount: 0\n });\n }\n const parentInstance = currentVNode.component && currentVNode.component.parent;\n currentVNode = parentInstance && parentInstance.vnode;\n }\n return normalizedStack;\n}\nfunction formatTrace(trace) {\n const logs = [];\n trace.forEach((entry, i) => {\n logs.push(...i === 0 ? [] : [`\n`], ...formatTraceEntry(entry));\n });\n return logs;\n}\nfunction formatTraceEntry({ vnode, recurseCount }) {\n const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;\n const isRoot = vnode.component ? vnode.component.parent == null : false;\n const open = ` at <${formatComponentName(\n vnode.component,\n vnode.type,\n isRoot\n )}`;\n const close = `>` + postfix;\n return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];\n}\nfunction formatProps(props) {\n const res = [];\n const keys = Object.keys(props);\n keys.slice(0, 3).forEach((key) => {\n res.push(...formatProp(key, props[key]));\n });\n if (keys.length > 3) {\n res.push(` ...`);\n }\n return res;\n}\nfunction formatProp(key, value, raw) {\n if (isString(value)) {\n value = JSON.stringify(value);\n return raw ? value : [`${key}=${value}`];\n } else if (typeof value === \"number\" || typeof value === \"boolean\" || value == null) {\n return raw ? value : [`${key}=${value}`];\n } else if (isRef(value)) {\n value = formatProp(key, toRaw(value.value), true);\n return raw ? value : [`${key}=Ref<`, value, `>`];\n } else if (isFunction(value)) {\n return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];\n } else {\n value = toRaw(value);\n return raw ? value : [`${key}=`, value];\n }\n}\nfunction assertNumber(val, type) {\n if (!!!(process.env.NODE_ENV !== \"production\")) return;\n if (val === void 0) {\n return;\n } else if (typeof val !== \"number\") {\n warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);\n } else if (isNaN(val)) {\n warn$1(`${type} is NaN - the duration expression might be incorrect.`);\n }\n}\n\nconst ErrorCodes = {\n \"SETUP_FUNCTION\": 0,\n \"0\": \"SETUP_FUNCTION\",\n \"RENDER_FUNCTION\": 1,\n \"1\": \"RENDER_FUNCTION\",\n \"NATIVE_EVENT_HANDLER\": 5,\n \"5\": \"NATIVE_EVENT_HANDLER\",\n \"COMPONENT_EVENT_HANDLER\": 6,\n \"6\": \"COMPONENT_EVENT_HANDLER\",\n \"VNODE_HOOK\": 7,\n \"7\": \"VNODE_HOOK\",\n \"DIRECTIVE_HOOK\": 8,\n \"8\": \"DIRECTIVE_HOOK\",\n \"TRANSITION_HOOK\": 9,\n \"9\": \"TRANSITION_HOOK\",\n \"APP_ERROR_HANDLER\": 10,\n \"10\": \"APP_ERROR_HANDLER\",\n \"APP_WARN_HANDLER\": 11,\n \"11\": \"APP_WARN_HANDLER\",\n \"FUNCTION_REF\": 12,\n \"12\": \"FUNCTION_REF\",\n \"ASYNC_COMPONENT_LOADER\": 13,\n \"13\": \"ASYNC_COMPONENT_LOADER\",\n \"SCHEDULER\": 14,\n \"14\": \"SCHEDULER\",\n \"COMPONENT_UPDATE\": 15,\n \"15\": \"COMPONENT_UPDATE\",\n \"APP_UNMOUNT_CLEANUP\": 16,\n \"16\": \"APP_UNMOUNT_CLEANUP\"\n};\nconst ErrorTypeStrings$1 = {\n [\"sp\"]: \"serverPrefetch hook\",\n [\"bc\"]: \"beforeCreate hook\",\n [\"c\"]: \"created hook\",\n [\"bm\"]: \"beforeMount hook\",\n [\"m\"]: \"mounted hook\",\n [\"bu\"]: \"beforeUpdate hook\",\n [\"u\"]: \"updated\",\n [\"bum\"]: \"beforeUnmount hook\",\n [\"um\"]: \"unmounted hook\",\n [\"a\"]: \"activated hook\",\n [\"da\"]: \"deactivated hook\",\n [\"ec\"]: \"errorCaptured hook\",\n [\"rtc\"]: \"renderTracked hook\",\n [\"rtg\"]: \"renderTriggered hook\",\n [0]: \"setup function\",\n [1]: \"render function\",\n [2]: \"watcher getter\",\n [3]: \"watcher callback\",\n [4]: \"watcher cleanup function\",\n [5]: \"native event handler\",\n [6]: \"component event handler\",\n [7]: \"vnode hook\",\n [8]: \"directive hook\",\n [9]: \"transition hook\",\n [10]: \"app errorHandler\",\n [11]: \"app warnHandler\",\n [12]: \"ref function\",\n [13]: \"async component loader\",\n [14]: \"scheduler flush\",\n [15]: \"component update\",\n [16]: \"app unmount cleanup function\"\n};\nfunction callWithErrorHandling(fn, instance, type, args) {\n try {\n return args ? fn(...args) : fn();\n } catch (err) {\n handleError(err, instance, type);\n }\n}\nfunction callWithAsyncErrorHandling(fn, instance, type, args) {\n if (isFunction(fn)) {\n const res = callWithErrorHandling(fn, instance, type, args);\n if (res && isPromise(res)) {\n res.catch((err) => {\n handleError(err, instance, type);\n });\n }\n return res;\n }\n if (isArray(fn)) {\n const values = [];\n for (let i = 0; i < fn.length; i++) {\n values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));\n }\n return values;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`\n );\n }\n}\nfunction handleError(err, instance, type, throwInDev = true) {\n const contextVNode = instance ? instance.vnode : null;\n const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;\n if (instance) {\n let cur = instance.parent;\n const exposedInstance = instance.proxy;\n const errorInfo = !!(process.env.NODE_ENV !== \"production\") ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`;\n while (cur) {\n const errorCapturedHooks = cur.ec;\n if (errorCapturedHooks) {\n for (let i = 0; i < errorCapturedHooks.length; i++) {\n if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {\n return;\n }\n }\n }\n cur = cur.parent;\n }\n if (errorHandler) {\n pauseTracking();\n callWithErrorHandling(errorHandler, null, 10, [\n err,\n exposedInstance,\n errorInfo\n ]);\n resetTracking();\n return;\n }\n }\n logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);\n}\nfunction logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n const info = ErrorTypeStrings$1[type];\n if (contextVNode) {\n pushWarningContext(contextVNode);\n }\n warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);\n if (contextVNode) {\n popWarningContext();\n }\n if (throwInDev) {\n throw err;\n } else {\n console.error(err);\n }\n } else if (throwInProd) {\n throw err;\n } else {\n console.error(err);\n }\n}\n\nconst queue = [];\nlet flushIndex = -1;\nconst pendingPostFlushCbs = [];\nlet activePostFlushCbs = null;\nlet postFlushIndex = 0;\nconst resolvedPromise = /* @__PURE__ */ Promise.resolve();\nlet currentFlushPromise = null;\nconst RECURSION_LIMIT = 100;\nfunction nextTick(fn) {\n const p = currentFlushPromise || resolvedPromise;\n return fn ? p.then(this ? fn.bind(this) : fn) : p;\n}\nfunction findInsertionIndex(id) {\n let start = flushIndex + 1;\n let end = queue.length;\n while (start < end) {\n const middle = start + end >>> 1;\n const middleJob = queue[middle];\n const middleJobId = getId(middleJob);\n if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {\n start = middle + 1;\n } else {\n end = middle;\n }\n }\n return start;\n}\nfunction queueJob(job) {\n if (!(job.flags & 1)) {\n const jobId = getId(job);\n const lastJob = queue[queue.length - 1];\n if (!lastJob || // fast path when the job id is larger than the tail\n !(job.flags & 2) && jobId >= getId(lastJob)) {\n queue.push(job);\n } else {\n queue.splice(findInsertionIndex(jobId), 0, job);\n }\n job.flags |= 1;\n queueFlush();\n }\n}\nfunction queueFlush() {\n if (!currentFlushPromise) {\n currentFlushPromise = resolvedPromise.then(flushJobs);\n }\n}\nfunction queuePostFlushCb(cb) {\n if (!isArray(cb)) {\n if (activePostFlushCbs && cb.id === -1) {\n activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);\n } else if (!(cb.flags & 1)) {\n pendingPostFlushCbs.push(cb);\n cb.flags |= 1;\n }\n } else {\n pendingPostFlushCbs.push(...cb);\n }\n queueFlush();\n}\nfunction flushPreFlushCbs(instance, seen, i = flushIndex + 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (; i < queue.length; i++) {\n const cb = queue[i];\n if (cb && cb.flags & 2) {\n if (instance && cb.id !== instance.uid) {\n continue;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n queue.splice(i, 1);\n i--;\n if (cb.flags & 4) {\n cb.flags &= ~1;\n }\n cb();\n if (!(cb.flags & 4)) {\n cb.flags &= ~1;\n }\n }\n }\n}\nfunction flushPostFlushCbs(seen) {\n if (pendingPostFlushCbs.length) {\n const deduped = [...new Set(pendingPostFlushCbs)].sort(\n (a, b) => getId(a) - getId(b)\n );\n pendingPostFlushCbs.length = 0;\n if (activePostFlushCbs) {\n activePostFlushCbs.push(...deduped);\n return;\n }\n activePostFlushCbs = deduped;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {\n const cb = activePostFlushCbs[postFlushIndex];\n if (!!(process.env.NODE_ENV !== \"production\") && checkRecursiveUpdates(seen, cb)) {\n continue;\n }\n if (cb.flags & 4) {\n cb.flags &= ~1;\n }\n if (!(cb.flags & 8)) cb();\n cb.flags &= ~1;\n }\n activePostFlushCbs = null;\n postFlushIndex = 0;\n }\n}\nconst getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;\nfunction flushJobs(seen) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n seen = seen || /* @__PURE__ */ new Map();\n }\n const check = !!(process.env.NODE_ENV !== \"production\") ? (job) => checkRecursiveUpdates(seen, job) : NOOP;\n try {\n for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job && !(job.flags & 8)) {\n if (!!(process.env.NODE_ENV !== \"production\") && check(job)) {\n continue;\n }\n if (job.flags & 4) {\n job.flags &= ~1;\n }\n callWithErrorHandling(\n job,\n job.i,\n job.i ? 15 : 14\n );\n if (!(job.flags & 4)) {\n job.flags &= ~1;\n }\n }\n }\n } finally {\n for (; flushIndex < queue.length; flushIndex++) {\n const job = queue[flushIndex];\n if (job) {\n job.flags &= ~1;\n }\n }\n flushIndex = -1;\n queue.length = 0;\n flushPostFlushCbs(seen);\n currentFlushPromise = null;\n if (queue.length || pendingPostFlushCbs.length) {\n flushJobs(seen);\n }\n }\n}\nfunction checkRecursiveUpdates(seen, fn) {\n const count = seen.get(fn) || 0;\n if (count > RECURSION_LIMIT) {\n const instance = fn.i;\n const componentName = instance && getComponentName(instance.type);\n handleError(\n `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`,\n null,\n 10\n );\n return true;\n }\n seen.set(fn, count + 1);\n return false;\n}\n\nlet isHmrUpdating = false;\nconst hmrDirtyComponents = /* @__PURE__ */ new Map();\nif (!!(process.env.NODE_ENV !== \"production\")) {\n getGlobalThis().__VUE_HMR_RUNTIME__ = {\n createRecord: tryWrap(createRecord),\n rerender: tryWrap(rerender),\n reload: tryWrap(reload)\n };\n}\nconst map = /* @__PURE__ */ new Map();\nfunction registerHMR(instance) {\n const id = instance.type.__hmrId;\n let record = map.get(id);\n if (!record) {\n createRecord(id, instance.type);\n record = map.get(id);\n }\n record.instances.add(instance);\n}\nfunction unregisterHMR(instance) {\n map.get(instance.type.__hmrId).instances.delete(instance);\n}\nfunction createRecord(id, initialDef) {\n if (map.has(id)) {\n return false;\n }\n map.set(id, {\n initialDef: normalizeClassComponent(initialDef),\n instances: /* @__PURE__ */ new Set()\n });\n return true;\n}\nfunction normalizeClassComponent(component) {\n return isClassComponent(component) ? component.__vccOpts : component;\n}\nfunction rerender(id, newRender) {\n const record = map.get(id);\n if (!record) {\n return;\n }\n record.initialDef.render = newRender;\n [...record.instances].forEach((instance) => {\n if (newRender) {\n instance.render = newRender;\n normalizeClassComponent(instance.type).render = newRender;\n }\n instance.renderCache = [];\n isHmrUpdating = true;\n instance.update();\n isHmrUpdating = false;\n });\n}\nfunction reload(id, newComp) {\n const record = map.get(id);\n if (!record) return;\n newComp = normalizeClassComponent(newComp);\n updateComponentDef(record.initialDef, newComp);\n const instances = [...record.instances];\n for (let i = 0; i < instances.length; i++) {\n const instance = instances[i];\n const oldComp = normalizeClassComponent(instance.type);\n let dirtyInstances = hmrDirtyComponents.get(oldComp);\n if (!dirtyInstances) {\n if (oldComp !== record.initialDef) {\n updateComponentDef(oldComp, newComp);\n }\n hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());\n }\n dirtyInstances.add(instance);\n instance.appContext.propsCache.delete(instance.type);\n instance.appContext.emitsCache.delete(instance.type);\n instance.appContext.optionsCache.delete(instance.type);\n if (instance.ceReload) {\n dirtyInstances.add(instance);\n instance.ceReload(newComp.styles);\n dirtyInstances.delete(instance);\n } else if (instance.parent) {\n queueJob(() => {\n isHmrUpdating = true;\n instance.parent.update();\n isHmrUpdating = false;\n dirtyInstances.delete(instance);\n });\n } else if (instance.appContext.reload) {\n instance.appContext.reload();\n } else if (typeof window !== \"undefined\") {\n window.location.reload();\n } else {\n console.warn(\n \"[HMR] Root or manually mounted instance modified. Full reload required.\"\n );\n }\n if (instance.root.ce && instance !== instance.root) {\n instance.root.ce._removeChildStyle(oldComp);\n }\n }\n queuePostFlushCb(() => {\n hmrDirtyComponents.clear();\n });\n}\nfunction updateComponentDef(oldComp, newComp) {\n extend(oldComp, newComp);\n for (const key in oldComp) {\n if (key !== \"__file\" && !(key in newComp)) {\n delete oldComp[key];\n }\n }\n}\nfunction tryWrap(fn) {\n return (id, arg) => {\n try {\n return fn(id, arg);\n } catch (e) {\n console.error(e);\n console.warn(\n `[HMR] Something went wrong during Vue component hot-reload. Full reload required.`\n );\n }\n };\n}\n\nlet devtools$1;\nlet buffer = [];\nlet devtoolsNotInstalled = false;\nfunction emit$1(event, ...args) {\n if (devtools$1) {\n devtools$1.emit(event, ...args);\n } else if (!devtoolsNotInstalled) {\n buffer.push({ event, args });\n }\n}\nfunction setDevtoolsHook$1(hook, target) {\n var _a, _b;\n devtools$1 = hook;\n if (devtools$1) {\n devtools$1.enabled = true;\n buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));\n buffer = [];\n } else if (\n // handle late devtools injection - only do this if we are in an actual\n // browser environment to avoid the timer handle stalling test runner exit\n // (#4815)\n typeof window !== \"undefined\" && // some envs mock window but not fully\n window.HTMLElement && // also exclude jsdom\n // eslint-disable-next-line no-restricted-syntax\n !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes(\"jsdom\"))\n ) {\n const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];\n replay.push((newHook) => {\n setDevtoolsHook$1(newHook, target);\n });\n setTimeout(() => {\n if (!devtools$1) {\n target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;\n devtoolsNotInstalled = true;\n buffer = [];\n }\n }, 3e3);\n } else {\n devtoolsNotInstalled = true;\n buffer = [];\n }\n}\nfunction devtoolsInitApp(app, version) {\n emit$1(\"app:init\" /* APP_INIT */, app, version, {\n Fragment,\n Text,\n Comment,\n Static\n });\n}\nfunction devtoolsUnmountApp(app) {\n emit$1(\"app:unmount\" /* APP_UNMOUNT */, app);\n}\nconst devtoolsComponentAdded = /* @__PURE__ */ createDevtoolsComponentHook(\"component:added\" /* COMPONENT_ADDED */);\nconst devtoolsComponentUpdated = /* @__PURE__ */ createDevtoolsComponentHook(\"component:updated\" /* COMPONENT_UPDATED */);\nconst _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(\n \"component:removed\" /* COMPONENT_REMOVED */\n);\nconst devtoolsComponentRemoved = (component) => {\n if (devtools$1 && typeof devtools$1.cleanupBuffer === \"function\" && // remove the component if it wasn't buffered\n !devtools$1.cleanupBuffer(component)) {\n _devtoolsComponentRemoved(component);\n }\n};\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction createDevtoolsComponentHook(hook) {\n return (component) => {\n emit$1(\n hook,\n component.appContext.app,\n component.uid,\n component.parent ? component.parent.uid : void 0,\n component\n );\n };\n}\nconst devtoolsPerfStart = /* @__PURE__ */ createDevtoolsPerformanceHook(\"perf:start\" /* PERFORMANCE_START */);\nconst devtoolsPerfEnd = /* @__PURE__ */ createDevtoolsPerformanceHook(\"perf:end\" /* PERFORMANCE_END */);\nfunction createDevtoolsPerformanceHook(hook) {\n return (component, type, time) => {\n emit$1(hook, component.appContext.app, component.uid, component, type, time);\n };\n}\nfunction devtoolsComponentEmit(component, event, params) {\n emit$1(\n \"component:emit\" /* COMPONENT_EMIT */,\n component.appContext.app,\n component,\n event,\n params\n );\n}\n\nlet currentRenderingInstance = null;\nlet currentScopeId = null;\nfunction setCurrentRenderingInstance(instance) {\n const prev = currentRenderingInstance;\n currentRenderingInstance = instance;\n currentScopeId = instance && instance.type.__scopeId || null;\n return prev;\n}\nfunction pushScopeId(id) {\n currentScopeId = id;\n}\nfunction popScopeId() {\n currentScopeId = null;\n}\nconst withScopeId = (_id) => withCtx;\nfunction withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {\n if (!ctx) return fn;\n if (fn._n) {\n return fn;\n }\n const renderFnWithContext = (...args) => {\n if (renderFnWithContext._d) {\n setBlockTracking(-1);\n }\n const prevInstance = setCurrentRenderingInstance(ctx);\n let res;\n try {\n res = fn(...args);\n } finally {\n setCurrentRenderingInstance(prevInstance);\n if (renderFnWithContext._d) {\n setBlockTracking(1);\n }\n }\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentUpdated(ctx);\n }\n return res;\n };\n renderFnWithContext._n = true;\n renderFnWithContext._c = true;\n renderFnWithContext._d = true;\n return renderFnWithContext;\n}\n\nfunction validateDirectiveName(name) {\n if (isBuiltInDirective(name)) {\n warn$1(\"Do not use built-in directive ids as custom directive id: \" + name);\n }\n}\nfunction withDirectives(vnode, directives) {\n if (currentRenderingInstance === null) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(`withDirectives can only be used inside render functions.`);\n return vnode;\n }\n const instance = getComponentPublicInstance(currentRenderingInstance);\n const bindings = vnode.dirs || (vnode.dirs = []);\n for (let i = 0; i < directives.length; i++) {\n let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i];\n if (dir) {\n if (isFunction(dir)) {\n dir = {\n mounted: dir,\n updated: dir\n };\n }\n if (dir.deep) {\n traverse(value);\n }\n bindings.push({\n dir,\n instance,\n value,\n oldValue: void 0,\n arg,\n modifiers\n });\n }\n }\n return vnode;\n}\nfunction invokeDirectiveHook(vnode, prevVNode, instance, name) {\n const bindings = vnode.dirs;\n const oldBindings = prevVNode && prevVNode.dirs;\n for (let i = 0; i < bindings.length; i++) {\n const binding = bindings[i];\n if (oldBindings) {\n binding.oldValue = oldBindings[i].value;\n }\n let hook = binding.dir[name];\n if (hook) {\n pauseTracking();\n callWithAsyncErrorHandling(hook, instance, 8, [\n vnode.el,\n binding,\n vnode,\n prevVNode\n ]);\n resetTracking();\n }\n }\n}\n\nconst TeleportEndKey = Symbol(\"_vte\");\nconst isTeleport = (type) => type.__isTeleport;\nconst isTeleportDisabled = (props) => props && (props.disabled || props.disabled === \"\");\nconst isTeleportDeferred = (props) => props && (props.defer || props.defer === \"\");\nconst isTargetSVG = (target) => typeof SVGElement !== \"undefined\" && target instanceof SVGElement;\nconst isTargetMathML = (target) => typeof MathMLElement === \"function\" && target instanceof MathMLElement;\nconst resolveTarget = (props, select) => {\n const targetSelector = props && props.to;\n if (isString(targetSelector)) {\n if (!select) {\n !!(process.env.NODE_ENV !== \"production\") && warn$1(\n `Current renderer does not support string target for Teleports. (missing querySelector renderer option)`\n );\n return null;\n } else {\n const target = select(targetSelector);\n if (!!(process.env.NODE_ENV !== \"production\") && !target && !isTeleportDisabled(props)) {\n warn$1(\n `Failed to locate Teleport target with selector \"${targetSelector}\". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`\n );\n }\n return target;\n }\n } else {\n if (!!(process.env.NODE_ENV !== \"production\") && !targetSelector && !isTeleportDisabled(props)) {\n warn$1(`Invalid Teleport target: ${targetSelector}`);\n }\n return targetSelector;\n }\n};\nconst TeleportImpl = {\n name: \"Teleport\",\n __isTeleport: true,\n process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {\n const {\n mc: mountChildren,\n pc: patchChildren,\n pbc: patchBlockChildren,\n o: { insert, querySelector, createText, createComment }\n } = internals;\n const disabled = isTeleportDisabled(n2.props);\n let { shapeFlag, children, dynamicChildren } = n2;\n if (!!(process.env.NODE_ENV !== \"production\") && isHmrUpdating) {\n optimized = false;\n dynamicChildren = null;\n }\n if (n1 == null) {\n const placeholder = n2.el = !!(process.env.NODE_ENV !== \"production\") ? createComment(\"teleport start\") : createText(\"\");\n const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== \"production\") ? createComment(\"teleport end\") : createText(\"\");\n insert(placeholder, container, anchor);\n insert(mainAnchor, container, anchor);\n const mount = (container2, anchor2) => {\n if (shapeFlag & 16) {\n if (parentComponent && parentComponent.isCE) {\n parentComponent.ce._teleportTarget = container2;\n }\n mountChildren(\n children,\n container2,\n anchor2,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n optimized\n );\n }\n };\n const mountToTarget = () => {\n const target = n2.target = resolveTarget(n2.props, querySelector);\n const targetAnchor = prepareAnchor(target, n2, createText, insert);\n if (target) {\n if (namespace !== \"svg\" && isTargetSVG(target)) {\n namespace = \"svg\";\n } else if (namespace !== \"mathml\" && isTargetMathML(target)) {\n namespace = \"mathml\";\n }\n if (!disabled) {\n mount(target, targetAnchor);\n updateCssVars(n2, false);\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && !disabled) {\n warn$1(\n \"Invalid Teleport target on mount:\",\n target,\n `(${typeof target})`\n );\n }\n };\n if (disabled) {\n mount(container, mainAnchor);\n updateCssVars(n2, true);\n }\n if (isTeleportDeferred(n2.props)) {\n queuePostRenderEffect(mountToTarget, parentSuspense);\n } else {\n mountToTarget();\n }\n } else {\n n2.el = n1.el;\n n2.targetStart = n1.targetStart;\n const mainAnchor = n2.anchor = n1.anchor;\n const target = n2.target = n1.target;\n const targetAnchor = n2.targetAnchor = n1.targetAnchor;\n const wasDisabled = isTeleportDisabled(n1.props);\n const currentContainer = wasDisabled ? container : target;\n const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;\n if (namespace === \"svg\" || isTargetSVG(target)) {\n namespace = \"svg\";\n } else if (namespace === \"mathml\" || isTargetMathML(target)) {\n namespace = \"mathml\";\n }\n if (dynamicChildren) {\n patchBlockChildren(\n n1.dynamicChildren,\n dynamicChildren,\n currentContainer,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds\n );\n traverseStaticChildren(n1, n2, true);\n } else if (!optimized) {\n patchChildren(\n n1,\n n2,\n currentContainer,\n currentAnchor,\n parentComponent,\n parentSuspense,\n namespace,\n slotScopeIds,\n false\n );\n }\n if (disabled) {\n if (!wasDisabled) {\n moveTeleport(\n n2,\n container,\n mainAnchor,\n internals,\n 1\n );\n } else {\n if (n2.props && n1.props && n2.props.to !== n1.props.to) {\n n2.props.to = n1.props.to;\n }\n }\n } else {\n if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {\n const nextTarget = n2.target = resolveTarget(\n n2.props,\n querySelector\n );\n if (nextTarget) {\n moveTeleport(\n n2,\n nextTarget,\n null,\n internals,\n 0\n );\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n \"Invalid Teleport target on update:\",\n target,\n `(${typeof target})`\n );\n }\n } else if (wasDisabled) {\n moveTeleport(\n n2,\n target,\n targetAnchor,\n internals,\n 1\n );\n }\n }\n updateCssVars(n2, disabled);\n }\n },\n remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {\n const {\n shapeFlag,\n children,\n anchor,\n targetStart,\n targetAnchor,\n target,\n props\n } = vnode;\n if (target) {\n hostRemove(targetStart);\n hostRemove(targetAnchor);\n }\n doRemove && hostRemove(anchor);\n if (shapeFlag & 16) {\n const shouldRemove = doRemove || !isTeleportDisabled(props);\n for (let i = 0; i < children.length; i++) {\n const child = children[i];\n unmount(\n child,\n parentComponent,\n parentSuspense,\n shouldRemove,\n !!child.dynamicChildren\n );\n }\n }\n },\n move: moveTeleport,\n hydrate: hydrateTeleport\n};\nfunction moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {\n if (moveType === 0) {\n insert(vnode.targetAnchor, container, parentAnchor);\n }\n const { el, anchor, shapeFlag, children, props } = vnode;\n const isReorder = moveType === 2;\n if (isReorder) {\n insert(el, container, parentAnchor);\n }\n if (!isReorder || isTeleportDisabled(props)) {\n if (shapeFlag & 16) {\n for (let i = 0; i < children.length; i++) {\n move(\n children[i],\n container,\n parentAnchor,\n 2\n );\n }\n }\n }\n if (isReorder) {\n insert(anchor, container, parentAnchor);\n }\n}\nfunction hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {\n o: { nextSibling, parentNode, querySelector, insert, createText }\n}, hydrateChildren) {\n const target = vnode.target = resolveTarget(\n vnode.props,\n querySelector\n );\n if (target) {\n const disabled = isTeleportDisabled(vnode.props);\n const targetNode = target._lpa || target.firstChild;\n if (vnode.shapeFlag & 16) {\n if (disabled) {\n vnode.anchor = hydrateChildren(\n nextSibling(node),\n vnode,\n parentNode(node),\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n vnode.targetStart = targetNode;\n vnode.targetAnchor = targetNode && nextSibling(targetNode);\n } else {\n vnode.anchor = nextSibling(node);\n let targetAnchor = targetNode;\n while (targetAnchor) {\n if (targetAnchor && targetAnchor.nodeType === 8) {\n if (targetAnchor.data === \"teleport start anchor\") {\n vnode.targetStart = targetAnchor;\n } else if (targetAnchor.data === \"teleport anchor\") {\n vnode.targetAnchor = targetAnchor;\n target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);\n break;\n }\n }\n targetAnchor = nextSibling(targetAnchor);\n }\n if (!vnode.targetAnchor) {\n prepareAnchor(target, vnode, createText, insert);\n }\n hydrateChildren(\n targetNode && nextSibling(targetNode),\n vnode,\n target,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n }\n }\n updateCssVars(vnode, disabled);\n }\n return vnode.anchor && nextSibling(vnode.anchor);\n}\nconst Teleport = TeleportImpl;\nfunction updateCssVars(vnode, isDisabled) {\n const ctx = vnode.ctx;\n if (ctx && ctx.ut) {\n let node, anchor;\n if (isDisabled) {\n node = vnode.el;\n anchor = vnode.anchor;\n } else {\n node = vnode.targetStart;\n anchor = vnode.targetAnchor;\n }\n while (node && node !== anchor) {\n if (node.nodeType === 1) node.setAttribute(\"data-v-owner\", ctx.uid);\n node = node.nextSibling;\n }\n ctx.ut();\n }\n}\nfunction prepareAnchor(target, vnode, createText, insert) {\n const targetStart = vnode.targetStart = createText(\"\");\n const targetAnchor = vnode.targetAnchor = createText(\"\");\n targetStart[TeleportEndKey] = targetAnchor;\n if (target) {\n insert(targetStart, target);\n insert(targetAnchor, target);\n }\n return targetAnchor;\n}\n\nconst leaveCbKey = Symbol(\"_leaveCb\");\nconst enterCbKey = Symbol(\"_enterCb\");\nfunction useTransitionState() {\n const state = {\n isMounted: false,\n isLeaving: false,\n isUnmounting: false,\n leavingVNodes: /* @__PURE__ */ new Map()\n };\n onMounted(() => {\n state.isMounted = true;\n });\n onBeforeUnmount(() => {\n state.isUnmounting = true;\n });\n return state;\n}\nconst TransitionHookValidator = [Function, Array];\nconst BaseTransitionPropsValidators = {\n mode: String,\n appear: Boolean,\n persisted: Boolean,\n // enter\n onBeforeEnter: TransitionHookValidator,\n onEnter: TransitionHookValidator,\n onAfterEnter: TransitionHookValidator,\n onEnterCancelled: TransitionHookValidator,\n // leave\n onBeforeLeave: TransitionHookValidator,\n onLeave: TransitionHookValidator,\n onAfterLeave: TransitionHookValidator,\n onLeaveCancelled: TransitionHookValidator,\n // appear\n onBeforeAppear: TransitionHookValidator,\n onAppear: TransitionHookValidator,\n onAfterAppear: TransitionHookValidator,\n onAppearCancelled: TransitionHookValidator\n};\nconst recursiveGetSubtree = (instance) => {\n const subTree = instance.subTree;\n return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;\n};\nconst BaseTransitionImpl = {\n name: `BaseTransition`,\n props: BaseTransitionPropsValidators,\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const state = useTransitionState();\n return () => {\n const children = slots.default && getTransitionRawChildren(slots.default(), true);\n if (!children || !children.length) {\n return;\n }\n const child = findNonCommentChild(children);\n const rawProps = toRaw(props);\n const { mode } = rawProps;\n if (!!(process.env.NODE_ENV !== \"production\") && mode && mode !== \"in-out\" && mode !== \"out-in\" && mode !== \"default\") {\n warn$1(`invalid mode: ${mode}`);\n }\n if (state.isLeaving) {\n return emptyPlaceholder(child);\n }\n const innerChild = getInnerChild$1(child);\n if (!innerChild) {\n return emptyPlaceholder(child);\n }\n let enterHooks = resolveTransitionHooks(\n innerChild,\n rawProps,\n state,\n instance,\n // #11061, ensure enterHooks is fresh after clone\n (hooks) => enterHooks = hooks\n );\n if (innerChild.type !== Comment) {\n setTransitionHooks(innerChild, enterHooks);\n }\n const oldChild = instance.subTree;\n const oldInnerChild = oldChild && getInnerChild$1(oldChild);\n if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild) && recursiveGetSubtree(instance).type !== Comment) {\n const leavingHooks = resolveTransitionHooks(\n oldInnerChild,\n rawProps,\n state,\n instance\n );\n setTransitionHooks(oldInnerChild, leavingHooks);\n if (mode === \"out-in\" && innerChild.type !== Comment) {\n state.isLeaving = true;\n leavingHooks.afterLeave = () => {\n state.isLeaving = false;\n if (!(instance.job.flags & 8)) {\n instance.update();\n }\n delete leavingHooks.afterLeave;\n };\n return emptyPlaceholder(child);\n } else if (mode === \"in-out\" && innerChild.type !== Comment) {\n leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {\n const leavingVNodesCache = getLeavingNodesForType(\n state,\n oldInnerChild\n );\n leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;\n el[leaveCbKey] = () => {\n earlyRemove();\n el[leaveCbKey] = void 0;\n delete enterHooks.delayedLeave;\n };\n enterHooks.delayedLeave = delayedLeave;\n };\n }\n }\n return child;\n };\n }\n};\nfunction findNonCommentChild(children) {\n let child = children[0];\n if (children.length > 1) {\n let hasFound = false;\n for (const c of children) {\n if (c.type !== Comment) {\n if (!!(process.env.NODE_ENV !== \"production\") && hasFound) {\n warn$1(\n \" can only be used on a single element or component. Use for lists.\"\n );\n break;\n }\n child = c;\n hasFound = true;\n if (!!!(process.env.NODE_ENV !== \"production\")) break;\n }\n }\n }\n return child;\n}\nconst BaseTransition = BaseTransitionImpl;\nfunction getLeavingNodesForType(state, vnode) {\n const { leavingVNodes } = state;\n let leavingVNodesCache = leavingVNodes.get(vnode.type);\n if (!leavingVNodesCache) {\n leavingVNodesCache = /* @__PURE__ */ Object.create(null);\n leavingVNodes.set(vnode.type, leavingVNodesCache);\n }\n return leavingVNodesCache;\n}\nfunction resolveTransitionHooks(vnode, props, state, instance, postClone) {\n const {\n appear,\n mode,\n persisted = false,\n onBeforeEnter,\n onEnter,\n onAfterEnter,\n onEnterCancelled,\n onBeforeLeave,\n onLeave,\n onAfterLeave,\n onLeaveCancelled,\n onBeforeAppear,\n onAppear,\n onAfterAppear,\n onAppearCancelled\n } = props;\n const key = String(vnode.key);\n const leavingVNodesCache = getLeavingNodesForType(state, vnode);\n const callHook = (hook, args) => {\n hook && callWithAsyncErrorHandling(\n hook,\n instance,\n 9,\n args\n );\n };\n const callAsyncHook = (hook, args) => {\n const done = args[1];\n callHook(hook, args);\n if (isArray(hook)) {\n if (hook.every((hook2) => hook2.length <= 1)) done();\n } else if (hook.length <= 1) {\n done();\n }\n };\n const hooks = {\n mode,\n persisted,\n beforeEnter(el) {\n let hook = onBeforeEnter;\n if (!state.isMounted) {\n if (appear) {\n hook = onBeforeAppear || onBeforeEnter;\n } else {\n return;\n }\n }\n if (el[leaveCbKey]) {\n el[leaveCbKey](\n true\n /* cancelled */\n );\n }\n const leavingVNode = leavingVNodesCache[key];\n if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) {\n leavingVNode.el[leaveCbKey]();\n }\n callHook(hook, [el]);\n },\n enter(el) {\n let hook = onEnter;\n let afterHook = onAfterEnter;\n let cancelHook = onEnterCancelled;\n if (!state.isMounted) {\n if (appear) {\n hook = onAppear || onEnter;\n afterHook = onAfterAppear || onAfterEnter;\n cancelHook = onAppearCancelled || onEnterCancelled;\n } else {\n return;\n }\n }\n let called = false;\n const done = el[enterCbKey] = (cancelled) => {\n if (called) return;\n called = true;\n if (cancelled) {\n callHook(cancelHook, [el]);\n } else {\n callHook(afterHook, [el]);\n }\n if (hooks.delayedLeave) {\n hooks.delayedLeave();\n }\n el[enterCbKey] = void 0;\n };\n if (hook) {\n callAsyncHook(hook, [el, done]);\n } else {\n done();\n }\n },\n leave(el, remove) {\n const key2 = String(vnode.key);\n if (el[enterCbKey]) {\n el[enterCbKey](\n true\n /* cancelled */\n );\n }\n if (state.isUnmounting) {\n return remove();\n }\n callHook(onBeforeLeave, [el]);\n let called = false;\n const done = el[leaveCbKey] = (cancelled) => {\n if (called) return;\n called = true;\n remove();\n if (cancelled) {\n callHook(onLeaveCancelled, [el]);\n } else {\n callHook(onAfterLeave, [el]);\n }\n el[leaveCbKey] = void 0;\n if (leavingVNodesCache[key2] === vnode) {\n delete leavingVNodesCache[key2];\n }\n };\n leavingVNodesCache[key2] = vnode;\n if (onLeave) {\n callAsyncHook(onLeave, [el, done]);\n } else {\n done();\n }\n },\n clone(vnode2) {\n const hooks2 = resolveTransitionHooks(\n vnode2,\n props,\n state,\n instance,\n postClone\n );\n if (postClone) postClone(hooks2);\n return hooks2;\n }\n };\n return hooks;\n}\nfunction emptyPlaceholder(vnode) {\n if (isKeepAlive(vnode)) {\n vnode = cloneVNode(vnode);\n vnode.children = null;\n return vnode;\n }\n}\nfunction getInnerChild$1(vnode) {\n if (!isKeepAlive(vnode)) {\n if (isTeleport(vnode.type) && vnode.children) {\n return findNonCommentChild(vnode.children);\n }\n return vnode;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && vnode.component) {\n return vnode.component.subTree;\n }\n const { shapeFlag, children } = vnode;\n if (children) {\n if (shapeFlag & 16) {\n return children[0];\n }\n if (shapeFlag & 32 && isFunction(children.default)) {\n return children.default();\n }\n }\n}\nfunction setTransitionHooks(vnode, hooks) {\n if (vnode.shapeFlag & 6 && vnode.component) {\n vnode.transition = hooks;\n setTransitionHooks(vnode.component.subTree, hooks);\n } else if (vnode.shapeFlag & 128) {\n vnode.ssContent.transition = hooks.clone(vnode.ssContent);\n vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);\n } else {\n vnode.transition = hooks;\n }\n}\nfunction getTransitionRawChildren(children, keepComment = false, parentKey) {\n let ret = [];\n let keyedFragmentCount = 0;\n for (let i = 0; i < children.length; i++) {\n let child = children[i];\n const key = parentKey == null ? child.key : String(parentKey) + String(child.key != null ? child.key : i);\n if (child.type === Fragment) {\n if (child.patchFlag & 128) keyedFragmentCount++;\n ret = ret.concat(\n getTransitionRawChildren(child.children, keepComment, key)\n );\n } else if (keepComment || child.type !== Comment) {\n ret.push(key != null ? cloneVNode(child, { key }) : child);\n }\n }\n if (keyedFragmentCount > 1) {\n for (let i = 0; i < ret.length; i++) {\n ret[i].patchFlag = -2;\n }\n }\n return ret;\n}\n\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineComponent(options, extraOptions) {\n return isFunction(options) ? (\n // #8236: extend call and options.name access are considered side-effects\n // by Rollup, so we have to wrap it in a pure-annotated IIFE.\n /* @__PURE__ */ (() => extend({ name: options.name }, extraOptions, { setup: options }))()\n ) : options;\n}\n\nfunction useId() {\n const i = getCurrentInstance();\n if (i) {\n return (i.appContext.config.idPrefix || \"v\") + \"-\" + i.ids[0] + i.ids[1]++;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `useId() is called when there is no active component instance to be associated with.`\n );\n }\n return \"\";\n}\nfunction markAsyncBoundary(instance) {\n instance.ids = [instance.ids[0] + instance.ids[2]++ + \"-\", 0, 0];\n}\n\nconst knownTemplateRefs = /* @__PURE__ */ new WeakSet();\nfunction useTemplateRef(key) {\n const i = getCurrentInstance();\n const r = shallowRef(null);\n if (i) {\n const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;\n let desc;\n if (!!(process.env.NODE_ENV !== \"production\") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {\n warn$1(`useTemplateRef('${key}') already exists.`);\n } else {\n Object.defineProperty(refs, key, {\n enumerable: true,\n get: () => r.value,\n set: (val) => r.value = val\n });\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `useTemplateRef() is called when there is no active component instance to be associated with.`\n );\n }\n const ret = !!(process.env.NODE_ENV !== \"production\") ? readonly(r) : r;\n if (!!(process.env.NODE_ENV !== \"production\")) {\n knownTemplateRefs.add(ret);\n }\n return ret;\n}\n\nfunction setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {\n if (isArray(rawRef)) {\n rawRef.forEach(\n (r, i) => setRef(\n r,\n oldRawRef && (isArray(oldRawRef) ? oldRawRef[i] : oldRawRef),\n parentSuspense,\n vnode,\n isUnmount\n )\n );\n return;\n }\n if (isAsyncWrapper(vnode) && !isUnmount) {\n return;\n }\n const refValue = vnode.shapeFlag & 4 ? getComponentPublicInstance(vnode.component) : vnode.el;\n const value = isUnmount ? null : refValue;\n const { i: owner, r: ref } = rawRef;\n if (!!(process.env.NODE_ENV !== \"production\") && !owner) {\n warn$1(\n `Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`\n );\n return;\n }\n const oldRef = oldRawRef && oldRawRef.r;\n const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;\n const setupState = owner.setupState;\n const rawSetupState = toRaw(setupState);\n const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n if (hasOwn(rawSetupState, key) && !isRef(rawSetupState[key])) {\n warn$1(\n `Template ref \"${key}\" used on a non-ref value. It will not work in the production build.`\n );\n }\n if (knownTemplateRefs.has(rawSetupState[key])) {\n return false;\n }\n }\n return hasOwn(rawSetupState, key);\n };\n if (oldRef != null && oldRef !== ref) {\n if (isString(oldRef)) {\n refs[oldRef] = null;\n if (canSetSetupRef(oldRef)) {\n setupState[oldRef] = null;\n }\n } else if (isRef(oldRef)) {\n oldRef.value = null;\n }\n }\n if (isFunction(ref)) {\n callWithErrorHandling(ref, owner, 12, [value, refs]);\n } else {\n const _isString = isString(ref);\n const _isRef = isRef(ref);\n if (_isString || _isRef) {\n const doSet = () => {\n if (rawRef.f) {\n const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : ref.value;\n if (isUnmount) {\n isArray(existing) && remove(existing, refValue);\n } else {\n if (!isArray(existing)) {\n if (_isString) {\n refs[ref] = [refValue];\n if (canSetSetupRef(ref)) {\n setupState[ref] = refs[ref];\n }\n } else {\n ref.value = [refValue];\n if (rawRef.k) refs[rawRef.k] = ref.value;\n }\n } else if (!existing.includes(refValue)) {\n existing.push(refValue);\n }\n }\n } else if (_isString) {\n refs[ref] = value;\n if (canSetSetupRef(ref)) {\n setupState[ref] = value;\n }\n } else if (_isRef) {\n ref.value = value;\n if (rawRef.k) refs[rawRef.k] = value;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\"Invalid template ref type:\", ref, `(${typeof ref})`);\n }\n };\n if (value) {\n doSet.id = -1;\n queuePostRenderEffect(doSet, parentSuspense);\n } else {\n doSet();\n }\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\"Invalid template ref type:\", ref, `(${typeof ref})`);\n }\n }\n}\n\nlet hasLoggedMismatchError = false;\nconst logMismatchError = () => {\n if (hasLoggedMismatchError) {\n return;\n }\n console.error(\"Hydration completed but contains mismatches.\");\n hasLoggedMismatchError = true;\n};\nconst isSVGContainer = (container) => container.namespaceURI.includes(\"svg\") && container.tagName !== \"foreignObject\";\nconst isMathMLContainer = (container) => container.namespaceURI.includes(\"MathML\");\nconst getContainerType = (container) => {\n if (container.nodeType !== 1) return void 0;\n if (isSVGContainer(container)) return \"svg\";\n if (isMathMLContainer(container)) return \"mathml\";\n return void 0;\n};\nconst isComment = (node) => node.nodeType === 8;\nfunction createHydrationFunctions(rendererInternals) {\n const {\n mt: mountComponent,\n p: patch,\n o: {\n patchProp,\n createText,\n nextSibling,\n parentNode,\n remove,\n insert,\n createComment\n }\n } = rendererInternals;\n const hydrate = (vnode, container) => {\n if (!container.hasChildNodes()) {\n (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n `Attempting to hydrate existing markup but container is empty. Performing full mount instead.`\n );\n patch(null, vnode, container);\n flushPostFlushCbs();\n container._vnode = vnode;\n return;\n }\n hydrateNode(container.firstChild, vnode, null, null, null);\n flushPostFlushCbs();\n container._vnode = vnode;\n };\n const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {\n optimized = optimized || !!vnode.dynamicChildren;\n const isFragmentStart = isComment(node) && node.data === \"[\";\n const onMismatch = () => handleMismatch(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n isFragmentStart\n );\n const { type, ref, shapeFlag, patchFlag } = vnode;\n let domType = node.nodeType;\n vnode.el = node;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n def(node, \"__vnode\", vnode, true);\n def(node, \"__vueParentComponent\", parentComponent, true);\n }\n if (patchFlag === -2) {\n optimized = false;\n vnode.dynamicChildren = null;\n }\n let nextNode = null;\n switch (type) {\n case Text:\n if (domType !== 3) {\n if (vnode.children === \"\") {\n insert(vnode.el = createText(\"\"), parentNode(node), node);\n nextNode = node;\n } else {\n nextNode = onMismatch();\n }\n } else {\n if (node.data !== vnode.children) {\n (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n `Hydration text mismatch in`,\n node.parentNode,\n `\n - rendered on server: ${JSON.stringify(\n node.data\n )}\n - expected on client: ${JSON.stringify(vnode.children)}`\n );\n logMismatchError();\n node.data = vnode.children;\n }\n nextNode = nextSibling(node);\n }\n break;\n case Comment:\n if (isTemplateNode(node)) {\n nextNode = nextSibling(node);\n replaceNode(\n vnode.el = node.content.firstChild,\n node,\n parentComponent\n );\n } else if (domType !== 8 || isFragmentStart) {\n nextNode = onMismatch();\n } else {\n nextNode = nextSibling(node);\n }\n break;\n case Static:\n if (isFragmentStart) {\n node = nextSibling(node);\n domType = node.nodeType;\n }\n if (domType === 1 || domType === 3) {\n nextNode = node;\n const needToAdoptContent = !vnode.children.length;\n for (let i = 0; i < vnode.staticCount; i++) {\n if (needToAdoptContent)\n vnode.children += nextNode.nodeType === 1 ? nextNode.outerHTML : nextNode.data;\n if (i === vnode.staticCount - 1) {\n vnode.anchor = nextNode;\n }\n nextNode = nextSibling(nextNode);\n }\n return isFragmentStart ? nextSibling(nextNode) : nextNode;\n } else {\n onMismatch();\n }\n break;\n case Fragment:\n if (!isFragmentStart) {\n nextNode = onMismatch();\n } else {\n nextNode = hydrateFragment(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n }\n break;\n default:\n if (shapeFlag & 1) {\n if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) {\n nextNode = onMismatch();\n } else {\n nextNode = hydrateElement(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n }\n } else if (shapeFlag & 6) {\n vnode.slotScopeIds = slotScopeIds;\n const container = parentNode(node);\n if (isFragmentStart) {\n nextNode = locateClosingAnchor(node);\n } else if (isComment(node) && node.data === \"teleport start\") {\n nextNode = locateClosingAnchor(node, node.data, \"teleport end\");\n } else {\n nextNode = nextSibling(node);\n }\n mountComponent(\n vnode,\n container,\n null,\n parentComponent,\n parentSuspense,\n getContainerType(container),\n optimized\n );\n if (isAsyncWrapper(vnode)) {\n let subTree;\n if (isFragmentStart) {\n subTree = createVNode(Fragment);\n subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;\n } else {\n subTree = node.nodeType === 3 ? createTextVNode(\"\") : createVNode(\"div\");\n }\n subTree.el = node;\n vnode.component.subTree = subTree;\n }\n } else if (shapeFlag & 64) {\n if (domType !== 8) {\n nextNode = onMismatch();\n } else {\n nextNode = vnode.type.hydrate(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized,\n rendererInternals,\n hydrateChildren\n );\n }\n } else if (shapeFlag & 128) {\n nextNode = vnode.type.hydrate(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n getContainerType(parentNode(node)),\n slotScopeIds,\n optimized,\n rendererInternals,\n hydrateNode\n );\n } else if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) {\n warn$1(\"Invalid HostVNode type:\", type, `(${typeof type})`);\n }\n }\n if (ref != null) {\n setRef(ref, null, parentSuspense, vnode);\n }\n return nextNode;\n };\n const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n optimized = optimized || !!vnode.dynamicChildren;\n const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;\n const forcePatch = type === \"input\" || type === \"option\";\n if (!!(process.env.NODE_ENV !== \"production\") || forcePatch || patchFlag !== -1) {\n if (dirs) {\n invokeDirectiveHook(vnode, null, parentComponent, \"created\");\n }\n let needCallTransitionHooks = false;\n if (isTemplateNode(el)) {\n needCallTransitionHooks = needTransition(\n null,\n // no need check parentSuspense in hydration\n transition\n ) && parentComponent && parentComponent.vnode.props && parentComponent.vnode.props.appear;\n const content = el.content.firstChild;\n if (needCallTransitionHooks) {\n transition.beforeEnter(content);\n }\n replaceNode(content, el, parentComponent);\n vnode.el = el = content;\n }\n if (shapeFlag & 16 && // skip if element has innerHTML / textContent\n !(props && (props.innerHTML || props.textContent))) {\n let next = hydrateChildren(\n el.firstChild,\n vnode,\n el,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n let hasWarned = false;\n while (next) {\n if (!isMismatchAllowed(el, 1 /* CHILDREN */)) {\n if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {\n warn$1(\n `Hydration children mismatch on`,\n el,\n `\nServer rendered element contains more child nodes than client vdom.`\n );\n hasWarned = true;\n }\n logMismatchError();\n }\n const cur = next;\n next = next.nextSibling;\n remove(cur);\n }\n } else if (shapeFlag & 8) {\n let clientText = vnode.children;\n if (clientText[0] === \"\\n\" && (el.tagName === \"PRE\" || el.tagName === \"TEXTAREA\")) {\n clientText = clientText.slice(1);\n }\n if (el.textContent !== clientText) {\n if (!isMismatchAllowed(el, 0 /* TEXT */)) {\n (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n `Hydration text content mismatch on`,\n el,\n `\n - rendered on server: ${el.textContent}\n - expected on client: ${vnode.children}`\n );\n logMismatchError();\n }\n el.textContent = vnode.children;\n }\n }\n if (props) {\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {\n const isCustomElement = el.tagName.includes(\"-\");\n for (const key in props) {\n if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks\n // as it could have mutated the DOM in any possible way\n !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {\n logMismatchError();\n }\n if (forcePatch && (key.endsWith(\"value\") || key === \"indeterminate\") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers\n key[0] === \".\" || isCustomElement) {\n patchProp(el, key, null, props[key], void 0, parentComponent);\n }\n }\n } else if (props.onClick) {\n patchProp(\n el,\n \"onClick\",\n null,\n props.onClick,\n void 0,\n parentComponent\n );\n } else if (patchFlag & 4 && isReactive(props.style)) {\n for (const key in props.style) props.style[key];\n }\n }\n let vnodeHooks;\n if (vnodeHooks = props && props.onVnodeBeforeMount) {\n invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n }\n if (dirs) {\n invokeDirectiveHook(vnode, null, parentComponent, \"beforeMount\");\n }\n if ((vnodeHooks = props && props.onVnodeMounted) || dirs || needCallTransitionHooks) {\n queueEffectWithSuspense(() => {\n vnodeHooks && invokeVNodeHook(vnodeHooks, parentComponent, vnode);\n needCallTransitionHooks && transition.enter(el);\n dirs && invokeDirectiveHook(vnode, null, parentComponent, \"mounted\");\n }, parentSuspense);\n }\n }\n return el.nextSibling;\n };\n const hydrateChildren = (node, parentVNode, container, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n optimized = optimized || !!parentVNode.dynamicChildren;\n const children = parentVNode.children;\n const l = children.length;\n let hasWarned = false;\n for (let i = 0; i < l; i++) {\n const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);\n const isText = vnode.type === Text;\n if (node) {\n if (isText && !optimized) {\n if (i + 1 < l && normalizeVNode(children[i + 1]).type === Text) {\n insert(\n createText(\n node.data.slice(vnode.children.length)\n ),\n container,\n nextSibling(node)\n );\n node.data = vnode.children;\n }\n }\n node = hydrateNode(\n node,\n vnode,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n } else if (isText && !vnode.children) {\n insert(vnode.el = createText(\"\"), container);\n } else {\n if (!isMismatchAllowed(container, 1 /* CHILDREN */)) {\n if ((!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {\n warn$1(\n `Hydration children mismatch on`,\n container,\n `\nServer rendered element contains fewer child nodes than client vdom.`\n );\n hasWarned = true;\n }\n logMismatchError();\n }\n patch(\n null,\n vnode,\n container,\n null,\n parentComponent,\n parentSuspense,\n getContainerType(container),\n slotScopeIds\n );\n }\n }\n return node;\n };\n const hydrateFragment = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {\n const { slotScopeIds: fragmentSlotScopeIds } = vnode;\n if (fragmentSlotScopeIds) {\n slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;\n }\n const container = parentNode(node);\n const next = hydrateChildren(\n nextSibling(node),\n vnode,\n container,\n parentComponent,\n parentSuspense,\n slotScopeIds,\n optimized\n );\n if (next && isComment(next) && next.data === \"]\") {\n return nextSibling(vnode.anchor = next);\n } else {\n logMismatchError();\n insert(vnode.anchor = createComment(`]`), container, next);\n return next;\n }\n };\n const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {\n if (!isMismatchAllowed(node.parentElement, 1 /* CHILDREN */)) {\n (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(\n `Hydration node mismatch:\n- rendered on server:`,\n node,\n node.nodeType === 3 ? `(text)` : isComment(node) && node.data === \"[\" ? `(start of fragment)` : ``,\n `\n- expected on client:`,\n vnode.type\n );\n logMismatchError();\n }\n vnode.el = null;\n if (isFragment) {\n const end = locateClosingAnchor(node);\n while (true) {\n const next2 = nextSibling(node);\n if (next2 && next2 !== end) {\n remove(next2);\n } else {\n break;\n }\n }\n }\n const next = nextSibling(node);\n const container = parentNode(node);\n remove(node);\n patch(\n null,\n vnode,\n container,\n next,\n parentComponent,\n parentSuspense,\n getContainerType(container),\n slotScopeIds\n );\n return next;\n };\n const locateClosingAnchor = (node, open = \"[\", close = \"]\") => {\n let match = 0;\n while (node) {\n node = nextSibling(node);\n if (node && isComment(node)) {\n if (node.data === open) match++;\n if (node.data === close) {\n if (match === 0) {\n return nextSibling(node);\n } else {\n match--;\n }\n }\n }\n }\n return node;\n };\n const replaceNode = (newNode, oldNode, parentComponent) => {\n const parentNode2 = oldNode.parentNode;\n if (parentNode2) {\n parentNode2.replaceChild(newNode, oldNode);\n }\n let parent = parentComponent;\n while (parent) {\n if (parent.vnode.el === oldNode) {\n parent.vnode.el = parent.subTree.el = newNode;\n }\n parent = parent.parent;\n }\n };\n const isTemplateNode = (node) => {\n return node.nodeType === 1 && node.tagName === \"TEMPLATE\";\n };\n return [hydrate, hydrateNode];\n}\nfunction propHasMismatch(el, key, clientValue, vnode, instance) {\n let mismatchType;\n let mismatchKey;\n let actual;\n let expected;\n if (key === \"class\") {\n actual = el.getAttribute(\"class\");\n expected = normalizeClass(clientValue);\n if (!isSetEqual(toClassSet(actual || \"\"), toClassSet(expected))) {\n mismatchType = 2 /* CLASS */;\n mismatchKey = `class`;\n }\n } else if (key === \"style\") {\n actual = el.getAttribute(\"style\") || \"\";\n expected = isString(clientValue) ? clientValue : stringifyStyle(normalizeStyle(clientValue));\n const actualMap = toStyleMap(actual);\n const expectedMap = toStyleMap(expected);\n if (vnode.dirs) {\n for (const { dir, value } of vnode.dirs) {\n if (dir.name === \"show\" && !value) {\n expectedMap.set(\"display\", \"none\");\n }\n }\n }\n if (instance) {\n resolveCssVars(instance, vnode, expectedMap);\n }\n if (!isMapEqual(actualMap, expectedMap)) {\n mismatchType = 3 /* STYLE */;\n mismatchKey = \"style\";\n }\n } else if (el instanceof SVGElement && isKnownSvgAttr(key) || el instanceof HTMLElement && (isBooleanAttr(key) || isKnownHtmlAttr(key))) {\n if (isBooleanAttr(key)) {\n actual = el.hasAttribute(key);\n expected = includeBooleanAttr(clientValue);\n } else if (clientValue == null) {\n actual = el.hasAttribute(key);\n expected = false;\n } else {\n if (el.hasAttribute(key)) {\n actual = el.getAttribute(key);\n } else if (key === \"value\" && el.tagName === \"TEXTAREA\") {\n actual = el.value;\n } else {\n actual = false;\n }\n expected = isRenderableAttrValue(clientValue) ? String(clientValue) : false;\n }\n if (actual !== expected) {\n mismatchType = 4 /* ATTRIBUTE */;\n mismatchKey = key;\n }\n }\n if (mismatchType != null && !isMismatchAllowed(el, mismatchType)) {\n const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}=\"${v}\"`;\n const preSegment = `Hydration ${MismatchTypeString[mismatchType]} mismatch on`;\n const postSegment = `\n - rendered on server: ${format(actual)}\n - expected on client: ${format(expected)}\n Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.\n You should fix the source of the mismatch.`;\n {\n warn$1(preSegment, el, postSegment);\n }\n return true;\n }\n return false;\n}\nfunction toClassSet(str) {\n return new Set(str.trim().split(/\\s+/));\n}\nfunction isSetEqual(a, b) {\n if (a.size !== b.size) {\n return false;\n }\n for (const s of a) {\n if (!b.has(s)) {\n return false;\n }\n }\n return true;\n}\nfunction toStyleMap(str) {\n const styleMap = /* @__PURE__ */ new Map();\n for (const item of str.split(\";\")) {\n let [key, value] = item.split(\":\");\n key = key.trim();\n value = value && value.trim();\n if (key && value) {\n styleMap.set(key, value);\n }\n }\n return styleMap;\n}\nfunction isMapEqual(a, b) {\n if (a.size !== b.size) {\n return false;\n }\n for (const [key, value] of a) {\n if (value !== b.get(key)) {\n return false;\n }\n }\n return true;\n}\nfunction resolveCssVars(instance, vnode, expectedMap) {\n const root = instance.subTree;\n if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {\n const cssVars = instance.getCssVars();\n for (const key in cssVars) {\n expectedMap.set(\n `--${getEscapedCssVarName(key, false)}`,\n String(cssVars[key])\n );\n }\n }\n if (vnode === root && instance.parent) {\n resolveCssVars(instance.parent, instance.vnode, expectedMap);\n }\n}\nconst allowMismatchAttr = \"data-allow-mismatch\";\nconst MismatchTypeString = {\n [0 /* TEXT */]: \"text\",\n [1 /* CHILDREN */]: \"children\",\n [2 /* CLASS */]: \"class\",\n [3 /* STYLE */]: \"style\",\n [4 /* ATTRIBUTE */]: \"attribute\"\n};\nfunction isMismatchAllowed(el, allowedType) {\n if (allowedType === 0 /* TEXT */ || allowedType === 1 /* CHILDREN */) {\n while (el && !el.hasAttribute(allowMismatchAttr)) {\n el = el.parentElement;\n }\n }\n const allowedAttr = el && el.getAttribute(allowMismatchAttr);\n if (allowedAttr == null) {\n return false;\n } else if (allowedAttr === \"\") {\n return true;\n } else {\n const list = allowedAttr.split(\",\");\n if (allowedType === 0 /* TEXT */ && list.includes(\"children\")) {\n return true;\n }\n return allowedAttr.split(\",\").includes(MismatchTypeString[allowedType]);\n }\n}\n\nconst requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));\nconst cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));\nconst hydrateOnIdle = (timeout = 1e4) => (hydrate) => {\n const id = requestIdleCallback(hydrate, { timeout });\n return () => cancelIdleCallback(id);\n};\nfunction elementIsVisibleInViewport(el) {\n const { top, left, bottom, right } = el.getBoundingClientRect();\n const { innerHeight, innerWidth } = window;\n return (top > 0 && top < innerHeight || bottom > 0 && bottom < innerHeight) && (left > 0 && left < innerWidth || right > 0 && right < innerWidth);\n}\nconst hydrateOnVisible = (opts) => (hydrate, forEach) => {\n const ob = new IntersectionObserver((entries) => {\n for (const e of entries) {\n if (!e.isIntersecting) continue;\n ob.disconnect();\n hydrate();\n break;\n }\n }, opts);\n forEach((el) => {\n if (!(el instanceof Element)) return;\n if (elementIsVisibleInViewport(el)) {\n hydrate();\n ob.disconnect();\n return false;\n }\n ob.observe(el);\n });\n return () => ob.disconnect();\n};\nconst hydrateOnMediaQuery = (query) => (hydrate) => {\n if (query) {\n const mql = matchMedia(query);\n if (mql.matches) {\n hydrate();\n } else {\n mql.addEventListener(\"change\", hydrate, { once: true });\n return () => mql.removeEventListener(\"change\", hydrate);\n }\n }\n};\nconst hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {\n if (isString(interactions)) interactions = [interactions];\n let hasHydrated = false;\n const doHydrate = (e) => {\n if (!hasHydrated) {\n hasHydrated = true;\n teardown();\n hydrate();\n e.target.dispatchEvent(new e.constructor(e.type, e));\n }\n };\n const teardown = () => {\n forEach((el) => {\n for (const i of interactions) {\n el.removeEventListener(i, doHydrate);\n }\n });\n };\n forEach((el) => {\n for (const i of interactions) {\n el.addEventListener(i, doHydrate, { once: true });\n }\n });\n return teardown;\n};\nfunction forEachElement(node, cb) {\n if (isComment(node) && node.data === \"[\") {\n let depth = 1;\n let next = node.nextSibling;\n while (next) {\n if (next.nodeType === 1) {\n const result = cb(next);\n if (result === false) {\n break;\n }\n } else if (isComment(next)) {\n if (next.data === \"]\") {\n if (--depth === 0) break;\n } else if (next.data === \"[\") {\n depth++;\n }\n }\n next = next.nextSibling;\n }\n } else {\n cb(node);\n }\n}\n\nconst isAsyncWrapper = (i) => !!i.type.__asyncLoader;\n/*! #__NO_SIDE_EFFECTS__ */\n// @__NO_SIDE_EFFECTS__\nfunction defineAsyncComponent(source) {\n if (isFunction(source)) {\n source = { loader: source };\n }\n const {\n loader,\n loadingComponent,\n errorComponent,\n delay = 200,\n hydrate: hydrateStrategy,\n timeout,\n // undefined = never times out\n suspensible = true,\n onError: userOnError\n } = source;\n let pendingRequest = null;\n let resolvedComp;\n let retries = 0;\n const retry = () => {\n retries++;\n pendingRequest = null;\n return load();\n };\n const load = () => {\n let thisRequest;\n return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => {\n err = err instanceof Error ? err : new Error(String(err));\n if (userOnError) {\n return new Promise((resolve, reject) => {\n const userRetry = () => resolve(retry());\n const userFail = () => reject(err);\n userOnError(err, userRetry, userFail, retries + 1);\n });\n } else {\n throw err;\n }\n }).then((comp) => {\n if (thisRequest !== pendingRequest && pendingRequest) {\n return pendingRequest;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && !comp) {\n warn$1(\n `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`\n );\n }\n if (comp && (comp.__esModule || comp[Symbol.toStringTag] === \"Module\")) {\n comp = comp.default;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && comp && !isObject(comp) && !isFunction(comp)) {\n throw new Error(`Invalid async component load result: ${comp}`);\n }\n resolvedComp = comp;\n return comp;\n }));\n };\n return defineComponent({\n name: \"AsyncComponentWrapper\",\n __asyncLoader: load,\n __asyncHydrate(el, instance, hydrate) {\n const doHydrate = hydrateStrategy ? () => {\n const teardown = hydrateStrategy(\n hydrate,\n (cb) => forEachElement(el, cb)\n );\n if (teardown) {\n (instance.bum || (instance.bum = [])).push(teardown);\n }\n } : hydrate;\n if (resolvedComp) {\n doHydrate();\n } else {\n load().then(() => !instance.isUnmounted && doHydrate());\n }\n },\n get __asyncResolved() {\n return resolvedComp;\n },\n setup() {\n const instance = currentInstance;\n markAsyncBoundary(instance);\n if (resolvedComp) {\n return () => createInnerComp(resolvedComp, instance);\n }\n const onError = (err) => {\n pendingRequest = null;\n handleError(\n err,\n instance,\n 13,\n !errorComponent\n );\n };\n if (suspensible && instance.suspense || isInSSRComponentSetup) {\n return load().then((comp) => {\n return () => createInnerComp(comp, instance);\n }).catch((err) => {\n onError(err);\n return () => errorComponent ? createVNode(errorComponent, {\n error: err\n }) : null;\n });\n }\n const loaded = ref(false);\n const error = ref();\n const delayed = ref(!!delay);\n if (delay) {\n setTimeout(() => {\n delayed.value = false;\n }, delay);\n }\n if (timeout != null) {\n setTimeout(() => {\n if (!loaded.value && !error.value) {\n const err = new Error(\n `Async component timed out after ${timeout}ms.`\n );\n onError(err);\n error.value = err;\n }\n }, timeout);\n }\n load().then(() => {\n loaded.value = true;\n if (instance.parent && isKeepAlive(instance.parent.vnode)) {\n instance.parent.update();\n }\n }).catch((err) => {\n onError(err);\n error.value = err;\n });\n return () => {\n if (loaded.value && resolvedComp) {\n return createInnerComp(resolvedComp, instance);\n } else if (error.value && errorComponent) {\n return createVNode(errorComponent, {\n error: error.value\n });\n } else if (loadingComponent && !delayed.value) {\n return createVNode(loadingComponent);\n }\n };\n }\n });\n}\nfunction createInnerComp(comp, parent) {\n const { ref: ref2, props, children, ce } = parent.vnode;\n const vnode = createVNode(comp, props, children);\n vnode.ref = ref2;\n vnode.ce = ce;\n delete parent.vnode.ce;\n return vnode;\n}\n\nconst isKeepAlive = (vnode) => vnode.type.__isKeepAlive;\nconst KeepAliveImpl = {\n name: `KeepAlive`,\n // Marker for special handling inside the renderer. We are not using a ===\n // check directly on KeepAlive in the renderer, because importing it directly\n // would prevent it from being tree-shaken.\n __isKeepAlive: true,\n props: {\n include: [String, RegExp, Array],\n exclude: [String, RegExp, Array],\n max: [String, Number]\n },\n setup(props, { slots }) {\n const instance = getCurrentInstance();\n const sharedContext = instance.ctx;\n if (!sharedContext.renderer) {\n return () => {\n const children = slots.default && slots.default();\n return children && children.length === 1 ? children[0] : children;\n };\n }\n const cache = /* @__PURE__ */ new Map();\n const keys = /* @__PURE__ */ new Set();\n let current = null;\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n instance.__v_cache = cache;\n }\n const parentSuspense = instance.suspense;\n const {\n renderer: {\n p: patch,\n m: move,\n um: _unmount,\n o: { createElement }\n }\n } = sharedContext;\n const storageContainer = createElement(\"div\");\n sharedContext.activate = (vnode, container, anchor, namespace, optimized) => {\n const instance2 = vnode.component;\n move(vnode, container, anchor, 0, parentSuspense);\n patch(\n instance2.vnode,\n vnode,\n container,\n anchor,\n instance2,\n parentSuspense,\n namespace,\n vnode.slotScopeIds,\n optimized\n );\n queuePostRenderEffect(() => {\n instance2.isDeactivated = false;\n if (instance2.a) {\n invokeArrayFns(instance2.a);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeMounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n sharedContext.deactivate = (vnode) => {\n const instance2 = vnode.component;\n invalidateMount(instance2.m);\n invalidateMount(instance2.a);\n move(vnode, storageContainer, null, 1, parentSuspense);\n queuePostRenderEffect(() => {\n if (instance2.da) {\n invokeArrayFns(instance2.da);\n }\n const vnodeHook = vnode.props && vnode.props.onVnodeUnmounted;\n if (vnodeHook) {\n invokeVNodeHook(vnodeHook, instance2.parent, vnode);\n }\n instance2.isDeactivated = true;\n }, parentSuspense);\n if (!!(process.env.NODE_ENV !== \"production\") || __VUE_PROD_DEVTOOLS__) {\n devtoolsComponentAdded(instance2);\n }\n };\n function unmount(vnode) {\n resetShapeFlag(vnode);\n _unmount(vnode, instance, parentSuspense, true);\n }\n function pruneCache(filter) {\n cache.forEach((vnode, key) => {\n const name = getComponentName(vnode.type);\n if (name && !filter(name)) {\n pruneCacheEntry(key);\n }\n });\n }\n function pruneCacheEntry(key) {\n const cached = cache.get(key);\n if (cached && (!current || !isSameVNodeType(cached, current))) {\n unmount(cached);\n } else if (current) {\n resetShapeFlag(current);\n }\n cache.delete(key);\n keys.delete(key);\n }\n watch(\n () => [props.include, props.exclude],\n ([include, exclude]) => {\n include && pruneCache((name) => matches(include, name));\n exclude && pruneCache((name) => !matches(exclude, name));\n },\n // prune post-render after `current` has been updated\n { flush: \"post\", deep: true }\n );\n let pendingCacheKey = null;\n const cacheSubtree = () => {\n if (pendingCacheKey != null) {\n if (isSuspense(instance.subTree.type)) {\n queuePostRenderEffect(() => {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }, instance.subTree.suspense);\n } else {\n cache.set(pendingCacheKey, getInnerChild(instance.subTree));\n }\n }\n };\n onMounted(cacheSubtree);\n onUpdated(cacheSubtree);\n onBeforeUnmount(() => {\n cache.forEach((cached) => {\n const { subTree, suspense } = instance;\n const vnode = getInnerChild(subTree);\n if (cached.type === vnode.type && cached.key === vnode.key) {\n resetShapeFlag(vnode);\n const da = vnode.component.da;\n da && queuePostRenderEffect(da, suspense);\n return;\n }\n unmount(cached);\n });\n });\n return () => {\n pendingCacheKey = null;\n if (!slots.default) {\n return current = null;\n }\n const children = slots.default();\n const rawVNode = children[0];\n if (children.length > 1) {\n if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(`KeepAlive should contain exactly one component child.`);\n }\n current = null;\n return children;\n } else if (!isVNode(rawVNode) || !(rawVNode.shapeFlag & 4) && !(rawVNode.shapeFlag & 128)) {\n current = null;\n return rawVNode;\n }\n let vnode = getInnerChild(rawVNode);\n if (vnode.type === Comment) {\n current = null;\n return vnode;\n }\n const comp = vnode.type;\n const name = getComponentName(\n isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : comp\n );\n const { include, exclude, max } = props;\n if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {\n vnode.shapeFlag &= ~256;\n current = vnode;\n return rawVNode;\n }\n const key = vnode.key == null ? comp : vnode.key;\n const cachedVNode = cache.get(key);\n if (vnode.el) {\n vnode = cloneVNode(vnode);\n if (rawVNode.shapeFlag & 128) {\n rawVNode.ssContent = vnode;\n }\n }\n pendingCacheKey = key;\n if (cachedVNode) {\n vnode.el = cachedVNode.el;\n vnode.component = cachedVNode.component;\n if (vnode.transition) {\n setTransitionHooks(vnode, vnode.transition);\n }\n vnode.shapeFlag |= 512;\n keys.delete(key);\n keys.add(key);\n } else {\n keys.add(key);\n if (max && keys.size > parseInt(max, 10)) {\n pruneCacheEntry(keys.values().next().value);\n }\n }\n vnode.shapeFlag |= 256;\n current = vnode;\n return isSuspense(rawVNode.type) ? rawVNode : vnode;\n };\n }\n};\nconst KeepAlive = KeepAliveImpl;\nfunction matches(pattern, name) {\n if (isArray(pattern)) {\n return pattern.some((p) => matches(p, name));\n } else if (isString(pattern)) {\n return pattern.split(\",\").includes(name);\n } else if (isRegExp(pattern)) {\n pattern.lastIndex = 0;\n return pattern.test(name);\n }\n return false;\n}\nfunction onActivated(hook, target) {\n registerKeepAliveHook(hook, \"a\", target);\n}\nfunction onDeactivated(hook, target) {\n registerKeepAliveHook(hook, \"da\", target);\n}\nfunction registerKeepAliveHook(hook, type, target = currentInstance) {\n const wrappedHook = hook.__wdc || (hook.__wdc = () => {\n let current = target;\n while (current) {\n if (current.isDeactivated) {\n return;\n }\n current = current.parent;\n }\n return hook();\n });\n injectHook(type, wrappedHook, target);\n if (target) {\n let current = target.parent;\n while (current && current.parent) {\n if (isKeepAlive(current.parent.vnode)) {\n injectToKeepAliveRoot(wrappedHook, type, target, current);\n }\n current = current.parent;\n }\n }\n}\nfunction injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {\n const injected = injectHook(\n type,\n hook,\n keepAliveRoot,\n true\n /* prepend */\n );\n onUnmounted(() => {\n remove(keepAliveRoot[type], injected);\n }, target);\n}\nfunction resetShapeFlag(vnode) {\n vnode.shapeFlag &= ~256;\n vnode.shapeFlag &= ~512;\n}\nfunction getInnerChild(vnode) {\n return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;\n}\n\nfunction injectHook(type, hook, target = currentInstance, prepend = false) {\n if (target) {\n const hooks = target[type] || (target[type] = []);\n const wrappedHook = hook.__weh || (hook.__weh = (...args) => {\n pauseTracking();\n const reset = setCurrentInstance(target);\n const res = callWithAsyncErrorHandling(hook, target, type, args);\n reset();\n resetTracking();\n return res;\n });\n if (prepend) {\n hooks.unshift(wrappedHook);\n } else {\n hooks.push(wrappedHook);\n }\n return wrappedHook;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, \"\"));\n warn$1(\n `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )\n );\n }\n}\nconst createHook = (lifecycle) => (hook, target = currentInstance) => {\n if (!isInSSRComponentSetup || lifecycle === \"sp\") {\n injectHook(lifecycle, (...args) => hook(...args), target);\n }\n};\nconst onBeforeMount = createHook(\"bm\");\nconst onMounted = createHook(\"m\");\nconst onBeforeUpdate = createHook(\n \"bu\"\n);\nconst onUpdated = createHook(\"u\");\nconst onBeforeUnmount = createHook(\n \"bum\"\n);\nconst onUnmounted = createHook(\"um\");\nconst onServerPrefetch = createHook(\n \"sp\"\n);\nconst onRenderTriggered = createHook(\"rtg\");\nconst onRenderTracked = createHook(\"rtc\");\nfunction onErrorCaptured(hook, target = currentInstance) {\n injectHook(\"ec\", hook, target);\n}\n\nconst COMPONENTS = \"components\";\nconst DIRECTIVES = \"directives\";\nfunction resolveComponent(name, maybeSelfReference) {\n return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;\n}\nconst NULL_DYNAMIC_COMPONENT = Symbol.for(\"v-ndc\");\nfunction resolveDynamicComponent(component) {\n if (isString(component)) {\n return resolveAsset(COMPONENTS, component, false) || component;\n } else {\n return component || NULL_DYNAMIC_COMPONENT;\n }\n}\nfunction resolveDirective(name) {\n return resolveAsset(DIRECTIVES, name);\n}\nfunction resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) {\n const instance = currentRenderingInstance || currentInstance;\n if (instance) {\n const Component = instance.type;\n if (type === COMPONENTS) {\n const selfName = getComponentName(\n Component,\n false\n );\n if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) {\n return Component;\n }\n }\n const res = (\n // local registration\n // check instance[type] first which is resolved for options API\n resolve(instance[type] || Component[type], name) || // global registration\n resolve(instance.appContext[type], name)\n );\n if (!res && maybeSelfReference) {\n return Component;\n }\n if (!!(process.env.NODE_ENV !== \"production\") && warnMissing && !res) {\n const extra = type === COMPONENTS ? `\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;\n warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);\n }\n return res;\n } else if (!!(process.env.NODE_ENV !== \"production\")) {\n warn$1(\n `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`\n );\n }\n}\nfunction resolve(registry, name) {\n return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]);\n}\n\nfunction renderList(source, renderItem, cache, index) {\n let ret;\n const cached = cache && cache[index];\n const sourceIsArray = isArray(source);\n if (sourceIsArray || isString(source)) {\n const sourceIsReactiveArray = sourceIsArray && isReactive(source);\n let needsWrap = false;\n if (sourceIsReactiveArray) {\n needsWrap = !isShallow(source);\n source = shallowReadArray(source);\n }\n ret = new Array(source.length);\n for (let i = 0, l = source.length; i < l; i++) {\n ret[i] = renderItem(\n needsWrap ? toReactive(source[i]) : source[i],\n i,\n void 0,\n cached && cached[i]\n );\n }\n } else if (typeof source === \"number\") {\n if (!!(process.env.NODE_ENV !== \"production\") && !Number.isInteger(source)) {\n warn$1(`The v-for range expect an integer value but got ${source}.`);\n }\n ret = new Array(source);\n for (let i = 0; i < source; i++) {\n ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);\n }\n } else if (isObject(source)) {\n if (source[Symbol.iterator]) {\n ret = Array.from(\n source,\n (item, i) => renderItem(item, i, void 0, cached && cached[i])\n );\n } else {\n const keys = Object.keys(source);\n ret = new Array(keys.length);\n for (let i = 0, l = keys.length; i < l; i++) {\n const key = keys[i];\n ret[i] = renderItem(source[key], key, i, cached && cached[i]);\n }\n }\n } else {\n ret = [];\n }\n if (cache) {\n cache[index] = ret;\n }\n return ret;\n}\n\nfunction createSlots(slots, dynamicSlots) {\n for (let i = 0; i < dynamicSlots.length; i++) {\n const slot = dynamicSlots[i];\n if (isArray(slot)) {\n for (let j = 0; j < slot.length; j++) {\n slots[slot[j].name] = slot[j].fn;\n }\n } else if (slot) {\n slots[slot.name] = slot.key ? (...args) => {\n const res = slot.fn(...args);\n if (res) res.key = slot.key;\n return res;\n } : slot.fn;\n }\n }\n return slots;\n}\n\nfunction renderSlot(slots, name, props = {}, fallback, noSlotted) {\n if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {\n if (name !== \"default\") props.name = name;\n return openBlock(), createBlock(\n Fragment,\n null,\n [createVNode(\"slot\", props, fallback && fallback())],\n 64\n );\n }\n let slot = slots[name];\n if (!!(process.env.NODE_ENV !== \"production\") && slot && slot.length > 1) {\n warn$1(\n `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`\n );\n slot = () => [];\n }\n if (slot && slot._c) {\n slot._d = false;\n }\n openBlock();\n const validSlotContent = slot && ensureValidVNode(slot(props));\n const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch\n // key attached in the `createSlots` helper, respect that\n validSlotContent && validSlotContent.key;\n const rendered = createBlock(\n Fragment,\n {\n key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content\n (!validSlotContent && fallback ? \"_fb\" : \"\")\n },\n validSlotContent || (fallback ? fallback() : []),\n validSlotContent && slots._ === 1 ? 64 : -2\n );\n if (!noSlotted && rendered.scopeId) {\n rendered.slotScopeIds = [rendered.scopeId + \"-s\"];\n }\n if (slot && slot._c) {\n slot._d = true;\n }\n return rendered;\n}\nfunction ensureValidVNode(vnodes) {\n return vnodes.some((child) => {\n if (!isVNode(child)) return true;\n if (child.type === Comment) return false;\n if (child.type === Fragment && !ensureValidVNode(child.children))\n return false;\n return true;\n }) ? vnodes : null;\n}\n\nfunction toHandlers(obj, preserveCaseIfNecessary) {\n const ret = {};\n if (!!(process.env.NODE_ENV !== \"production\") && !isObject(obj)) {\n warn$1(`v-on with no argument expects an object value.`);\n return ret;\n }\n for (const key in obj) {\n ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];\n }\n return ret;\n}\n\nconst getPublicInstance = (i) => {\n if (!i) return null;\n if (isStatefulComponent(i)) return getComponentPublicInstance(i);\n return getPublicInstance(i.parent);\n};\nconst publicPropertiesMap = (\n // Move PURE marker to new line to workaround compiler discarding it\n // due to type annotation\n /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {\n $: (i) => i,\n $el: (i) => i.vnode.el,\n $data: (i) => i.data,\n $props: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.props) : i.props,\n $attrs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.attrs) : i.attrs,\n $slots: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.slots) : i.slots,\n $refs: (i) => !!(process.env.NODE_ENV !== \"production\") ? shallowReadonly(i.refs) : i.refs,\n $parent: (i) => getPublicInstance(i.parent),\n $root: (i) => getPublicInstance(i.root),\n $host: (i) => i.ce,\n $emit: (i) => i.emit,\n $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,\n $forceUpdate: (i) => i.f || (i.f = () => {\n queueJob(i.update);\n }),\n $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),\n $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP\n })\n);\nconst isReservedPrefix = (key) => key === \"_\" || key === \"$\";\nconst hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);\nconst PublicInstanceProxyHandlers = {\n get({ _: instance }, key) {\n if (key === \"__v_skip\") {\n return true;\n }\n const { ctx, setupState, data, props, accessCache, type, appContext } = instance;\n if (!!(process.env.NODE_ENV !== \"production\") && key === \"__isVue\") {\n return true;\n }\n let normalizedProps;\n if (key[0] !== \"$\") {\n const n = accessCache[key];\n if (n !== void 0) {\n switch (n) {\n case 1 /* SETUP */:\n return setupState[key];\n case 2 /* DATA */:\n return data[key];\n case 4 /* CONTEXT */:\n return ctx[key];\n case 3 /* PROPS */:\n return props[key];\n }\n } else if (hasSetupBinding(setupState, key)) {\n accessCache[key] = 1 /* SETUP */;\n return setupState[key];\n } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {\n accessCache[key] = 2 /* DATA */;\n return data[key];\n } else if (\n // only cache other properties when instance has declared (thus stable)\n // props\n (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)\n ) {\n accessCache[key] = 3 /* PROPS */;\n return props[key];\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {\n accessCache[key] = 0 /* OTHER */;\n }\n }\n const publicGetter = publicPropertiesMap[key];\n let cssModule, globalProperties;\n if (publicGetter) {\n if (key === \"$attrs\") {\n track(instance.attrs, \"get\", \"\");\n !!(process.env.NODE_ENV !== \"production\") && markAttrsAccessed();\n } else if (!!(process.env.NODE_ENV !== \"production\") && key === \"$slots\") {\n track(instance, \"get\", key);\n }\n return publicGetter(instance);\n } else if (\n // css module (injected by vue-loader)\n (cssModule = type.__cssModules) && (cssModule = cssModule[key])\n ) {\n return cssModule;\n } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {\n accessCache[key] = 4 /* CONTEXT */;\n return ctx[key];\n } else if (\n // global properties\n globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)\n ) {\n {\n return globalProperties[key];\n }\n } else if (!!(process.env.NODE_ENV !== \"production\") && currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading\n // to infinite warning loop\n key.indexOf(\"__v\") !== 0)) {\n if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {\n warn$1(\n `Property ${JSON.stringify(\n key\n )} must be accessed via $data because it starts with a reserved character (\"$\" or \"_\") and is not proxied on the render context.`\n );\n } else if (instance === currentRenderingInstance) {\n warn$1(\n `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`\n );\n }\n }\n },\n set({ _: instance }, key, value) {\n const { data, setupState, ctx } = instance;\n if (hasSetupBinding(setupState, key)) {\n setupState[key] = value;\n return true;\n } else if (!!(process.env.NODE_ENV !== \"production\") && setupState.__isScriptSetup && hasOwn(setupState, key)) {\n warn$1(`Cannot mutate \r\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Xx5ZC/q02I03TtZQwkfAXIqgzSWnHrObkH5Xqcr1BHhAPEp+eGHHCmaJGJ3w/qtZlMw0neHBwd1wH3mSQhdb3OmKftASZwryjIHFZWpWJGvMT78Xs1GWT4Ac9d6QfaL6A+scVXR1fOWgUsaQ5qYW6ifal+AaL0JEJO6ynZ3cwQGSEOrITJPWU+gWAYxLCnUv1Jn5KsTimvoESe/F3ApJtRsBpjNJktW2MO5zlN/emJx0dxhpeplPaOZgf2RU8pVLovTEMiEccMIbiSIdZAYoMntYvwDh5qSw2eNPy5ZPN5WoybIgpo+RCEyWeJAM0ds+cYczjX7b6JEF1dR/HsoTr0CbytTHOF1i9QMPeMMLI7iSFAzPcTWmKnuEPVY9Q9ovljqPt6jcZXpvjw0SVFXHcCFeBlUKesAAAAAAA==\"","export default \"__VITE_ASSET__BOa9sMX8__\"","export default \"__VITE_ASSET__Cpkvln6z__\"","export default \"__VITE_ASSET__UgUW69tr__\"","export default \"__VITE_ASSET__CIAgJvl$__\"","export default \"data:image/webp;base64,UklGRqIIAABXRUJQVlA4IJYIAACQ4QCdASqwBCADPikUiUOhoSEQdAAYAoS0t3PQD9AHJwOfGTwD/k+AfgB+wH4KNAfsBzyeAaQD//9P+Y/wA7sqvl7jT3k306dCNaOZgrIDie8m+nTp06dOmxBJMcA8vcae8m+nTp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3GnvJvp2N/5BKr5e4095N9OnTp06dOnTp06dOnXKyH8POZe4095N9Oxv/IJVfL3GnvJvp06dOnTp06dOnTp065WQ/h5zL3Gn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AuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoFw/J0gFAuH5OkAoAAA==\"","export default \"__VITE_ASSET__CaaIqZZS__\"","export default \"__VITE_ASSET__5YIfko4K__\"","export default \"data:image/webp;base64,UklGRtYCAABXRUJQVlA4IMoCAADwNQCdASp1AXUBPikUiEKhoSETX1QEGAKEtLdwu7CN+dj4R/ks2b/NvmA0gH4gZID/AdxnxOmoY8W7mFf6B/h/yVDPc5tni3+UZKH6hWOgwl714TCXqkGoHakmSGWzbIre2bZ4cl646UqfNnczLZtnT3gJJkhlsyME2zxb0E2eLgA52ug5C03KqS96NDoRC5094CSZIZbNs8WW5AwVvbNs8XABztmRgmzuZls2zxcAHO18GnqXRKnzbPFwAc6/DABigBQAc7ZsydGoIibHyQ/Xs2SoBiFNdoKdG2eLgA5rE2dPeAkmSGWzbPFluQMFb2zbPFwAc7ZkYJs7mZa8to0qrwlC2q0MQ95fKR79R4KYdfJEChtMQAK/XmNtsi4by7/IDM0mJVSMIxnI/99qobIuHCW5Zf8+dfBp6l0SCOXABztfBpzHJSCOWW5Azi4AGJ/8S9by5AHmZbNs8OS9RFp5m7CXvSLeqqxZ6AV3OdYAkmSGLE2eLf52OlKnzbPFluQM4t6CbPFwAc7ZkYJtniy3IGcXABztfBp7MAgJeuOlKnzbHxG8Q5lAO7gxCnDg9RBlJMkMtm2dAAD+//ml1iDu497YP+IT49vB5K94X59mP+FftfJ1P/fYMc76aNRIAABBpgW3JGHEInXCQFknli+CXfhI7E/TwAACF8GvoEeuT43DqRfumX8tJjqO7EE8eW5xkfsCiQHtVp6/hm/l3BAnAAIFMN+oRpQeBxyUZ3bV3AYvHz/e6Yq8ErfewQ4Rb9lPuitnS3omnPB6HhKyx1DbFtdi//trc7MtuBwocXn4pyVodjE7AAguviEhis3Evfe2Xav8feAAAtl+kI3sXIUnwFlZIXn8COw2MSXY0+LzWdNlNjRJ1/v/9L/gNQcpbOHKSIR8wRK7wfO2bWjgz4nnxJAAAePiLD35O5b+L5dFagRDm6QKSjAAAAA=\"","export default \"__VITE_ASSET__DbCkEZah__\"","export default \"__VITE_ASSET__DVwglu5E__\"","export default \"__VITE_ASSET__BqZ5K3pE__\"","export default \"__VITE_ASSET__Ci7wsvM2__\"","export default \"__VITE_ASSET__DKK3u5Qh__\"","export default \"__VITE_ASSET__DhSqh0sO__\"","import OChameau from \"../assets/img/ochameau.webp\";\r\n\r\nimport Draph from \"../assets/img/D.webp\";\r\nimport BookBunker from \"../assets/img/bookbunker.webp\";\r\nimport WordleAI from \"../assets/img/wordleai.webp\";\r\nimport Tempos from \"../assets/img/tempos.webp\";\r\nimport Chifoumi from \"../assets/img/chifoumi.webp\";\r\nimport Flagle from \"../assets/img/flagle.webp\";\r\nimport Webdesigner from \"../assets/img/awd.webp\";\r\nimport Fun from \"../assets/img/fun.webp\";\r\nimport threedgol from \"../assets/img/threedgol.webp\";\r\n\r\nimport fabricjs from \"../assets/img/fabricjs.webp\";\r\nimport vuejs from \"../assets/img/vuejs.webp\";\r\nimport tailwindcss from \"../assets/img/tailwindcss.webp\";\r\nimport kotlin from \"../assets/img/kotlin.webp\";\r\nimport svelte from \"../assets/img/svelte.webp\";\r\nimport threejs from \"../assets/img/threejs.webp\";\r\nconst tech = {\r\n fabric: {\r\n title: \"fabricjs\",\r\n icon: fabricjs,\r\n url: \"http://fabricjs.com/\",\r\n },\r\n vue: {\r\n title: \"vuejs\",\r\n icon: vuejs,\r\n url: \"https://vuejs.org/\",\r\n },\r\n tailwind: {\r\n title: \"tailwindcss\",\r\n icon: tailwindcss,\r\n url: \"https://tailwindcss.com/\",\r\n },\r\n kotlin: {\r\n title: \"kotlin\",\r\n icon: kotlin,\r\n url: \"https://kotlinlang.org/\",\r\n },\r\n svelte: {\r\n title: \"svelte\",\r\n icon: svelte,\r\n url: \"https://svelte.dev/\",\r\n },\r\n threejs: {\r\n title: \"threejs\",\r\n icon: threejs,\r\n url: \"https://threejs.org/\",\r\n },\r\n};\r\n\r\nconst projects = [\r\n {\r\n link: \"https://www.maxigator.fr/draph\",\r\n title: \"Draph\",\r\n img: Draph,\r\n techs: [tech.vue, tech.tailwind, tech.fabric],\r\n\t\tdate: \"02/2024\"\r\n },\r\n {\r\n link: \"https://www.artiskit.net/store\",\r\n title: \"ArtisKit Web Designer\",\r\n img: Webdesigner,\r\n techs: [tech.vue, tech.tailwind, tech.fabric],\r\n\t\tdate: \"07/2021\"\r\n },\r\n {\r\n link: \"https://play.google.com/store/apps/details?id=com.maxigator.books\",\r\n title: \"Book Bunker\",\r\n img: BookBunker,\r\n techs: [tech.kotlin],\r\n\t\tdate: \"08/2023\"\r\n },\r\n {\r\n link: \"https://www.maxigator.fr/flagle\",\r\n title: \"Flagle\",\r\n img: Flagle,\r\n techs: [tech.vue, tech.tailwind],\r\n\t\tdate: \"03/2022\"\r\n },\r\n {\r\n link: \"https://www.maxigator.fr/wordleai\",\r\n title: \"Wordle Bot\",\r\n img: WordleAI,\r\n techs: [tech.vue, tech.tailwind],\r\n\t\tdate: \"03/2022\"\r\n },\r\n //{\r\n // link: \"https://www.maxigator.fr/ochameau\",\r\n // title: \"OChameau\",\r\n // desc: \"An online OCaml editor\",\r\n // img: OChameau,\r\n // techs: [tech.vue, tech.tailwind],\r\n //},\r\n {\r\n link: \"https://www.maxigator.fr/chifoumi\",\r\n title: \"Chifoumi\",\r\n img: Chifoumi,\r\n techs: [tech.vue, tech.tailwind, tech.fabric],\r\n\t\tdate: \"04/2022\"\r\n },\r\n {\r\n link: \"https://www.maxigator.fr/tempos\",\r\n title: \"Tempos\",\r\n img: Tempos,\r\n techs: [tech.vue, tech.tailwind],\r\n\t\tdate: \"05/2022\"\r\n },\r\n {\r\n link: \"https://www.maxigator.fr/3dgol\",\r\n title: \"3dgol\",\r\n img: threedgol,\r\n techs: [tech.svelte, tech.threejs],\r\n\t\tdate: \"02/2024\"\r\n },\r\n {\r\n link: \"https://www.maxigator.fr/fun\",\r\n title: \"Fun\",\r\n img: Fun,\r\n techs: [tech.vue, tech.tailwind, tech.fabric],\r\n\t\tdate: \"11/2022\"\r\n },\r\n];\r\n\r\nexport { projects, tech };\r\n","\r\n\r\n\r\n","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20496%20512'%3e%3c!--!%20Font%20Awesome%20Pro%206.4.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license%20(Commercial%20License)%20Copyright%202023%20Fonticons,%20Inc.%20--%3e%3cpath%20d='M165.9%20397.4c0%202-2.3%203.6-5.2%203.6-3.3.3-5.6-1.3-5.6-3.6%200-2%202.3-3.6%205.2-3.6%203-.3%205.6%201.3%205.6%203.6zm-31.1-4.5c-.7%202%201.3%204.3%204.3%204.9%202.6%201%205.6%200%206.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2%202.3zm44.2-1.7c-2.9.7-4.9%202.6-4.6%204.9.3%202%202.9%203.3%205.9%202.6%202.9-.7%204.9-2.6%204.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8%208C106.1%208%200%20113.3%200%20252c0%20110.9%2069.8%20205.8%20169.5%20239.2%2012.8%202.3%2017.3-5.6%2017.3-12.1%200-6.2-.3-40.4-.3-61.4%200%200-70%2015-84.7-29.8%200%200-11.4-29.1-27.8-36.6%200%200-22.9-15.7%201.6-15.4%200%200%2024.9%202%2038.6%2025.8%2021.9%2038.6%2058.6%2027.5%2072.9%2020.9%202.3-16%208.8-27.1%2016-33.7-55.9-6.2-112.3-14.3-112.3-110.5%200-27.5%207.6-41.3%2023.6-58.9-2.6-6.5-11.1-33.3%202.6-67.9%2020.9-6.5%2069%2027%2069%2027%2020-5.6%2041.5-8.5%2062.8-8.5s42.8%202.9%2062.8%208.5c0%200%2048.1-33.6%2069-27%2013.7%2034.7%205.2%2061.4%202.6%2067.9%2016%2017.7%2025.8%2031.5%2025.8%2058.9%200%2096.5-58.9%20104.2-114.8%20110.5%209.2%207.9%2017%2022.9%2017%2046.4%200%2033.7-.3%2075.4-.3%2083.6%200%206.5%204.6%2014.4%2017.3%2012.1C428.2%20457.8%20496%20362.9%20496%20252%20496%20113.3%20383.5%208%20244.8%208zM97.2%20352.9c-1.3%201-1%203.3.7%205.2%201.6%201.6%203.9%202.3%205.2%201%201.3-1%201-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7%201.3.3%202.9%202.3%203.9%201.6%201%203.6.7%204.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4%2035.6c-1.6%201.3-1%204.3%201.3%206.2%202.3%202.3%205.2%202.6%206.5%201%201.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6%201-1.6%203.6%200%205.9%201.6%202.3%204.3%203.3%205.6%202.3%201.6-1.3%201.6-3.9%200-6.2-1.4-2.3-4-3.3-5.6-2z'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20496%20512'%3e%3c!--!%20Font%20Awesome%20Pro%206.4.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license%20(Commercial%20License)%20Copyright%202023%20Fonticons,%20Inc.%20--%3e%3cpath%20d='M248%208C111.1%208%200%20119.1%200%20256s111.1%20248%20248%20248%20248-111.1%20248-248S384.9%208%20248%208zm100.7%20364.9c-4.2%200-6.8-1.3-10.7-3.6-62.4-37.6-135-39.2-206.7-24.5-3.9%201-9%202.6-11.9%202.6-9.7%200-15.8-7.7-15.8-15.8%200-10.3%206.1-15.2%2013.6-16.8%2081.9-18.1%20165.6-16.5%20237%2026.2%206.1%203.9%209.7%207.4%209.7%2016.5s-7.1%2015.4-15.2%2015.4zm26.9-65.6c-5.2%200-8.7-2.3-12.3-4.2-62.5-37-155.7-51.9-238.6-29.4-4.8%201.3-7.4%202.6-11.9%202.6-10.7%200-19.4-8.7-19.4-19.4s5.2-17.8%2015.5-20.7c27.8-7.8%2056.2-13.6%2097.8-13.6%2064.9%200%20127.6%2016.1%20177%2045.5%208.1%204.8%2011.3%2011%2011.3%2019.7-.1%2010.8-8.5%2019.5-19.4%2019.5zm31-76.2c-5.2%200-8.4-1.3-12.9-3.9-71.2-42.5-198.5-52.7-280.9-29.7-3.6%201-8.1%202.6-12.9%202.6-13.2%200-23.3-10.3-23.3-23.6%200-13.6%208.4-21.3%2017.4-23.9%2035.2-10.3%2074.6-15.2%20117.5-15.2%2073%200%20149.5%2015.2%20205.4%2047.8%207.8%204.5%2012.9%2010.7%2012.9%2022.6%200%2013.6-11%2023.3-23.2%2023.3z'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3e%3c!--!%20Font%20Awesome%20Pro%206.4.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license%20(Commercial%20License)%20Copyright%202023%20Fonticons,%20Inc.%20--%3e%3cpath%20d='M48%2064C21.5%2064%200%2085.5%200%20112c0%2015.1%207.1%2029.3%2019.2%2038.4L236.8%20313.6c11.4%208.5%2027%208.5%2038.4%200L492.8%20150.4c12.1-9.1%2019.2-23.3%2019.2-38.4c0-26.5-21.5-48-48-48H48zM0%20176V384c0%2035.3%2028.7%2064%2064%2064H448c35.3%200%2064-28.7%2064-64V176L294.4%20339.2c-22.8%2017.1-54%2017.1-76.8%200L0%20176z'/%3e%3c/svg%3e\"","/*!\n * matter-js 0.20.0 by @liabru\n * http://brm.io/matter-js/\n * License MIT\n * \n * The MIT License (MIT)\n * \n * Copyright (c) Liam Brummitt and contributors.\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine(\"Matter\", [], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"Matter\"] = factory();\n\telse\n\t\troot[\"Matter\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 20);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\n/**\n* The `Matter.Common` module contains utility functions that are common to all modules.\n*\n* @class Common\n*/\n\nvar Common = {};\n\nmodule.exports = Common;\n\n(function() {\n\n Common._baseDelta = 1000 / 60;\n Common._nextId = 0;\n Common._seed = 0;\n Common._nowStartTime = +(new Date());\n Common._warnedOnce = {};\n Common._decomp = null;\n \n /**\n * Extends the object in the first argument using the object in the second argument.\n * @method extend\n * @param {} obj\n * @param {boolean} deep\n * @return {} obj extended\n */\n Common.extend = function(obj, deep) {\n var argsStart,\n args,\n deepClone;\n\n if (typeof deep === 'boolean') {\n argsStart = 2;\n deepClone = deep;\n } else {\n argsStart = 1;\n deepClone = true;\n }\n\n for (var i = argsStart; i < arguments.length; i++) {\n var source = arguments[i];\n\n if (source) {\n for (var prop in source) {\n if (deepClone && source[prop] && source[prop].constructor === Object) {\n if (!obj[prop] || obj[prop].constructor === Object) {\n obj[prop] = obj[prop] || {};\n Common.extend(obj[prop], deepClone, source[prop]);\n } else {\n obj[prop] = source[prop];\n }\n } else {\n obj[prop] = source[prop];\n }\n }\n }\n }\n \n return obj;\n };\n\n /**\n * Creates a new clone of the object, if deep is true references will also be cloned.\n * @method clone\n * @param {} obj\n * @param {bool} deep\n * @return {} obj cloned\n */\n Common.clone = function(obj, deep) {\n return Common.extend({}, deep, obj);\n };\n\n /**\n * Returns the list of keys for the given object.\n * @method keys\n * @param {} obj\n * @return {string[]} keys\n */\n Common.keys = function(obj) {\n if (Object.keys)\n return Object.keys(obj);\n\n // avoid hasOwnProperty for performance\n var keys = [];\n for (var key in obj)\n keys.push(key);\n return keys;\n };\n\n /**\n * Returns the list of values for the given object.\n * @method values\n * @param {} obj\n * @return {array} Array of the objects property values\n */\n Common.values = function(obj) {\n var values = [];\n \n if (Object.keys) {\n var keys = Object.keys(obj);\n for (var i = 0; i < keys.length; i++) {\n values.push(obj[keys[i]]);\n }\n return values;\n }\n \n // avoid hasOwnProperty for performance\n for (var key in obj)\n values.push(obj[key]);\n return values;\n };\n\n /**\n * Gets a value from `base` relative to the `path` string.\n * @method get\n * @param {} obj The base object\n * @param {string} path The path relative to `base`, e.g. 'Foo.Bar.baz'\n * @param {number} [begin] Path slice begin\n * @param {number} [end] Path slice end\n * @return {} The object at the given path\n */\n Common.get = function(obj, path, begin, end) {\n path = path.split('.').slice(begin, end);\n\n for (var i = 0; i < path.length; i += 1) {\n obj = obj[path[i]];\n }\n\n return obj;\n };\n\n /**\n * Sets a value on `base` relative to the given `path` string.\n * @method set\n * @param {} obj The base object\n * @param {string} path The path relative to `base`, e.g. 'Foo.Bar.baz'\n * @param {} val The value to set\n * @param {number} [begin] Path slice begin\n * @param {number} [end] Path slice end\n * @return {} Pass through `val` for chaining\n */\n Common.set = function(obj, path, val, begin, end) {\n var parts = path.split('.').slice(begin, end);\n Common.get(obj, path, 0, -1)[parts[parts.length - 1]] = val;\n return val;\n };\n\n /**\n * Shuffles the given array in-place.\n * The function uses a seeded random generator.\n * @method shuffle\n * @param {array} array\n * @return {array} array shuffled randomly\n */\n Common.shuffle = function(array) {\n for (var i = array.length - 1; i > 0; i--) {\n var j = Math.floor(Common.random() * (i + 1));\n var temp = array[i];\n array[i] = array[j];\n array[j] = temp;\n }\n return array;\n };\n\n /**\n * Randomly chooses a value from a list with equal probability.\n * The function uses a seeded random generator.\n * @method choose\n * @param {array} choices\n * @return {object} A random choice object from the array\n */\n Common.choose = function(choices) {\n return choices[Math.floor(Common.random() * choices.length)];\n };\n\n /**\n * Returns true if the object is a HTMLElement, otherwise false.\n * @method isElement\n * @param {object} obj\n * @return {boolean} True if the object is a HTMLElement, otherwise false\n */\n Common.isElement = function(obj) {\n if (typeof HTMLElement !== 'undefined') {\n return obj instanceof HTMLElement;\n }\n\n return !!(obj && obj.nodeType && obj.nodeName);\n };\n\n /**\n * Returns true if the object is an array.\n * @method isArray\n * @param {object} obj\n * @return {boolean} True if the object is an array, otherwise false\n */\n Common.isArray = function(obj) {\n return Object.prototype.toString.call(obj) === '[object Array]';\n };\n\n /**\n * Returns true if the object is a function.\n * @method isFunction\n * @param {object} obj\n * @return {boolean} True if the object is a function, otherwise false\n */\n Common.isFunction = function(obj) {\n return typeof obj === \"function\";\n };\n\n /**\n * Returns true if the object is a plain object.\n * @method isPlainObject\n * @param {object} obj\n * @return {boolean} True if the object is a plain object, otherwise false\n */\n Common.isPlainObject = function(obj) {\n return typeof obj === 'object' && obj.constructor === Object;\n };\n\n /**\n * Returns true if the object is a string.\n * @method isString\n * @param {object} obj\n * @return {boolean} True if the object is a string, otherwise false\n */\n Common.isString = function(obj) {\n return toString.call(obj) === '[object String]';\n };\n \n /**\n * Returns the given value clamped between a minimum and maximum value.\n * @method clamp\n * @param {number} value\n * @param {number} min\n * @param {number} max\n * @return {number} The value clamped between min and max inclusive\n */\n Common.clamp = function(value, min, max) {\n if (value < min)\n return min;\n if (value > max)\n return max;\n return value;\n };\n \n /**\n * Returns the sign of the given value.\n * @method sign\n * @param {number} value\n * @return {number} -1 if negative, +1 if 0 or positive\n */\n Common.sign = function(value) {\n return value < 0 ? -1 : 1;\n };\n \n /**\n * Returns the current timestamp since the time origin (e.g. from page load).\n * The result is in milliseconds and will use high-resolution timing if available.\n * @method now\n * @return {number} the current timestamp in milliseconds\n */\n Common.now = function() {\n if (typeof window !== 'undefined' && window.performance) {\n if (window.performance.now) {\n return window.performance.now();\n } else if (window.performance.webkitNow) {\n return window.performance.webkitNow();\n }\n }\n\n if (Date.now) {\n return Date.now();\n }\n\n return (new Date()) - Common._nowStartTime;\n };\n \n /**\n * Returns a random value between a minimum and a maximum value inclusive.\n * The function uses a seeded random generator.\n * @method random\n * @param {number} min\n * @param {number} max\n * @return {number} A random number between min and max inclusive\n */\n Common.random = function(min, max) {\n min = (typeof min !== \"undefined\") ? min : 0;\n max = (typeof max !== \"undefined\") ? max : 1;\n return min + _seededRandom() * (max - min);\n };\n\n var _seededRandom = function() {\n // https://en.wikipedia.org/wiki/Linear_congruential_generator\n Common._seed = (Common._seed * 9301 + 49297) % 233280;\n return Common._seed / 233280;\n };\n\n /**\n * Converts a CSS hex colour string into an integer.\n * @method colorToNumber\n * @param {string} colorString\n * @return {number} An integer representing the CSS hex string\n */\n Common.colorToNumber = function(colorString) {\n colorString = colorString.replace('#','');\n\n if (colorString.length == 3) {\n colorString = colorString.charAt(0) + colorString.charAt(0)\n + colorString.charAt(1) + colorString.charAt(1)\n + colorString.charAt(2) + colorString.charAt(2);\n }\n\n return parseInt(colorString, 16);\n };\n\n /**\n * The console logging level to use, where each level includes all levels above and excludes the levels below.\n * The default level is 'debug' which shows all console messages. \n *\n * Possible level values are:\n * - 0 = None\n * - 1 = Debug\n * - 2 = Info\n * - 3 = Warn\n * - 4 = Error\n * @static\n * @property logLevel\n * @type {Number}\n * @default 1\n */\n Common.logLevel = 1;\n\n /**\n * Shows a `console.log` message only if the current `Common.logLevel` allows it.\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\n * @method log\n * @param ...objs {} The objects to log.\n */\n Common.log = function() {\n if (console && Common.logLevel > 0 && Common.logLevel <= 3) {\n console.log.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\n }\n };\n\n /**\n * Shows a `console.info` message only if the current `Common.logLevel` allows it.\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\n * @method info\n * @param ...objs {} The objects to log.\n */\n Common.info = function() {\n if (console && Common.logLevel > 0 && Common.logLevel <= 2) {\n console.info.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\n }\n };\n\n /**\n * Shows a `console.warn` message only if the current `Common.logLevel` allows it.\n * The message will be prefixed with 'matter-js' to make it easily identifiable.\n * @method warn\n * @param ...objs {} The objects to log.\n */\n Common.warn = function() {\n if (console && Common.logLevel > 0 && Common.logLevel <= 3) {\n console.warn.apply(console, ['matter-js:'].concat(Array.prototype.slice.call(arguments)));\n }\n };\n\n /**\n * Uses `Common.warn` to log the given message one time only.\n * @method warnOnce\n * @param ...objs {} The objects to log.\n */\n Common.warnOnce = function() {\n var message = Array.prototype.slice.call(arguments).join(' ');\n\n if (!Common._warnedOnce[message]) {\n Common.warn(message);\n Common._warnedOnce[message] = true;\n }\n };\n\n /**\n * Shows a deprecated console warning when the function on the given object is called.\n * The target function will be replaced with a new function that first shows the warning\n * and then calls the original function.\n * @method deprecated\n * @param {object} obj The object or module\n * @param {string} name The property name of the function on obj\n * @param {string} warning The one-time message to show if the function is called\n */\n Common.deprecated = function(obj, prop, warning) {\n obj[prop] = Common.chain(function() {\n Common.warnOnce('🔅 deprecated 🔅', warning);\n }, obj[prop]);\n };\n\n /**\n * Returns the next unique sequential ID.\n * @method nextId\n * @return {Number} Unique sequential ID\n */\n Common.nextId = function() {\n return Common._nextId++;\n };\n\n /**\n * A cross browser compatible indexOf implementation.\n * @method indexOf\n * @param {array} haystack\n * @param {object} needle\n * @return {number} The position of needle in haystack, otherwise -1.\n */\n Common.indexOf = function(haystack, needle) {\n if (haystack.indexOf)\n return haystack.indexOf(needle);\n\n for (var i = 0; i < haystack.length; i++) {\n if (haystack[i] === needle)\n return i;\n }\n\n return -1;\n };\n\n /**\n * A cross browser compatible array map implementation.\n * @method map\n * @param {array} list\n * @param {function} func\n * @return {array} Values from list transformed by func.\n */\n Common.map = function(list, func) {\n if (list.map) {\n return list.map(func);\n }\n\n var mapped = [];\n\n for (var i = 0; i < list.length; i += 1) {\n mapped.push(func(list[i]));\n }\n\n return mapped;\n };\n\n /**\n * Takes a directed graph and returns the partially ordered set of vertices in topological order.\n * Circular dependencies are allowed.\n * @method topologicalSort\n * @param {object} graph\n * @return {array} Partially ordered set of vertices in topological order.\n */\n Common.topologicalSort = function(graph) {\n // https://github.com/mgechev/javascript-algorithms\n // Copyright (c) Minko Gechev (MIT license)\n // Modifications: tidy formatting and naming\n var result = [],\n visited = [],\n temp = [];\n\n for (var node in graph) {\n if (!visited[node] && !temp[node]) {\n Common._topologicalSort(node, visited, temp, graph, result);\n }\n }\n\n return result;\n };\n\n Common._topologicalSort = function(node, visited, temp, graph, result) {\n var neighbors = graph[node] || [];\n temp[node] = true;\n\n for (var i = 0; i < neighbors.length; i += 1) {\n var neighbor = neighbors[i];\n\n if (temp[neighbor]) {\n // skip circular dependencies\n continue;\n }\n\n if (!visited[neighbor]) {\n Common._topologicalSort(neighbor, visited, temp, graph, result);\n }\n }\n\n temp[node] = false;\n visited[node] = true;\n\n result.push(node);\n };\n\n /**\n * Takes _n_ functions as arguments and returns a new function that calls them in order.\n * The arguments applied when calling the new function will also be applied to every function passed.\n * The value of `this` refers to the last value returned in the chain that was not `undefined`.\n * Therefore if a passed function does not return a value, the previously returned value is maintained.\n * After all passed functions have been called the new function returns the last returned value (if any).\n * If any of the passed functions are a chain, then the chain will be flattened.\n * @method chain\n * @param ...funcs {function} The functions to chain.\n * @return {function} A new function that calls the passed functions in order.\n */\n Common.chain = function() {\n var funcs = [];\n\n for (var i = 0; i < arguments.length; i += 1) {\n var func = arguments[i];\n\n if (func._chained) {\n // flatten already chained functions\n funcs.push.apply(funcs, func._chained);\n } else {\n funcs.push(func);\n }\n }\n\n var chain = function() {\n // https://github.com/GoogleChrome/devtools-docs/issues/53#issuecomment-51941358\n var lastResult,\n args = new Array(arguments.length);\n\n for (var i = 0, l = arguments.length; i < l; i++) {\n args[i] = arguments[i];\n }\n\n for (i = 0; i < funcs.length; i += 1) {\n var result = funcs[i].apply(lastResult, args);\n\n if (typeof result !== 'undefined') {\n lastResult = result;\n }\n }\n\n return lastResult;\n };\n\n chain._chained = funcs;\n\n return chain;\n };\n\n /**\n * Chains a function to excute before the original function on the given `path` relative to `base`.\n * See also docs for `Common.chain`.\n * @method chainPathBefore\n * @param {} base The base object\n * @param {string} path The path relative to `base`\n * @param {function} func The function to chain before the original\n * @return {function} The chained function that replaced the original\n */\n Common.chainPathBefore = function(base, path, func) {\n return Common.set(base, path, Common.chain(\n func,\n Common.get(base, path)\n ));\n };\n\n /**\n * Chains a function to excute after the original function on the given `path` relative to `base`.\n * See also docs for `Common.chain`.\n * @method chainPathAfter\n * @param {} base The base object\n * @param {string} path The path relative to `base`\n * @param {function} func The function to chain after the original\n * @return {function} The chained function that replaced the original\n */\n Common.chainPathAfter = function(base, path, func) {\n return Common.set(base, path, Common.chain(\n Common.get(base, path),\n func\n ));\n };\n\n /**\n * Provide the [poly-decomp](https://github.com/schteppe/poly-decomp.js) library module to enable\n * concave vertex decomposition support when using `Bodies.fromVertices` e.g. `Common.setDecomp(require('poly-decomp'))`.\n * @method setDecomp\n * @param {} decomp The [poly-decomp](https://github.com/schteppe/poly-decomp.js) library module.\n */\n Common.setDecomp = function(decomp) {\n Common._decomp = decomp;\n };\n\n /**\n * Returns the [poly-decomp](https://github.com/schteppe/poly-decomp.js) library module provided through `Common.setDecomp`,\n * otherwise returns the global `decomp` if set.\n * @method getDecomp\n * @return {} The [poly-decomp](https://github.com/schteppe/poly-decomp.js) library module if provided.\n */\n Common.getDecomp = function() {\n // get user provided decomp if set\n var decomp = Common._decomp;\n\n try {\n // otherwise from window global\n if (!decomp && typeof window !== 'undefined') {\n decomp = window.decomp;\n }\n \n // otherwise from node global\n if (!decomp && typeof global !== 'undefined') {\n decomp = global.decomp;\n }\n } catch (e) {\n // decomp not available\n decomp = null;\n }\n\n return decomp;\n };\n})();\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\n/**\n* The `Matter.Bounds` module contains methods for creating and manipulating axis-aligned bounding boxes (AABB).\n*\n* @class Bounds\n*/\n\nvar Bounds = {};\n\nmodule.exports = Bounds;\n\n(function() {\n\n /**\n * Creates a new axis-aligned bounding box (AABB) for the given vertices.\n * @method create\n * @param {vertices} vertices\n * @return {bounds} A new bounds object\n */\n Bounds.create = function(vertices) {\n var bounds = { \n min: { x: 0, y: 0 }, \n max: { x: 0, y: 0 }\n };\n\n if (vertices)\n Bounds.update(bounds, vertices);\n \n return bounds;\n };\n\n /**\n * Updates bounds using the given vertices and extends the bounds given a velocity.\n * @method update\n * @param {bounds} bounds\n * @param {vertices} vertices\n * @param {vector} velocity\n */\n Bounds.update = function(bounds, vertices, velocity) {\n bounds.min.x = Infinity;\n bounds.max.x = -Infinity;\n bounds.min.y = Infinity;\n bounds.max.y = -Infinity;\n\n for (var i = 0; i < vertices.length; i++) {\n var vertex = vertices[i];\n if (vertex.x > bounds.max.x) bounds.max.x = vertex.x;\n if (vertex.x < bounds.min.x) bounds.min.x = vertex.x;\n if (vertex.y > bounds.max.y) bounds.max.y = vertex.y;\n if (vertex.y < bounds.min.y) bounds.min.y = vertex.y;\n }\n \n if (velocity) {\n if (velocity.x > 0) {\n bounds.max.x += velocity.x;\n } else {\n bounds.min.x += velocity.x;\n }\n \n if (velocity.y > 0) {\n bounds.max.y += velocity.y;\n } else {\n bounds.min.y += velocity.y;\n }\n }\n };\n\n /**\n * Returns true if the bounds contains the given point.\n * @method contains\n * @param {bounds} bounds\n * @param {vector} point\n * @return {boolean} True if the bounds contain the point, otherwise false\n */\n Bounds.contains = function(bounds, point) {\n return point.x >= bounds.min.x && point.x <= bounds.max.x \n && point.y >= bounds.min.y && point.y <= bounds.max.y;\n };\n\n /**\n * Returns true if the two bounds intersect.\n * @method overlaps\n * @param {bounds} boundsA\n * @param {bounds} boundsB\n * @return {boolean} True if the bounds overlap, otherwise false\n */\n Bounds.overlaps = function(boundsA, boundsB) {\n return (boundsA.min.x <= boundsB.max.x && boundsA.max.x >= boundsB.min.x\n && boundsA.max.y >= boundsB.min.y && boundsA.min.y <= boundsB.max.y);\n };\n\n /**\n * Translates the bounds by the given vector.\n * @method translate\n * @param {bounds} bounds\n * @param {vector} vector\n */\n Bounds.translate = function(bounds, vector) {\n bounds.min.x += vector.x;\n bounds.max.x += vector.x;\n bounds.min.y += vector.y;\n bounds.max.y += vector.y;\n };\n\n /**\n * Shifts the bounds to the given position.\n * @method shift\n * @param {bounds} bounds\n * @param {vector} position\n */\n Bounds.shift = function(bounds, position) {\n var deltaX = bounds.max.x - bounds.min.x,\n deltaY = bounds.max.y - bounds.min.y;\n \n bounds.min.x = position.x;\n bounds.max.x = position.x + deltaX;\n bounds.min.y = position.y;\n bounds.max.y = position.y + deltaY;\n };\n \n})();\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports) {\n\n/**\n* The `Matter.Vector` module contains methods for creating and manipulating vectors.\n* Vectors are the basis of all the geometry related operations in the engine.\n* A `Matter.Vector` object is of the form `{ x: 0, y: 0 }`.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Vector\n*/\n\n// TODO: consider params for reusing vector objects\n\nvar Vector = {};\n\nmodule.exports = Vector;\n\n(function() {\n\n /**\n * Creates a new vector.\n * @method create\n * @param {number} x\n * @param {number} y\n * @return {vector} A new vector\n */\n Vector.create = function(x, y) {\n return { x: x || 0, y: y || 0 };\n };\n\n /**\n * Returns a new vector with `x` and `y` copied from the given `vector`.\n * @method clone\n * @param {vector} vector\n * @return {vector} A new cloned vector\n */\n Vector.clone = function(vector) {\n return { x: vector.x, y: vector.y };\n };\n\n /**\n * Returns the magnitude (length) of a vector.\n * @method magnitude\n * @param {vector} vector\n * @return {number} The magnitude of the vector\n */\n Vector.magnitude = function(vector) {\n return Math.sqrt((vector.x * vector.x) + (vector.y * vector.y));\n };\n\n /**\n * Returns the magnitude (length) of a vector (therefore saving a `sqrt` operation).\n * @method magnitudeSquared\n * @param {vector} vector\n * @return {number} The squared magnitude of the vector\n */\n Vector.magnitudeSquared = function(vector) {\n return (vector.x * vector.x) + (vector.y * vector.y);\n };\n\n /**\n * Rotates the vector about (0, 0) by specified angle.\n * @method rotate\n * @param {vector} vector\n * @param {number} angle\n * @param {vector} [output]\n * @return {vector} The vector rotated about (0, 0)\n */\n Vector.rotate = function(vector, angle, output) {\n var cos = Math.cos(angle), sin = Math.sin(angle);\n if (!output) output = {};\n var x = vector.x * cos - vector.y * sin;\n output.y = vector.x * sin + vector.y * cos;\n output.x = x;\n return output;\n };\n\n /**\n * Rotates the vector about a specified point by specified angle.\n * @method rotateAbout\n * @param {vector} vector\n * @param {number} angle\n * @param {vector} point\n * @param {vector} [output]\n * @return {vector} A new vector rotated about the point\n */\n Vector.rotateAbout = function(vector, angle, point, output) {\n var cos = Math.cos(angle), sin = Math.sin(angle);\n if (!output) output = {};\n var x = point.x + ((vector.x - point.x) * cos - (vector.y - point.y) * sin);\n output.y = point.y + ((vector.x - point.x) * sin + (vector.y - point.y) * cos);\n output.x = x;\n return output;\n };\n\n /**\n * Normalises a vector (such that its magnitude is `1`).\n * @method normalise\n * @param {vector} vector\n * @return {vector} A new vector normalised\n */\n Vector.normalise = function(vector) {\n var magnitude = Vector.magnitude(vector);\n if (magnitude === 0)\n return { x: 0, y: 0 };\n return { x: vector.x / magnitude, y: vector.y / magnitude };\n };\n\n /**\n * Returns the dot-product of two vectors.\n * @method dot\n * @param {vector} vectorA\n * @param {vector} vectorB\n * @return {number} The dot product of the two vectors\n */\n Vector.dot = function(vectorA, vectorB) {\n return (vectorA.x * vectorB.x) + (vectorA.y * vectorB.y);\n };\n\n /**\n * Returns the cross-product of two vectors.\n * @method cross\n * @param {vector} vectorA\n * @param {vector} vectorB\n * @return {number} The cross product of the two vectors\n */\n Vector.cross = function(vectorA, vectorB) {\n return (vectorA.x * vectorB.y) - (vectorA.y * vectorB.x);\n };\n\n /**\n * Returns the cross-product of three vectors.\n * @method cross3\n * @param {vector} vectorA\n * @param {vector} vectorB\n * @param {vector} vectorC\n * @return {number} The cross product of the three vectors\n */\n Vector.cross3 = function(vectorA, vectorB, vectorC) {\n return (vectorB.x - vectorA.x) * (vectorC.y - vectorA.y) - (vectorB.y - vectorA.y) * (vectorC.x - vectorA.x);\n };\n\n /**\n * Adds the two vectors.\n * @method add\n * @param {vector} vectorA\n * @param {vector} vectorB\n * @param {vector} [output]\n * @return {vector} A new vector of vectorA and vectorB added\n */\n Vector.add = function(vectorA, vectorB, output) {\n if (!output) output = {};\n output.x = vectorA.x + vectorB.x;\n output.y = vectorA.y + vectorB.y;\n return output;\n };\n\n /**\n * Subtracts the two vectors.\n * @method sub\n * @param {vector} vectorA\n * @param {vector} vectorB\n * @param {vector} [output]\n * @return {vector} A new vector of vectorA and vectorB subtracted\n */\n Vector.sub = function(vectorA, vectorB, output) {\n if (!output) output = {};\n output.x = vectorA.x - vectorB.x;\n output.y = vectorA.y - vectorB.y;\n return output;\n };\n\n /**\n * Multiplies a vector and a scalar.\n * @method mult\n * @param {vector} vector\n * @param {number} scalar\n * @return {vector} A new vector multiplied by scalar\n */\n Vector.mult = function(vector, scalar) {\n return { x: vector.x * scalar, y: vector.y * scalar };\n };\n\n /**\n * Divides a vector and a scalar.\n * @method div\n * @param {vector} vector\n * @param {number} scalar\n * @return {vector} A new vector divided by scalar\n */\n Vector.div = function(vector, scalar) {\n return { x: vector.x / scalar, y: vector.y / scalar };\n };\n\n /**\n * Returns the perpendicular vector. Set `negate` to true for the perpendicular in the opposite direction.\n * @method perp\n * @param {vector} vector\n * @param {bool} [negate=false]\n * @return {vector} The perpendicular vector\n */\n Vector.perp = function(vector, negate) {\n negate = negate === true ? -1 : 1;\n return { x: negate * -vector.y, y: negate * vector.x };\n };\n\n /**\n * Negates both components of a vector such that it points in the opposite direction.\n * @method neg\n * @param {vector} vector\n * @return {vector} The negated vector\n */\n Vector.neg = function(vector) {\n return { x: -vector.x, y: -vector.y };\n };\n\n /**\n * Returns the angle between the vector `vectorB - vectorA` and the x-axis in radians.\n * @method angle\n * @param {vector} vectorA\n * @param {vector} vectorB\n * @return {number} The angle in radians\n */\n Vector.angle = function(vectorA, vectorB) {\n return Math.atan2(vectorB.y - vectorA.y, vectorB.x - vectorA.x);\n };\n\n /**\n * Temporary vector pool (not thread-safe).\n * @property _temp\n * @type {vector[]}\n * @private\n */\n Vector._temp = [\n Vector.create(), Vector.create(), \n Vector.create(), Vector.create(), \n Vector.create(), Vector.create()\n ];\n\n})();\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Vertices` module contains methods for creating and manipulating sets of vertices.\n* A set of vertices is an array of `Matter.Vector` with additional indexing properties inserted by `Vertices.create`.\n* A `Matter.Body` maintains a set of vertices to represent the shape of the object (its convex hull).\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Vertices\n*/\n\nvar Vertices = {};\n\nmodule.exports = Vertices;\n\nvar Vector = __webpack_require__(2);\nvar Common = __webpack_require__(0);\n\n(function() {\n\n /**\n * Creates a new set of `Matter.Body` compatible vertices.\n * The `points` argument accepts an array of `Matter.Vector` points orientated around the origin `(0, 0)`, for example:\n *\n * [{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]\n *\n * The `Vertices.create` method returns a new array of vertices, which are similar to Matter.Vector objects,\n * but with some additional references required for efficient collision detection routines.\n *\n * Vertices must be specified in clockwise order.\n *\n * Note that the `body` argument is not optional, a `Matter.Body` reference must be provided.\n *\n * @method create\n * @param {vector[]} points\n * @param {body} body\n */\n Vertices.create = function(points, body) {\n var vertices = [];\n\n for (var i = 0; i < points.length; i++) {\n var point = points[i],\n vertex = {\n x: point.x,\n y: point.y,\n index: i,\n body: body,\n isInternal: false\n };\n\n vertices.push(vertex);\n }\n\n return vertices;\n };\n\n /**\n * Parses a string containing ordered x y pairs separated by spaces (and optionally commas), \n * into a `Matter.Vertices` object for the given `Matter.Body`.\n * For parsing SVG paths, see `Svg.pathToVertices`.\n * @method fromPath\n * @param {string} path\n * @param {body} body\n * @return {vertices} vertices\n */\n Vertices.fromPath = function(path, body) {\n var pathPattern = /L?\\s*([-\\d.e]+)[\\s,]*([-\\d.e]+)*/ig,\n points = [];\n\n path.replace(pathPattern, function(match, x, y) {\n points.push({ x: parseFloat(x), y: parseFloat(y) });\n });\n\n return Vertices.create(points, body);\n };\n\n /**\n * Returns the centre (centroid) of the set of vertices.\n * @method centre\n * @param {vertices} vertices\n * @return {vector} The centre point\n */\n Vertices.centre = function(vertices) {\n var area = Vertices.area(vertices, true),\n centre = { x: 0, y: 0 },\n cross,\n temp,\n j;\n\n for (var i = 0; i < vertices.length; i++) {\n j = (i + 1) % vertices.length;\n cross = Vector.cross(vertices[i], vertices[j]);\n temp = Vector.mult(Vector.add(vertices[i], vertices[j]), cross);\n centre = Vector.add(centre, temp);\n }\n\n return Vector.div(centre, 6 * area);\n };\n\n /**\n * Returns the average (mean) of the set of vertices.\n * @method mean\n * @param {vertices} vertices\n * @return {vector} The average point\n */\n Vertices.mean = function(vertices) {\n var average = { x: 0, y: 0 };\n\n for (var i = 0; i < vertices.length; i++) {\n average.x += vertices[i].x;\n average.y += vertices[i].y;\n }\n\n return Vector.div(average, vertices.length);\n };\n\n /**\n * Returns the area of the set of vertices.\n * @method area\n * @param {vertices} vertices\n * @param {bool} signed\n * @return {number} The area\n */\n Vertices.area = function(vertices, signed) {\n var area = 0,\n j = vertices.length - 1;\n\n for (var i = 0; i < vertices.length; i++) {\n area += (vertices[j].x - vertices[i].x) * (vertices[j].y + vertices[i].y);\n j = i;\n }\n\n if (signed)\n return area / 2;\n\n return Math.abs(area) / 2;\n };\n\n /**\n * Returns the moment of inertia (second moment of area) of the set of vertices given the total mass.\n * @method inertia\n * @param {vertices} vertices\n * @param {number} mass\n * @return {number} The polygon's moment of inertia\n */\n Vertices.inertia = function(vertices, mass) {\n var numerator = 0,\n denominator = 0,\n v = vertices,\n cross,\n j;\n\n // find the polygon's moment of inertia, using second moment of area\n // from equations at http://www.physicsforums.com/showthread.php?t=25293\n for (var n = 0; n < v.length; n++) {\n j = (n + 1) % v.length;\n cross = Math.abs(Vector.cross(v[j], v[n]));\n numerator += cross * (Vector.dot(v[j], v[j]) + Vector.dot(v[j], v[n]) + Vector.dot(v[n], v[n]));\n denominator += cross;\n }\n\n return (mass / 6) * (numerator / denominator);\n };\n\n /**\n * Translates the set of vertices in-place.\n * @method translate\n * @param {vertices} vertices\n * @param {vector} vector\n * @param {number} scalar\n */\n Vertices.translate = function(vertices, vector, scalar) {\n scalar = typeof scalar !== 'undefined' ? scalar : 1;\n\n var verticesLength = vertices.length,\n translateX = vector.x * scalar,\n translateY = vector.y * scalar,\n i;\n \n for (i = 0; i < verticesLength; i++) {\n vertices[i].x += translateX;\n vertices[i].y += translateY;\n }\n\n return vertices;\n };\n\n /**\n * Rotates the set of vertices in-place.\n * @method rotate\n * @param {vertices} vertices\n * @param {number} angle\n * @param {vector} point\n */\n Vertices.rotate = function(vertices, angle, point) {\n if (angle === 0)\n return;\n\n var cos = Math.cos(angle),\n sin = Math.sin(angle),\n pointX = point.x,\n pointY = point.y,\n verticesLength = vertices.length,\n vertex,\n dx,\n dy,\n i;\n\n for (i = 0; i < verticesLength; i++) {\n vertex = vertices[i];\n dx = vertex.x - pointX;\n dy = vertex.y - pointY;\n vertex.x = pointX + (dx * cos - dy * sin);\n vertex.y = pointY + (dx * sin + dy * cos);\n }\n\n return vertices;\n };\n\n /**\n * Returns `true` if the `point` is inside the set of `vertices`.\n * @method contains\n * @param {vertices} vertices\n * @param {vector} point\n * @return {boolean} True if the vertices contains point, otherwise false\n */\n Vertices.contains = function(vertices, point) {\n var pointX = point.x,\n pointY = point.y,\n verticesLength = vertices.length,\n vertex = vertices[verticesLength - 1],\n nextVertex;\n\n for (var i = 0; i < verticesLength; i++) {\n nextVertex = vertices[i];\n\n if ((pointX - vertex.x) * (nextVertex.y - vertex.y) \n + (pointY - vertex.y) * (vertex.x - nextVertex.x) > 0) {\n return false;\n }\n\n vertex = nextVertex;\n }\n\n return true;\n };\n\n /**\n * Scales the vertices from a point (default is centre) in-place.\n * @method scale\n * @param {vertices} vertices\n * @param {number} scaleX\n * @param {number} scaleY\n * @param {vector} point\n */\n Vertices.scale = function(vertices, scaleX, scaleY, point) {\n if (scaleX === 1 && scaleY === 1)\n return vertices;\n\n point = point || Vertices.centre(vertices);\n\n var vertex,\n delta;\n\n for (var i = 0; i < vertices.length; i++) {\n vertex = vertices[i];\n delta = Vector.sub(vertex, point);\n vertices[i].x = point.x + delta.x * scaleX;\n vertices[i].y = point.y + delta.y * scaleY;\n }\n\n return vertices;\n };\n\n /**\n * Chamfers a set of vertices by giving them rounded corners, returns a new set of vertices.\n * The radius parameter is a single number or an array to specify the radius for each vertex.\n * @method chamfer\n * @param {vertices} vertices\n * @param {number[]} radius\n * @param {number} quality\n * @param {number} qualityMin\n * @param {number} qualityMax\n */\n Vertices.chamfer = function(vertices, radius, quality, qualityMin, qualityMax) {\n if (typeof radius === 'number') {\n radius = [radius];\n } else {\n radius = radius || [8];\n }\n\n // quality defaults to -1, which is auto\n quality = (typeof quality !== 'undefined') ? quality : -1;\n qualityMin = qualityMin || 2;\n qualityMax = qualityMax || 14;\n\n var newVertices = [];\n\n for (var i = 0; i < vertices.length; i++) {\n var prevVertex = vertices[i - 1 >= 0 ? i - 1 : vertices.length - 1],\n vertex = vertices[i],\n nextVertex = vertices[(i + 1) % vertices.length],\n currentRadius = radius[i < radius.length ? i : radius.length - 1];\n\n if (currentRadius === 0) {\n newVertices.push(vertex);\n continue;\n }\n\n var prevNormal = Vector.normalise({ \n x: vertex.y - prevVertex.y, \n y: prevVertex.x - vertex.x\n });\n\n var nextNormal = Vector.normalise({ \n x: nextVertex.y - vertex.y, \n y: vertex.x - nextVertex.x\n });\n\n var diagonalRadius = Math.sqrt(2 * Math.pow(currentRadius, 2)),\n radiusVector = Vector.mult(Common.clone(prevNormal), currentRadius),\n midNormal = Vector.normalise(Vector.mult(Vector.add(prevNormal, nextNormal), 0.5)),\n scaledVertex = Vector.sub(vertex, Vector.mult(midNormal, diagonalRadius));\n\n var precision = quality;\n\n if (quality === -1) {\n // automatically decide precision\n precision = Math.pow(currentRadius, 0.32) * 1.75;\n }\n\n precision = Common.clamp(precision, qualityMin, qualityMax);\n\n // use an even value for precision, more likely to reduce axes by using symmetry\n if (precision % 2 === 1)\n precision += 1;\n\n var alpha = Math.acos(Vector.dot(prevNormal, nextNormal)),\n theta = alpha / precision;\n\n for (var j = 0; j < precision; j++) {\n newVertices.push(Vector.add(Vector.rotate(radiusVector, theta * j), scaledVertex));\n }\n }\n\n return newVertices;\n };\n\n /**\n * Sorts the input vertices into clockwise order in place.\n * @method clockwiseSort\n * @param {vertices} vertices\n * @return {vertices} vertices\n */\n Vertices.clockwiseSort = function(vertices) {\n var centre = Vertices.mean(vertices);\n\n vertices.sort(function(vertexA, vertexB) {\n return Vector.angle(centre, vertexA) - Vector.angle(centre, vertexB);\n });\n\n return vertices;\n };\n\n /**\n * Returns true if the vertices form a convex shape (vertices must be in clockwise order).\n * @method isConvex\n * @param {vertices} vertices\n * @return {bool} `true` if the `vertices` are convex, `false` if not (or `null` if not computable).\n */\n Vertices.isConvex = function(vertices) {\n // http://paulbourke.net/geometry/polygonmesh/\n // Copyright (c) Paul Bourke (use permitted)\n\n var flag = 0,\n n = vertices.length,\n i,\n j,\n k,\n z;\n\n if (n < 3)\n return null;\n\n for (i = 0; i < n; i++) {\n j = (i + 1) % n;\n k = (i + 2) % n;\n z = (vertices[j].x - vertices[i].x) * (vertices[k].y - vertices[j].y);\n z -= (vertices[j].y - vertices[i].y) * (vertices[k].x - vertices[j].x);\n\n if (z < 0) {\n flag |= 1;\n } else if (z > 0) {\n flag |= 2;\n }\n\n if (flag === 3) {\n return false;\n }\n }\n\n if (flag !== 0){\n return true;\n } else {\n return null;\n }\n };\n\n /**\n * Returns the convex hull of the input vertices as a new array of points.\n * @method hull\n * @param {vertices} vertices\n * @return [vertex] vertices\n */\n Vertices.hull = function(vertices) {\n // http://geomalgorithms.com/a10-_hull-1.html\n\n var upper = [],\n lower = [], \n vertex,\n i;\n\n // sort vertices on x-axis (y-axis for ties)\n vertices = vertices.slice(0);\n vertices.sort(function(vertexA, vertexB) {\n var dx = vertexA.x - vertexB.x;\n return dx !== 0 ? dx : vertexA.y - vertexB.y;\n });\n\n // build lower hull\n for (i = 0; i < vertices.length; i += 1) {\n vertex = vertices[i];\n\n while (lower.length >= 2 \n && Vector.cross3(lower[lower.length - 2], lower[lower.length - 1], vertex) <= 0) {\n lower.pop();\n }\n\n lower.push(vertex);\n }\n\n // build upper hull\n for (i = vertices.length - 1; i >= 0; i -= 1) {\n vertex = vertices[i];\n\n while (upper.length >= 2 \n && Vector.cross3(upper[upper.length - 2], upper[upper.length - 1], vertex) <= 0) {\n upper.pop();\n }\n\n upper.push(vertex);\n }\n\n // concatenation of the lower and upper hulls gives the convex hull\n // omit last points because they are repeated at the beginning of the other list\n upper.pop();\n lower.pop();\n\n return upper.concat(lower);\n };\n\n})();\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Body` module contains methods for creating and manipulating rigid bodies.\n* For creating bodies with common configurations such as rectangles, circles and other polygons see the module `Matter.Bodies`.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n\n* @class Body\n*/\n\nvar Body = {};\n\nmodule.exports = Body;\n\nvar Vertices = __webpack_require__(3);\nvar Vector = __webpack_require__(2);\nvar Sleeping = __webpack_require__(7);\nvar Common = __webpack_require__(0);\nvar Bounds = __webpack_require__(1);\nvar Axes = __webpack_require__(11);\n\n(function() {\n\n Body._timeCorrection = true;\n Body._inertiaScale = 4;\n Body._nextCollidingGroupId = 1;\n Body._nextNonCollidingGroupId = -1;\n Body._nextCategory = 0x0001;\n Body._baseDelta = 1000 / 60;\n\n /**\n * Creates a new rigid body model. The options parameter is an object that specifies any properties you wish to override the defaults.\n * All properties have default values, and many are pre-calculated automatically based on other properties.\n * Vertices must be specified in clockwise order.\n * See the properties section below for detailed information on what you can pass via the `options` object.\n * @method create\n * @param {} options\n * @return {body} body\n */\n Body.create = function(options) {\n var defaults = {\n id: Common.nextId(),\n type: 'body',\n label: 'Body',\n parts: [],\n plugin: {},\n angle: 0,\n vertices: Vertices.fromPath('L 0 0 L 40 0 L 40 40 L 0 40'),\n position: { x: 0, y: 0 },\n force: { x: 0, y: 0 },\n torque: 0,\n positionImpulse: { x: 0, y: 0 },\n constraintImpulse: { x: 0, y: 0, angle: 0 },\n totalContacts: 0,\n speed: 0,\n angularSpeed: 0,\n velocity: { x: 0, y: 0 },\n angularVelocity: 0,\n isSensor: false,\n isStatic: false,\n isSleeping: false,\n motion: 0,\n sleepThreshold: 60,\n density: 0.001,\n restitution: 0,\n friction: 0.1,\n frictionStatic: 0.5,\n frictionAir: 0.01,\n collisionFilter: {\n category: 0x0001,\n mask: 0xFFFFFFFF,\n group: 0\n },\n slop: 0.05,\n timeScale: 1,\n render: {\n visible: true,\n opacity: 1,\n strokeStyle: null,\n fillStyle: null,\n lineWidth: null,\n sprite: {\n xScale: 1,\n yScale: 1,\n xOffset: 0,\n yOffset: 0\n }\n },\n events: null,\n bounds: null,\n chamfer: null,\n circleRadius: 0,\n positionPrev: null,\n anglePrev: 0,\n parent: null,\n axes: null,\n area: 0,\n mass: 0,\n inertia: 0,\n deltaTime: 1000 / 60,\n _original: null\n };\n\n var body = Common.extend(defaults, options);\n\n _initProperties(body, options);\n\n return body;\n };\n\n /**\n * Returns the next unique group index for which bodies will collide.\n * If `isNonColliding` is `true`, returns the next unique group index for which bodies will _not_ collide.\n * See `body.collisionFilter` for more information.\n * @method nextGroup\n * @param {bool} [isNonColliding=false]\n * @return {Number} Unique group index\n */\n Body.nextGroup = function(isNonColliding) {\n if (isNonColliding)\n return Body._nextNonCollidingGroupId--;\n\n return Body._nextCollidingGroupId++;\n };\n\n /**\n * Returns the next unique category bitfield (starting after the initial default category `0x0001`).\n * There are 32 available. See `body.collisionFilter` for more information.\n * @method nextCategory\n * @return {Number} Unique category bitfield\n */\n Body.nextCategory = function() {\n Body._nextCategory = Body._nextCategory << 1;\n return Body._nextCategory;\n };\n\n /**\n * Initialises body properties.\n * @method _initProperties\n * @private\n * @param {body} body\n * @param {} [options]\n */\n var _initProperties = function(body, options) {\n options = options || {};\n\n // init required properties (order is important)\n Body.set(body, {\n bounds: body.bounds || Bounds.create(body.vertices),\n positionPrev: body.positionPrev || Vector.clone(body.position),\n anglePrev: body.anglePrev || body.angle,\n vertices: body.vertices,\n parts: body.parts || [body],\n isStatic: body.isStatic,\n isSleeping: body.isSleeping,\n parent: body.parent || body\n });\n\n Vertices.rotate(body.vertices, body.angle, body.position);\n Axes.rotate(body.axes, body.angle);\n Bounds.update(body.bounds, body.vertices, body.velocity);\n\n // allow options to override the automatically calculated properties\n Body.set(body, {\n axes: options.axes || body.axes,\n area: options.area || body.area,\n mass: options.mass || body.mass,\n inertia: options.inertia || body.inertia\n });\n\n // render properties\n var defaultFillStyle = (body.isStatic ? '#14151f' : Common.choose(['#f19648', '#f5d259', '#f55a3c', '#063e7b', '#ececd1'])),\n defaultStrokeStyle = body.isStatic ? '#555' : '#ccc',\n defaultLineWidth = body.isStatic && body.render.fillStyle === null ? 1 : 0;\n body.render.fillStyle = body.render.fillStyle || defaultFillStyle;\n body.render.strokeStyle = body.render.strokeStyle || defaultStrokeStyle;\n body.render.lineWidth = body.render.lineWidth || defaultLineWidth;\n body.render.sprite.xOffset += -(body.bounds.min.x - body.position.x) / (body.bounds.max.x - body.bounds.min.x);\n body.render.sprite.yOffset += -(body.bounds.min.y - body.position.y) / (body.bounds.max.y - body.bounds.min.y);\n };\n\n /**\n * Given a property and a value (or map of), sets the property(s) on the body, using the appropriate setter functions if they exist.\n * Prefer to use the actual setter functions in performance critical situations.\n * @method set\n * @param {body} body\n * @param {} settings A property name (or map of properties and values) to set on the body.\n * @param {} value The value to set if `settings` is a single property name.\n */\n Body.set = function(body, settings, value) {\n var property;\n\n if (typeof settings === 'string') {\n property = settings;\n settings = {};\n settings[property] = value;\n }\n\n for (property in settings) {\n if (!Object.prototype.hasOwnProperty.call(settings, property))\n continue;\n\n value = settings[property];\n switch (property) {\n\n case 'isStatic':\n Body.setStatic(body, value);\n break;\n case 'isSleeping':\n Sleeping.set(body, value);\n break;\n case 'mass':\n Body.setMass(body, value);\n break;\n case 'density':\n Body.setDensity(body, value);\n break;\n case 'inertia':\n Body.setInertia(body, value);\n break;\n case 'vertices':\n Body.setVertices(body, value);\n break;\n case 'position':\n Body.setPosition(body, value);\n break;\n case 'angle':\n Body.setAngle(body, value);\n break;\n case 'velocity':\n Body.setVelocity(body, value);\n break;\n case 'angularVelocity':\n Body.setAngularVelocity(body, value);\n break;\n case 'speed':\n Body.setSpeed(body, value);\n break;\n case 'angularSpeed':\n Body.setAngularSpeed(body, value);\n break;\n case 'parts':\n Body.setParts(body, value);\n break;\n case 'centre':\n Body.setCentre(body, value);\n break;\n default:\n body[property] = value;\n\n }\n }\n };\n\n /**\n * Sets the body as static, including isStatic flag and setting mass and inertia to Infinity.\n * @method setStatic\n * @param {body} body\n * @param {bool} isStatic\n */\n Body.setStatic = function(body, isStatic) {\n for (var i = 0; i < body.parts.length; i++) {\n var part = body.parts[i];\n\n if (isStatic) {\n if (!part.isStatic) {\n part._original = {\n restitution: part.restitution,\n friction: part.friction,\n mass: part.mass,\n inertia: part.inertia,\n density: part.density,\n inverseMass: part.inverseMass,\n inverseInertia: part.inverseInertia\n };\n }\n\n part.restitution = 0;\n part.friction = 1;\n part.mass = part.inertia = part.density = Infinity;\n part.inverseMass = part.inverseInertia = 0;\n\n part.positionPrev.x = part.position.x;\n part.positionPrev.y = part.position.y;\n part.anglePrev = part.angle;\n part.angularVelocity = 0;\n part.speed = 0;\n part.angularSpeed = 0;\n part.motion = 0;\n } else if (part._original) {\n part.restitution = part._original.restitution;\n part.friction = part._original.friction;\n part.mass = part._original.mass;\n part.inertia = part._original.inertia;\n part.density = part._original.density;\n part.inverseMass = part._original.inverseMass;\n part.inverseInertia = part._original.inverseInertia;\n\n part._original = null;\n }\n\n part.isStatic = isStatic;\n }\n };\n\n /**\n * Sets the mass of the body. Inverse mass, density and inertia are automatically updated to reflect the change.\n * @method setMass\n * @param {body} body\n * @param {number} mass\n */\n Body.setMass = function(body, mass) {\n var moment = body.inertia / (body.mass / 6);\n body.inertia = moment * (mass / 6);\n body.inverseInertia = 1 / body.inertia;\n\n body.mass = mass;\n body.inverseMass = 1 / body.mass;\n body.density = body.mass / body.area;\n };\n\n /**\n * Sets the density of the body. Mass and inertia are automatically updated to reflect the change.\n * @method setDensity\n * @param {body} body\n * @param {number} density\n */\n Body.setDensity = function(body, density) {\n Body.setMass(body, density * body.area);\n body.density = density;\n };\n\n /**\n * Sets the moment of inertia of the body. This is the second moment of area in two dimensions.\n * Inverse inertia is automatically updated to reflect the change. Mass is not changed.\n * @method setInertia\n * @param {body} body\n * @param {number} inertia\n */\n Body.setInertia = function(body, inertia) {\n body.inertia = inertia;\n body.inverseInertia = 1 / body.inertia;\n };\n\n /**\n * Sets the body's vertices and updates body properties accordingly, including inertia, area and mass (with respect to `body.density`).\n * Vertices will be automatically transformed to be orientated around their centre of mass as the origin.\n * They are then automatically translated to world space based on `body.position`.\n *\n * The `vertices` argument should be passed as an array of `Matter.Vector` points (or a `Matter.Vertices` array).\n * Vertices must form a convex hull. Concave vertices must be decomposed into convex parts.\n * \n * @method setVertices\n * @param {body} body\n * @param {vector[]} vertices\n */\n Body.setVertices = function(body, vertices) {\n // change vertices\n if (vertices[0].body === body) {\n body.vertices = vertices;\n } else {\n body.vertices = Vertices.create(vertices, body);\n }\n\n // update properties\n body.axes = Axes.fromVertices(body.vertices);\n body.area = Vertices.area(body.vertices);\n Body.setMass(body, body.density * body.area);\n\n // orient vertices around the centre of mass at origin (0, 0)\n var centre = Vertices.centre(body.vertices);\n Vertices.translate(body.vertices, centre, -1);\n\n // update inertia while vertices are at origin (0, 0)\n Body.setInertia(body, Body._inertiaScale * Vertices.inertia(body.vertices, body.mass));\n\n // update geometry\n Vertices.translate(body.vertices, body.position);\n Bounds.update(body.bounds, body.vertices, body.velocity);\n };\n\n /**\n * Sets the parts of the `body`. \n * \n * See `body.parts` for details and requirements on how parts are used.\n * \n * See Bodies.fromVertices for a related utility.\n * \n * This function updates `body` mass, inertia and centroid based on the parts geometry. \n * Sets each `part.parent` to be this `body`. \n * \n * The convex hull is computed and set on this `body` (unless `autoHull` is `false`). \n * Automatically ensures that the first part in `body.parts` is the `body`.\n * @method setParts\n * @param {body} body\n * @param {body[]} parts\n * @param {bool} [autoHull=true]\n */\n Body.setParts = function(body, parts, autoHull) {\n var i;\n\n // add all the parts, ensuring that the first part is always the parent body\n parts = parts.slice(0);\n body.parts.length = 0;\n body.parts.push(body);\n body.parent = body;\n\n for (i = 0; i < parts.length; i++) {\n var part = parts[i];\n if (part !== body) {\n part.parent = body;\n body.parts.push(part);\n }\n }\n\n if (body.parts.length === 1)\n return;\n\n autoHull = typeof autoHull !== 'undefined' ? autoHull : true;\n\n // find the convex hull of all parts to set on the parent body\n if (autoHull) {\n var vertices = [];\n for (i = 0; i < parts.length; i++) {\n vertices = vertices.concat(parts[i].vertices);\n }\n\n Vertices.clockwiseSort(vertices);\n\n var hull = Vertices.hull(vertices),\n hullCentre = Vertices.centre(hull);\n\n Body.setVertices(body, hull);\n Vertices.translate(body.vertices, hullCentre);\n }\n\n // sum the properties of all compound parts of the parent body\n var total = Body._totalProperties(body);\n\n body.area = total.area;\n body.parent = body;\n body.position.x = total.centre.x;\n body.position.y = total.centre.y;\n body.positionPrev.x = total.centre.x;\n body.positionPrev.y = total.centre.y;\n\n Body.setMass(body, total.mass);\n Body.setInertia(body, total.inertia);\n Body.setPosition(body, total.centre);\n };\n\n /**\n * Set the centre of mass of the body. \n * The `centre` is a vector in world-space unless `relative` is set, in which case it is a translation.\n * The centre of mass is the point the body rotates about and can be used to simulate non-uniform density.\n * This is equal to moving `body.position` but not the `body.vertices`.\n * Invalid if the `centre` falls outside the body's convex hull.\n * @method setCentre\n * @param {body} body\n * @param {vector} centre\n * @param {bool} relative\n */\n Body.setCentre = function(body, centre, relative) {\n if (!relative) {\n body.positionPrev.x = centre.x - (body.position.x - body.positionPrev.x);\n body.positionPrev.y = centre.y - (body.position.y - body.positionPrev.y);\n body.position.x = centre.x;\n body.position.y = centre.y;\n } else {\n body.positionPrev.x += centre.x;\n body.positionPrev.y += centre.y;\n body.position.x += centre.x;\n body.position.y += centre.y;\n }\n };\n\n /**\n * Sets the position of the body. By default velocity is unchanged.\n * If `updateVelocity` is `true` then velocity is inferred from the change in position.\n * @method setPosition\n * @param {body} body\n * @param {vector} position\n * @param {boolean} [updateVelocity=false]\n */\n Body.setPosition = function(body, position, updateVelocity) {\n var delta = Vector.sub(position, body.position);\n\n if (updateVelocity) {\n body.positionPrev.x = body.position.x;\n body.positionPrev.y = body.position.y;\n body.velocity.x = delta.x;\n body.velocity.y = delta.y;\n body.speed = Vector.magnitude(delta);\n } else {\n body.positionPrev.x += delta.x;\n body.positionPrev.y += delta.y;\n }\n\n for (var i = 0; i < body.parts.length; i++) {\n var part = body.parts[i];\n part.position.x += delta.x;\n part.position.y += delta.y;\n Vertices.translate(part.vertices, delta);\n Bounds.update(part.bounds, part.vertices, body.velocity);\n }\n };\n\n /**\n * Sets the angle of the body. By default angular velocity is unchanged.\n * If `updateVelocity` is `true` then angular velocity is inferred from the change in angle.\n * @method setAngle\n * @param {body} body\n * @param {number} angle\n * @param {boolean} [updateVelocity=false]\n */\n Body.setAngle = function(body, angle, updateVelocity) {\n var delta = angle - body.angle;\n \n if (updateVelocity) {\n body.anglePrev = body.angle;\n body.angularVelocity = delta;\n body.angularSpeed = Math.abs(delta);\n } else {\n body.anglePrev += delta;\n }\n\n for (var i = 0; i < body.parts.length; i++) {\n var part = body.parts[i];\n part.angle += delta;\n Vertices.rotate(part.vertices, delta, body.position);\n Axes.rotate(part.axes, delta);\n Bounds.update(part.bounds, part.vertices, body.velocity);\n if (i > 0) {\n Vector.rotateAbout(part.position, delta, body.position, part.position);\n }\n }\n };\n\n /**\n * Sets the current linear velocity of the body. \n * Affects body speed.\n * @method setVelocity\n * @param {body} body\n * @param {vector} velocity\n */\n Body.setVelocity = function(body, velocity) {\n var timeScale = body.deltaTime / Body._baseDelta;\n body.positionPrev.x = body.position.x - velocity.x * timeScale;\n body.positionPrev.y = body.position.y - velocity.y * timeScale;\n body.velocity.x = (body.position.x - body.positionPrev.x) / timeScale;\n body.velocity.y = (body.position.y - body.positionPrev.y) / timeScale;\n body.speed = Vector.magnitude(body.velocity);\n };\n\n /**\n * Gets the current linear velocity of the body.\n * @method getVelocity\n * @param {body} body\n * @return {vector} velocity\n */\n Body.getVelocity = function(body) {\n var timeScale = Body._baseDelta / body.deltaTime;\n\n return {\n x: (body.position.x - body.positionPrev.x) * timeScale,\n y: (body.position.y - body.positionPrev.y) * timeScale\n };\n };\n\n /**\n * Gets the current linear speed of the body. \n * Equivalent to the magnitude of its velocity.\n * @method getSpeed\n * @param {body} body\n * @return {number} speed\n */\n Body.getSpeed = function(body) {\n return Vector.magnitude(Body.getVelocity(body));\n };\n\n /**\n * Sets the current linear speed of the body. \n * Direction is maintained. Affects body velocity.\n * @method setSpeed\n * @param {body} body\n * @param {number} speed\n */\n Body.setSpeed = function(body, speed) {\n Body.setVelocity(body, Vector.mult(Vector.normalise(Body.getVelocity(body)), speed));\n };\n\n /**\n * Sets the current rotational velocity of the body. \n * Affects body angular speed.\n * @method setAngularVelocity\n * @param {body} body\n * @param {number} velocity\n */\n Body.setAngularVelocity = function(body, velocity) {\n var timeScale = body.deltaTime / Body._baseDelta;\n body.anglePrev = body.angle - velocity * timeScale;\n body.angularVelocity = (body.angle - body.anglePrev) / timeScale;\n body.angularSpeed = Math.abs(body.angularVelocity);\n };\n\n /**\n * Gets the current rotational velocity of the body.\n * @method getAngularVelocity\n * @param {body} body\n * @return {number} angular velocity\n */\n Body.getAngularVelocity = function(body) {\n return (body.angle - body.anglePrev) * Body._baseDelta / body.deltaTime;\n };\n\n /**\n * Gets the current rotational speed of the body. \n * Equivalent to the magnitude of its angular velocity.\n * @method getAngularSpeed\n * @param {body} body\n * @return {number} angular speed\n */\n Body.getAngularSpeed = function(body) {\n return Math.abs(Body.getAngularVelocity(body));\n };\n\n /**\n * Sets the current rotational speed of the body. \n * Direction is maintained. Affects body angular velocity.\n * @method setAngularSpeed\n * @param {body} body\n * @param {number} speed\n */\n Body.setAngularSpeed = function(body, speed) {\n Body.setAngularVelocity(body, Common.sign(Body.getAngularVelocity(body)) * speed);\n };\n\n /**\n * Moves a body by a given vector relative to its current position. By default velocity is unchanged.\n * If `updateVelocity` is `true` then velocity is inferred from the change in position.\n * @method translate\n * @param {body} body\n * @param {vector} translation\n * @param {boolean} [updateVelocity=false]\n */\n Body.translate = function(body, translation, updateVelocity) {\n Body.setPosition(body, Vector.add(body.position, translation), updateVelocity);\n };\n\n /**\n * Rotates a body by a given angle relative to its current angle. By default angular velocity is unchanged.\n * If `updateVelocity` is `true` then angular velocity is inferred from the change in angle.\n * @method rotate\n * @param {body} body\n * @param {number} rotation\n * @param {vector} [point]\n * @param {boolean} [updateVelocity=false]\n */\n Body.rotate = function(body, rotation, point, updateVelocity) {\n if (!point) {\n Body.setAngle(body, body.angle + rotation, updateVelocity);\n } else {\n var cos = Math.cos(rotation),\n sin = Math.sin(rotation),\n dx = body.position.x - point.x,\n dy = body.position.y - point.y;\n \n Body.setPosition(body, {\n x: point.x + (dx * cos - dy * sin),\n y: point.y + (dx * sin + dy * cos)\n }, updateVelocity);\n\n Body.setAngle(body, body.angle + rotation, updateVelocity);\n }\n };\n\n /**\n * Scales the body, including updating physical properties (mass, area, axes, inertia), from a world-space point (default is body centre).\n * @method scale\n * @param {body} body\n * @param {number} scaleX\n * @param {number} scaleY\n * @param {vector} [point]\n */\n Body.scale = function(body, scaleX, scaleY, point) {\n var totalArea = 0,\n totalInertia = 0;\n\n point = point || body.position;\n\n for (var i = 0; i < body.parts.length; i++) {\n var part = body.parts[i];\n\n // scale vertices\n Vertices.scale(part.vertices, scaleX, scaleY, point);\n\n // update properties\n part.axes = Axes.fromVertices(part.vertices);\n part.area = Vertices.area(part.vertices);\n Body.setMass(part, body.density * part.area);\n\n // update inertia (requires vertices to be at origin)\n Vertices.translate(part.vertices, { x: -part.position.x, y: -part.position.y });\n Body.setInertia(part, Body._inertiaScale * Vertices.inertia(part.vertices, part.mass));\n Vertices.translate(part.vertices, { x: part.position.x, y: part.position.y });\n\n if (i > 0) {\n totalArea += part.area;\n totalInertia += part.inertia;\n }\n\n // scale position\n part.position.x = point.x + (part.position.x - point.x) * scaleX;\n part.position.y = point.y + (part.position.y - point.y) * scaleY;\n\n // update bounds\n Bounds.update(part.bounds, part.vertices, body.velocity);\n }\n\n // handle parent body\n if (body.parts.length > 1) {\n body.area = totalArea;\n\n if (!body.isStatic) {\n Body.setMass(body, body.density * totalArea);\n Body.setInertia(body, totalInertia);\n }\n }\n\n // handle circles\n if (body.circleRadius) { \n if (scaleX === scaleY) {\n body.circleRadius *= scaleX;\n } else {\n // body is no longer a circle\n body.circleRadius = null;\n }\n }\n };\n\n /**\n * Performs an update by integrating the equations of motion on the `body`.\n * This is applied every update by `Matter.Engine` automatically.\n * @method update\n * @param {body} body\n * @param {number} [deltaTime=16.666]\n */\n Body.update = function(body, deltaTime) {\n deltaTime = (typeof deltaTime !== 'undefined' ? deltaTime : (1000 / 60)) * body.timeScale;\n\n var deltaTimeSquared = deltaTime * deltaTime,\n correction = Body._timeCorrection ? deltaTime / (body.deltaTime || deltaTime) : 1;\n\n // from the previous step\n var frictionAir = 1 - body.frictionAir * (deltaTime / Common._baseDelta),\n velocityPrevX = (body.position.x - body.positionPrev.x) * correction,\n velocityPrevY = (body.position.y - body.positionPrev.y) * correction;\n\n // update velocity with Verlet integration\n body.velocity.x = (velocityPrevX * frictionAir) + (body.force.x / body.mass) * deltaTimeSquared;\n body.velocity.y = (velocityPrevY * frictionAir) + (body.force.y / body.mass) * deltaTimeSquared;\n\n body.positionPrev.x = body.position.x;\n body.positionPrev.y = body.position.y;\n body.position.x += body.velocity.x;\n body.position.y += body.velocity.y;\n body.deltaTime = deltaTime;\n\n // update angular velocity with Verlet integration\n body.angularVelocity = ((body.angle - body.anglePrev) * frictionAir * correction) + (body.torque / body.inertia) * deltaTimeSquared;\n body.anglePrev = body.angle;\n body.angle += body.angularVelocity;\n\n // transform the body geometry\n for (var i = 0; i < body.parts.length; i++) {\n var part = body.parts[i];\n\n Vertices.translate(part.vertices, body.velocity);\n \n if (i > 0) {\n part.position.x += body.velocity.x;\n part.position.y += body.velocity.y;\n }\n\n if (body.angularVelocity !== 0) {\n Vertices.rotate(part.vertices, body.angularVelocity, body.position);\n Axes.rotate(part.axes, body.angularVelocity);\n if (i > 0) {\n Vector.rotateAbout(part.position, body.angularVelocity, body.position, part.position);\n }\n }\n\n Bounds.update(part.bounds, part.vertices, body.velocity);\n }\n };\n\n /**\n * Updates properties `body.velocity`, `body.speed`, `body.angularVelocity` and `body.angularSpeed` which are normalised in relation to `Body._baseDelta`.\n * @method updateVelocities\n * @param {body} body\n */\n Body.updateVelocities = function(body) {\n var timeScale = Body._baseDelta / body.deltaTime,\n bodyVelocity = body.velocity;\n\n bodyVelocity.x = (body.position.x - body.positionPrev.x) * timeScale;\n bodyVelocity.y = (body.position.y - body.positionPrev.y) * timeScale;\n body.speed = Math.sqrt((bodyVelocity.x * bodyVelocity.x) + (bodyVelocity.y * bodyVelocity.y));\n\n body.angularVelocity = (body.angle - body.anglePrev) * timeScale;\n body.angularSpeed = Math.abs(body.angularVelocity);\n };\n\n /**\n * Applies the `force` to the `body` from the force origin `position` in world-space, over a single timestep, including applying any resulting angular torque.\n * \n * Forces are useful for effects like gravity, wind or rocket thrust, but can be difficult in practice when precise control is needed. In these cases see `Body.setVelocity` and `Body.setPosition` as an alternative.\n * \n * The force from this function is only applied once for the duration of a single timestep, in other words the duration depends directly on the current engine update `delta` and the rate of calls to this function.\n * \n * Therefore to account for time, you should apply the force constantly over as many engine updates as equivalent to the intended duration.\n * \n * If all or part of the force duration is some fraction of a timestep, first multiply the force by `duration / timestep`.\n * \n * The force origin `position` in world-space must also be specified. Passing `body.position` will result in zero angular effect as the force origin would be at the centre of mass.\n * \n * The `body` will take time to accelerate under a force, the resulting effect depends on duration of the force, the body mass and other forces on the body including friction combined.\n * @method applyForce\n * @param {body} body\n * @param {vector} position The force origin in world-space. Pass `body.position` to avoid angular torque.\n * @param {vector} force\n */\n Body.applyForce = function(body, position, force) {\n var offset = { x: position.x - body.position.x, y: position.y - body.position.y };\n body.force.x += force.x;\n body.force.y += force.y;\n body.torque += offset.x * force.y - offset.y * force.x;\n };\n\n /**\n * Returns the sums of the properties of all compound parts of the parent body.\n * @method _totalProperties\n * @private\n * @param {body} body\n * @return {}\n */\n Body._totalProperties = function(body) {\n // from equations at:\n // https://ecourses.ou.edu/cgi-bin/ebook.cgi?doc=&topic=st&chap_sec=07.2&page=theory\n // http://output.to/sideway/default.asp?qno=121100087\n\n var properties = {\n mass: 0,\n area: 0,\n inertia: 0,\n centre: { x: 0, y: 0 }\n };\n\n // sum the properties of all compound parts of the parent body\n for (var i = body.parts.length === 1 ? 0 : 1; i < body.parts.length; i++) {\n var part = body.parts[i],\n mass = part.mass !== Infinity ? part.mass : 1;\n\n properties.mass += mass;\n properties.area += part.area;\n properties.inertia += part.inertia;\n properties.centre = Vector.add(properties.centre, Vector.mult(part.position, mass));\n }\n\n properties.centre = Vector.div(properties.centre, properties.mass);\n\n return properties;\n };\n\n /*\n *\n * Events Documentation\n *\n */\n\n /**\n * Fired when a body starts sleeping (where `this` is the body).\n *\n * @event sleepStart\n * @this {body} The body that has started sleeping\n * @param {} event An event object\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired when a body ends sleeping (where `this` is the body).\n *\n * @event sleepEnd\n * @this {body} The body that has ended sleeping\n * @param {} event An event object\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /*\n *\n * Properties Documentation\n *\n */\n\n /**\n * An integer `Number` uniquely identifying number generated in `Body.create` by `Common.nextId`.\n *\n * @property id\n * @type number\n */\n\n /**\n * _Read only_. Set by `Body.create`.\n * \n * A `String` denoting the type of object.\n *\n * @readOnly\n * @property type\n * @type string\n * @default \"body\"\n */\n\n /**\n * An arbitrary `String` name to help the user identify and manage bodies.\n *\n * @property label\n * @type string\n * @default \"Body\"\n */\n\n /**\n * _Read only_. Use `Body.setParts` to set. \n * \n * See `Bodies.fromVertices` for a related utility.\n * \n * An array of bodies (the 'parts') that make up this body (the 'parent'). The first body in this array must always be a self-reference to this `body`. \n * \n * The parts are fixed together and therefore perform as a single unified rigid body.\n * \n * Parts in relation to each other are allowed to overlap, as well as form gaps or holes, so can be used to create complex concave bodies unlike when using a single part. \n * \n * Use properties and functions on the parent `body` rather than on parts.\n * \n * Outside of their geometry, most properties on parts are not considered or updated. \n * As such 'per-part' material properties among others are not currently considered.\n * \n * Parts should be created specifically for their parent body. \n * Parts should not be shared or reused between bodies, only one parent is supported. \n * Parts should not have their own parts, they are not handled recursively. \n * Parts should not be added to the world directly or any other composite. \n * Parts own vertices must be convex and in clockwise order. \n * \n * A body with more than one part is sometimes referred to as a 'compound' body. \n * \n * Use `Body.setParts` when setting parts to ensure correct updates of all properties. \n *\n * @readOnly\n * @property parts\n * @type body[]\n */\n\n /**\n * An object reserved for storing plugin-specific properties.\n *\n * @property plugin\n * @type {}\n */\n\n /**\n * _Read only_. Updated by `Body.setParts`.\n * \n * A reference to the body that this is a part of. See `body.parts`.\n * This is a self reference if the body is not a part of another body.\n *\n * @readOnly\n * @property parent\n * @type body\n */\n\n /**\n * A `Number` specifying the angle of the body, in radians.\n *\n * @property angle\n * @type number\n * @default 0\n */\n\n /**\n * _Read only_. Use `Body.setVertices` or `Body.setParts` to set. See also `Bodies.fromVertices`.\n * \n * An array of `Vector` objects that specify the convex hull of the rigid body.\n * These should be provided about the origin `(0, 0)`. E.g.\n *\n * `[{ x: 0, y: 0 }, { x: 25, y: 50 }, { x: 50, y: 0 }]`\n * \n * Vertices must always be convex, in clockwise order and must not contain any duplicate points.\n * \n * Concave vertices should be decomposed into convex `parts`, see `Bodies.fromVertices` and `Body.setParts`.\n *\n * When set the vertices are translated such that `body.position` is at the centre of mass.\n * Many other body properties are automatically calculated from these vertices when set including `density`, `area` and `inertia`.\n * \n * The module `Matter.Vertices` contains useful methods for working with vertices.\n *\n * @readOnly\n * @property vertices\n * @type vector[]\n */\n\n /**\n * _Read only_. Use `Body.setPosition` to set. \n * \n * A `Vector` that specifies the current world-space position of the body.\n * \n * @readOnly\n * @property position\n * @type vector\n * @default { x: 0, y: 0 }\n */\n\n /**\n * A `Vector` that accumulates the total force applied to the body for a single update.\n * Force is zeroed after every `Engine.update`, so constant forces should be applied for every update they are needed. See also `Body.applyForce`.\n * \n * @property force\n * @type vector\n * @default { x: 0, y: 0 }\n */\n\n /**\n * A `Number` that accumulates the total torque (turning force) applied to the body for a single update. See also `Body.applyForce`.\n * Torque is zeroed after every `Engine.update`, so constant torques should be applied for every update they are needed.\n *\n * Torques result in angular acceleration on every update, which depends on body inertia and the engine update delta.\n * \n * @property torque\n * @type number\n * @default 0\n */\n\n /**\n * _Read only_. Use `Body.setSpeed` to set. \n * \n * See `Body.getSpeed` for details.\n * \n * Equivalent to the magnitude of `body.velocity` (always positive).\n * \n * @readOnly\n * @property speed\n * @type number\n * @default 0\n */\n\n /**\n * _Read only_. Use `Body.setVelocity` to set. \n * \n * See `Body.getVelocity` for details.\n * \n * Equivalent to the magnitude of `body.angularVelocity` (always positive).\n * \n * @readOnly\n * @property velocity\n * @type vector\n * @default { x: 0, y: 0 }\n */\n\n /**\n * _Read only_. Use `Body.setAngularSpeed` to set. \n * \n * See `Body.getAngularSpeed` for details.\n * \n * \n * @readOnly\n * @property angularSpeed\n * @type number\n * @default 0\n */\n\n /**\n * _Read only_. Use `Body.setAngularVelocity` to set. \n * \n * See `Body.getAngularVelocity` for details.\n * \n *\n * @readOnly\n * @property angularVelocity\n * @type number\n * @default 0\n */\n\n /**\n * _Read only_. Use `Body.setStatic` to set. \n * \n * A flag that indicates whether a body is considered static. A static body can never change position or angle and is completely fixed.\n *\n * @readOnly\n * @property isStatic\n * @type boolean\n * @default false\n */\n\n /**\n * A flag that indicates whether a body is a sensor. Sensor triggers collision events, but doesn't react with colliding body physically.\n *\n * @property isSensor\n * @type boolean\n * @default false\n */\n\n /**\n * _Read only_. Use `Sleeping.set` to set. \n * \n * A flag that indicates whether the body is considered sleeping. A sleeping body acts similar to a static body, except it is only temporary and can be awoken.\n *\n * @readOnly\n * @property isSleeping\n * @type boolean\n * @default false\n */\n\n /**\n * _Read only_. Calculated during engine update only when sleeping is enabled.\n * \n * A `Number` that loosely measures the amount of movement a body currently has.\n *\n * Derived from `body.speed^2 + body.angularSpeed^2`. See `Sleeping.update`.\n * \n * @readOnly\n * @property motion\n * @type number\n * @default 0\n */\n\n /**\n * A `Number` that defines the length of time during which this body must have near-zero velocity before it is set as sleeping by the `Matter.Sleeping` module (if sleeping is enabled by the engine).\n * \n * @property sleepThreshold\n * @type number\n * @default 60\n */\n\n /**\n * _Read only_. Use `Body.setDensity` to set. \n * \n * A `Number` that defines the density of the body (mass per unit area).\n * \n * Mass will also be updated when set.\n *\n * @readOnly\n * @property density\n * @type number\n * @default 0.001\n */\n\n /**\n * _Read only_. Use `Body.setMass` to set. \n * \n * A `Number` that defines the mass of the body.\n * \n * Density will also be updated when set.\n * \n * @readOnly\n * @property mass\n * @type number\n */\n\n /**\n * _Read only_. Use `Body.setMass` to set. \n * \n * A `Number` that defines the inverse mass of the body (`1 / mass`).\n *\n * @readOnly\n * @property inverseMass\n * @type number\n */\n\n /**\n * _Read only_. Automatically calculated when vertices, mass or density are set or set through `Body.setInertia`.\n * \n * A `Number` that defines the moment of inertia of the body. This is the second moment of area in two dimensions.\n * \n * Can be manually set to `Infinity` to prevent rotation of the body. See `Body.setInertia`.\n * \n * @readOnly\n * @property inertia\n * @type number\n */\n\n /**\n * _Read only_. Automatically calculated when vertices, mass or density are set or calculated by `Body.setInertia`.\n * \n * A `Number` that defines the inverse moment of inertia of the body (`1 / inertia`).\n * \n * @readOnly\n * @property inverseInertia\n * @type number\n */\n\n /**\n * A `Number` that defines the restitution (elasticity) of the body. The value is always positive and is in the range `(0, 1)`.\n * A value of `0` means collisions may be perfectly inelastic and no bouncing may occur. \n * A value of `0.8` means the body may bounce back with approximately 80% of its kinetic energy.\n * Note that collision response is based on _pairs_ of bodies, and that `restitution` values are _combined_ with the following formula:\n *\n * `Math.max(bodyA.restitution, bodyB.restitution)`\n *\n * @property restitution\n * @type number\n * @default 0\n */\n\n /**\n * A `Number` that defines the friction of the body. The value is always positive and is in the range `(0, 1)`.\n * A value of `0` means that the body may slide indefinitely.\n * A value of `1` means the body may come to a stop almost instantly after a force is applied.\n *\n * The effects of the value may be non-linear. \n * High values may be unstable depending on the body.\n * The engine uses a Coulomb friction model including static and kinetic friction.\n * Note that collision response is based on _pairs_ of bodies, and that `friction` values are _combined_ with the following formula:\n *\n * `Math.min(bodyA.friction, bodyB.friction)`\n *\n * @property friction\n * @type number\n * @default 0.1\n */\n\n /**\n * A `Number` that defines the static friction of the body (in the Coulomb friction model). \n * A value of `0` means the body will never 'stick' when it is nearly stationary and only dynamic `friction` is used.\n * The higher the value (e.g. `10`), the more force it will take to initially get the body moving when nearly stationary.\n * This value is multiplied with the `friction` property to make it easier to change `friction` and maintain an appropriate amount of static friction.\n *\n * @property frictionStatic\n * @type number\n * @default 0.5\n */\n\n /**\n * A `Number` that defines the air friction of the body (air resistance). \n * A value of `0` means the body will never slow as it moves through space.\n * The higher the value, the faster a body slows when moving through space.\n * The effects of the value are non-linear. \n *\n * @property frictionAir\n * @type number\n * @default 0.01\n */\n\n /**\n * An `Object` that specifies the collision filtering properties of this body.\n *\n * Collisions between two bodies will obey the following rules:\n * - If the two bodies have the same non-zero value of `collisionFilter.group`,\n * they will always collide if the value is positive, and they will never collide\n * if the value is negative.\n * - If the two bodies have different values of `collisionFilter.group` or if one\n * (or both) of the bodies has a value of 0, then the category/mask rules apply as follows:\n *\n * Each body belongs to a collision category, given by `collisionFilter.category`. This\n * value is used as a bit field and the category should have only one bit set, meaning that\n * the value of this property is a power of two in the range [1, 2^31]. Thus, there are 32\n * different collision categories available.\n *\n * Each body also defines a collision bitmask, given by `collisionFilter.mask` which specifies\n * the categories it collides with (the value is the bitwise AND value of all these categories).\n *\n * Using the category/mask rules, two bodies `A` and `B` collide if each includes the other's\n * category in its mask, i.e. `(categoryA & maskB) !== 0` and `(categoryB & maskA) !== 0`\n * are both true.\n *\n * @property collisionFilter\n * @type object\n */\n\n /**\n * An Integer `Number`, that specifies the collision group this body belongs to.\n * See `body.collisionFilter` for more information.\n *\n * @property collisionFilter.group\n * @type object\n * @default 0\n */\n\n /**\n * A bit field that specifies the collision category this body belongs to.\n * The category value should have only one bit set, for example `0x0001`.\n * This means there are up to 32 unique collision categories available.\n * See `body.collisionFilter` for more information.\n *\n * @property collisionFilter.category\n * @type object\n * @default 1\n */\n\n /**\n * A bit mask that specifies the collision categories this body may collide with.\n * See `body.collisionFilter` for more information.\n *\n * @property collisionFilter.mask\n * @type object\n * @default -1\n */\n\n /**\n * A `Number` that specifies a thin boundary around the body where it is allowed to slightly sink into other bodies.\n * \n * This is required for proper collision response, including friction and restitution effects.\n * \n * The default should generally suffice in most cases. You may need to decrease this value for very small bodies that are nearing the default value in scale.\n *\n * @property slop\n * @type number\n * @default 0.05\n */\n\n /**\n * A `Number` that specifies per-body time scaling.\n *\n * @property timeScale\n * @type number\n * @default 1\n */\n\n /**\n * _Read only_. Updated during engine update.\n * \n * A `Number` that records the last delta time value used to update this body.\n * Used to calculate speed and velocity.\n *\n * @readOnly\n * @property deltaTime\n * @type number\n * @default 1000 / 60\n */\n\n /**\n * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\n *\n * @property render\n * @type object\n */\n\n /**\n * A flag that indicates if the body should be rendered.\n *\n * @property render.visible\n * @type boolean\n * @default true\n */\n\n /**\n * Sets the opacity to use when rendering.\n *\n * @property render.opacity\n * @type number\n * @default 1\n */\n\n /**\n * An `Object` that defines the sprite properties to use when rendering, if any.\n *\n * @property render.sprite\n * @type object\n */\n\n /**\n * An `String` that defines the path to the image to use as the sprite texture, if any.\n *\n * @property render.sprite.texture\n * @type string\n */\n \n /**\n * A `Number` that defines the scaling in the x-axis for the sprite, if any.\n *\n * @property render.sprite.xScale\n * @type number\n * @default 1\n */\n\n /**\n * A `Number` that defines the scaling in the y-axis for the sprite, if any.\n *\n * @property render.sprite.yScale\n * @type number\n * @default 1\n */\n\n /**\n * A `Number` that defines the offset in the x-axis for the sprite (normalised by texture width).\n *\n * @property render.sprite.xOffset\n * @type number\n * @default 0\n */\n\n /**\n * A `Number` that defines the offset in the y-axis for the sprite (normalised by texture height).\n *\n * @property render.sprite.yOffset\n * @type number\n * @default 0\n */\n\n /**\n * A `Number` that defines the line width to use when rendering the body outline (if a sprite is not defined).\n * A value of `0` means no outline will be rendered.\n *\n * @property render.lineWidth\n * @type number\n * @default 0\n */\n\n /**\n * A `String` that defines the fill style to use when rendering the body (if a sprite is not defined).\n * It is the same as when using a canvas, so it accepts CSS style property values.\n *\n * @property render.fillStyle\n * @type string\n * @default a random colour\n */\n\n /**\n * A `String` that defines the stroke style to use when rendering the body outline (if a sprite is not defined).\n * It is the same as when using a canvas, so it accepts CSS style property values.\n *\n * @property render.strokeStyle\n * @type string\n * @default a random colour\n */\n\n /**\n * _Read only_. Calculated automatically when vertices are set.\n * \n * An array of unique axis vectors (edge normals) used for collision detection.\n * These are automatically calculated when vertices are set.\n * They are constantly updated by `Body.update` during the simulation.\n *\n * @readOnly\n * @property axes\n * @type vector[]\n */\n \n /**\n * _Read only_. Calculated automatically when vertices are set.\n * \n * A `Number` that measures the area of the body's convex hull.\n * \n * @readOnly\n * @property area\n * @type string\n * @default \n */\n\n /**\n * A `Bounds` object that defines the AABB region for the body.\n * It is automatically calculated when vertices are set and constantly updated by `Body.update` during simulation.\n * \n * @property bounds\n * @type bounds\n */\n\n /**\n * Temporarily may hold parameters to be passed to `Vertices.chamfer` where supported by external functions.\n * \n * See `Vertices.chamfer` for possible parameters this object may hold.\n * \n * Currently only functions inside `Matter.Bodies` provide a utility using this property as a vertices pre-processing option.\n * \n * Alternatively consider using `Vertices.chamfer` directly on vertices before passing them to a body creation function.\n * \n * @property chamfer\n * @type object|null|undefined\n */\n\n})();\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Events` module contains methods to fire and listen to events on other objects.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Events\n*/\n\nvar Events = {};\n\nmodule.exports = Events;\n\nvar Common = __webpack_require__(0);\n\n(function() {\n\n /**\n * Subscribes a callback function to the given object's `eventName`.\n * @method on\n * @param {} object\n * @param {string} eventNames\n * @param {function} callback\n */\n Events.on = function(object, eventNames, callback) {\n var names = eventNames.split(' '),\n name;\n\n for (var i = 0; i < names.length; i++) {\n name = names[i];\n object.events = object.events || {};\n object.events[name] = object.events[name] || [];\n object.events[name].push(callback);\n }\n\n return callback;\n };\n\n /**\n * Removes the given event callback. If no callback, clears all callbacks in `eventNames`. If no `eventNames`, clears all events.\n * @method off\n * @param {} object\n * @param {string} eventNames\n * @param {function} callback\n */\n Events.off = function(object, eventNames, callback) {\n if (!eventNames) {\n object.events = {};\n return;\n }\n\n // handle Events.off(object, callback)\n if (typeof eventNames === 'function') {\n callback = eventNames;\n eventNames = Common.keys(object.events).join(' ');\n }\n\n var names = eventNames.split(' ');\n\n for (var i = 0; i < names.length; i++) {\n var callbacks = object.events[names[i]],\n newCallbacks = [];\n\n if (callback && callbacks) {\n for (var j = 0; j < callbacks.length; j++) {\n if (callbacks[j] !== callback)\n newCallbacks.push(callbacks[j]);\n }\n }\n\n object.events[names[i]] = newCallbacks;\n }\n };\n\n /**\n * Fires all the callbacks subscribed to the given object's `eventName`, in the order they subscribed, if any.\n * @method trigger\n * @param {} object\n * @param {string} eventNames\n * @param {} event\n */\n Events.trigger = function(object, eventNames, event) {\n var names,\n name,\n callbacks,\n eventClone;\n\n var events = object.events;\n \n if (events && Common.keys(events).length > 0) {\n if (!event)\n event = {};\n\n names = eventNames.split(' ');\n\n for (var i = 0; i < names.length; i++) {\n name = names[i];\n callbacks = events[name];\n\n if (callbacks) {\n eventClone = Common.clone(event, false);\n eventClone.name = name;\n eventClone.source = object;\n\n for (var j = 0; j < callbacks.length; j++) {\n callbacks[j].apply(object, [eventClone]);\n }\n }\n }\n }\n };\n\n})();\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* A composite is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite` objects.\n*\n* They are a container that can represent complex objects made of multiple parts, even if they are not physically connected.\n* A composite could contain anything from a single body all the way up to a whole world.\n* \n* When making any changes to composites, use the included functions rather than changing their properties directly.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Composite\n*/\n\nvar Composite = {};\n\nmodule.exports = Composite;\n\nvar Events = __webpack_require__(5);\nvar Common = __webpack_require__(0);\nvar Bounds = __webpack_require__(1);\nvar Body = __webpack_require__(4);\n\n(function() {\n\n /**\n * Creates a new composite. The options parameter is an object that specifies any properties you wish to override the defaults.\n * See the properites section below for detailed information on what you can pass via the `options` object.\n * @method create\n * @param {} [options]\n * @return {composite} A new composite\n */\n Composite.create = function(options) {\n return Common.extend({ \n id: Common.nextId(),\n type: 'composite',\n parent: null,\n isModified: false,\n bodies: [], \n constraints: [], \n composites: [],\n label: 'Composite',\n plugin: {},\n cache: {\n allBodies: null,\n allConstraints: null,\n allComposites: null\n }\n }, options);\n };\n\n /**\n * Sets the composite's `isModified` flag. \n * If `updateParents` is true, all parents will be set (default: false).\n * If `updateChildren` is true, all children will be set (default: false).\n * @private\n * @method setModified\n * @param {composite} composite\n * @param {boolean} isModified\n * @param {boolean} [updateParents=false]\n * @param {boolean} [updateChildren=false]\n */\n Composite.setModified = function(composite, isModified, updateParents, updateChildren) {\n composite.isModified = isModified;\n\n if (isModified && composite.cache) {\n composite.cache.allBodies = null;\n composite.cache.allConstraints = null;\n composite.cache.allComposites = null;\n }\n\n if (updateParents && composite.parent) {\n Composite.setModified(composite.parent, isModified, updateParents, updateChildren);\n }\n\n if (updateChildren) {\n for (var i = 0; i < composite.composites.length; i++) {\n var childComposite = composite.composites[i];\n Composite.setModified(childComposite, isModified, updateParents, updateChildren);\n }\n }\n };\n\n /**\n * Generic single or multi-add function. Adds a single or an array of body(s), constraint(s) or composite(s) to the given composite.\n * Triggers `beforeAdd` and `afterAdd` events on the `composite`.\n * @method add\n * @param {composite} composite\n * @param {object|array} object A single or an array of body(s), constraint(s) or composite(s)\n * @return {composite} The original composite with the objects added\n */\n Composite.add = function(composite, object) {\n var objects = [].concat(object);\n\n Events.trigger(composite, 'beforeAdd', { object: object });\n\n for (var i = 0; i < objects.length; i++) {\n var obj = objects[i];\n\n switch (obj.type) {\n\n case 'body':\n // skip adding compound parts\n if (obj.parent !== obj) {\n Common.warn('Composite.add: skipped adding a compound body part (you must add its parent instead)');\n break;\n }\n\n Composite.addBody(composite, obj);\n break;\n case 'constraint':\n Composite.addConstraint(composite, obj);\n break;\n case 'composite':\n Composite.addComposite(composite, obj);\n break;\n case 'mouseConstraint':\n Composite.addConstraint(composite, obj.constraint);\n break;\n\n }\n }\n\n Events.trigger(composite, 'afterAdd', { object: object });\n\n return composite;\n };\n\n /**\n * Generic remove function. Removes one or many body(s), constraint(s) or a composite(s) to the given composite.\n * Optionally searching its children recursively.\n * Triggers `beforeRemove` and `afterRemove` events on the `composite`.\n * @method remove\n * @param {composite} composite\n * @param {object|array} object\n * @param {boolean} [deep=false]\n * @return {composite} The original composite with the objects removed\n */\n Composite.remove = function(composite, object, deep) {\n var objects = [].concat(object);\n\n Events.trigger(composite, 'beforeRemove', { object: object });\n\n for (var i = 0; i < objects.length; i++) {\n var obj = objects[i];\n\n switch (obj.type) {\n\n case 'body':\n Composite.removeBody(composite, obj, deep);\n break;\n case 'constraint':\n Composite.removeConstraint(composite, obj, deep);\n break;\n case 'composite':\n Composite.removeComposite(composite, obj, deep);\n break;\n case 'mouseConstraint':\n Composite.removeConstraint(composite, obj.constraint);\n break;\n\n }\n }\n\n Events.trigger(composite, 'afterRemove', { object: object });\n\n return composite;\n };\n\n /**\n * Adds a composite to the given composite.\n * @private\n * @method addComposite\n * @param {composite} compositeA\n * @param {composite} compositeB\n * @return {composite} The original compositeA with the objects from compositeB added\n */\n Composite.addComposite = function(compositeA, compositeB) {\n compositeA.composites.push(compositeB);\n compositeB.parent = compositeA;\n Composite.setModified(compositeA, true, true, false);\n return compositeA;\n };\n\n /**\n * Removes a composite from the given composite, and optionally searching its children recursively.\n * @private\n * @method removeComposite\n * @param {composite} compositeA\n * @param {composite} compositeB\n * @param {boolean} [deep=false]\n * @return {composite} The original compositeA with the composite removed\n */\n Composite.removeComposite = function(compositeA, compositeB, deep) {\n var position = Common.indexOf(compositeA.composites, compositeB);\n\n if (position !== -1) {\n var bodies = Composite.allBodies(compositeB);\n\n Composite.removeCompositeAt(compositeA, position);\n\n for (var i = 0; i < bodies.length; i++) {\n bodies[i].sleepCounter = 0;\n }\n }\n\n if (deep) {\n for (var i = 0; i < compositeA.composites.length; i++){\n Composite.removeComposite(compositeA.composites[i], compositeB, true);\n }\n }\n\n return compositeA;\n };\n\n /**\n * Removes a composite from the given composite.\n * @private\n * @method removeCompositeAt\n * @param {composite} composite\n * @param {number} position\n * @return {composite} The original composite with the composite removed\n */\n Composite.removeCompositeAt = function(composite, position) {\n composite.composites.splice(position, 1);\n Composite.setModified(composite, true, true, false);\n return composite;\n };\n\n /**\n * Adds a body to the given composite.\n * @private\n * @method addBody\n * @param {composite} composite\n * @param {body} body\n * @return {composite} The original composite with the body added\n */\n Composite.addBody = function(composite, body) {\n composite.bodies.push(body);\n Composite.setModified(composite, true, true, false);\n return composite;\n };\n\n /**\n * Removes a body from the given composite, and optionally searching its children recursively.\n * @private\n * @method removeBody\n * @param {composite} composite\n * @param {body} body\n * @param {boolean} [deep=false]\n * @return {composite} The original composite with the body removed\n */\n Composite.removeBody = function(composite, body, deep) {\n var position = Common.indexOf(composite.bodies, body);\n\n if (position !== -1) {\n Composite.removeBodyAt(composite, position);\n body.sleepCounter = 0;\n }\n\n if (deep) {\n for (var i = 0; i < composite.composites.length; i++){\n Composite.removeBody(composite.composites[i], body, true);\n }\n }\n\n return composite;\n };\n\n /**\n * Removes a body from the given composite.\n * @private\n * @method removeBodyAt\n * @param {composite} composite\n * @param {number} position\n * @return {composite} The original composite with the body removed\n */\n Composite.removeBodyAt = function(composite, position) {\n composite.bodies.splice(position, 1);\n Composite.setModified(composite, true, true, false);\n return composite;\n };\n\n /**\n * Adds a constraint to the given composite.\n * @private\n * @method addConstraint\n * @param {composite} composite\n * @param {constraint} constraint\n * @return {composite} The original composite with the constraint added\n */\n Composite.addConstraint = function(composite, constraint) {\n composite.constraints.push(constraint);\n Composite.setModified(composite, true, true, false);\n return composite;\n };\n\n /**\n * Removes a constraint from the given composite, and optionally searching its children recursively.\n * @private\n * @method removeConstraint\n * @param {composite} composite\n * @param {constraint} constraint\n * @param {boolean} [deep=false]\n * @return {composite} The original composite with the constraint removed\n */\n Composite.removeConstraint = function(composite, constraint, deep) {\n var position = Common.indexOf(composite.constraints, constraint);\n \n if (position !== -1) {\n Composite.removeConstraintAt(composite, position);\n }\n\n if (deep) {\n for (var i = 0; i < composite.composites.length; i++){\n Composite.removeConstraint(composite.composites[i], constraint, true);\n }\n }\n\n return composite;\n };\n\n /**\n * Removes a body from the given composite.\n * @private\n * @method removeConstraintAt\n * @param {composite} composite\n * @param {number} position\n * @return {composite} The original composite with the constraint removed\n */\n Composite.removeConstraintAt = function(composite, position) {\n composite.constraints.splice(position, 1);\n Composite.setModified(composite, true, true, false);\n return composite;\n };\n\n /**\n * Removes all bodies, constraints and composites from the given composite.\n * Optionally clearing its children recursively.\n * @method clear\n * @param {composite} composite\n * @param {boolean} keepStatic\n * @param {boolean} [deep=false]\n */\n Composite.clear = function(composite, keepStatic, deep) {\n if (deep) {\n for (var i = 0; i < composite.composites.length; i++){\n Composite.clear(composite.composites[i], keepStatic, true);\n }\n }\n \n if (keepStatic) {\n composite.bodies = composite.bodies.filter(function(body) { return body.isStatic; });\n } else {\n composite.bodies.length = 0;\n }\n\n composite.constraints.length = 0;\n composite.composites.length = 0;\n\n Composite.setModified(composite, true, true, false);\n\n return composite;\n };\n\n /**\n * Returns all bodies in the given composite, including all bodies in its children, recursively.\n * @method allBodies\n * @param {composite} composite\n * @return {body[]} All the bodies\n */\n Composite.allBodies = function(composite) {\n if (composite.cache && composite.cache.allBodies) {\n return composite.cache.allBodies;\n }\n\n var bodies = [].concat(composite.bodies);\n\n for (var i = 0; i < composite.composites.length; i++)\n bodies = bodies.concat(Composite.allBodies(composite.composites[i]));\n\n if (composite.cache) {\n composite.cache.allBodies = bodies;\n }\n\n return bodies;\n };\n\n /**\n * Returns all constraints in the given composite, including all constraints in its children, recursively.\n * @method allConstraints\n * @param {composite} composite\n * @return {constraint[]} All the constraints\n */\n Composite.allConstraints = function(composite) {\n if (composite.cache && composite.cache.allConstraints) {\n return composite.cache.allConstraints;\n }\n\n var constraints = [].concat(composite.constraints);\n\n for (var i = 0; i < composite.composites.length; i++)\n constraints = constraints.concat(Composite.allConstraints(composite.composites[i]));\n\n if (composite.cache) {\n composite.cache.allConstraints = constraints;\n }\n\n return constraints;\n };\n\n /**\n * Returns all composites in the given composite, including all composites in its children, recursively.\n * @method allComposites\n * @param {composite} composite\n * @return {composite[]} All the composites\n */\n Composite.allComposites = function(composite) {\n if (composite.cache && composite.cache.allComposites) {\n return composite.cache.allComposites;\n }\n\n var composites = [].concat(composite.composites);\n\n for (var i = 0; i < composite.composites.length; i++)\n composites = composites.concat(Composite.allComposites(composite.composites[i]));\n\n if (composite.cache) {\n composite.cache.allComposites = composites;\n }\n\n return composites;\n };\n\n /**\n * Searches the composite recursively for an object matching the type and id supplied, null if not found.\n * @method get\n * @param {composite} composite\n * @param {number} id\n * @param {string} type\n * @return {object} The requested object, if found\n */\n Composite.get = function(composite, id, type) {\n var objects,\n object;\n\n switch (type) {\n case 'body':\n objects = Composite.allBodies(composite);\n break;\n case 'constraint':\n objects = Composite.allConstraints(composite);\n break;\n case 'composite':\n objects = Composite.allComposites(composite).concat(composite);\n break;\n }\n\n if (!objects)\n return null;\n\n object = objects.filter(function(object) { \n return object.id.toString() === id.toString(); \n });\n\n return object.length === 0 ? null : object[0];\n };\n\n /**\n * Moves the given object(s) from compositeA to compositeB (equal to a remove followed by an add).\n * @method move\n * @param {compositeA} compositeA\n * @param {object[]} objects\n * @param {compositeB} compositeB\n * @return {composite} Returns compositeA\n */\n Composite.move = function(compositeA, objects, compositeB) {\n Composite.remove(compositeA, objects);\n Composite.add(compositeB, objects);\n return compositeA;\n };\n\n /**\n * Assigns new ids for all objects in the composite, recursively.\n * @method rebase\n * @param {composite} composite\n * @return {composite} Returns composite\n */\n Composite.rebase = function(composite) {\n var objects = Composite.allBodies(composite)\n .concat(Composite.allConstraints(composite))\n .concat(Composite.allComposites(composite));\n\n for (var i = 0; i < objects.length; i++) {\n objects[i].id = Common.nextId();\n }\n\n return composite;\n };\n\n /**\n * Translates all children in the composite by a given vector relative to their current positions, \n * without imparting any velocity.\n * @method translate\n * @param {composite} composite\n * @param {vector} translation\n * @param {bool} [recursive=true]\n */\n Composite.translate = function(composite, translation, recursive) {\n var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\n\n for (var i = 0; i < bodies.length; i++) {\n Body.translate(bodies[i], translation);\n }\n\n return composite;\n };\n\n /**\n * Rotates all children in the composite by a given angle about the given point, without imparting any angular velocity.\n * @method rotate\n * @param {composite} composite\n * @param {number} rotation\n * @param {vector} point\n * @param {bool} [recursive=true]\n */\n Composite.rotate = function(composite, rotation, point, recursive) {\n var cos = Math.cos(rotation),\n sin = Math.sin(rotation),\n bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\n\n for (var i = 0; i < bodies.length; i++) {\n var body = bodies[i],\n dx = body.position.x - point.x,\n dy = body.position.y - point.y;\n \n Body.setPosition(body, {\n x: point.x + (dx * cos - dy * sin),\n y: point.y + (dx * sin + dy * cos)\n });\n\n Body.rotate(body, rotation);\n }\n\n return composite;\n };\n\n /**\n * Scales all children in the composite, including updating physical properties (mass, area, axes, inertia), from a world-space point.\n * @method scale\n * @param {composite} composite\n * @param {number} scaleX\n * @param {number} scaleY\n * @param {vector} point\n * @param {bool} [recursive=true]\n */\n Composite.scale = function(composite, scaleX, scaleY, point, recursive) {\n var bodies = recursive ? Composite.allBodies(composite) : composite.bodies;\n\n for (var i = 0; i < bodies.length; i++) {\n var body = bodies[i],\n dx = body.position.x - point.x,\n dy = body.position.y - point.y;\n \n Body.setPosition(body, {\n x: point.x + dx * scaleX,\n y: point.y + dy * scaleY\n });\n\n Body.scale(body, scaleX, scaleY);\n }\n\n return composite;\n };\n\n /**\n * Returns the union of the bounds of all of the composite's bodies.\n * @method bounds\n * @param {composite} composite The composite.\n * @returns {bounds} The composite bounds.\n */\n Composite.bounds = function(composite) {\n var bodies = Composite.allBodies(composite),\n vertices = [];\n\n for (var i = 0; i < bodies.length; i += 1) {\n var body = bodies[i];\n vertices.push(body.bounds.min, body.bounds.max);\n }\n\n return Bounds.create(vertices);\n };\n\n /*\n *\n * Events Documentation\n *\n */\n\n /**\n * Fired when a call to `Composite.add` is made, before objects have been added.\n *\n * @event beforeAdd\n * @param {} event An event object\n * @param {} event.object The object(s) to be added (may be a single body, constraint, composite or a mixed array of these)\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired when a call to `Composite.add` is made, after objects have been added.\n *\n * @event afterAdd\n * @param {} event An event object\n * @param {} event.object The object(s) that have been added (may be a single body, constraint, composite or a mixed array of these)\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired when a call to `Composite.remove` is made, before objects have been removed.\n *\n * @event beforeRemove\n * @param {} event An event object\n * @param {} event.object The object(s) to be removed (may be a single body, constraint, composite or a mixed array of these)\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired when a call to `Composite.remove` is made, after objects have been removed.\n *\n * @event afterRemove\n * @param {} event An event object\n * @param {} event.object The object(s) that have been removed (may be a single body, constraint, composite or a mixed array of these)\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /*\n *\n * Properties Documentation\n *\n */\n\n /**\n * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\n *\n * @property id\n * @type number\n */\n\n /**\n * A `String` denoting the type of object.\n *\n * @property type\n * @type string\n * @default \"composite\"\n * @readOnly\n */\n\n /**\n * An arbitrary `String` name to help the user identify and manage composites.\n *\n * @property label\n * @type string\n * @default \"Composite\"\n */\n\n /**\n * A flag that specifies whether the composite has been modified during the current step.\n * This is automatically managed when bodies, constraints or composites are added or removed.\n *\n * @property isModified\n * @type boolean\n * @default false\n */\n\n /**\n * The `Composite` that is the parent of this composite. It is automatically managed by the `Matter.Composite` methods.\n *\n * @property parent\n * @type composite\n * @default null\n */\n\n /**\n * An array of `Body` that are _direct_ children of this composite.\n * To add or remove bodies you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\n * If you wish to recursively find all descendants, you should use the `Composite.allBodies` method.\n *\n * @property bodies\n * @type body[]\n * @default []\n */\n\n /**\n * An array of `Constraint` that are _direct_ children of this composite.\n * To add or remove constraints you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\n * If you wish to recursively find all descendants, you should use the `Composite.allConstraints` method.\n *\n * @property constraints\n * @type constraint[]\n * @default []\n */\n\n /**\n * An array of `Composite` that are _direct_ children of this composite.\n * To add or remove composites you should use `Composite.add` and `Composite.remove` methods rather than directly modifying this property.\n * If you wish to recursively find all descendants, you should use the `Composite.allComposites` method.\n *\n * @property composites\n * @type composite[]\n * @default []\n */\n\n /**\n * An object reserved for storing plugin-specific properties.\n *\n * @property plugin\n * @type {}\n */\n\n /**\n * An object used for storing cached results for performance reasons.\n * This is used internally only and is automatically managed.\n *\n * @private\n * @property cache\n * @type {}\n */\n\n})();\n\n\n/***/ }),\n/* 7 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Sleeping` module contains methods to manage the sleeping state of bodies.\n*\n* @class Sleeping\n*/\n\nvar Sleeping = {};\n\nmodule.exports = Sleeping;\n\nvar Body = __webpack_require__(4);\nvar Events = __webpack_require__(5);\nvar Common = __webpack_require__(0);\n\n(function() {\n\n Sleeping._motionWakeThreshold = 0.18;\n Sleeping._motionSleepThreshold = 0.08;\n Sleeping._minBias = 0.9;\n\n /**\n * Puts bodies to sleep or wakes them up depending on their motion.\n * @method update\n * @param {body[]} bodies\n * @param {number} delta\n */\n Sleeping.update = function(bodies, delta) {\n var timeScale = delta / Common._baseDelta,\n motionSleepThreshold = Sleeping._motionSleepThreshold;\n \n // update bodies sleeping status\n for (var i = 0; i < bodies.length; i++) {\n var body = bodies[i],\n speed = Body.getSpeed(body),\n angularSpeed = Body.getAngularSpeed(body),\n motion = speed * speed + angularSpeed * angularSpeed;\n\n // wake up bodies if they have a force applied\n if (body.force.x !== 0 || body.force.y !== 0) {\n Sleeping.set(body, false);\n continue;\n }\n\n var minMotion = Math.min(body.motion, motion),\n maxMotion = Math.max(body.motion, motion);\n \n // biased average motion estimation between frames\n body.motion = Sleeping._minBias * minMotion + (1 - Sleeping._minBias) * maxMotion;\n\n if (body.sleepThreshold > 0 && body.motion < motionSleepThreshold) {\n body.sleepCounter += 1;\n \n if (body.sleepCounter >= body.sleepThreshold / timeScale) {\n Sleeping.set(body, true);\n }\n } else if (body.sleepCounter > 0) {\n body.sleepCounter -= 1;\n }\n }\n };\n\n /**\n * Given a set of colliding pairs, wakes the sleeping bodies involved.\n * @method afterCollisions\n * @param {pair[]} pairs\n */\n Sleeping.afterCollisions = function(pairs) {\n var motionSleepThreshold = Sleeping._motionSleepThreshold;\n\n // wake up bodies involved in collisions\n for (var i = 0; i < pairs.length; i++) {\n var pair = pairs[i];\n \n // don't wake inactive pairs\n if (!pair.isActive)\n continue;\n\n var collision = pair.collision,\n bodyA = collision.bodyA.parent, \n bodyB = collision.bodyB.parent;\n \n // don't wake if at least one body is static\n if ((bodyA.isSleeping && bodyB.isSleeping) || bodyA.isStatic || bodyB.isStatic)\n continue;\n \n if (bodyA.isSleeping || bodyB.isSleeping) {\n var sleepingBody = (bodyA.isSleeping && !bodyA.isStatic) ? bodyA : bodyB,\n movingBody = sleepingBody === bodyA ? bodyB : bodyA;\n\n if (!sleepingBody.isStatic && movingBody.motion > motionSleepThreshold) {\n Sleeping.set(sleepingBody, false);\n }\n }\n }\n };\n \n /**\n * Set a body as sleeping or awake.\n * @method set\n * @param {body} body\n * @param {boolean} isSleeping\n */\n Sleeping.set = function(body, isSleeping) {\n var wasSleeping = body.isSleeping;\n\n if (isSleeping) {\n body.isSleeping = true;\n body.sleepCounter = body.sleepThreshold;\n\n body.positionImpulse.x = 0;\n body.positionImpulse.y = 0;\n\n body.positionPrev.x = body.position.x;\n body.positionPrev.y = body.position.y;\n\n body.anglePrev = body.angle;\n body.speed = 0;\n body.angularSpeed = 0;\n body.motion = 0;\n\n if (!wasSleeping) {\n Events.trigger(body, 'sleepStart');\n }\n } else {\n body.isSleeping = false;\n body.sleepCounter = 0;\n\n if (wasSleeping) {\n Events.trigger(body, 'sleepEnd');\n }\n }\n };\n\n})();\n\n\n/***/ }),\n/* 8 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Collision` module contains methods for detecting collisions between a given pair of bodies.\n*\n* For efficient detection between a list of bodies, see `Matter.Detector` and `Matter.Query`.\n*\n* See `Matter.Engine` for collision events.\n*\n* @class Collision\n*/\n\nvar Collision = {};\n\nmodule.exports = Collision;\n\nvar Vertices = __webpack_require__(3);\nvar Pair = __webpack_require__(9);\n\n(function() {\n var _supports = [];\n\n var _overlapAB = {\n overlap: 0,\n axis: null\n };\n\n var _overlapBA = {\n overlap: 0,\n axis: null\n };\n\n /**\n * Creates a new collision record.\n * @method create\n * @param {body} bodyA The first body part represented by the collision record\n * @param {body} bodyB The second body part represented by the collision record\n * @return {collision} A new collision record\n */\n Collision.create = function(bodyA, bodyB) {\n return { \n pair: null,\n collided: false,\n bodyA: bodyA,\n bodyB: bodyB,\n parentA: bodyA.parent,\n parentB: bodyB.parent,\n depth: 0,\n normal: { x: 0, y: 0 },\n tangent: { x: 0, y: 0 },\n penetration: { x: 0, y: 0 },\n supports: [null, null],\n supportCount: 0\n };\n };\n\n /**\n * Detect collision between two bodies.\n * @method collides\n * @param {body} bodyA\n * @param {body} bodyB\n * @param {pairs} [pairs] Optionally reuse collision records from existing pairs.\n * @return {collision|null} A collision record if detected, otherwise null\n */\n Collision.collides = function(bodyA, bodyB, pairs) {\n Collision._overlapAxes(_overlapAB, bodyA.vertices, bodyB.vertices, bodyA.axes);\n\n if (_overlapAB.overlap <= 0) {\n return null;\n }\n\n Collision._overlapAxes(_overlapBA, bodyB.vertices, bodyA.vertices, bodyB.axes);\n\n if (_overlapBA.overlap <= 0) {\n return null;\n }\n\n // reuse collision records for gc efficiency\n var pair = pairs && pairs.table[Pair.id(bodyA, bodyB)],\n collision;\n\n if (!pair) {\n collision = Collision.create(bodyA, bodyB);\n collision.collided = true;\n collision.bodyA = bodyA.id < bodyB.id ? bodyA : bodyB;\n collision.bodyB = bodyA.id < bodyB.id ? bodyB : bodyA;\n collision.parentA = collision.bodyA.parent;\n collision.parentB = collision.bodyB.parent;\n } else {\n collision = pair.collision;\n }\n\n bodyA = collision.bodyA;\n bodyB = collision.bodyB;\n\n var minOverlap;\n\n if (_overlapAB.overlap < _overlapBA.overlap) {\n minOverlap = _overlapAB;\n } else {\n minOverlap = _overlapBA;\n }\n\n var normal = collision.normal,\n tangent = collision.tangent,\n penetration = collision.penetration,\n supports = collision.supports,\n depth = minOverlap.overlap,\n minAxis = minOverlap.axis,\n normalX = minAxis.x,\n normalY = minAxis.y,\n deltaX = bodyB.position.x - bodyA.position.x,\n deltaY = bodyB.position.y - bodyA.position.y;\n\n // ensure normal is facing away from bodyA\n if (normalX * deltaX + normalY * deltaY >= 0) {\n normalX = -normalX;\n normalY = -normalY;\n }\n\n normal.x = normalX;\n normal.y = normalY;\n \n tangent.x = -normalY;\n tangent.y = normalX;\n\n penetration.x = normalX * depth;\n penetration.y = normalY * depth;\n\n collision.depth = depth;\n\n // find support points, there is always either exactly one or two\n var supportsB = Collision._findSupports(bodyA, bodyB, normal, 1),\n supportCount = 0;\n\n // find the supports from bodyB that are inside bodyA\n if (Vertices.contains(bodyA.vertices, supportsB[0])) {\n supports[supportCount++] = supportsB[0];\n }\n\n if (Vertices.contains(bodyA.vertices, supportsB[1])) {\n supports[supportCount++] = supportsB[1];\n }\n\n // find the supports from bodyA that are inside bodyB\n if (supportCount < 2) {\n var supportsA = Collision._findSupports(bodyB, bodyA, normal, -1);\n\n if (Vertices.contains(bodyB.vertices, supportsA[0])) {\n supports[supportCount++] = supportsA[0];\n }\n\n if (supportCount < 2 && Vertices.contains(bodyB.vertices, supportsA[1])) {\n supports[supportCount++] = supportsA[1];\n }\n }\n\n // account for the edge case of overlapping but no vertex containment\n if (supportCount === 0) {\n supports[supportCount++] = supportsB[0];\n }\n\n // update support count\n collision.supportCount = supportCount;\n\n return collision;\n };\n\n /**\n * Find the overlap between two sets of vertices.\n * @method _overlapAxes\n * @private\n * @param {object} result\n * @param {vertices} verticesA\n * @param {vertices} verticesB\n * @param {axes} axes\n */\n Collision._overlapAxes = function(result, verticesA, verticesB, axes) {\n var verticesALength = verticesA.length,\n verticesBLength = verticesB.length,\n verticesAX = verticesA[0].x,\n verticesAY = verticesA[0].y,\n verticesBX = verticesB[0].x,\n verticesBY = verticesB[0].y,\n axesLength = axes.length,\n overlapMin = Number.MAX_VALUE,\n overlapAxisNumber = 0,\n overlap,\n overlapAB,\n overlapBA,\n dot,\n i,\n j;\n\n for (i = 0; i < axesLength; i++) {\n var axis = axes[i],\n axisX = axis.x,\n axisY = axis.y,\n minA = verticesAX * axisX + verticesAY * axisY,\n minB = verticesBX * axisX + verticesBY * axisY,\n maxA = minA,\n maxB = minB;\n \n for (j = 1; j < verticesALength; j += 1) {\n dot = verticesA[j].x * axisX + verticesA[j].y * axisY;\n\n if (dot > maxA) { \n maxA = dot;\n } else if (dot < minA) { \n minA = dot;\n }\n }\n\n for (j = 1; j < verticesBLength; j += 1) {\n dot = verticesB[j].x * axisX + verticesB[j].y * axisY;\n\n if (dot > maxB) { \n maxB = dot;\n } else if (dot < minB) { \n minB = dot;\n }\n }\n\n overlapAB = maxA - minB;\n overlapBA = maxB - minA;\n overlap = overlapAB < overlapBA ? overlapAB : overlapBA;\n\n if (overlap < overlapMin) {\n overlapMin = overlap;\n overlapAxisNumber = i;\n\n if (overlap <= 0) {\n // can not be intersecting\n break;\n }\n } \n }\n\n result.axis = axes[overlapAxisNumber];\n result.overlap = overlapMin;\n };\n\n /**\n * Finds supporting vertices given two bodies along a given direction using hill-climbing.\n * @method _findSupports\n * @private\n * @param {body} bodyA\n * @param {body} bodyB\n * @param {vector} normal\n * @param {number} direction\n * @return [vector]\n */\n Collision._findSupports = function(bodyA, bodyB, normal, direction) {\n var vertices = bodyB.vertices,\n verticesLength = vertices.length,\n bodyAPositionX = bodyA.position.x,\n bodyAPositionY = bodyA.position.y,\n normalX = normal.x * direction,\n normalY = normal.y * direction,\n vertexA = vertices[0],\n vertexB = vertexA,\n nearestDistance = normalX * (bodyAPositionX - vertexB.x) + normalY * (bodyAPositionY - vertexB.y),\n vertexC,\n distance,\n j;\n\n // find deepest vertex relative to the axis\n for (j = 1; j < verticesLength; j += 1) {\n vertexB = vertices[j];\n distance = normalX * (bodyAPositionX - vertexB.x) + normalY * (bodyAPositionY - vertexB.y);\n\n // convex hill-climbing\n if (distance < nearestDistance) {\n nearestDistance = distance;\n vertexA = vertexB;\n }\n }\n\n // measure next vertex\n vertexC = vertices[(verticesLength + vertexA.index - 1) % verticesLength];\n nearestDistance = normalX * (bodyAPositionX - vertexC.x) + normalY * (bodyAPositionY - vertexC.y);\n\n // compare with previous vertex\n vertexB = vertices[(vertexA.index + 1) % verticesLength];\n if (normalX * (bodyAPositionX - vertexB.x) + normalY * (bodyAPositionY - vertexB.y) < nearestDistance) {\n _supports[0] = vertexA;\n _supports[1] = vertexB;\n\n return _supports;\n }\n\n _supports[0] = vertexA;\n _supports[1] = vertexC;\n\n return _supports;\n };\n\n /*\n *\n * Properties Documentation\n *\n */\n\n /**\n * A reference to the pair using this collision record, if there is one.\n *\n * @property pair\n * @type {pair|null}\n * @default null\n */\n\n /**\n * A flag that indicates if the bodies were colliding when the collision was last updated.\n * \n * @property collided\n * @type boolean\n * @default false\n */\n\n /**\n * The first body part represented by the collision (see also `collision.parentA`).\n * \n * @property bodyA\n * @type body\n */\n\n /**\n * The second body part represented by the collision (see also `collision.parentB`).\n * \n * @property bodyB\n * @type body\n */\n\n /**\n * The first body represented by the collision (i.e. `collision.bodyA.parent`).\n * \n * @property parentA\n * @type body\n */\n\n /**\n * The second body represented by the collision (i.e. `collision.bodyB.parent`).\n * \n * @property parentB\n * @type body\n */\n\n /**\n * A `Number` that represents the minimum separating distance between the bodies along the collision normal.\n *\n * @readOnly\n * @property depth\n * @type number\n * @default 0\n */\n\n /**\n * A normalised `Vector` that represents the direction between the bodies that provides the minimum separating distance.\n *\n * @property normal\n * @type vector\n * @default { x: 0, y: 0 }\n */\n\n /**\n * A normalised `Vector` that is the tangent direction to the collision normal.\n *\n * @property tangent\n * @type vector\n * @default { x: 0, y: 0 }\n */\n\n /**\n * A `Vector` that represents the direction and depth of the collision.\n *\n * @property penetration\n * @type vector\n * @default { x: 0, y: 0 }\n */\n\n /**\n * An array of body vertices that represent the support points in the collision.\n * \n * _Note:_ Only the first `collision.supportCount` items of `collision.supports` are active.\n * Therefore use `collision.supportCount` instead of `collision.supports.length` when iterating the active supports.\n * \n * These are the deepest vertices (along the collision normal) of each body that are contained by the other body's vertices.\n *\n * @property supports\n * @type vector[]\n * @default []\n */\n\n /**\n * The number of active supports for this collision found in `collision.supports`.\n * \n * _Note:_ Only the first `collision.supportCount` items of `collision.supports` are active.\n * Therefore use `collision.supportCount` instead of `collision.supports.length` when iterating the active supports.\n *\n * @property supportCount\n * @type number\n * @default 0\n */\n\n})();\n\n\n/***/ }),\n/* 9 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Pair` module contains methods for creating and manipulating collision pairs.\n*\n* @class Pair\n*/\n\nvar Pair = {};\n\nmodule.exports = Pair;\n\nvar Contact = __webpack_require__(16);\n\n(function() {\n \n /**\n * Creates a pair.\n * @method create\n * @param {collision} collision\n * @param {number} timestamp\n * @return {pair} A new pair\n */\n Pair.create = function(collision, timestamp) {\n var bodyA = collision.bodyA,\n bodyB = collision.bodyB;\n\n var pair = {\n id: Pair.id(bodyA, bodyB),\n bodyA: bodyA,\n bodyB: bodyB,\n collision: collision,\n contacts: [Contact.create(), Contact.create()],\n contactCount: 0,\n separation: 0,\n isActive: true,\n isSensor: bodyA.isSensor || bodyB.isSensor,\n timeCreated: timestamp,\n timeUpdated: timestamp,\n inverseMass: 0,\n friction: 0,\n frictionStatic: 0,\n restitution: 0,\n slop: 0\n };\n\n Pair.update(pair, collision, timestamp);\n\n return pair;\n };\n\n /**\n * Updates a pair given a collision.\n * @method update\n * @param {pair} pair\n * @param {collision} collision\n * @param {number} timestamp\n */\n Pair.update = function(pair, collision, timestamp) {\n var supports = collision.supports,\n supportCount = collision.supportCount,\n contacts = pair.contacts,\n parentA = collision.parentA,\n parentB = collision.parentB;\n \n pair.isActive = true;\n pair.timeUpdated = timestamp;\n pair.collision = collision;\n pair.separation = collision.depth;\n pair.inverseMass = parentA.inverseMass + parentB.inverseMass;\n pair.friction = parentA.friction < parentB.friction ? parentA.friction : parentB.friction;\n pair.frictionStatic = parentA.frictionStatic > parentB.frictionStatic ? parentA.frictionStatic : parentB.frictionStatic;\n pair.restitution = parentA.restitution > parentB.restitution ? parentA.restitution : parentB.restitution;\n pair.slop = parentA.slop > parentB.slop ? parentA.slop : parentB.slop;\n\n pair.contactCount = supportCount;\n collision.pair = pair;\n\n var supportA = supports[0],\n contactA = contacts[0],\n supportB = supports[1],\n contactB = contacts[1];\n\n // match contacts to supports\n if (contactB.vertex === supportA || contactA.vertex === supportB) {\n contacts[1] = contactA;\n contacts[0] = contactA = contactB;\n contactB = contacts[1];\n }\n\n // update contacts\n contactA.vertex = supportA;\n contactB.vertex = supportB;\n };\n \n /**\n * Set a pair as active or inactive.\n * @method setActive\n * @param {pair} pair\n * @param {bool} isActive\n * @param {number} timestamp\n */\n Pair.setActive = function(pair, isActive, timestamp) {\n if (isActive) {\n pair.isActive = true;\n pair.timeUpdated = timestamp;\n } else {\n pair.isActive = false;\n pair.contactCount = 0;\n }\n };\n\n /**\n * Get the id for the given pair.\n * @method id\n * @param {body} bodyA\n * @param {body} bodyB\n * @return {string} Unique pairId\n */\n Pair.id = function(bodyA, bodyB) {\n return bodyA.id < bodyB.id ? bodyA.id.toString(36) + ':' + bodyB.id.toString(36) \n : bodyB.id.toString(36) + ':' + bodyA.id.toString(36);\n };\n\n})();\n\n\n/***/ }),\n/* 10 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Constraint` module contains methods for creating and manipulating constraints.\n* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).\n* The stiffness of constraints can be modified to create springs or elastic.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Constraint\n*/\n\nvar Constraint = {};\n\nmodule.exports = Constraint;\n\nvar Vertices = __webpack_require__(3);\nvar Vector = __webpack_require__(2);\nvar Sleeping = __webpack_require__(7);\nvar Bounds = __webpack_require__(1);\nvar Axes = __webpack_require__(11);\nvar Common = __webpack_require__(0);\n\n(function() {\n\n Constraint._warming = 0.4;\n Constraint._torqueDampen = 1;\n Constraint._minLength = 0.000001;\n\n /**\n * Creates a new constraint.\n * All properties have default values, and many are pre-calculated automatically based on other properties.\n * To simulate a revolute constraint (or pin joint) set `length: 0` and a high `stiffness` value (e.g. `0.7` or above).\n * If the constraint is unstable, try lowering the `stiffness` value and / or increasing `engine.constraintIterations`.\n * For compound bodies, constraints must be applied to the parent body (not one of its parts).\n * See the properties section below for detailed information on what you can pass via the `options` object.\n * @method create\n * @param {} options\n * @return {constraint} constraint\n */\n Constraint.create = function(options) {\n var constraint = options;\n\n // if bodies defined but no points, use body centre\n if (constraint.bodyA && !constraint.pointA)\n constraint.pointA = { x: 0, y: 0 };\n if (constraint.bodyB && !constraint.pointB)\n constraint.pointB = { x: 0, y: 0 };\n\n // calculate static length using initial world space points\n var initialPointA = constraint.bodyA ? Vector.add(constraint.bodyA.position, constraint.pointA) : constraint.pointA,\n initialPointB = constraint.bodyB ? Vector.add(constraint.bodyB.position, constraint.pointB) : constraint.pointB,\n length = Vector.magnitude(Vector.sub(initialPointA, initialPointB));\n \n constraint.length = typeof constraint.length !== 'undefined' ? constraint.length : length;\n\n // option defaults\n constraint.id = constraint.id || Common.nextId();\n constraint.label = constraint.label || 'Constraint';\n constraint.type = 'constraint';\n constraint.stiffness = constraint.stiffness || (constraint.length > 0 ? 1 : 0.7);\n constraint.damping = constraint.damping || 0;\n constraint.angularStiffness = constraint.angularStiffness || 0;\n constraint.angleA = constraint.bodyA ? constraint.bodyA.angle : constraint.angleA;\n constraint.angleB = constraint.bodyB ? constraint.bodyB.angle : constraint.angleB;\n constraint.plugin = {};\n\n // render\n var render = {\n visible: true,\n lineWidth: 2,\n strokeStyle: '#ffffff',\n type: 'line',\n anchors: true\n };\n\n if (constraint.length === 0 && constraint.stiffness > 0.1) {\n render.type = 'pin';\n render.anchors = false;\n } else if (constraint.stiffness < 0.9) {\n render.type = 'spring';\n }\n\n constraint.render = Common.extend(render, constraint.render);\n\n return constraint;\n };\n\n /**\n * Prepares for solving by constraint warming.\n * @private\n * @method preSolveAll\n * @param {body[]} bodies\n */\n Constraint.preSolveAll = function(bodies) {\n for (var i = 0; i < bodies.length; i += 1) {\n var body = bodies[i],\n impulse = body.constraintImpulse;\n\n if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) {\n continue;\n }\n\n body.position.x += impulse.x;\n body.position.y += impulse.y;\n body.angle += impulse.angle;\n }\n };\n\n /**\n * Solves all constraints in a list of collisions.\n * @private\n * @method solveAll\n * @param {constraint[]} constraints\n * @param {number} delta\n */\n Constraint.solveAll = function(constraints, delta) {\n var timeScale = Common.clamp(delta / Common._baseDelta, 0, 1);\n\n // Solve fixed constraints first.\n for (var i = 0; i < constraints.length; i += 1) {\n var constraint = constraints[i],\n fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic),\n fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic);\n\n if (fixedA || fixedB) {\n Constraint.solve(constraints[i], timeScale);\n }\n }\n\n // Solve free constraints last.\n for (i = 0; i < constraints.length; i += 1) {\n constraint = constraints[i];\n fixedA = !constraint.bodyA || (constraint.bodyA && constraint.bodyA.isStatic);\n fixedB = !constraint.bodyB || (constraint.bodyB && constraint.bodyB.isStatic);\n\n if (!fixedA && !fixedB) {\n Constraint.solve(constraints[i], timeScale);\n }\n }\n };\n\n /**\n * Solves a distance constraint with Gauss-Siedel method.\n * @private\n * @method solve\n * @param {constraint} constraint\n * @param {number} timeScale\n */\n Constraint.solve = function(constraint, timeScale) {\n var bodyA = constraint.bodyA,\n bodyB = constraint.bodyB,\n pointA = constraint.pointA,\n pointB = constraint.pointB;\n\n if (!bodyA && !bodyB)\n return;\n\n // update reference angle\n if (bodyA && !bodyA.isStatic) {\n Vector.rotate(pointA, bodyA.angle - constraint.angleA, pointA);\n constraint.angleA = bodyA.angle;\n }\n \n // update reference angle\n if (bodyB && !bodyB.isStatic) {\n Vector.rotate(pointB, bodyB.angle - constraint.angleB, pointB);\n constraint.angleB = bodyB.angle;\n }\n\n var pointAWorld = pointA,\n pointBWorld = pointB;\n\n if (bodyA) pointAWorld = Vector.add(bodyA.position, pointA);\n if (bodyB) pointBWorld = Vector.add(bodyB.position, pointB);\n\n if (!pointAWorld || !pointBWorld)\n return;\n\n var delta = Vector.sub(pointAWorld, pointBWorld),\n currentLength = Vector.magnitude(delta);\n\n // prevent singularity\n if (currentLength < Constraint._minLength) {\n currentLength = Constraint._minLength;\n }\n\n // solve distance constraint with Gauss-Siedel method\n var difference = (currentLength - constraint.length) / currentLength,\n isRigid = constraint.stiffness >= 1 || constraint.length === 0,\n stiffness = isRigid ? constraint.stiffness * timeScale \n : constraint.stiffness * timeScale * timeScale,\n damping = constraint.damping * timeScale,\n force = Vector.mult(delta, difference * stiffness),\n massTotal = (bodyA ? bodyA.inverseMass : 0) + (bodyB ? bodyB.inverseMass : 0),\n inertiaTotal = (bodyA ? bodyA.inverseInertia : 0) + (bodyB ? bodyB.inverseInertia : 0),\n resistanceTotal = massTotal + inertiaTotal,\n torque,\n share,\n normal,\n normalVelocity,\n relativeVelocity;\n \n if (damping > 0) {\n var zero = Vector.create();\n normal = Vector.div(delta, currentLength);\n\n relativeVelocity = Vector.sub(\n bodyB && Vector.sub(bodyB.position, bodyB.positionPrev) || zero,\n bodyA && Vector.sub(bodyA.position, bodyA.positionPrev) || zero\n );\n\n normalVelocity = Vector.dot(normal, relativeVelocity);\n }\n\n if (bodyA && !bodyA.isStatic) {\n share = bodyA.inverseMass / massTotal;\n\n // keep track of applied impulses for post solving\n bodyA.constraintImpulse.x -= force.x * share;\n bodyA.constraintImpulse.y -= force.y * share;\n\n // apply forces\n bodyA.position.x -= force.x * share;\n bodyA.position.y -= force.y * share;\n\n // apply damping\n if (damping > 0) {\n bodyA.positionPrev.x -= damping * normal.x * normalVelocity * share;\n bodyA.positionPrev.y -= damping * normal.y * normalVelocity * share;\n }\n\n // apply torque\n torque = (Vector.cross(pointA, force) / resistanceTotal) * Constraint._torqueDampen * bodyA.inverseInertia * (1 - constraint.angularStiffness);\n bodyA.constraintImpulse.angle -= torque;\n bodyA.angle -= torque;\n }\n\n if (bodyB && !bodyB.isStatic) {\n share = bodyB.inverseMass / massTotal;\n\n // keep track of applied impulses for post solving\n bodyB.constraintImpulse.x += force.x * share;\n bodyB.constraintImpulse.y += force.y * share;\n \n // apply forces\n bodyB.position.x += force.x * share;\n bodyB.position.y += force.y * share;\n\n // apply damping\n if (damping > 0) {\n bodyB.positionPrev.x += damping * normal.x * normalVelocity * share;\n bodyB.positionPrev.y += damping * normal.y * normalVelocity * share;\n }\n\n // apply torque\n torque = (Vector.cross(pointB, force) / resistanceTotal) * Constraint._torqueDampen * bodyB.inverseInertia * (1 - constraint.angularStiffness);\n bodyB.constraintImpulse.angle += torque;\n bodyB.angle += torque;\n }\n\n };\n\n /**\n * Performs body updates required after solving constraints.\n * @private\n * @method postSolveAll\n * @param {body[]} bodies\n */\n Constraint.postSolveAll = function(bodies) {\n for (var i = 0; i < bodies.length; i++) {\n var body = bodies[i],\n impulse = body.constraintImpulse;\n\n if (body.isStatic || (impulse.x === 0 && impulse.y === 0 && impulse.angle === 0)) {\n continue;\n }\n\n Sleeping.set(body, false);\n\n // update geometry and reset\n for (var j = 0; j < body.parts.length; j++) {\n var part = body.parts[j];\n \n Vertices.translate(part.vertices, impulse);\n\n if (j > 0) {\n part.position.x += impulse.x;\n part.position.y += impulse.y;\n }\n\n if (impulse.angle !== 0) {\n Vertices.rotate(part.vertices, impulse.angle, body.position);\n Axes.rotate(part.axes, impulse.angle);\n if (j > 0) {\n Vector.rotateAbout(part.position, impulse.angle, body.position, part.position);\n }\n }\n\n Bounds.update(part.bounds, part.vertices, body.velocity);\n }\n\n // dampen the cached impulse for warming next step\n impulse.angle *= Constraint._warming;\n impulse.x *= Constraint._warming;\n impulse.y *= Constraint._warming;\n }\n };\n\n /**\n * Returns the world-space position of `constraint.pointA`, accounting for `constraint.bodyA`.\n * @method pointAWorld\n * @param {constraint} constraint\n * @returns {vector} the world-space position\n */\n Constraint.pointAWorld = function(constraint) {\n return {\n x: (constraint.bodyA ? constraint.bodyA.position.x : 0) \n + (constraint.pointA ? constraint.pointA.x : 0),\n y: (constraint.bodyA ? constraint.bodyA.position.y : 0) \n + (constraint.pointA ? constraint.pointA.y : 0)\n };\n };\n\n /**\n * Returns the world-space position of `constraint.pointB`, accounting for `constraint.bodyB`.\n * @method pointBWorld\n * @param {constraint} constraint\n * @returns {vector} the world-space position\n */\n Constraint.pointBWorld = function(constraint) {\n return {\n x: (constraint.bodyB ? constraint.bodyB.position.x : 0) \n + (constraint.pointB ? constraint.pointB.x : 0),\n y: (constraint.bodyB ? constraint.bodyB.position.y : 0) \n + (constraint.pointB ? constraint.pointB.y : 0)\n };\n };\n\n /**\n * Returns the current length of the constraint. \n * This is the distance between both of the constraint's end points.\n * See `constraint.length` for the target rest length.\n * @method currentLength\n * @param {constraint} constraint\n * @returns {number} the current length\n */\n Constraint.currentLength = function(constraint) {\n var pointAX = (constraint.bodyA ? constraint.bodyA.position.x : 0) \n + (constraint.pointA ? constraint.pointA.x : 0);\n\n var pointAY = (constraint.bodyA ? constraint.bodyA.position.y : 0) \n + (constraint.pointA ? constraint.pointA.y : 0);\n\n var pointBX = (constraint.bodyB ? constraint.bodyB.position.x : 0) \n + (constraint.pointB ? constraint.pointB.x : 0);\n \n var pointBY = (constraint.bodyB ? constraint.bodyB.position.y : 0) \n + (constraint.pointB ? constraint.pointB.y : 0);\n\n var deltaX = pointAX - pointBX;\n var deltaY = pointAY - pointBY;\n\n return Math.sqrt(deltaX * deltaX + deltaY * deltaY);\n };\n\n /*\n *\n * Properties Documentation\n *\n */\n\n /**\n * An integer `Number` uniquely identifying number generated in `Composite.create` by `Common.nextId`.\n *\n * @property id\n * @type number\n */\n\n /**\n * A `String` denoting the type of object.\n *\n * @property type\n * @type string\n * @default \"constraint\"\n * @readOnly\n */\n\n /**\n * An arbitrary `String` name to help the user identify and manage bodies.\n *\n * @property label\n * @type string\n * @default \"Constraint\"\n */\n\n /**\n * An `Object` that defines the rendering properties to be consumed by the module `Matter.Render`.\n *\n * @property render\n * @type object\n */\n\n /**\n * A flag that indicates if the constraint should be rendered.\n *\n * @property render.visible\n * @type boolean\n * @default true\n */\n\n /**\n * A `Number` that defines the line width to use when rendering the constraint outline.\n * A value of `0` means no outline will be rendered.\n *\n * @property render.lineWidth\n * @type number\n * @default 2\n */\n\n /**\n * A `String` that defines the stroke style to use when rendering the constraint outline.\n * It is the same as when using a canvas, so it accepts CSS style property values.\n *\n * @property render.strokeStyle\n * @type string\n * @default a random colour\n */\n\n /**\n * A `String` that defines the constraint rendering type. \n * The possible values are 'line', 'pin', 'spring'.\n * An appropriate render type will be automatically chosen unless one is given in options.\n *\n * @property render.type\n * @type string\n * @default 'line'\n */\n\n /**\n * A `Boolean` that defines if the constraint's anchor points should be rendered.\n *\n * @property render.anchors\n * @type boolean\n * @default true\n */\n\n /**\n * The first possible `Body` that this constraint is attached to.\n *\n * @property bodyA\n * @type body\n * @default null\n */\n\n /**\n * The second possible `Body` that this constraint is attached to.\n *\n * @property bodyB\n * @type body\n * @default null\n */\n\n /**\n * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyA` if defined, otherwise a world-space position.\n *\n * @property pointA\n * @type vector\n * @default { x: 0, y: 0 }\n */\n\n /**\n * A `Vector` that specifies the offset of the constraint from center of the `constraint.bodyB` if defined, otherwise a world-space position.\n *\n * @property pointB\n * @type vector\n * @default { x: 0, y: 0 }\n */\n\n /**\n * A `Number` that specifies the stiffness of the constraint, i.e. the rate at which it returns to its resting `constraint.length`.\n * A value of `1` means the constraint should be very stiff.\n * A value of `0.2` means the constraint acts like a soft spring.\n *\n * @property stiffness\n * @type number\n * @default 1\n */\n\n /**\n * A `Number` that specifies the damping of the constraint, \n * i.e. the amount of resistance applied to each body based on their velocities to limit the amount of oscillation.\n * Damping will only be apparent when the constraint also has a very low `stiffness`.\n * A value of `0.1` means the constraint will apply heavy damping, resulting in little to no oscillation.\n * A value of `0` means the constraint will apply no damping.\n *\n * @property damping\n * @type number\n * @default 0\n */\n\n /**\n * A `Number` that specifies the target resting length of the constraint. \n * It is calculated automatically in `Constraint.create` from initial positions of the `constraint.bodyA` and `constraint.bodyB`.\n *\n * @property length\n * @type number\n */\n\n /**\n * An object reserved for storing plugin-specific properties.\n *\n * @property plugin\n * @type {}\n */\n\n})();\n\n\n/***/ }),\n/* 11 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Axes` module contains methods for creating and manipulating sets of axes.\n*\n* @class Axes\n*/\n\nvar Axes = {};\n\nmodule.exports = Axes;\n\nvar Vector = __webpack_require__(2);\nvar Common = __webpack_require__(0);\n\n(function() {\n\n /**\n * Creates a new set of axes from the given vertices.\n * @method fromVertices\n * @param {vertices} vertices\n * @return {axes} A new axes from the given vertices\n */\n Axes.fromVertices = function(vertices) {\n var axes = {};\n\n // find the unique axes, using edge normal gradients\n for (var i = 0; i < vertices.length; i++) {\n var j = (i + 1) % vertices.length, \n normal = Vector.normalise({ \n x: vertices[j].y - vertices[i].y, \n y: vertices[i].x - vertices[j].x\n }),\n gradient = (normal.y === 0) ? Infinity : (normal.x / normal.y);\n \n // limit precision\n gradient = gradient.toFixed(3).toString();\n axes[gradient] = normal;\n }\n\n return Common.values(axes);\n };\n\n /**\n * Rotates a set of axes by the given angle.\n * @method rotate\n * @param {axes} axes\n * @param {number} angle\n */\n Axes.rotate = function(axes, angle) {\n if (angle === 0)\n return;\n \n var cos = Math.cos(angle),\n sin = Math.sin(angle);\n\n for (var i = 0; i < axes.length; i++) {\n var axis = axes[i],\n xx;\n xx = axis.x * cos - axis.y * sin;\n axis.y = axis.x * sin + axis.y * cos;\n axis.x = xx;\n }\n };\n\n})();\n\n\n/***/ }),\n/* 12 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Bodies` module contains factory methods for creating rigid body models \n* with commonly used body configurations (such as rectangles, circles and other polygons).\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Bodies\n*/\n\n// TODO: true circle bodies\n\nvar Bodies = {};\n\nmodule.exports = Bodies;\n\nvar Vertices = __webpack_require__(3);\nvar Common = __webpack_require__(0);\nvar Body = __webpack_require__(4);\nvar Bounds = __webpack_require__(1);\nvar Vector = __webpack_require__(2);\n\n(function() {\n\n /**\n * Creates a new rigid body model with a rectangle hull. \n * The options parameter is an object that specifies any properties you wish to override the defaults.\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n * @method rectangle\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {object} [options]\n * @return {body} A new rectangle body\n */\n Bodies.rectangle = function(x, y, width, height, options) {\n options = options || {};\n\n var rectangle = { \n label: 'Rectangle Body',\n position: { x: x, y: y },\n vertices: Vertices.fromPath('L 0 0 L ' + width + ' 0 L ' + width + ' ' + height + ' L 0 ' + height)\n };\n\n if (options.chamfer) {\n var chamfer = options.chamfer;\n rectangle.vertices = Vertices.chamfer(rectangle.vertices, chamfer.radius, \n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\n delete options.chamfer;\n }\n\n return Body.create(Common.extend({}, rectangle, options));\n };\n \n /**\n * Creates a new rigid body model with a trapezoid hull. \n * The `slope` is parameterised as a fraction of `width` and must be < 1 to form a valid trapezoid. \n * The options parameter is an object that specifies any properties you wish to override the defaults.\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n * @method trapezoid\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {number} slope Must be a number < 1.\n * @param {object} [options]\n * @return {body} A new trapezoid body\n */\n Bodies.trapezoid = function(x, y, width, height, slope, options) {\n options = options || {};\n\n if (slope >= 1) {\n Common.warn('Bodies.trapezoid: slope parameter must be < 1.');\n }\n\n slope *= 0.5;\n var roof = (1 - (slope * 2)) * width;\n \n var x1 = width * slope,\n x2 = x1 + roof,\n x3 = x2 + x1,\n verticesPath;\n\n if (slope < 0.5) {\n verticesPath = 'L 0 0 L ' + x1 + ' ' + (-height) + ' L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\n } else {\n verticesPath = 'L 0 0 L ' + x2 + ' ' + (-height) + ' L ' + x3 + ' 0';\n }\n\n var trapezoid = { \n label: 'Trapezoid Body',\n position: { x: x, y: y },\n vertices: Vertices.fromPath(verticesPath)\n };\n\n if (options.chamfer) {\n var chamfer = options.chamfer;\n trapezoid.vertices = Vertices.chamfer(trapezoid.vertices, chamfer.radius, \n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\n delete options.chamfer;\n }\n\n return Body.create(Common.extend({}, trapezoid, options));\n };\n\n /**\n * Creates a new rigid body model with a circle hull. \n * The options parameter is an object that specifies any properties you wish to override the defaults.\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n * @method circle\n * @param {number} x\n * @param {number} y\n * @param {number} radius\n * @param {object} [options]\n * @param {number} [maxSides]\n * @return {body} A new circle body\n */\n Bodies.circle = function(x, y, radius, options, maxSides) {\n options = options || {};\n\n var circle = {\n label: 'Circle Body',\n circleRadius: radius\n };\n \n // approximate circles with polygons until true circles implemented in SAT\n maxSides = maxSides || 25;\n var sides = Math.ceil(Math.max(10, Math.min(maxSides, radius)));\n\n // optimisation: always use even number of sides (half the number of unique axes)\n if (sides % 2 === 1)\n sides += 1;\n\n return Bodies.polygon(x, y, sides, radius, Common.extend({}, circle, options));\n };\n\n /**\n * Creates a new rigid body model with a regular polygon hull with the given number of sides. \n * The options parameter is an object that specifies any properties you wish to override the defaults.\n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n * @method polygon\n * @param {number} x\n * @param {number} y\n * @param {number} sides\n * @param {number} radius\n * @param {object} [options]\n * @return {body} A new regular polygon body\n */\n Bodies.polygon = function(x, y, sides, radius, options) {\n options = options || {};\n\n if (sides < 3)\n return Bodies.circle(x, y, radius, options);\n\n var theta = 2 * Math.PI / sides,\n path = '',\n offset = theta * 0.5;\n\n for (var i = 0; i < sides; i += 1) {\n var angle = offset + (i * theta),\n xx = Math.cos(angle) * radius,\n yy = Math.sin(angle) * radius;\n\n path += 'L ' + xx.toFixed(3) + ' ' + yy.toFixed(3) + ' ';\n }\n\n var polygon = { \n label: 'Polygon Body',\n position: { x: x, y: y },\n vertices: Vertices.fromPath(path)\n };\n\n if (options.chamfer) {\n var chamfer = options.chamfer;\n polygon.vertices = Vertices.chamfer(polygon.vertices, chamfer.radius, \n chamfer.quality, chamfer.qualityMin, chamfer.qualityMax);\n delete options.chamfer;\n }\n\n return Body.create(Common.extend({}, polygon, options));\n };\n\n /**\n * Utility to create a compound body based on set(s) of vertices.\n * \n * _Note:_ To optionally enable automatic concave vertices decomposition the [poly-decomp](https://github.com/schteppe/poly-decomp.js) \n * package must be first installed and provided see `Common.setDecomp`, otherwise the convex hull of each vertex set will be used.\n * \n * The resulting vertices are reorientated about their centre of mass,\n * and offset such that `body.position` corresponds to this point.\n * \n * The resulting offset may be found if needed by subtracting `body.bounds` from the original input bounds.\n * To later move the centre of mass see `Body.setCentre`.\n * \n * Note that automatic conconcave decomposition results are not always optimal. \n * For best results, simplify the input vertices as much as possible first.\n * By default this function applies some addtional simplification to help.\n * \n * Some outputs may also require further manual processing afterwards to be robust.\n * In particular some parts may need to be overlapped to avoid collision gaps.\n * Thin parts and sharp points should be avoided or removed where possible.\n *\n * The options parameter object specifies any `Matter.Body` properties you wish to override the defaults.\n * \n * See the properties section of the `Matter.Body` module for detailed information on what you can pass via the `options` object.\n * @method fromVertices\n * @param {number} x\n * @param {number} y\n * @param {array} vertexSets One or more arrays of vertex points e.g. `[[{ x: 0, y: 0 }...], ...]`.\n * @param {object} [options] The body options.\n * @param {bool} [flagInternal=false] Optionally marks internal edges with `isInternal`.\n * @param {number} [removeCollinear=0.01] Threshold when simplifying vertices along the same edge.\n * @param {number} [minimumArea=10] Threshold when removing small parts.\n * @param {number} [removeDuplicatePoints=0.01] Threshold when simplifying nearby vertices.\n * @return {body}\n */\n Bodies.fromVertices = function(x, y, vertexSets, options, flagInternal, removeCollinear, minimumArea, removeDuplicatePoints) {\n var decomp = Common.getDecomp(),\n canDecomp,\n body,\n parts,\n isConvex,\n isConcave,\n vertices,\n i,\n j,\n k,\n v,\n z;\n\n // check decomp is as expected\n canDecomp = Boolean(decomp && decomp.quickDecomp);\n\n options = options || {};\n parts = [];\n\n flagInternal = typeof flagInternal !== 'undefined' ? flagInternal : false;\n removeCollinear = typeof removeCollinear !== 'undefined' ? removeCollinear : 0.01;\n minimumArea = typeof minimumArea !== 'undefined' ? minimumArea : 10;\n removeDuplicatePoints = typeof removeDuplicatePoints !== 'undefined' ? removeDuplicatePoints : 0.01;\n\n // ensure vertexSets is an array of arrays\n if (!Common.isArray(vertexSets[0])) {\n vertexSets = [vertexSets];\n }\n\n for (v = 0; v < vertexSets.length; v += 1) {\n vertices = vertexSets[v];\n isConvex = Vertices.isConvex(vertices);\n isConcave = !isConvex;\n\n if (isConcave && !canDecomp) {\n Common.warnOnce(\n 'Bodies.fromVertices: Install the \\'poly-decomp\\' library and use Common.setDecomp or provide \\'decomp\\' as a global to decompose concave vertices.'\n );\n }\n\n if (isConvex || !canDecomp) {\n if (isConvex) {\n vertices = Vertices.clockwiseSort(vertices);\n } else {\n // fallback to convex hull when decomposition is not possible\n vertices = Vertices.hull(vertices);\n }\n\n parts.push({\n position: { x: x, y: y },\n vertices: vertices\n });\n } else {\n // initialise a decomposition\n var concave = vertices.map(function(vertex) {\n return [vertex.x, vertex.y];\n });\n\n // vertices are concave and simple, we can decompose into parts\n decomp.makeCCW(concave);\n if (removeCollinear !== false)\n decomp.removeCollinearPoints(concave, removeCollinear);\n if (removeDuplicatePoints !== false && decomp.removeDuplicatePoints)\n decomp.removeDuplicatePoints(concave, removeDuplicatePoints);\n\n // use the quick decomposition algorithm (Bayazit)\n var decomposed = decomp.quickDecomp(concave);\n\n // for each decomposed chunk\n for (i = 0; i < decomposed.length; i++) {\n var chunk = decomposed[i];\n\n // convert vertices into the correct structure\n var chunkVertices = chunk.map(function(vertices) {\n return {\n x: vertices[0],\n y: vertices[1]\n };\n });\n\n // skip small chunks\n if (minimumArea > 0 && Vertices.area(chunkVertices) < minimumArea)\n continue;\n\n // create a compound part\n parts.push({\n position: Vertices.centre(chunkVertices),\n vertices: chunkVertices\n });\n }\n }\n }\n\n // create body parts\n for (i = 0; i < parts.length; i++) {\n parts[i] = Body.create(Common.extend(parts[i], options));\n }\n\n // flag internal edges (coincident part edges)\n if (flagInternal) {\n var coincident_max_dist = 5;\n\n for (i = 0; i < parts.length; i++) {\n var partA = parts[i];\n\n for (j = i + 1; j < parts.length; j++) {\n var partB = parts[j];\n\n if (Bounds.overlaps(partA.bounds, partB.bounds)) {\n var pav = partA.vertices,\n pbv = partB.vertices;\n\n // iterate vertices of both parts\n for (k = 0; k < partA.vertices.length; k++) {\n for (z = 0; z < partB.vertices.length; z++) {\n // find distances between the vertices\n var da = Vector.magnitudeSquared(Vector.sub(pav[(k + 1) % pav.length], pbv[z])),\n db = Vector.magnitudeSquared(Vector.sub(pav[k], pbv[(z + 1) % pbv.length]));\n\n // if both vertices are very close, consider the edge concident (internal)\n if (da < coincident_max_dist && db < coincident_max_dist) {\n pav[k].isInternal = true;\n pbv[z].isInternal = true;\n }\n }\n }\n\n }\n }\n }\n }\n\n if (parts.length > 1) {\n // create the parent body to be returned, that contains generated compound parts\n body = Body.create(Common.extend({ parts: parts.slice(0) }, options));\n\n // offset such that body.position is at the centre off mass\n Body.setPosition(body, { x: x, y: y });\n\n return body;\n } else {\n return parts[0];\n }\n };\n\n})();\n\n\n/***/ }),\n/* 13 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Detector` module contains methods for efficiently detecting collisions between a list of bodies using a broadphase algorithm.\n*\n* @class Detector\n*/\n\nvar Detector = {};\n\nmodule.exports = Detector;\n\nvar Common = __webpack_require__(0);\nvar Collision = __webpack_require__(8);\n\n(function() {\n\n /**\n * Creates a new collision detector.\n * @method create\n * @param {} options\n * @return {detector} A new collision detector\n */\n Detector.create = function(options) {\n var defaults = {\n bodies: [],\n collisions: [],\n pairs: null\n };\n\n return Common.extend(defaults, options);\n };\n\n /**\n * Sets the list of bodies in the detector.\n * @method setBodies\n * @param {detector} detector\n * @param {body[]} bodies\n */\n Detector.setBodies = function(detector, bodies) {\n detector.bodies = bodies.slice(0);\n };\n\n /**\n * Clears the detector including its list of bodies.\n * @method clear\n * @param {detector} detector\n */\n Detector.clear = function(detector) {\n detector.bodies = [];\n detector.collisions = [];\n };\n\n /**\n * Efficiently finds all collisions among all the bodies in `detector.bodies` using a broadphase algorithm.\n * \n * _Note:_ The specific ordering of collisions returned is not guaranteed between releases and may change for performance reasons.\n * If a specific ordering is required then apply a sort to the resulting array.\n * @method collisions\n * @param {detector} detector\n * @return {collision[]} collisions\n */\n Detector.collisions = function(detector) {\n var pairs = detector.pairs,\n bodies = detector.bodies,\n bodiesLength = bodies.length,\n canCollide = Detector.canCollide,\n collides = Collision.collides,\n collisions = detector.collisions,\n collisionIndex = 0,\n i,\n j;\n\n bodies.sort(Detector._compareBoundsX);\n\n for (i = 0; i < bodiesLength; i++) {\n var bodyA = bodies[i],\n boundsA = bodyA.bounds,\n boundXMax = bodyA.bounds.max.x,\n boundYMax = bodyA.bounds.max.y,\n boundYMin = bodyA.bounds.min.y,\n bodyAStatic = bodyA.isStatic || bodyA.isSleeping,\n partsALength = bodyA.parts.length,\n partsASingle = partsALength === 1;\n\n for (j = i + 1; j < bodiesLength; j++) {\n var bodyB = bodies[j],\n boundsB = bodyB.bounds;\n\n if (boundsB.min.x > boundXMax) {\n break;\n }\n\n if (boundYMax < boundsB.min.y || boundYMin > boundsB.max.y) {\n continue;\n }\n\n if (bodyAStatic && (bodyB.isStatic || bodyB.isSleeping)) {\n continue;\n }\n\n if (!canCollide(bodyA.collisionFilter, bodyB.collisionFilter)) {\n continue;\n }\n\n var partsBLength = bodyB.parts.length;\n\n if (partsASingle && partsBLength === 1) {\n var collision = collides(bodyA, bodyB, pairs);\n\n if (collision) {\n collisions[collisionIndex++] = collision;\n }\n } else {\n var partsAStart = partsALength > 1 ? 1 : 0,\n partsBStart = partsBLength > 1 ? 1 : 0;\n \n for (var k = partsAStart; k < partsALength; k++) {\n var partA = bodyA.parts[k],\n boundsA = partA.bounds;\n\n for (var z = partsBStart; z < partsBLength; z++) {\n var partB = bodyB.parts[z],\n boundsB = partB.bounds;\n\n if (boundsA.min.x > boundsB.max.x || boundsA.max.x < boundsB.min.x\n || boundsA.max.y < boundsB.min.y || boundsA.min.y > boundsB.max.y) {\n continue;\n }\n\n var collision = collides(partA, partB, pairs);\n\n if (collision) {\n collisions[collisionIndex++] = collision;\n }\n }\n }\n }\n }\n }\n\n if (collisions.length !== collisionIndex) {\n collisions.length = collisionIndex;\n }\n\n return collisions;\n };\n\n /**\n * Returns `true` if both supplied collision filters will allow a collision to occur.\n * See `body.collisionFilter` for more information.\n * @method canCollide\n * @param {} filterA\n * @param {} filterB\n * @return {bool} `true` if collision can occur\n */\n Detector.canCollide = function(filterA, filterB) {\n if (filterA.group === filterB.group && filterA.group !== 0)\n return filterA.group > 0;\n\n return (filterA.mask & filterB.category) !== 0 && (filterB.mask & filterA.category) !== 0;\n };\n\n /**\n * The comparison function used in the broadphase algorithm.\n * Returns the signed delta of the bodies bounds on the x-axis.\n * @private\n * @method _sortCompare\n * @param {body} bodyA\n * @param {body} bodyB\n * @return {number} The signed delta used for sorting\n */\n Detector._compareBoundsX = function(bodyA, bodyB) {\n return bodyA.bounds.min.x - bodyB.bounds.min.x;\n };\n\n /*\n *\n * Properties Documentation\n *\n */\n\n /**\n * The array of `Matter.Body` between which the detector finds collisions.\n * \n * _Note:_ The order of bodies in this array _is not fixed_ and will be continually managed by the detector.\n * @property bodies\n * @type body[]\n * @default []\n */\n\n /**\n * The array of `Matter.Collision` found in the last call to `Detector.collisions` on this detector.\n * @property collisions\n * @type collision[]\n * @default []\n */\n\n /**\n * Optional. A `Matter.Pairs` object from which previous collision objects may be reused. Intended for internal `Matter.Engine` usage.\n * @property pairs\n * @type {pairs|null}\n * @default null\n */\n\n})();\n\n\n/***/ }),\n/* 14 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Mouse` module contains methods for creating and manipulating mouse inputs.\n*\n* @class Mouse\n*/\n\nvar Mouse = {};\n\nmodule.exports = Mouse;\n\nvar Common = __webpack_require__(0);\n\n(function() {\n\n /**\n * Creates a mouse input.\n * @method create\n * @param {HTMLElement} element\n * @return {mouse} A new mouse\n */\n Mouse.create = function(element) {\n var mouse = {};\n\n if (!element) {\n Common.log('Mouse.create: element was undefined, defaulting to document.body', 'warn');\n }\n \n mouse.element = element || document.body;\n mouse.absolute = { x: 0, y: 0 };\n mouse.position = { x: 0, y: 0 };\n mouse.mousedownPosition = { x: 0, y: 0 };\n mouse.mouseupPosition = { x: 0, y: 0 };\n mouse.offset = { x: 0, y: 0 };\n mouse.scale = { x: 1, y: 1 };\n mouse.wheelDelta = 0;\n mouse.button = -1;\n mouse.pixelRatio = parseInt(mouse.element.getAttribute('data-pixel-ratio'), 10) || 1;\n\n mouse.sourceEvents = {\n mousemove: null,\n mousedown: null,\n mouseup: null,\n mousewheel: null\n };\n \n mouse.mousemove = function(event) { \n var position = Mouse._getRelativeMousePosition(event, mouse.element, mouse.pixelRatio),\n touches = event.changedTouches;\n\n if (touches) {\n mouse.button = 0;\n event.preventDefault();\n }\n\n mouse.absolute.x = position.x;\n mouse.absolute.y = position.y;\n mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n mouse.sourceEvents.mousemove = event;\n };\n \n mouse.mousedown = function(event) {\n var position = Mouse._getRelativeMousePosition(event, mouse.element, mouse.pixelRatio),\n touches = event.changedTouches;\n\n if (touches) {\n mouse.button = 0;\n event.preventDefault();\n } else {\n mouse.button = event.button;\n }\n\n mouse.absolute.x = position.x;\n mouse.absolute.y = position.y;\n mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n mouse.mousedownPosition.x = mouse.position.x;\n mouse.mousedownPosition.y = mouse.position.y;\n mouse.sourceEvents.mousedown = event;\n };\n \n mouse.mouseup = function(event) {\n var position = Mouse._getRelativeMousePosition(event, mouse.element, mouse.pixelRatio),\n touches = event.changedTouches;\n\n if (touches) {\n event.preventDefault();\n }\n \n mouse.button = -1;\n mouse.absolute.x = position.x;\n mouse.absolute.y = position.y;\n mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n mouse.mouseupPosition.x = mouse.position.x;\n mouse.mouseupPosition.y = mouse.position.y;\n mouse.sourceEvents.mouseup = event;\n };\n\n mouse.mousewheel = function(event) {\n mouse.wheelDelta = Math.max(-1, Math.min(1, event.wheelDelta || -event.detail));\n event.preventDefault();\n mouse.sourceEvents.mousewheel = event;\n };\n\n Mouse.setElement(mouse, mouse.element);\n\n return mouse;\n };\n\n /**\n * Sets the element the mouse is bound to (and relative to).\n * @method setElement\n * @param {mouse} mouse\n * @param {HTMLElement} element\n */\n Mouse.setElement = function(mouse, element) {\n mouse.element = element;\n\n element.addEventListener('mousemove', mouse.mousemove, { passive: true });\n element.addEventListener('mousedown', mouse.mousedown, { passive: true });\n element.addEventListener('mouseup', mouse.mouseup, { passive: true });\n \n element.addEventListener('wheel', mouse.mousewheel, { passive: false });\n \n element.addEventListener('touchmove', mouse.mousemove, { passive: false });\n element.addEventListener('touchstart', mouse.mousedown, { passive: false });\n element.addEventListener('touchend', mouse.mouseup, { passive: false });\n };\n\n /**\n * Clears all captured source events.\n * @method clearSourceEvents\n * @param {mouse} mouse\n */\n Mouse.clearSourceEvents = function(mouse) {\n mouse.sourceEvents.mousemove = null;\n mouse.sourceEvents.mousedown = null;\n mouse.sourceEvents.mouseup = null;\n mouse.sourceEvents.mousewheel = null;\n mouse.wheelDelta = 0;\n };\n\n /**\n * Sets the mouse position offset.\n * @method setOffset\n * @param {mouse} mouse\n * @param {vector} offset\n */\n Mouse.setOffset = function(mouse, offset) {\n mouse.offset.x = offset.x;\n mouse.offset.y = offset.y;\n mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n };\n\n /**\n * Sets the mouse position scale.\n * @method setScale\n * @param {mouse} mouse\n * @param {vector} scale\n */\n Mouse.setScale = function(mouse, scale) {\n mouse.scale.x = scale.x;\n mouse.scale.y = scale.y;\n mouse.position.x = mouse.absolute.x * mouse.scale.x + mouse.offset.x;\n mouse.position.y = mouse.absolute.y * mouse.scale.y + mouse.offset.y;\n };\n \n /**\n * Gets the mouse position relative to an element given a screen pixel ratio.\n * @method _getRelativeMousePosition\n * @private\n * @param {} event\n * @param {} element\n * @param {number} pixelRatio\n * @return {}\n */\n Mouse._getRelativeMousePosition = function(event, element, pixelRatio) {\n var elementBounds = element.getBoundingClientRect(),\n rootNode = (document.documentElement || document.body.parentNode || document.body),\n scrollX = (window.pageXOffset !== undefined) ? window.pageXOffset : rootNode.scrollLeft,\n scrollY = (window.pageYOffset !== undefined) ? window.pageYOffset : rootNode.scrollTop,\n touches = event.changedTouches,\n x, y;\n \n if (touches) {\n x = touches[0].pageX - elementBounds.left - scrollX;\n y = touches[0].pageY - elementBounds.top - scrollY;\n } else {\n x = event.pageX - elementBounds.left - scrollX;\n y = event.pageY - elementBounds.top - scrollY;\n }\n\n return { \n x: x / (element.clientWidth / (element.width || element.clientWidth) * pixelRatio),\n y: y / (element.clientHeight / (element.height || element.clientHeight) * pixelRatio)\n };\n };\n\n})();\n\n\n/***/ }),\n/* 15 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Plugin` module contains functions for registering and installing plugins on modules.\n*\n* @class Plugin\n*/\n\nvar Plugin = {};\n\nmodule.exports = Plugin;\n\nvar Common = __webpack_require__(0);\n\n(function() {\n\n Plugin._registry = {};\n\n /**\n * Registers a plugin object so it can be resolved later by name.\n * @method register\n * @param plugin {} The plugin to register.\n * @return {object} The plugin.\n */\n Plugin.register = function(plugin) {\n if (!Plugin.isPlugin(plugin)) {\n Common.warn('Plugin.register:', Plugin.toString(plugin), 'does not implement all required fields.');\n }\n\n if (plugin.name in Plugin._registry) {\n var registered = Plugin._registry[plugin.name],\n pluginVersion = Plugin.versionParse(plugin.version).number,\n registeredVersion = Plugin.versionParse(registered.version).number;\n\n if (pluginVersion > registeredVersion) {\n Common.warn('Plugin.register:', Plugin.toString(registered), 'was upgraded to', Plugin.toString(plugin));\n Plugin._registry[plugin.name] = plugin;\n } else if (pluginVersion < registeredVersion) {\n Common.warn('Plugin.register:', Plugin.toString(registered), 'can not be downgraded to', Plugin.toString(plugin));\n } else if (plugin !== registered) {\n Common.warn('Plugin.register:', Plugin.toString(plugin), 'is already registered to different plugin object');\n }\n } else {\n Plugin._registry[plugin.name] = plugin;\n }\n\n return plugin;\n };\n\n /**\n * Resolves a dependency to a plugin object from the registry if it exists. \n * The `dependency` may contain a version, but only the name matters when resolving.\n * @method resolve\n * @param dependency {string} The dependency.\n * @return {object} The plugin if resolved, otherwise `undefined`.\n */\n Plugin.resolve = function(dependency) {\n return Plugin._registry[Plugin.dependencyParse(dependency).name];\n };\n\n /**\n * Returns a pretty printed plugin name and version.\n * @method toString\n * @param plugin {} The plugin.\n * @return {string} Pretty printed plugin name and version.\n */\n Plugin.toString = function(plugin) {\n return typeof plugin === 'string' ? plugin : (plugin.name || 'anonymous') + '@' + (plugin.version || plugin.range || '0.0.0');\n };\n\n /**\n * Returns `true` if the object meets the minimum standard to be considered a plugin.\n * This means it must define the following properties:\n * - `name`\n * - `version`\n * - `install`\n * @method isPlugin\n * @param obj {} The obj to test.\n * @return {boolean} `true` if the object can be considered a plugin otherwise `false`.\n */\n Plugin.isPlugin = function(obj) {\n return obj && obj.name && obj.version && obj.install;\n };\n\n /**\n * Returns `true` if a plugin with the given `name` been installed on `module`.\n * @method isUsed\n * @param module {} The module.\n * @param name {string} The plugin name.\n * @return {boolean} `true` if a plugin with the given `name` been installed on `module`, otherwise `false`.\n */\n Plugin.isUsed = function(module, name) {\n return module.used.indexOf(name) > -1;\n };\n\n /**\n * Returns `true` if `plugin.for` is applicable to `module` by comparing against `module.name` and `module.version`.\n * If `plugin.for` is not specified then it is assumed to be applicable.\n * The value of `plugin.for` is a string of the format `'module-name'` or `'module-name@version'`.\n * @method isFor\n * @param plugin {} The plugin.\n * @param module {} The module.\n * @return {boolean} `true` if `plugin.for` is applicable to `module`, otherwise `false`.\n */\n Plugin.isFor = function(plugin, module) {\n var parsed = plugin.for && Plugin.dependencyParse(plugin.for);\n return !plugin.for || (module.name === parsed.name && Plugin.versionSatisfies(module.version, parsed.range));\n };\n\n /**\n * Installs the plugins by calling `plugin.install` on each plugin specified in `plugins` if passed, otherwise `module.uses`.\n * For installing plugins on `Matter` see the convenience function `Matter.use`.\n * Plugins may be specified either by their name or a reference to the plugin object.\n * Plugins themselves may specify further dependencies, but each plugin is installed only once.\n * Order is important, a topological sort is performed to find the best resulting order of installation.\n * This sorting attempts to satisfy every dependency's requested ordering, but may not be exact in all cases.\n * This function logs the resulting status of each dependency in the console, along with any warnings.\n * - A green tick ✅ indicates a dependency was resolved and installed.\n * - An orange diamond 🔶 indicates a dependency was resolved but a warning was thrown for it or one if its dependencies.\n * - A red cross ❌ indicates a dependency could not be resolved.\n * Avoid calling this function multiple times on the same module unless you intend to manually control installation order.\n * @method use\n * @param module {} The module install plugins on.\n * @param [plugins=module.uses] {} The plugins to install on module (optional, defaults to `module.uses`).\n */\n Plugin.use = function(module, plugins) {\n module.uses = (module.uses || []).concat(plugins || []);\n\n if (module.uses.length === 0) {\n Common.warn('Plugin.use:', Plugin.toString(module), 'does not specify any dependencies to install.');\n return;\n }\n\n var dependencies = Plugin.dependencies(module),\n sortedDependencies = Common.topologicalSort(dependencies),\n status = [];\n\n for (var i = 0; i < sortedDependencies.length; i += 1) {\n if (sortedDependencies[i] === module.name) {\n continue;\n }\n\n var plugin = Plugin.resolve(sortedDependencies[i]);\n\n if (!plugin) {\n status.push('❌ ' + sortedDependencies[i]);\n continue;\n }\n\n if (Plugin.isUsed(module, plugin.name)) {\n continue;\n }\n\n if (!Plugin.isFor(plugin, module)) {\n Common.warn('Plugin.use:', Plugin.toString(plugin), 'is for', plugin.for, 'but installed on', Plugin.toString(module) + '.');\n plugin._warned = true;\n }\n\n if (plugin.install) {\n plugin.install(module);\n } else {\n Common.warn('Plugin.use:', Plugin.toString(plugin), 'does not specify an install function.');\n plugin._warned = true;\n }\n\n if (plugin._warned) {\n status.push('🔶 ' + Plugin.toString(plugin));\n delete plugin._warned;\n } else {\n status.push('✅ ' + Plugin.toString(plugin));\n }\n\n module.used.push(plugin.name);\n }\n\n if (status.length > 0) {\n Common.info(status.join(' '));\n }\n };\n\n /**\n * Recursively finds all of a module's dependencies and returns a flat dependency graph.\n * @method dependencies\n * @param module {} The module.\n * @return {object} A dependency graph.\n */\n Plugin.dependencies = function(module, tracked) {\n var parsedBase = Plugin.dependencyParse(module),\n name = parsedBase.name;\n\n tracked = tracked || {};\n\n if (name in tracked) {\n return;\n }\n\n module = Plugin.resolve(module) || module;\n\n tracked[name] = Common.map(module.uses || [], function(dependency) {\n if (Plugin.isPlugin(dependency)) {\n Plugin.register(dependency);\n }\n\n var parsed = Plugin.dependencyParse(dependency),\n resolved = Plugin.resolve(dependency);\n\n if (resolved && !Plugin.versionSatisfies(resolved.version, parsed.range)) {\n Common.warn(\n 'Plugin.dependencies:', Plugin.toString(resolved), 'does not satisfy',\n Plugin.toString(parsed), 'used by', Plugin.toString(parsedBase) + '.'\n );\n\n resolved._warned = true;\n module._warned = true;\n } else if (!resolved) {\n Common.warn(\n 'Plugin.dependencies:', Plugin.toString(dependency), 'used by',\n Plugin.toString(parsedBase), 'could not be resolved.'\n );\n\n module._warned = true;\n }\n\n return parsed.name;\n });\n\n for (var i = 0; i < tracked[name].length; i += 1) {\n Plugin.dependencies(tracked[name][i], tracked);\n }\n\n return tracked;\n };\n\n /**\n * Parses a dependency string into its components.\n * The `dependency` is a string of the format `'module-name'` or `'module-name@version'`.\n * See documentation for `Plugin.versionParse` for a description of the format.\n * This function can also handle dependencies that are already resolved (e.g. a module object).\n * @method dependencyParse\n * @param dependency {string} The dependency of the format `'module-name'` or `'module-name@version'`.\n * @return {object} The dependency parsed into its components.\n */\n Plugin.dependencyParse = function(dependency) {\n if (Common.isString(dependency)) {\n var pattern = /^[\\w-]+(@(\\*|[\\^~]?\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z-+]+)?))?$/;\n\n if (!pattern.test(dependency)) {\n Common.warn('Plugin.dependencyParse:', dependency, 'is not a valid dependency string.');\n }\n\n return {\n name: dependency.split('@')[0],\n range: dependency.split('@')[1] || '*'\n };\n }\n\n return {\n name: dependency.name,\n range: dependency.range || dependency.version\n };\n };\n\n /**\n * Parses a version string into its components. \n * Versions are strictly of the format `x.y.z` (as in [semver](http://semver.org/)).\n * Versions may optionally have a prerelease tag in the format `x.y.z-alpha`.\n * Ranges are a strict subset of [npm ranges](https://docs.npmjs.com/misc/semver#advanced-range-syntax).\n * Only the following range types are supported:\n * - Tilde ranges e.g. `~1.2.3`\n * - Caret ranges e.g. `^1.2.3`\n * - Greater than ranges e.g. `>1.2.3`\n * - Greater than or equal ranges e.g. `>=1.2.3`\n * - Exact version e.g. `1.2.3`\n * - Any version `*`\n * @method versionParse\n * @param range {string} The version string.\n * @return {object} The version range parsed into its components.\n */\n Plugin.versionParse = function(range) {\n var pattern = /^(\\*)|(\\^|~|>=|>)?\\s*((\\d+)\\.(\\d+)\\.(\\d+))(-[0-9A-Za-z-+]+)?$/;\n\n if (!pattern.test(range)) {\n Common.warn('Plugin.versionParse:', range, 'is not a valid version or range.');\n }\n\n var parts = pattern.exec(range);\n var major = Number(parts[4]);\n var minor = Number(parts[5]);\n var patch = Number(parts[6]);\n\n return {\n isRange: Boolean(parts[1] || parts[2]),\n version: parts[3],\n range: range,\n operator: parts[1] || parts[2] || '',\n major: major,\n minor: minor,\n patch: patch,\n parts: [major, minor, patch],\n prerelease: parts[7],\n number: major * 1e8 + minor * 1e4 + patch\n };\n };\n\n /**\n * Returns `true` if `version` satisfies the given `range`.\n * See documentation for `Plugin.versionParse` for a description of the format.\n * If a version or range is not specified, then any version (`*`) is assumed to satisfy.\n * @method versionSatisfies\n * @param version {string} The version string.\n * @param range {string} The range string.\n * @return {boolean} `true` if `version` satisfies `range`, otherwise `false`.\n */\n Plugin.versionSatisfies = function(version, range) {\n range = range || '*';\n\n var r = Plugin.versionParse(range),\n v = Plugin.versionParse(version);\n\n if (r.isRange) {\n if (r.operator === '*' || version === '*') {\n return true;\n }\n\n if (r.operator === '>') {\n return v.number > r.number;\n }\n\n if (r.operator === '>=') {\n return v.number >= r.number;\n }\n\n if (r.operator === '~') {\n return v.major === r.major && v.minor === r.minor && v.patch >= r.patch;\n }\n\n if (r.operator === '^') {\n if (r.major > 0) {\n return v.major === r.major && v.number >= r.number;\n }\n\n if (r.minor > 0) {\n return v.minor === r.minor && v.patch >= r.patch;\n }\n\n return v.patch === r.patch;\n }\n }\n\n return version === range || version === '*';\n };\n\n})();\n\n\n/***/ }),\n/* 16 */\n/***/ (function(module, exports) {\n\n/**\n* The `Matter.Contact` module contains methods for creating and manipulating collision contacts.\n*\n* @class Contact\n*/\n\nvar Contact = {};\n\nmodule.exports = Contact;\n\n(function() {\n\n /**\n * Creates a new contact.\n * @method create\n * @param {vertex} [vertex]\n * @return {contact} A new contact\n */\n Contact.create = function(vertex) {\n return {\n vertex: vertex,\n normalImpulse: 0,\n tangentImpulse: 0\n };\n };\n\n})();\n\n\n/***/ }),\n/* 17 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Engine` module contains methods for creating and manipulating engines.\n* An engine is a controller that manages updating the simulation of the world.\n* See `Matter.Runner` for an optional game loop utility.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Engine\n*/\n\nvar Engine = {};\n\nmodule.exports = Engine;\n\nvar Sleeping = __webpack_require__(7);\nvar Resolver = __webpack_require__(18);\nvar Detector = __webpack_require__(13);\nvar Pairs = __webpack_require__(19);\nvar Events = __webpack_require__(5);\nvar Composite = __webpack_require__(6);\nvar Constraint = __webpack_require__(10);\nvar Common = __webpack_require__(0);\nvar Body = __webpack_require__(4);\n\n(function() {\n\n Engine._deltaMax = 1000 / 60;\n\n /**\n * Creates a new engine. The options parameter is an object that specifies any properties you wish to override the defaults.\n * All properties have default values, and many are pre-calculated automatically based on other properties.\n * See the properties section below for detailed information on what you can pass via the `options` object.\n * @method create\n * @param {object} [options]\n * @return {engine} engine\n */\n Engine.create = function(options) {\n options = options || {};\n\n var defaults = {\n positionIterations: 6,\n velocityIterations: 4,\n constraintIterations: 2,\n enableSleeping: false,\n events: [],\n plugin: {},\n gravity: {\n x: 0,\n y: 1,\n scale: 0.001\n },\n timing: {\n timestamp: 0,\n timeScale: 1,\n lastDelta: 0,\n lastElapsed: 0,\n lastUpdatesPerFrame: 0\n }\n };\n\n var engine = Common.extend(defaults, options);\n\n engine.world = options.world || Composite.create({ label: 'World' });\n engine.pairs = options.pairs || Pairs.create();\n engine.detector = options.detector || Detector.create();\n engine.detector.pairs = engine.pairs;\n\n // for temporary back compatibility only\n engine.grid = { buckets: [] };\n engine.world.gravity = engine.gravity;\n engine.broadphase = engine.grid;\n engine.metrics = {};\n \n return engine;\n };\n\n /**\n * Moves the simulation forward in time by `delta` milliseconds.\n * Triggers `beforeUpdate`, `beforeSolve` and `afterUpdate` events.\n * Triggers `collisionStart`, `collisionActive` and `collisionEnd` events.\n * @method update\n * @param {engine} engine\n * @param {number} [delta=16.666]\n */\n Engine.update = function(engine, delta) {\n var startTime = Common.now();\n\n var world = engine.world,\n detector = engine.detector,\n pairs = engine.pairs,\n timing = engine.timing,\n timestamp = timing.timestamp,\n i;\n\n // warn if high delta\n if (delta > Engine._deltaMax) {\n Common.warnOnce(\n 'Matter.Engine.update: delta argument is recommended to be less than or equal to', Engine._deltaMax.toFixed(3), 'ms.'\n );\n }\n\n delta = typeof delta !== 'undefined' ? delta : Common._baseDelta;\n delta *= timing.timeScale;\n\n // increment timestamp\n timing.timestamp += delta;\n timing.lastDelta = delta;\n\n // create an event object\n var event = {\n timestamp: timing.timestamp,\n delta: delta\n };\n\n Events.trigger(engine, 'beforeUpdate', event);\n\n // get all bodies and all constraints in the world\n var allBodies = Composite.allBodies(world),\n allConstraints = Composite.allConstraints(world);\n\n // if the world has changed\n if (world.isModified) {\n // update the detector bodies\n Detector.setBodies(detector, allBodies);\n\n // reset all composite modified flags\n Composite.setModified(world, false, false, true);\n }\n\n // update sleeping if enabled\n if (engine.enableSleeping)\n Sleeping.update(allBodies, delta);\n\n // apply gravity to all bodies\n Engine._bodiesApplyGravity(allBodies, engine.gravity);\n\n // update all body position and rotation by integration\n if (delta > 0) {\n Engine._bodiesUpdate(allBodies, delta);\n }\n\n Events.trigger(engine, 'beforeSolve', event);\n\n // update all constraints (first pass)\n Constraint.preSolveAll(allBodies);\n for (i = 0; i < engine.constraintIterations; i++) {\n Constraint.solveAll(allConstraints, delta);\n }\n Constraint.postSolveAll(allBodies);\n\n // find all collisions\n var collisions = Detector.collisions(detector);\n\n // update collision pairs\n Pairs.update(pairs, collisions, timestamp);\n\n // wake up bodies involved in collisions\n if (engine.enableSleeping)\n Sleeping.afterCollisions(pairs.list);\n\n // trigger collision events\n if (pairs.collisionStart.length > 0) {\n Events.trigger(engine, 'collisionStart', { \n pairs: pairs.collisionStart,\n timestamp: timing.timestamp,\n delta: delta\n });\n }\n\n // iteratively resolve position between collisions\n var positionDamping = Common.clamp(20 / engine.positionIterations, 0, 1);\n \n Resolver.preSolvePosition(pairs.list);\n for (i = 0; i < engine.positionIterations; i++) {\n Resolver.solvePosition(pairs.list, delta, positionDamping);\n }\n Resolver.postSolvePosition(allBodies);\n\n // update all constraints (second pass)\n Constraint.preSolveAll(allBodies);\n for (i = 0; i < engine.constraintIterations; i++) {\n Constraint.solveAll(allConstraints, delta);\n }\n Constraint.postSolveAll(allBodies);\n\n // iteratively resolve velocity between collisions\n Resolver.preSolveVelocity(pairs.list);\n for (i = 0; i < engine.velocityIterations; i++) {\n Resolver.solveVelocity(pairs.list, delta);\n }\n\n // update body speed and velocity properties\n Engine._bodiesUpdateVelocities(allBodies);\n\n // trigger collision events\n if (pairs.collisionActive.length > 0) {\n Events.trigger(engine, 'collisionActive', { \n pairs: pairs.collisionActive, \n timestamp: timing.timestamp,\n delta: delta\n });\n }\n\n if (pairs.collisionEnd.length > 0) {\n Events.trigger(engine, 'collisionEnd', {\n pairs: pairs.collisionEnd,\n timestamp: timing.timestamp,\n delta: delta\n });\n }\n\n // clear force buffers\n Engine._bodiesClearForces(allBodies);\n\n Events.trigger(engine, 'afterUpdate', event);\n\n // log the time elapsed computing this update\n engine.timing.lastElapsed = Common.now() - startTime;\n\n return engine;\n };\n \n /**\n * Merges two engines by keeping the configuration of `engineA` but replacing the world with the one from `engineB`.\n * @method merge\n * @param {engine} engineA\n * @param {engine} engineB\n */\n Engine.merge = function(engineA, engineB) {\n Common.extend(engineA, engineB);\n \n if (engineB.world) {\n engineA.world = engineB.world;\n\n Engine.clear(engineA);\n\n var bodies = Composite.allBodies(engineA.world);\n\n for (var i = 0; i < bodies.length; i++) {\n var body = bodies[i];\n Sleeping.set(body, false);\n body.id = Common.nextId();\n }\n }\n };\n\n /**\n * Clears the engine pairs and detector.\n * @method clear\n * @param {engine} engine\n */\n Engine.clear = function(engine) {\n Pairs.clear(engine.pairs);\n Detector.clear(engine.detector);\n };\n\n /**\n * Zeroes the `body.force` and `body.torque` force buffers.\n * @method _bodiesClearForces\n * @private\n * @param {body[]} bodies\n */\n Engine._bodiesClearForces = function(bodies) {\n var bodiesLength = bodies.length;\n\n for (var i = 0; i < bodiesLength; i++) {\n var body = bodies[i];\n\n // reset force buffers\n body.force.x = 0;\n body.force.y = 0;\n body.torque = 0;\n }\n };\n\n /**\n * Applies gravitational acceleration to all `bodies`.\n * This models a [uniform gravitational field](https://en.wikipedia.org/wiki/Gravity_of_Earth), similar to near the surface of a planet.\n * \n * @method _bodiesApplyGravity\n * @private\n * @param {body[]} bodies\n * @param {vector} gravity\n */\n Engine._bodiesApplyGravity = function(bodies, gravity) {\n var gravityScale = typeof gravity.scale !== 'undefined' ? gravity.scale : 0.001,\n bodiesLength = bodies.length;\n\n if ((gravity.x === 0 && gravity.y === 0) || gravityScale === 0) {\n return;\n }\n \n for (var i = 0; i < bodiesLength; i++) {\n var body = bodies[i];\n\n if (body.isStatic || body.isSleeping)\n continue;\n\n // add the resultant force of gravity\n body.force.y += body.mass * gravity.y * gravityScale;\n body.force.x += body.mass * gravity.x * gravityScale;\n }\n };\n\n /**\n * Applies `Body.update` to all given `bodies`.\n * @method _bodiesUpdate\n * @private\n * @param {body[]} bodies\n * @param {number} delta The amount of time elapsed between updates\n */\n Engine._bodiesUpdate = function(bodies, delta) {\n var bodiesLength = bodies.length;\n\n for (var i = 0; i < bodiesLength; i++) {\n var body = bodies[i];\n\n if (body.isStatic || body.isSleeping)\n continue;\n\n Body.update(body, delta);\n }\n };\n\n /**\n * Applies `Body.updateVelocities` to all given `bodies`.\n * @method _bodiesUpdateVelocities\n * @private\n * @param {body[]} bodies\n */\n Engine._bodiesUpdateVelocities = function(bodies) {\n var bodiesLength = bodies.length;\n\n for (var i = 0; i < bodiesLength; i++) {\n Body.updateVelocities(bodies[i]);\n }\n };\n\n /**\n * A deprecated alias for `Runner.run`, use `Matter.Runner.run(engine)` instead and see `Matter.Runner` for more information.\n * @deprecated use Matter.Runner.run(engine) instead\n * @method run\n * @param {engine} engine\n */\n\n /**\n * Fired just before an update\n *\n * @event beforeUpdate\n * @param {object} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {number} event.delta The delta time in milliseconds value used in the update\n * @param {engine} event.source The source object of the event\n * @param {string} event.name The name of the event\n */\n\n /**\n * Fired after bodies updated based on their velocity and forces, but before any collision detection, constraints and resolving etc.\n *\n * @event beforeSolve\n * @param {object} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {number} event.delta The delta time in milliseconds value used in the update\n * @param {engine} event.source The source object of the event\n * @param {string} event.name The name of the event\n */\n\n /**\n * Fired after engine update and all collision events\n *\n * @event afterUpdate\n * @param {object} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {number} event.delta The delta time in milliseconds value used in the update\n * @param {engine} event.source The source object of the event\n * @param {string} event.name The name of the event\n */\n\n /**\n * Fired after engine update, provides a list of all pairs that have started to collide in the current tick (if any)\n *\n * @event collisionStart\n * @param {object} event An event object\n * @param {pair[]} event.pairs List of affected pairs\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {number} event.delta The delta time in milliseconds value used in the update\n * @param {engine} event.source The source object of the event\n * @param {string} event.name The name of the event\n */\n\n /**\n * Fired after engine update, provides a list of all pairs that are colliding in the current tick (if any)\n *\n * @event collisionActive\n * @param {object} event An event object\n * @param {pair[]} event.pairs List of affected pairs\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {number} event.delta The delta time in milliseconds value used in the update\n * @param {engine} event.source The source object of the event\n * @param {string} event.name The name of the event\n */\n\n /**\n * Fired after engine update, provides a list of all pairs that have ended collision in the current tick (if any)\n *\n * @event collisionEnd\n * @param {object} event An event object\n * @param {pair[]} event.pairs List of affected pairs\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {number} event.delta The delta time in milliseconds value used in the update\n * @param {engine} event.source The source object of the event\n * @param {string} event.name The name of the event\n */\n\n /*\n *\n * Properties Documentation\n *\n */\n\n /**\n * An integer `Number` that specifies the number of position iterations to perform each update.\n * The higher the value, the higher quality the simulation will be at the expense of performance.\n *\n * @property positionIterations\n * @type number\n * @default 6\n */\n\n /**\n * An integer `Number` that specifies the number of velocity iterations to perform each update.\n * The higher the value, the higher quality the simulation will be at the expense of performance.\n *\n * @property velocityIterations\n * @type number\n * @default 4\n */\n\n /**\n * An integer `Number` that specifies the number of constraint iterations to perform each update.\n * The higher the value, the higher quality the simulation will be at the expense of performance.\n * The default value of `2` is usually very adequate.\n *\n * @property constraintIterations\n * @type number\n * @default 2\n */\n\n /**\n * A flag that specifies whether the engine should allow sleeping via the `Matter.Sleeping` module.\n * Sleeping can improve stability and performance, but often at the expense of accuracy.\n *\n * @property enableSleeping\n * @type boolean\n * @default false\n */\n\n /**\n * An `Object` containing properties regarding the timing systems of the engine. \n *\n * @property timing\n * @type object\n */\n\n /**\n * A `Number` that specifies the global scaling factor of time for all bodies.\n * A value of `0` freezes the simulation.\n * A value of `0.1` gives a slow-motion effect.\n * A value of `1.2` gives a speed-up effect.\n *\n * @property timing.timeScale\n * @type number\n * @default 1\n */\n\n /**\n * A `Number` that specifies the current simulation-time in milliseconds starting from `0`. \n * It is incremented on every `Engine.update` by the given `delta` argument. \n * \n * @property timing.timestamp\n * @type number\n * @default 0\n */\n\n /**\n * A `Number` that represents the total execution time elapsed during the last `Engine.update` in milliseconds.\n * It is updated by timing from the start of the last `Engine.update` call until it ends.\n *\n * This value will also include the total execution time of all event handlers directly or indirectly triggered by the engine update.\n * \n * @property timing.lastElapsed\n * @type number\n * @default 0\n */\n\n /**\n * A `Number` that represents the `delta` value used in the last engine update.\n * \n * @property timing.lastDelta\n * @type number\n * @default 0\n */\n\n /**\n * A `Matter.Detector` instance.\n *\n * @property detector\n * @type detector\n * @default a Matter.Detector instance\n */\n\n /**\n * A `Matter.Grid` instance.\n *\n * @deprecated replaced by `engine.detector`\n * @property grid\n * @type grid\n * @default a Matter.Grid instance\n */\n\n /**\n * Replaced by and now alias for `engine.grid`.\n *\n * @deprecated replaced by `engine.detector`\n * @property broadphase\n * @type grid\n * @default a Matter.Grid instance\n */\n\n /**\n * The root `Matter.Composite` instance that will contain all bodies, constraints and other composites to be simulated by this engine.\n *\n * @property world\n * @type composite\n * @default a Matter.Composite instance\n */\n\n /**\n * An object reserved for storing plugin-specific properties.\n *\n * @property plugin\n * @type {}\n */\n\n /**\n * An optional gravitational acceleration applied to all bodies in `engine.world` on every update.\n * \n * This models a [uniform gravitational field](https://en.wikipedia.org/wiki/Gravity_of_Earth), similar to near the surface of a planet. For gravity in other contexts, disable this and apply forces as needed.\n * \n * To disable set the `scale` component to `0`.\n * \n * This is split into three components for ease of use: \n * a normalised direction (`x` and `y`) and magnitude (`scale`).\n *\n * @property gravity\n * @type object\n */\n\n /**\n * The gravitational direction normal `x` component, to be multiplied by `gravity.scale`.\n * \n * @property gravity.x\n * @type object\n * @default 0\n */\n\n /**\n * The gravitational direction normal `y` component, to be multiplied by `gravity.scale`.\n *\n * @property gravity.y\n * @type object\n * @default 1\n */\n\n /**\n * The magnitude of the gravitational acceleration.\n * \n * @property gravity.scale\n * @type object\n * @default 0.001\n */\n\n})();\n\n\n/***/ }),\n/* 18 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Resolver` module contains methods for resolving collision pairs.\n*\n* @class Resolver\n*/\n\nvar Resolver = {};\n\nmodule.exports = Resolver;\n\nvar Vertices = __webpack_require__(3);\nvar Common = __webpack_require__(0);\nvar Bounds = __webpack_require__(1);\n\n(function() {\n\n Resolver._restingThresh = 2;\n Resolver._restingThreshTangent = Math.sqrt(6);\n Resolver._positionDampen = 0.9;\n Resolver._positionWarming = 0.8;\n Resolver._frictionNormalMultiplier = 5;\n Resolver._frictionMaxStatic = Number.MAX_VALUE;\n\n /**\n * Prepare pairs for position solving.\n * @method preSolvePosition\n * @param {pair[]} pairs\n */\n Resolver.preSolvePosition = function(pairs) {\n var i,\n pair,\n contactCount,\n pairsLength = pairs.length;\n\n // find total contacts on each body\n for (i = 0; i < pairsLength; i++) {\n pair = pairs[i];\n \n if (!pair.isActive)\n continue;\n \n contactCount = pair.contactCount;\n pair.collision.parentA.totalContacts += contactCount;\n pair.collision.parentB.totalContacts += contactCount;\n }\n };\n\n /**\n * Find a solution for pair positions.\n * @method solvePosition\n * @param {pair[]} pairs\n * @param {number} delta\n * @param {number} [damping=1]\n */\n Resolver.solvePosition = function(pairs, delta, damping) {\n var i,\n pair,\n collision,\n bodyA,\n bodyB,\n normal,\n contactShare,\n positionImpulse,\n positionDampen = Resolver._positionDampen * (damping || 1),\n slopDampen = Common.clamp(delta / Common._baseDelta, 0, 1),\n pairsLength = pairs.length;\n\n // find impulses required to resolve penetration\n for (i = 0; i < pairsLength; i++) {\n pair = pairs[i];\n \n if (!pair.isActive || pair.isSensor)\n continue;\n\n collision = pair.collision;\n bodyA = collision.parentA;\n bodyB = collision.parentB;\n normal = collision.normal;\n\n // get current separation between body edges involved in collision\n pair.separation = \n collision.depth + normal.x * (bodyB.positionImpulse.x - bodyA.positionImpulse.x)\n + normal.y * (bodyB.positionImpulse.y - bodyA.positionImpulse.y);\n }\n \n for (i = 0; i < pairsLength; i++) {\n pair = pairs[i];\n\n if (!pair.isActive || pair.isSensor)\n continue;\n \n collision = pair.collision;\n bodyA = collision.parentA;\n bodyB = collision.parentB;\n normal = collision.normal;\n positionImpulse = pair.separation - pair.slop * slopDampen;\n\n if (bodyA.isStatic || bodyB.isStatic)\n positionImpulse *= 2;\n \n if (!(bodyA.isStatic || bodyA.isSleeping)) {\n contactShare = positionDampen / bodyA.totalContacts;\n bodyA.positionImpulse.x += normal.x * positionImpulse * contactShare;\n bodyA.positionImpulse.y += normal.y * positionImpulse * contactShare;\n }\n\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\n contactShare = positionDampen / bodyB.totalContacts;\n bodyB.positionImpulse.x -= normal.x * positionImpulse * contactShare;\n bodyB.positionImpulse.y -= normal.y * positionImpulse * contactShare;\n }\n }\n };\n\n /**\n * Apply position resolution.\n * @method postSolvePosition\n * @param {body[]} bodies\n */\n Resolver.postSolvePosition = function(bodies) {\n var positionWarming = Resolver._positionWarming,\n bodiesLength = bodies.length,\n verticesTranslate = Vertices.translate,\n boundsUpdate = Bounds.update;\n\n for (var i = 0; i < bodiesLength; i++) {\n var body = bodies[i],\n positionImpulse = body.positionImpulse,\n positionImpulseX = positionImpulse.x,\n positionImpulseY = positionImpulse.y,\n velocity = body.velocity;\n\n // reset contact count\n body.totalContacts = 0;\n\n if (positionImpulseX !== 0 || positionImpulseY !== 0) {\n // update body geometry\n for (var j = 0; j < body.parts.length; j++) {\n var part = body.parts[j];\n verticesTranslate(part.vertices, positionImpulse);\n boundsUpdate(part.bounds, part.vertices, velocity);\n part.position.x += positionImpulseX;\n part.position.y += positionImpulseY;\n }\n\n // move the body without changing velocity\n body.positionPrev.x += positionImpulseX;\n body.positionPrev.y += positionImpulseY;\n\n if (positionImpulseX * velocity.x + positionImpulseY * velocity.y < 0) {\n // reset cached impulse if the body has velocity along it\n positionImpulse.x = 0;\n positionImpulse.y = 0;\n } else {\n // warm the next iteration\n positionImpulse.x *= positionWarming;\n positionImpulse.y *= positionWarming;\n }\n }\n }\n };\n\n /**\n * Prepare pairs for velocity solving.\n * @method preSolveVelocity\n * @param {pair[]} pairs\n */\n Resolver.preSolveVelocity = function(pairs) {\n var pairsLength = pairs.length,\n i,\n j;\n \n for (i = 0; i < pairsLength; i++) {\n var pair = pairs[i];\n \n if (!pair.isActive || pair.isSensor)\n continue;\n \n var contacts = pair.contacts,\n contactCount = pair.contactCount,\n collision = pair.collision,\n bodyA = collision.parentA,\n bodyB = collision.parentB,\n normal = collision.normal,\n tangent = collision.tangent;\n \n // resolve each contact\n for (j = 0; j < contactCount; j++) {\n var contact = contacts[j],\n contactVertex = contact.vertex,\n normalImpulse = contact.normalImpulse,\n tangentImpulse = contact.tangentImpulse;\n \n if (normalImpulse !== 0 || tangentImpulse !== 0) {\n // total impulse from contact\n var impulseX = normal.x * normalImpulse + tangent.x * tangentImpulse,\n impulseY = normal.y * normalImpulse + tangent.y * tangentImpulse;\n \n // apply impulse from contact\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\n bodyA.positionPrev.x += impulseX * bodyA.inverseMass;\n bodyA.positionPrev.y += impulseY * bodyA.inverseMass;\n bodyA.anglePrev += bodyA.inverseInertia * (\n (contactVertex.x - bodyA.position.x) * impulseY\n - (contactVertex.y - bodyA.position.y) * impulseX\n );\n }\n \n if (!(bodyB.isStatic || bodyB.isSleeping)) {\n bodyB.positionPrev.x -= impulseX * bodyB.inverseMass;\n bodyB.positionPrev.y -= impulseY * bodyB.inverseMass;\n bodyB.anglePrev -= bodyB.inverseInertia * (\n (contactVertex.x - bodyB.position.x) * impulseY \n - (contactVertex.y - bodyB.position.y) * impulseX\n );\n }\n }\n }\n }\n };\n\n /**\n * Find a solution for pair velocities.\n * @method solveVelocity\n * @param {pair[]} pairs\n * @param {number} delta\n */\n Resolver.solveVelocity = function(pairs, delta) {\n var timeScale = delta / Common._baseDelta,\n timeScaleSquared = timeScale * timeScale,\n timeScaleCubed = timeScaleSquared * timeScale,\n restingThresh = -Resolver._restingThresh * timeScale,\n restingThreshTangent = Resolver._restingThreshTangent,\n frictionNormalMultiplier = Resolver._frictionNormalMultiplier * timeScale,\n frictionMaxStatic = Resolver._frictionMaxStatic,\n pairsLength = pairs.length,\n tangentImpulse,\n maxFriction,\n i,\n j;\n\n for (i = 0; i < pairsLength; i++) {\n var pair = pairs[i];\n \n if (!pair.isActive || pair.isSensor)\n continue;\n \n var collision = pair.collision,\n bodyA = collision.parentA,\n bodyB = collision.parentB,\n normalX = collision.normal.x,\n normalY = collision.normal.y,\n tangentX = collision.tangent.x,\n tangentY = collision.tangent.y,\n inverseMassTotal = pair.inverseMass,\n friction = pair.friction * pair.frictionStatic * frictionNormalMultiplier,\n contacts = pair.contacts,\n contactCount = pair.contactCount,\n contactShare = 1 / contactCount;\n\n // get body velocities\n var bodyAVelocityX = bodyA.position.x - bodyA.positionPrev.x,\n bodyAVelocityY = bodyA.position.y - bodyA.positionPrev.y,\n bodyAAngularVelocity = bodyA.angle - bodyA.anglePrev,\n bodyBVelocityX = bodyB.position.x - bodyB.positionPrev.x,\n bodyBVelocityY = bodyB.position.y - bodyB.positionPrev.y,\n bodyBAngularVelocity = bodyB.angle - bodyB.anglePrev;\n\n // resolve each contact\n for (j = 0; j < contactCount; j++) {\n var contact = contacts[j],\n contactVertex = contact.vertex;\n\n var offsetAX = contactVertex.x - bodyA.position.x,\n offsetAY = contactVertex.y - bodyA.position.y,\n offsetBX = contactVertex.x - bodyB.position.x,\n offsetBY = contactVertex.y - bodyB.position.y;\n \n var velocityPointAX = bodyAVelocityX - offsetAY * bodyAAngularVelocity,\n velocityPointAY = bodyAVelocityY + offsetAX * bodyAAngularVelocity,\n velocityPointBX = bodyBVelocityX - offsetBY * bodyBAngularVelocity,\n velocityPointBY = bodyBVelocityY + offsetBX * bodyBAngularVelocity;\n\n var relativeVelocityX = velocityPointAX - velocityPointBX,\n relativeVelocityY = velocityPointAY - velocityPointBY;\n\n var normalVelocity = normalX * relativeVelocityX + normalY * relativeVelocityY,\n tangentVelocity = tangentX * relativeVelocityX + tangentY * relativeVelocityY;\n\n // coulomb friction\n var normalOverlap = pair.separation + normalVelocity;\n var normalForce = Math.min(normalOverlap, 1);\n normalForce = normalOverlap < 0 ? 0 : normalForce;\n\n var frictionLimit = normalForce * friction;\n\n if (tangentVelocity < -frictionLimit || tangentVelocity > frictionLimit) {\n maxFriction = (tangentVelocity > 0 ? tangentVelocity : -tangentVelocity);\n tangentImpulse = pair.friction * (tangentVelocity > 0 ? 1 : -1) * timeScaleCubed;\n \n if (tangentImpulse < -maxFriction) {\n tangentImpulse = -maxFriction;\n } else if (tangentImpulse > maxFriction) {\n tangentImpulse = maxFriction;\n }\n } else {\n tangentImpulse = tangentVelocity;\n maxFriction = frictionMaxStatic;\n }\n\n // account for mass, inertia and contact offset\n var oAcN = offsetAX * normalY - offsetAY * normalX,\n oBcN = offsetBX * normalY - offsetBY * normalX,\n share = contactShare / (inverseMassTotal + bodyA.inverseInertia * oAcN * oAcN + bodyB.inverseInertia * oBcN * oBcN);\n\n // raw impulses\n var normalImpulse = (1 + pair.restitution) * normalVelocity * share;\n tangentImpulse *= share;\n\n // handle high velocity and resting collisions separately\n if (normalVelocity < restingThresh) {\n // high normal velocity so clear cached contact normal impulse\n contact.normalImpulse = 0;\n } else {\n // solve resting collision constraints using Erin Catto's method (GDC08)\n // impulse constraint tends to 0\n var contactNormalImpulse = contact.normalImpulse;\n contact.normalImpulse += normalImpulse;\n if (contact.normalImpulse > 0) contact.normalImpulse = 0;\n normalImpulse = contact.normalImpulse - contactNormalImpulse;\n }\n\n // handle high velocity and resting collisions separately\n if (tangentVelocity < -restingThreshTangent || tangentVelocity > restingThreshTangent) {\n // high tangent velocity so clear cached contact tangent impulse\n contact.tangentImpulse = 0;\n } else {\n // solve resting collision constraints using Erin Catto's method (GDC08)\n // tangent impulse tends to -tangentSpeed or +tangentSpeed\n var contactTangentImpulse = contact.tangentImpulse;\n contact.tangentImpulse += tangentImpulse;\n if (contact.tangentImpulse < -maxFriction) contact.tangentImpulse = -maxFriction;\n if (contact.tangentImpulse > maxFriction) contact.tangentImpulse = maxFriction;\n tangentImpulse = contact.tangentImpulse - contactTangentImpulse;\n }\n\n // total impulse from contact\n var impulseX = normalX * normalImpulse + tangentX * tangentImpulse,\n impulseY = normalY * normalImpulse + tangentY * tangentImpulse;\n \n // apply impulse from contact\n if (!(bodyA.isStatic || bodyA.isSleeping)) {\n bodyA.positionPrev.x += impulseX * bodyA.inverseMass;\n bodyA.positionPrev.y += impulseY * bodyA.inverseMass;\n bodyA.anglePrev += (offsetAX * impulseY - offsetAY * impulseX) * bodyA.inverseInertia;\n }\n\n if (!(bodyB.isStatic || bodyB.isSleeping)) {\n bodyB.positionPrev.x -= impulseX * bodyB.inverseMass;\n bodyB.positionPrev.y -= impulseY * bodyB.inverseMass;\n bodyB.anglePrev -= (offsetBX * impulseY - offsetBY * impulseX) * bodyB.inverseInertia;\n }\n }\n }\n };\n\n})();\n\n\n/***/ }),\n/* 19 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Pairs` module contains methods for creating and manipulating collision pair sets.\n*\n* @class Pairs\n*/\n\nvar Pairs = {};\n\nmodule.exports = Pairs;\n\nvar Pair = __webpack_require__(9);\nvar Common = __webpack_require__(0);\n\n(function() {\n\n /**\n * Creates a new pairs structure.\n * @method create\n * @param {object} options\n * @return {pairs} A new pairs structure\n */\n Pairs.create = function(options) {\n return Common.extend({ \n table: {},\n list: [],\n collisionStart: [],\n collisionActive: [],\n collisionEnd: []\n }, options);\n };\n\n /**\n * Updates pairs given a list of collisions.\n * @method update\n * @param {object} pairs\n * @param {collision[]} collisions\n * @param {number} timestamp\n */\n Pairs.update = function(pairs, collisions, timestamp) {\n var pairUpdate = Pair.update,\n pairCreate = Pair.create,\n pairSetActive = Pair.setActive,\n pairsTable = pairs.table,\n pairsList = pairs.list,\n pairsListLength = pairsList.length,\n pairsListIndex = pairsListLength,\n collisionStart = pairs.collisionStart,\n collisionEnd = pairs.collisionEnd,\n collisionActive = pairs.collisionActive,\n collisionsLength = collisions.length,\n collisionStartIndex = 0,\n collisionEndIndex = 0,\n collisionActiveIndex = 0,\n collision,\n pair,\n i;\n\n for (i = 0; i < collisionsLength; i++) {\n collision = collisions[i];\n pair = collision.pair;\n\n if (pair) {\n // pair already exists (but may or may not be active)\n if (pair.isActive) {\n // pair exists and is active\n collisionActive[collisionActiveIndex++] = pair;\n }\n\n // update the pair\n pairUpdate(pair, collision, timestamp);\n } else {\n // pair did not exist, create a new pair\n pair = pairCreate(collision, timestamp);\n pairsTable[pair.id] = pair;\n\n // add the new pair\n collisionStart[collisionStartIndex++] = pair;\n pairsList[pairsListIndex++] = pair;\n }\n }\n\n // find pairs that are no longer active\n pairsListIndex = 0;\n pairsListLength = pairsList.length;\n\n for (i = 0; i < pairsListLength; i++) {\n pair = pairsList[i];\n \n // pair is active if updated this timestep\n if (pair.timeUpdated >= timestamp) {\n // keep active pairs\n pairsList[pairsListIndex++] = pair;\n } else {\n pairSetActive(pair, false, timestamp);\n\n // keep inactive pairs if both bodies may be sleeping\n if (pair.collision.bodyA.sleepCounter > 0 && pair.collision.bodyB.sleepCounter > 0) {\n pairsList[pairsListIndex++] = pair;\n } else {\n // remove inactive pairs if either body awake\n collisionEnd[collisionEndIndex++] = pair;\n delete pairsTable[pair.id];\n }\n }\n }\n\n // update array lengths if changed\n if (pairsList.length !== pairsListIndex) {\n pairsList.length = pairsListIndex;\n }\n\n if (collisionStart.length !== collisionStartIndex) {\n collisionStart.length = collisionStartIndex;\n }\n\n if (collisionEnd.length !== collisionEndIndex) {\n collisionEnd.length = collisionEndIndex;\n }\n\n if (collisionActive.length !== collisionActiveIndex) {\n collisionActive.length = collisionActiveIndex;\n }\n };\n\n /**\n * Clears the given pairs structure.\n * @method clear\n * @param {pairs} pairs\n * @return {pairs} pairs\n */\n Pairs.clear = function(pairs) {\n pairs.table = {};\n pairs.list.length = 0;\n pairs.collisionStart.length = 0;\n pairs.collisionActive.length = 0;\n pairs.collisionEnd.length = 0;\n return pairs;\n };\n\n})();\n\n\n/***/ }),\n/* 20 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar Matter = module.exports = __webpack_require__(21);\r\n\r\nMatter.Axes = __webpack_require__(11);\r\nMatter.Bodies = __webpack_require__(12);\r\nMatter.Body = __webpack_require__(4);\r\nMatter.Bounds = __webpack_require__(1);\r\nMatter.Collision = __webpack_require__(8);\r\nMatter.Common = __webpack_require__(0);\r\nMatter.Composite = __webpack_require__(6);\r\nMatter.Composites = __webpack_require__(22);\r\nMatter.Constraint = __webpack_require__(10);\r\nMatter.Contact = __webpack_require__(16);\r\nMatter.Detector = __webpack_require__(13);\r\nMatter.Engine = __webpack_require__(17);\r\nMatter.Events = __webpack_require__(5);\r\nMatter.Grid = __webpack_require__(23);\r\nMatter.Mouse = __webpack_require__(14);\r\nMatter.MouseConstraint = __webpack_require__(24);\r\nMatter.Pair = __webpack_require__(9);\r\nMatter.Pairs = __webpack_require__(19);\r\nMatter.Plugin = __webpack_require__(15);\r\nMatter.Query = __webpack_require__(25);\r\nMatter.Render = __webpack_require__(26);\r\nMatter.Resolver = __webpack_require__(18);\r\nMatter.Runner = __webpack_require__(27);\r\nMatter.SAT = __webpack_require__(28);\r\nMatter.Sleeping = __webpack_require__(7);\r\nMatter.Svg = __webpack_require__(29);\r\nMatter.Vector = __webpack_require__(2);\r\nMatter.Vertices = __webpack_require__(3);\r\nMatter.World = __webpack_require__(30);\r\n\r\n// temporary back compatibility\r\nMatter.Engine.run = Matter.Runner.run;\r\nMatter.Common.deprecated(Matter.Engine, 'run', 'Engine.run ➤ use Matter.Runner.run(engine) instead');\r\n\n\n/***/ }),\n/* 21 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\r\n* The `Matter` module is the top level namespace. It also includes a function for installing plugins on top of the library.\r\n*\r\n* @class Matter\r\n*/\r\n\r\nvar Matter = {};\r\n\r\nmodule.exports = Matter;\r\n\r\nvar Plugin = __webpack_require__(15);\r\nvar Common = __webpack_require__(0);\r\n\r\n(function() {\r\n\r\n /**\r\n * The library name.\r\n * @property name\r\n * @readOnly\r\n * @type {String}\r\n */\r\n Matter.name = 'matter-js';\r\n\r\n /**\r\n * The library version.\r\n * @property version\r\n * @readOnly\r\n * @type {String}\r\n */\r\n Matter.version = true ? \"0.20.0\" : undefined;\r\n\r\n /**\r\n * A list of plugin dependencies to be installed. These are normally set and installed through `Matter.use`.\r\n * Alternatively you may set `Matter.uses` manually and install them by calling `Plugin.use(Matter)`.\r\n * @property uses\r\n * @type {Array}\r\n */\r\n Matter.uses = [];\r\n\r\n /**\r\n * The plugins that have been installed through `Matter.Plugin.install`. Read only.\r\n * @property used\r\n * @readOnly\r\n * @type {Array}\r\n */\r\n Matter.used = [];\r\n\r\n /**\r\n * Installs the given plugins on the `Matter` namespace.\r\n * This is a short-hand for `Plugin.use`, see it for more information.\r\n * Call this function once at the start of your code, with all of the plugins you wish to install as arguments.\r\n * Avoid calling this function multiple times unless you intend to manually control installation order.\r\n * @method use\r\n * @param ...plugin {Function} The plugin(s) to install on `base` (multi-argument).\r\n */\r\n Matter.use = function() {\r\n Plugin.use(Matter, Array.prototype.slice.call(arguments));\r\n };\r\n\r\n /**\r\n * Chains a function to excute before the original function on the given `path` relative to `Matter`.\r\n * See also docs for `Common.chain`.\r\n * @method before\r\n * @param {string} path The path relative to `Matter`\r\n * @param {function} func The function to chain before the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Matter.before = function(path, func) {\r\n path = path.replace(/^Matter./, '');\r\n return Common.chainPathBefore(Matter, path, func);\r\n };\r\n\r\n /**\r\n * Chains a function to excute after the original function on the given `path` relative to `Matter`.\r\n * See also docs for `Common.chain`.\r\n * @method after\r\n * @param {string} path The path relative to `Matter`\r\n * @param {function} func The function to chain after the original\r\n * @return {function} The chained function that replaced the original\r\n */\r\n Matter.after = function(path, func) {\r\n path = path.replace(/^Matter./, '');\r\n return Common.chainPathAfter(Matter, path, func);\r\n };\r\n\r\n})();\r\n\n\n/***/ }),\n/* 22 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Composites` module contains factory methods for creating composite bodies\n* with commonly used configurations (such as stacks and chains).\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Composites\n*/\n\nvar Composites = {};\n\nmodule.exports = Composites;\n\nvar Composite = __webpack_require__(6);\nvar Constraint = __webpack_require__(10);\nvar Common = __webpack_require__(0);\nvar Body = __webpack_require__(4);\nvar Bodies = __webpack_require__(12);\nvar deprecated = Common.deprecated;\n\n(function() {\n\n /**\n * Create a new composite containing bodies created in the callback in a grid arrangement.\n * This function uses the body's bounds to prevent overlaps.\n * @method stack\n * @param {number} x Starting position in X.\n * @param {number} y Starting position in Y.\n * @param {number} columns\n * @param {number} rows\n * @param {number} columnGap\n * @param {number} rowGap\n * @param {function} callback\n * @return {composite} A new composite containing objects created in the callback\n */\n Composites.stack = function(x, y, columns, rows, columnGap, rowGap, callback) {\n var stack = Composite.create({ label: 'Stack' }),\n currentX = x,\n currentY = y,\n lastBody,\n i = 0;\n\n for (var row = 0; row < rows; row++) {\n var maxHeight = 0;\n \n for (var column = 0; column < columns; column++) {\n var body = callback(currentX, currentY, column, row, lastBody, i);\n \n if (body) {\n var bodyHeight = body.bounds.max.y - body.bounds.min.y,\n bodyWidth = body.bounds.max.x - body.bounds.min.x; \n\n if (bodyHeight > maxHeight)\n maxHeight = bodyHeight;\n \n Body.translate(body, { x: bodyWidth * 0.5, y: bodyHeight * 0.5 });\n\n currentX = body.bounds.max.x + columnGap;\n\n Composite.addBody(stack, body);\n \n lastBody = body;\n i += 1;\n } else {\n currentX += columnGap;\n }\n }\n \n currentY += maxHeight + rowGap;\n currentX = x;\n }\n\n return stack;\n };\n \n /**\n * Chains all bodies in the given composite together using constraints.\n * @method chain\n * @param {composite} composite\n * @param {number} xOffsetA\n * @param {number} yOffsetA\n * @param {number} xOffsetB\n * @param {number} yOffsetB\n * @param {object} options\n * @return {composite} A new composite containing objects chained together with constraints\n */\n Composites.chain = function(composite, xOffsetA, yOffsetA, xOffsetB, yOffsetB, options) {\n var bodies = composite.bodies;\n \n for (var i = 1; i < bodies.length; i++) {\n var bodyA = bodies[i - 1],\n bodyB = bodies[i],\n bodyAHeight = bodyA.bounds.max.y - bodyA.bounds.min.y,\n bodyAWidth = bodyA.bounds.max.x - bodyA.bounds.min.x, \n bodyBHeight = bodyB.bounds.max.y - bodyB.bounds.min.y,\n bodyBWidth = bodyB.bounds.max.x - bodyB.bounds.min.x;\n \n var defaults = {\n bodyA: bodyA,\n pointA: { x: bodyAWidth * xOffsetA, y: bodyAHeight * yOffsetA },\n bodyB: bodyB,\n pointB: { x: bodyBWidth * xOffsetB, y: bodyBHeight * yOffsetB }\n };\n \n var constraint = Common.extend(defaults, options);\n \n Composite.addConstraint(composite, Constraint.create(constraint));\n }\n\n composite.label += ' Chain';\n \n return composite;\n };\n\n /**\n * Connects bodies in the composite with constraints in a grid pattern, with optional cross braces.\n * @method mesh\n * @param {composite} composite\n * @param {number} columns\n * @param {number} rows\n * @param {boolean} crossBrace\n * @param {object} options\n * @return {composite} The composite containing objects meshed together with constraints\n */\n Composites.mesh = function(composite, columns, rows, crossBrace, options) {\n var bodies = composite.bodies,\n row,\n col,\n bodyA,\n bodyB,\n bodyC;\n \n for (row = 0; row < rows; row++) {\n for (col = 1; col < columns; col++) {\n bodyA = bodies[(col - 1) + (row * columns)];\n bodyB = bodies[col + (row * columns)];\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\n }\n\n if (row > 0) {\n for (col = 0; col < columns; col++) {\n bodyA = bodies[col + ((row - 1) * columns)];\n bodyB = bodies[col + (row * columns)];\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyA, bodyB: bodyB }, options)));\n\n if (crossBrace && col > 0) {\n bodyC = bodies[(col - 1) + ((row - 1) * columns)];\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\n }\n\n if (crossBrace && col < columns - 1) {\n bodyC = bodies[(col + 1) + ((row - 1) * columns)];\n Composite.addConstraint(composite, Constraint.create(Common.extend({ bodyA: bodyC, bodyB: bodyB }, options)));\n }\n }\n }\n }\n\n composite.label += ' Mesh';\n \n return composite;\n };\n \n /**\n * Create a new composite containing bodies created in the callback in a pyramid arrangement.\n * This function uses the body's bounds to prevent overlaps.\n * @method pyramid\n * @param {number} x Starting position in X.\n * @param {number} y Starting position in Y.\n * @param {number} columns\n * @param {number} rows\n * @param {number} columnGap\n * @param {number} rowGap\n * @param {function} callback\n * @return {composite} A new composite containing objects created in the callback\n */\n Composites.pyramid = function(x, y, columns, rows, columnGap, rowGap, callback) {\n return Composites.stack(x, y, columns, rows, columnGap, rowGap, function(stackX, stackY, column, row, lastBody, i) {\n var actualRows = Math.min(rows, Math.ceil(columns / 2)),\n lastBodyWidth = lastBody ? lastBody.bounds.max.x - lastBody.bounds.min.x : 0;\n \n if (row > actualRows)\n return;\n \n // reverse row order\n row = actualRows - row;\n \n var start = row,\n end = columns - 1 - row;\n\n if (column < start || column > end)\n return;\n \n // retroactively fix the first body's position, since width was unknown\n if (i === 1) {\n Body.translate(lastBody, { x: (column + (columns % 2 === 1 ? 1 : -1)) * lastBodyWidth, y: 0 });\n }\n\n var xOffset = lastBody ? column * lastBodyWidth : 0;\n \n return callback(x + xOffset + column * columnGap, stackY, column, row, lastBody, i);\n });\n };\n\n /**\n * This has now moved to the [newtonsCradle example](https://github.com/liabru/matter-js/blob/master/examples/newtonsCradle.js), follow that instead as this function is deprecated here.\n * @deprecated moved to newtonsCradle example\n * @method newtonsCradle\n * @param {number} x Starting position in X.\n * @param {number} y Starting position in Y.\n * @param {number} number\n * @param {number} size\n * @param {number} length\n * @return {composite} A new composite newtonsCradle body\n */\n Composites.newtonsCradle = function(x, y, number, size, length) {\n var newtonsCradle = Composite.create({ label: 'Newtons Cradle' });\n\n for (var i = 0; i < number; i++) {\n var separation = 1.9,\n circle = Bodies.circle(x + i * (size * separation), y + length, size, \n { inertia: Infinity, restitution: 1, friction: 0, frictionAir: 0.0001, slop: 1 }),\n constraint = Constraint.create({ pointA: { x: x + i * (size * separation), y: y }, bodyB: circle });\n\n Composite.addBody(newtonsCradle, circle);\n Composite.addConstraint(newtonsCradle, constraint);\n }\n\n return newtonsCradle;\n };\n\n deprecated(Composites, 'newtonsCradle', 'Composites.newtonsCradle ➤ moved to newtonsCradle example');\n \n /**\n * This has now moved to the [car example](https://github.com/liabru/matter-js/blob/master/examples/car.js), follow that instead as this function is deprecated here.\n * @deprecated moved to car example\n * @method car\n * @param {number} x Starting position in X.\n * @param {number} y Starting position in Y.\n * @param {number} width\n * @param {number} height\n * @param {number} wheelSize\n * @return {composite} A new composite car body\n */\n Composites.car = function(x, y, width, height, wheelSize) {\n var group = Body.nextGroup(true),\n wheelBase = 20,\n wheelAOffset = -width * 0.5 + wheelBase,\n wheelBOffset = width * 0.5 - wheelBase,\n wheelYOffset = 0;\n \n var car = Composite.create({ label: 'Car' }),\n body = Bodies.rectangle(x, y, width, height, { \n collisionFilter: {\n group: group\n },\n chamfer: {\n radius: height * 0.5\n },\n density: 0.0002\n });\n \n var wheelA = Bodies.circle(x + wheelAOffset, y + wheelYOffset, wheelSize, { \n collisionFilter: {\n group: group\n },\n friction: 0.8\n });\n \n var wheelB = Bodies.circle(x + wheelBOffset, y + wheelYOffset, wheelSize, { \n collisionFilter: {\n group: group\n },\n friction: 0.8\n });\n \n var axelA = Constraint.create({\n bodyB: body,\n pointB: { x: wheelAOffset, y: wheelYOffset },\n bodyA: wheelA,\n stiffness: 1,\n length: 0\n });\n \n var axelB = Constraint.create({\n bodyB: body,\n pointB: { x: wheelBOffset, y: wheelYOffset },\n bodyA: wheelB,\n stiffness: 1,\n length: 0\n });\n \n Composite.addBody(car, body);\n Composite.addBody(car, wheelA);\n Composite.addBody(car, wheelB);\n Composite.addConstraint(car, axelA);\n Composite.addConstraint(car, axelB);\n\n return car;\n };\n\n deprecated(Composites, 'car', 'Composites.car ➤ moved to car example');\n\n /**\n * This has now moved to the [softBody example](https://github.com/liabru/matter-js/blob/master/examples/softBody.js)\n * and the [cloth example](https://github.com/liabru/matter-js/blob/master/examples/cloth.js), follow those instead as this function is deprecated here.\n * @deprecated moved to softBody and cloth examples\n * @method softBody\n * @param {number} x Starting position in X.\n * @param {number} y Starting position in Y.\n * @param {number} columns\n * @param {number} rows\n * @param {number} columnGap\n * @param {number} rowGap\n * @param {boolean} crossBrace\n * @param {number} particleRadius\n * @param {} particleOptions\n * @param {} constraintOptions\n * @return {composite} A new composite softBody\n */\n Composites.softBody = function(x, y, columns, rows, columnGap, rowGap, crossBrace, particleRadius, particleOptions, constraintOptions) {\n particleOptions = Common.extend({ inertia: Infinity }, particleOptions);\n constraintOptions = Common.extend({ stiffness: 0.2, render: { type: 'line', anchors: false } }, constraintOptions);\n\n var softBody = Composites.stack(x, y, columns, rows, columnGap, rowGap, function(stackX, stackY) {\n return Bodies.circle(stackX, stackY, particleRadius, particleOptions);\n });\n\n Composites.mesh(softBody, columns, rows, crossBrace, constraintOptions);\n\n softBody.label = 'Soft Body';\n\n return softBody;\n };\n\n deprecated(Composites, 'softBody', 'Composites.softBody ➤ moved to softBody and cloth examples');\n})();\n\n\n/***/ }),\n/* 23 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* This module has now been replaced by `Matter.Detector`.\n*\n* All usage should be migrated to `Matter.Detector` or another alternative.\n* For back-compatibility purposes this module will remain for a short term and then later removed in a future release.\n*\n* The `Matter.Grid` module contains methods for creating and manipulating collision broadphase grid structures.\n*\n* @class Grid\n* @deprecated\n*/\n\nvar Grid = {};\n\nmodule.exports = Grid;\n\nvar Pair = __webpack_require__(9);\nvar Common = __webpack_require__(0);\nvar deprecated = Common.deprecated;\n\n(function() {\n\n /**\n * Creates a new grid.\n * @deprecated replaced by Matter.Detector\n * @method create\n * @param {} options\n * @return {grid} A new grid\n */\n Grid.create = function(options) {\n var defaults = {\n buckets: {},\n pairs: {},\n pairsList: [],\n bucketWidth: 48,\n bucketHeight: 48\n };\n\n return Common.extend(defaults, options);\n };\n\n /**\n * The width of a single grid bucket.\n *\n * @property bucketWidth\n * @type number\n * @default 48\n */\n\n /**\n * The height of a single grid bucket.\n *\n * @property bucketHeight\n * @type number\n * @default 48\n */\n\n /**\n * Updates the grid.\n * @deprecated replaced by Matter.Detector\n * @method update\n * @param {grid} grid\n * @param {body[]} bodies\n * @param {engine} engine\n * @param {boolean} forceUpdate\n */\n Grid.update = function(grid, bodies, engine, forceUpdate) {\n var i, col, row,\n world = engine.world,\n buckets = grid.buckets,\n bucket,\n bucketId,\n gridChanged = false;\n\n for (i = 0; i < bodies.length; i++) {\n var body = bodies[i];\n\n if (body.isSleeping && !forceUpdate)\n continue;\n\n // temporary back compatibility bounds check\n if (world.bounds && (body.bounds.max.x < world.bounds.min.x || body.bounds.min.x > world.bounds.max.x\n || body.bounds.max.y < world.bounds.min.y || body.bounds.min.y > world.bounds.max.y))\n continue;\n\n var newRegion = Grid._getRegion(grid, body);\n\n // if the body has changed grid region\n if (!body.region || newRegion.id !== body.region.id || forceUpdate) {\n\n if (!body.region || forceUpdate)\n body.region = newRegion;\n\n var union = Grid._regionUnion(newRegion, body.region);\n\n // update grid buckets affected by region change\n // iterate over the union of both regions\n for (col = union.startCol; col <= union.endCol; col++) {\n for (row = union.startRow; row <= union.endRow; row++) {\n bucketId = Grid._getBucketId(col, row);\n bucket = buckets[bucketId];\n\n var isInsideNewRegion = (col >= newRegion.startCol && col <= newRegion.endCol\n && row >= newRegion.startRow && row <= newRegion.endRow);\n\n var isInsideOldRegion = (col >= body.region.startCol && col <= body.region.endCol\n && row >= body.region.startRow && row <= body.region.endRow);\n\n // remove from old region buckets\n if (!isInsideNewRegion && isInsideOldRegion) {\n if (isInsideOldRegion) {\n if (bucket)\n Grid._bucketRemoveBody(grid, bucket, body);\n }\n }\n\n // add to new region buckets\n if (body.region === newRegion || (isInsideNewRegion && !isInsideOldRegion) || forceUpdate) {\n if (!bucket)\n bucket = Grid._createBucket(buckets, bucketId);\n Grid._bucketAddBody(grid, bucket, body);\n }\n }\n }\n\n // set the new region\n body.region = newRegion;\n\n // flag changes so we can update pairs\n gridChanged = true;\n }\n }\n\n // update pairs list only if pairs changed (i.e. a body changed region)\n if (gridChanged)\n grid.pairsList = Grid._createActivePairsList(grid);\n };\n\n deprecated(Grid, 'update', 'Grid.update ➤ replaced by Matter.Detector');\n\n /**\n * Clears the grid.\n * @deprecated replaced by Matter.Detector\n * @method clear\n * @param {grid} grid\n */\n Grid.clear = function(grid) {\n grid.buckets = {};\n grid.pairs = {};\n grid.pairsList = [];\n };\n\n deprecated(Grid, 'clear', 'Grid.clear ➤ replaced by Matter.Detector');\n\n /**\n * Finds the union of two regions.\n * @method _regionUnion\n * @deprecated replaced by Matter.Detector\n * @private\n * @param {} regionA\n * @param {} regionB\n * @return {} region\n */\n Grid._regionUnion = function(regionA, regionB) {\n var startCol = Math.min(regionA.startCol, regionB.startCol),\n endCol = Math.max(regionA.endCol, regionB.endCol),\n startRow = Math.min(regionA.startRow, regionB.startRow),\n endRow = Math.max(regionA.endRow, regionB.endRow);\n\n return Grid._createRegion(startCol, endCol, startRow, endRow);\n };\n\n /**\n * Gets the region a given body falls in for a given grid.\n * @method _getRegion\n * @deprecated replaced by Matter.Detector\n * @private\n * @param {} grid\n * @param {} body\n * @return {} region\n */\n Grid._getRegion = function(grid, body) {\n var bounds = body.bounds,\n startCol = Math.floor(bounds.min.x / grid.bucketWidth),\n endCol = Math.floor(bounds.max.x / grid.bucketWidth),\n startRow = Math.floor(bounds.min.y / grid.bucketHeight),\n endRow = Math.floor(bounds.max.y / grid.bucketHeight);\n\n return Grid._createRegion(startCol, endCol, startRow, endRow);\n };\n\n /**\n * Creates a region.\n * @method _createRegion\n * @deprecated replaced by Matter.Detector\n * @private\n * @param {} startCol\n * @param {} endCol\n * @param {} startRow\n * @param {} endRow\n * @return {} region\n */\n Grid._createRegion = function(startCol, endCol, startRow, endRow) {\n return { \n id: startCol + ',' + endCol + ',' + startRow + ',' + endRow,\n startCol: startCol, \n endCol: endCol, \n startRow: startRow, \n endRow: endRow \n };\n };\n\n /**\n * Gets the bucket id at the given position.\n * @method _getBucketId\n * @deprecated replaced by Matter.Detector\n * @private\n * @param {} column\n * @param {} row\n * @return {string} bucket id\n */\n Grid._getBucketId = function(column, row) {\n return 'C' + column + 'R' + row;\n };\n\n /**\n * Creates a bucket.\n * @method _createBucket\n * @deprecated replaced by Matter.Detector\n * @private\n * @param {} buckets\n * @param {} bucketId\n * @return {} bucket\n */\n Grid._createBucket = function(buckets, bucketId) {\n var bucket = buckets[bucketId] = [];\n return bucket;\n };\n\n /**\n * Adds a body to a bucket.\n * @method _bucketAddBody\n * @deprecated replaced by Matter.Detector\n * @private\n * @param {} grid\n * @param {} bucket\n * @param {} body\n */\n Grid._bucketAddBody = function(grid, bucket, body) {\n var gridPairs = grid.pairs,\n pairId = Pair.id,\n bucketLength = bucket.length,\n i;\n\n // add new pairs\n for (i = 0; i < bucketLength; i++) {\n var bodyB = bucket[i];\n\n if (body.id === bodyB.id || (body.isStatic && bodyB.isStatic))\n continue;\n\n // keep track of the number of buckets the pair exists in\n // important for Grid.update to work\n var id = pairId(body, bodyB),\n pair = gridPairs[id];\n\n if (pair) {\n pair[2] += 1;\n } else {\n gridPairs[id] = [body, bodyB, 1];\n }\n }\n\n // add to bodies (after pairs, otherwise pairs with self)\n bucket.push(body);\n };\n\n /**\n * Removes a body from a bucket.\n * @method _bucketRemoveBody\n * @deprecated replaced by Matter.Detector\n * @private\n * @param {} grid\n * @param {} bucket\n * @param {} body\n */\n Grid._bucketRemoveBody = function(grid, bucket, body) {\n var gridPairs = grid.pairs,\n pairId = Pair.id,\n i;\n\n // remove from bucket\n bucket.splice(Common.indexOf(bucket, body), 1);\n\n var bucketLength = bucket.length;\n\n // update pair counts\n for (i = 0; i < bucketLength; i++) {\n // keep track of the number of buckets the pair exists in\n // important for _createActivePairsList to work\n var pair = gridPairs[pairId(body, bucket[i])];\n\n if (pair)\n pair[2] -= 1;\n }\n };\n\n /**\n * Generates a list of the active pairs in the grid.\n * @method _createActivePairsList\n * @deprecated replaced by Matter.Detector\n * @private\n * @param {} grid\n * @return [] pairs\n */\n Grid._createActivePairsList = function(grid) {\n var pair,\n gridPairs = grid.pairs,\n pairKeys = Common.keys(gridPairs),\n pairKeysLength = pairKeys.length,\n pairs = [],\n k;\n\n // iterate over grid.pairs\n for (k = 0; k < pairKeysLength; k++) {\n pair = gridPairs[pairKeys[k]];\n\n // if pair exists in at least one bucket\n // it is a pair that needs further collision testing so push it\n if (pair[2] > 0) {\n pairs.push(pair);\n } else {\n delete gridPairs[pairKeys[k]];\n }\n }\n\n return pairs;\n };\n \n})();\n\n\n/***/ }),\n/* 24 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.MouseConstraint` module contains methods for creating mouse constraints.\n* Mouse constraints are used for allowing user interaction, providing the ability to move bodies via the mouse or touch.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class MouseConstraint\n*/\n\nvar MouseConstraint = {};\n\nmodule.exports = MouseConstraint;\n\nvar Vertices = __webpack_require__(3);\nvar Sleeping = __webpack_require__(7);\nvar Mouse = __webpack_require__(14);\nvar Events = __webpack_require__(5);\nvar Detector = __webpack_require__(13);\nvar Constraint = __webpack_require__(10);\nvar Composite = __webpack_require__(6);\nvar Common = __webpack_require__(0);\nvar Bounds = __webpack_require__(1);\n\n(function() {\n\n /**\n * Creates a new mouse constraint.\n * All properties have default values, and many are pre-calculated automatically based on other properties.\n * See the properties section below for detailed information on what you can pass via the `options` object.\n * @method create\n * @param {engine} engine\n * @param {} options\n * @return {MouseConstraint} A new MouseConstraint\n */\n MouseConstraint.create = function(engine, options) {\n var mouse = (engine ? engine.mouse : null) || (options ? options.mouse : null);\n\n if (!mouse) {\n if (engine && engine.render && engine.render.canvas) {\n mouse = Mouse.create(engine.render.canvas);\n } else if (options && options.element) {\n mouse = Mouse.create(options.element);\n } else {\n mouse = Mouse.create();\n Common.warn('MouseConstraint.create: options.mouse was undefined, options.element was undefined, may not function as expected');\n }\n }\n\n var constraint = Constraint.create({ \n label: 'Mouse Constraint',\n pointA: mouse.position,\n pointB: { x: 0, y: 0 },\n length: 0.01, \n stiffness: 0.1,\n angularStiffness: 1,\n render: {\n strokeStyle: '#90EE90',\n lineWidth: 3\n }\n });\n\n var defaults = {\n type: 'mouseConstraint',\n mouse: mouse,\n element: null,\n body: null,\n constraint: constraint,\n collisionFilter: {\n category: 0x0001,\n mask: 0xFFFFFFFF,\n group: 0\n }\n };\n\n var mouseConstraint = Common.extend(defaults, options);\n\n Events.on(engine, 'beforeUpdate', function() {\n var allBodies = Composite.allBodies(engine.world);\n MouseConstraint.update(mouseConstraint, allBodies);\n MouseConstraint._triggerEvents(mouseConstraint);\n });\n\n return mouseConstraint;\n };\n\n /**\n * Updates the given mouse constraint.\n * @private\n * @method update\n * @param {MouseConstraint} mouseConstraint\n * @param {body[]} bodies\n */\n MouseConstraint.update = function(mouseConstraint, bodies) {\n var mouse = mouseConstraint.mouse,\n constraint = mouseConstraint.constraint,\n body = mouseConstraint.body;\n\n if (mouse.button === 0) {\n if (!constraint.bodyB) {\n for (var i = 0; i < bodies.length; i++) {\n body = bodies[i];\n if (Bounds.contains(body.bounds, mouse.position) \n && Detector.canCollide(body.collisionFilter, mouseConstraint.collisionFilter)) {\n for (var j = body.parts.length > 1 ? 1 : 0; j < body.parts.length; j++) {\n var part = body.parts[j];\n if (Vertices.contains(part.vertices, mouse.position)) {\n constraint.pointA = mouse.position;\n constraint.bodyB = mouseConstraint.body = body;\n constraint.pointB = { x: mouse.position.x - body.position.x, y: mouse.position.y - body.position.y };\n constraint.angleB = body.angle;\n\n Sleeping.set(body, false);\n Events.trigger(mouseConstraint, 'startdrag', { mouse: mouse, body: body });\n\n break;\n }\n }\n }\n }\n } else {\n Sleeping.set(constraint.bodyB, false);\n constraint.pointA = mouse.position;\n }\n } else {\n constraint.bodyB = mouseConstraint.body = null;\n constraint.pointB = null;\n\n if (body)\n Events.trigger(mouseConstraint, 'enddrag', { mouse: mouse, body: body });\n }\n };\n\n /**\n * Triggers mouse constraint events.\n * @method _triggerEvents\n * @private\n * @param {mouse} mouseConstraint\n */\n MouseConstraint._triggerEvents = function(mouseConstraint) {\n var mouse = mouseConstraint.mouse,\n mouseEvents = mouse.sourceEvents;\n\n if (mouseEvents.mousemove)\n Events.trigger(mouseConstraint, 'mousemove', { mouse: mouse });\n\n if (mouseEvents.mousedown)\n Events.trigger(mouseConstraint, 'mousedown', { mouse: mouse });\n\n if (mouseEvents.mouseup)\n Events.trigger(mouseConstraint, 'mouseup', { mouse: mouse });\n\n // reset the mouse state ready for the next step\n Mouse.clearSourceEvents(mouse);\n };\n\n /*\n *\n * Events Documentation\n *\n */\n\n /**\n * Fired when the mouse has moved (or a touch moves) during the last step\n *\n * @event mousemove\n * @param {} event An event object\n * @param {mouse} event.mouse The engine's mouse instance\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired when the mouse is down (or a touch has started) during the last step\n *\n * @event mousedown\n * @param {} event An event object\n * @param {mouse} event.mouse The engine's mouse instance\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired when the mouse is up (or a touch has ended) during the last step\n *\n * @event mouseup\n * @param {} event An event object\n * @param {mouse} event.mouse The engine's mouse instance\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired when the user starts dragging a body\n *\n * @event startdrag\n * @param {} event An event object\n * @param {mouse} event.mouse The engine's mouse instance\n * @param {body} event.body The body being dragged\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired when the user ends dragging a body\n *\n * @event enddrag\n * @param {} event An event object\n * @param {mouse} event.mouse The engine's mouse instance\n * @param {body} event.body The body that has stopped being dragged\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /*\n *\n * Properties Documentation\n *\n */\n\n /**\n * A `String` denoting the type of object.\n *\n * @property type\n * @type string\n * @default \"constraint\"\n * @readOnly\n */\n\n /**\n * The `Mouse` instance in use. If not supplied in `MouseConstraint.create`, one will be created.\n *\n * @property mouse\n * @type mouse\n * @default mouse\n */\n\n /**\n * The `Body` that is currently being moved by the user, or `null` if no body.\n *\n * @property body\n * @type body\n * @default null\n */\n\n /**\n * The `Constraint` object that is used to move the body during interaction.\n *\n * @property constraint\n * @type constraint\n */\n\n /**\n * An `Object` that specifies the collision filter properties.\n * The collision filter allows the user to define which types of body this mouse constraint can interact with.\n * See `body.collisionFilter` for more information.\n *\n * @property collisionFilter\n * @type object\n */\n\n})();\n\n\n/***/ }),\n/* 25 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Query` module contains methods for performing collision queries.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Query\n*/\n\nvar Query = {};\n\nmodule.exports = Query;\n\nvar Vector = __webpack_require__(2);\nvar Collision = __webpack_require__(8);\nvar Bounds = __webpack_require__(1);\nvar Bodies = __webpack_require__(12);\nvar Vertices = __webpack_require__(3);\n\n(function() {\n\n /**\n * Returns a list of collisions between `body` and `bodies`.\n * @method collides\n * @param {body} body\n * @param {body[]} bodies\n * @return {collision[]} Collisions\n */\n Query.collides = function(body, bodies) {\n var collisions = [],\n bodiesLength = bodies.length,\n bounds = body.bounds,\n collides = Collision.collides,\n overlaps = Bounds.overlaps;\n\n for (var i = 0; i < bodiesLength; i++) {\n var bodyA = bodies[i],\n partsALength = bodyA.parts.length,\n partsAStart = partsALength === 1 ? 0 : 1;\n \n if (overlaps(bodyA.bounds, bounds)) {\n for (var j = partsAStart; j < partsALength; j++) {\n var part = bodyA.parts[j];\n\n if (overlaps(part.bounds, bounds)) {\n var collision = collides(part, body);\n\n if (collision) {\n collisions.push(collision);\n break;\n }\n }\n }\n }\n }\n\n return collisions;\n };\n\n /**\n * Casts a ray segment against a set of bodies and returns all collisions, ray width is optional. Intersection points are not provided.\n * @method ray\n * @param {body[]} bodies\n * @param {vector} startPoint\n * @param {vector} endPoint\n * @param {number} [rayWidth]\n * @return {collision[]} Collisions\n */\n Query.ray = function(bodies, startPoint, endPoint, rayWidth) {\n rayWidth = rayWidth || 1e-100;\n\n var rayAngle = Vector.angle(startPoint, endPoint),\n rayLength = Vector.magnitude(Vector.sub(startPoint, endPoint)),\n rayX = (endPoint.x + startPoint.x) * 0.5,\n rayY = (endPoint.y + startPoint.y) * 0.5,\n ray = Bodies.rectangle(rayX, rayY, rayLength, rayWidth, { angle: rayAngle }),\n collisions = Query.collides(ray, bodies);\n\n for (var i = 0; i < collisions.length; i += 1) {\n var collision = collisions[i];\n collision.body = collision.bodyB = collision.bodyA; \n }\n\n return collisions;\n };\n\n /**\n * Returns all bodies whose bounds are inside (or outside if set) the given set of bounds, from the given set of bodies.\n * @method region\n * @param {body[]} bodies\n * @param {bounds} bounds\n * @param {bool} [outside=false]\n * @return {body[]} The bodies matching the query\n */\n Query.region = function(bodies, bounds, outside) {\n var result = [];\n\n for (var i = 0; i < bodies.length; i++) {\n var body = bodies[i],\n overlaps = Bounds.overlaps(body.bounds, bounds);\n if ((overlaps && !outside) || (!overlaps && outside))\n result.push(body);\n }\n\n return result;\n };\n\n /**\n * Returns all bodies whose vertices contain the given point, from the given set of bodies.\n * @method point\n * @param {body[]} bodies\n * @param {vector} point\n * @return {body[]} The bodies matching the query\n */\n Query.point = function(bodies, point) {\n var result = [];\n\n for (var i = 0; i < bodies.length; i++) {\n var body = bodies[i];\n \n if (Bounds.contains(body.bounds, point)) {\n for (var j = body.parts.length === 1 ? 0 : 1; j < body.parts.length; j++) {\n var part = body.parts[j];\n\n if (Bounds.contains(part.bounds, point)\n && Vertices.contains(part.vertices, point)) {\n result.push(body);\n break;\n }\n }\n }\n }\n\n return result;\n };\n\n})();\n\n\n/***/ }),\n/* 26 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Render` module is a lightweight, optional utility which provides a simple canvas based renderer for visualising instances of `Matter.Engine`.\n* It is intended for development and debugging purposes, but may also be suitable for simple games.\n* It includes a number of drawing options including wireframe, vector with support for sprites and viewports.\n*\n* @class Render\n*/\n\nvar Render = {};\n\nmodule.exports = Render;\n\nvar Body = __webpack_require__(4);\nvar Common = __webpack_require__(0);\nvar Composite = __webpack_require__(6);\nvar Bounds = __webpack_require__(1);\nvar Events = __webpack_require__(5);\nvar Vector = __webpack_require__(2);\nvar Mouse = __webpack_require__(14);\n\n(function() {\n\n var _requestAnimationFrame,\n _cancelAnimationFrame;\n\n if (typeof window !== 'undefined') {\n _requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame\n || window.mozRequestAnimationFrame || window.msRequestAnimationFrame\n || function(callback){ window.setTimeout(function() { callback(Common.now()); }, 1000 / 60); };\n\n _cancelAnimationFrame = window.cancelAnimationFrame || window.mozCancelAnimationFrame\n || window.webkitCancelAnimationFrame || window.msCancelAnimationFrame;\n }\n\n Render._goodFps = 30;\n Render._goodDelta = 1000 / 60;\n\n /**\n * Creates a new renderer. The options parameter is an object that specifies any properties you wish to override the defaults.\n * All properties have default values, and many are pre-calculated automatically based on other properties.\n * See the properties section below for detailed information on what you can pass via the `options` object.\n * @method create\n * @param {object} [options]\n * @return {render} A new renderer\n */\n Render.create = function(options) {\n var defaults = {\n engine: null,\n element: null,\n canvas: null,\n mouse: null,\n frameRequestId: null,\n timing: {\n historySize: 60,\n delta: 0,\n deltaHistory: [],\n lastTime: 0,\n lastTimestamp: 0,\n lastElapsed: 0,\n timestampElapsed: 0,\n timestampElapsedHistory: [],\n engineDeltaHistory: [],\n engineElapsedHistory: [],\n engineUpdatesHistory: [],\n elapsedHistory: []\n },\n options: {\n width: 800,\n height: 600,\n pixelRatio: 1,\n background: '#14151f',\n wireframeBackground: '#14151f',\n wireframeStrokeStyle: '#bbb',\n hasBounds: !!options.bounds,\n enabled: true,\n wireframes: true,\n showSleeping: true,\n showDebug: false,\n showStats: false,\n showPerformance: false,\n showBounds: false,\n showVelocity: false,\n showCollisions: false,\n showSeparations: false,\n showAxes: false,\n showPositions: false,\n showAngleIndicator: false,\n showIds: false,\n showVertexNumbers: false,\n showConvexHulls: false,\n showInternalEdges: false,\n showMousePosition: false\n }\n };\n\n var render = Common.extend(defaults, options);\n\n if (render.canvas) {\n render.canvas.width = render.options.width || render.canvas.width;\n render.canvas.height = render.options.height || render.canvas.height;\n }\n\n render.mouse = options.mouse;\n render.engine = options.engine;\n render.canvas = render.canvas || _createCanvas(render.options.width, render.options.height);\n render.context = render.canvas.getContext('2d');\n render.textures = {};\n\n render.bounds = render.bounds || {\n min: {\n x: 0,\n y: 0\n },\n max: {\n x: render.canvas.width,\n y: render.canvas.height\n }\n };\n\n // for temporary back compatibility only\n render.controller = Render;\n render.options.showBroadphase = false;\n\n if (render.options.pixelRatio !== 1) {\n Render.setPixelRatio(render, render.options.pixelRatio);\n }\n\n if (Common.isElement(render.element)) {\n render.element.appendChild(render.canvas);\n }\n\n return render;\n };\n\n /**\n * Continuously updates the render canvas on the `requestAnimationFrame` event.\n * @method run\n * @param {render} render\n */\n Render.run = function(render) {\n (function loop(time){\n render.frameRequestId = _requestAnimationFrame(loop);\n \n _updateTiming(render, time);\n\n Render.world(render, time);\n\n render.context.setTransform(render.options.pixelRatio, 0, 0, render.options.pixelRatio, 0, 0);\n\n if (render.options.showStats || render.options.showDebug) {\n Render.stats(render, render.context, time);\n }\n\n if (render.options.showPerformance || render.options.showDebug) {\n Render.performance(render, render.context, time);\n }\n\n render.context.setTransform(1, 0, 0, 1, 0, 0);\n })();\n };\n\n /**\n * Ends execution of `Render.run` on the given `render`, by canceling the animation frame request event loop.\n * @method stop\n * @param {render} render\n */\n Render.stop = function(render) {\n _cancelAnimationFrame(render.frameRequestId);\n };\n\n /**\n * Sets the pixel ratio of the renderer and updates the canvas.\n * To automatically detect the correct ratio, pass the string `'auto'` for `pixelRatio`.\n * @method setPixelRatio\n * @param {render} render\n * @param {number} pixelRatio\n */\n Render.setPixelRatio = function(render, pixelRatio) {\n var options = render.options,\n canvas = render.canvas;\n\n if (pixelRatio === 'auto') {\n pixelRatio = _getPixelRatio(canvas);\n }\n\n options.pixelRatio = pixelRatio;\n canvas.setAttribute('data-pixel-ratio', pixelRatio);\n canvas.width = options.width * pixelRatio;\n canvas.height = options.height * pixelRatio;\n canvas.style.width = options.width + 'px';\n canvas.style.height = options.height + 'px';\n };\n\n /**\n * Sets the render `width` and `height`.\n * \n * Updates the canvas accounting for `render.options.pixelRatio`. \n * \n * Updates the bottom right render bound `render.bounds.max` relative to the provided `width` and `height`.\n * The top left render bound `render.bounds.min` isn't changed.\n * \n * Follow this call with `Render.lookAt` if you need to change the render bounds.\n * \n * See also `Render.setPixelRatio`.\n * @method setSize\n * @param {render} render\n * @param {number} width The width (in CSS pixels)\n * @param {number} height The height (in CSS pixels)\n */\n Render.setSize = function(render, width, height) {\n render.options.width = width;\n render.options.height = height;\n render.bounds.max.x = render.bounds.min.x + width;\n render.bounds.max.y = render.bounds.min.y + height;\n\n if (render.options.pixelRatio !== 1) {\n Render.setPixelRatio(render, render.options.pixelRatio);\n } else {\n render.canvas.width = width;\n render.canvas.height = height;\n }\n };\n\n /**\n * Positions and sizes the viewport around the given object bounds.\n * Objects must have at least one of the following properties:\n * - `object.bounds`\n * - `object.position`\n * - `object.min` and `object.max`\n * - `object.x` and `object.y`\n * @method lookAt\n * @param {render} render\n * @param {object[]} objects\n * @param {vector} [padding]\n * @param {bool} [center=true]\n */\n Render.lookAt = function(render, objects, padding, center) {\n center = typeof center !== 'undefined' ? center : true;\n objects = Common.isArray(objects) ? objects : [objects];\n padding = padding || {\n x: 0,\n y: 0\n };\n\n // find bounds of all objects\n var bounds = {\n min: { x: Infinity, y: Infinity },\n max: { x: -Infinity, y: -Infinity }\n };\n\n for (var i = 0; i < objects.length; i += 1) {\n var object = objects[i],\n min = object.bounds ? object.bounds.min : (object.min || object.position || object),\n max = object.bounds ? object.bounds.max : (object.max || object.position || object);\n\n if (min && max) {\n if (min.x < bounds.min.x)\n bounds.min.x = min.x;\n\n if (max.x > bounds.max.x)\n bounds.max.x = max.x;\n\n if (min.y < bounds.min.y)\n bounds.min.y = min.y;\n\n if (max.y > bounds.max.y)\n bounds.max.y = max.y;\n }\n }\n\n // find ratios\n var width = (bounds.max.x - bounds.min.x) + 2 * padding.x,\n height = (bounds.max.y - bounds.min.y) + 2 * padding.y,\n viewHeight = render.canvas.height,\n viewWidth = render.canvas.width,\n outerRatio = viewWidth / viewHeight,\n innerRatio = width / height,\n scaleX = 1,\n scaleY = 1;\n\n // find scale factor\n if (innerRatio > outerRatio) {\n scaleY = innerRatio / outerRatio;\n } else {\n scaleX = outerRatio / innerRatio;\n }\n\n // enable bounds\n render.options.hasBounds = true;\n\n // position and size\n render.bounds.min.x = bounds.min.x;\n render.bounds.max.x = bounds.min.x + width * scaleX;\n render.bounds.min.y = bounds.min.y;\n render.bounds.max.y = bounds.min.y + height * scaleY;\n\n // center\n if (center) {\n render.bounds.min.x += width * 0.5 - (width * scaleX) * 0.5;\n render.bounds.max.x += width * 0.5 - (width * scaleX) * 0.5;\n render.bounds.min.y += height * 0.5 - (height * scaleY) * 0.5;\n render.bounds.max.y += height * 0.5 - (height * scaleY) * 0.5;\n }\n\n // padding\n render.bounds.min.x -= padding.x;\n render.bounds.max.x -= padding.x;\n render.bounds.min.y -= padding.y;\n render.bounds.max.y -= padding.y;\n\n // update mouse\n if (render.mouse) {\n Mouse.setScale(render.mouse, {\n x: (render.bounds.max.x - render.bounds.min.x) / render.canvas.width,\n y: (render.bounds.max.y - render.bounds.min.y) / render.canvas.height\n });\n\n Mouse.setOffset(render.mouse, render.bounds.min);\n }\n };\n\n /**\n * Applies viewport transforms based on `render.bounds` to a render context.\n * @method startViewTransform\n * @param {render} render\n */\n Render.startViewTransform = function(render) {\n var boundsWidth = render.bounds.max.x - render.bounds.min.x,\n boundsHeight = render.bounds.max.y - render.bounds.min.y,\n boundsScaleX = boundsWidth / render.options.width,\n boundsScaleY = boundsHeight / render.options.height;\n\n render.context.setTransform(\n render.options.pixelRatio / boundsScaleX, 0, 0, \n render.options.pixelRatio / boundsScaleY, 0, 0\n );\n \n render.context.translate(-render.bounds.min.x, -render.bounds.min.y);\n };\n\n /**\n * Resets all transforms on the render context.\n * @method endViewTransform\n * @param {render} render\n */\n Render.endViewTransform = function(render) {\n render.context.setTransform(render.options.pixelRatio, 0, 0, render.options.pixelRatio, 0, 0);\n };\n\n /**\n * Renders the given `engine`'s `Matter.World` object.\n * This is the entry point for all rendering and should be called every time the scene changes.\n * @method world\n * @param {render} render\n */\n Render.world = function(render, time) {\n var startTime = Common.now(),\n engine = render.engine,\n world = engine.world,\n canvas = render.canvas,\n context = render.context,\n options = render.options,\n timing = render.timing;\n\n var allBodies = Composite.allBodies(world),\n allConstraints = Composite.allConstraints(world),\n background = options.wireframes ? options.wireframeBackground : options.background,\n bodies = [],\n constraints = [],\n i;\n\n var event = {\n timestamp: engine.timing.timestamp\n };\n\n Events.trigger(render, 'beforeRender', event);\n\n // apply background if it has changed\n if (render.currentBackground !== background)\n _applyBackground(render, background);\n\n // clear the canvas with a transparent fill, to allow the canvas background to show\n context.globalCompositeOperation = 'source-in';\n context.fillStyle = \"transparent\";\n context.fillRect(0, 0, canvas.width, canvas.height);\n context.globalCompositeOperation = 'source-over';\n\n // handle bounds\n if (options.hasBounds) {\n // filter out bodies that are not in view\n for (i = 0; i < allBodies.length; i++) {\n var body = allBodies[i];\n if (Bounds.overlaps(body.bounds, render.bounds))\n bodies.push(body);\n }\n\n // filter out constraints that are not in view\n for (i = 0; i < allConstraints.length; i++) {\n var constraint = allConstraints[i],\n bodyA = constraint.bodyA,\n bodyB = constraint.bodyB,\n pointAWorld = constraint.pointA,\n pointBWorld = constraint.pointB;\n\n if (bodyA) pointAWorld = Vector.add(bodyA.position, constraint.pointA);\n if (bodyB) pointBWorld = Vector.add(bodyB.position, constraint.pointB);\n\n if (!pointAWorld || !pointBWorld)\n continue;\n\n if (Bounds.contains(render.bounds, pointAWorld) || Bounds.contains(render.bounds, pointBWorld))\n constraints.push(constraint);\n }\n\n // transform the view\n Render.startViewTransform(render);\n\n // update mouse\n if (render.mouse) {\n Mouse.setScale(render.mouse, {\n x: (render.bounds.max.x - render.bounds.min.x) / render.options.width,\n y: (render.bounds.max.y - render.bounds.min.y) / render.options.height\n });\n\n Mouse.setOffset(render.mouse, render.bounds.min);\n }\n } else {\n constraints = allConstraints;\n bodies = allBodies;\n\n if (render.options.pixelRatio !== 1) {\n render.context.setTransform(render.options.pixelRatio, 0, 0, render.options.pixelRatio, 0, 0);\n }\n }\n\n if (!options.wireframes || (engine.enableSleeping && options.showSleeping)) {\n // fully featured rendering of bodies\n Render.bodies(render, bodies, context);\n } else {\n if (options.showConvexHulls)\n Render.bodyConvexHulls(render, bodies, context);\n\n // optimised method for wireframes only\n Render.bodyWireframes(render, bodies, context);\n }\n\n if (options.showBounds)\n Render.bodyBounds(render, bodies, context);\n\n if (options.showAxes || options.showAngleIndicator)\n Render.bodyAxes(render, bodies, context);\n\n if (options.showPositions)\n Render.bodyPositions(render, bodies, context);\n\n if (options.showVelocity)\n Render.bodyVelocity(render, bodies, context);\n\n if (options.showIds)\n Render.bodyIds(render, bodies, context);\n\n if (options.showSeparations)\n Render.separations(render, engine.pairs.list, context);\n\n if (options.showCollisions)\n Render.collisions(render, engine.pairs.list, context);\n\n if (options.showVertexNumbers)\n Render.vertexNumbers(render, bodies, context);\n\n if (options.showMousePosition)\n Render.mousePosition(render, render.mouse, context);\n\n Render.constraints(constraints, context);\n\n if (options.hasBounds) {\n // revert view transforms\n Render.endViewTransform(render);\n }\n\n Events.trigger(render, 'afterRender', event);\n\n // log the time elapsed computing this update\n timing.lastElapsed = Common.now() - startTime;\n };\n\n /**\n * Renders statistics about the engine and world useful for debugging.\n * @private\n * @method stats\n * @param {render} render\n * @param {RenderingContext} context\n * @param {Number} time\n */\n Render.stats = function(render, context, time) {\n var engine = render.engine,\n world = engine.world,\n bodies = Composite.allBodies(world),\n parts = 0,\n width = 55,\n height = 44,\n x = 0,\n y = 0;\n \n // count parts\n for (var i = 0; i < bodies.length; i += 1) {\n parts += bodies[i].parts.length;\n }\n\n // sections\n var sections = {\n 'Part': parts,\n 'Body': bodies.length,\n 'Cons': Composite.allConstraints(world).length,\n 'Comp': Composite.allComposites(world).length,\n 'Pair': engine.pairs.list.length\n };\n\n // background\n context.fillStyle = '#0e0f19';\n context.fillRect(x, y, width * 5.5, height);\n\n context.font = '12px Arial';\n context.textBaseline = 'top';\n context.textAlign = 'right';\n\n // sections\n for (var key in sections) {\n var section = sections[key];\n // label\n context.fillStyle = '#aaa';\n context.fillText(key, x + width, y + 8);\n\n // value\n context.fillStyle = '#eee';\n context.fillText(section, x + width, y + 26);\n\n x += width;\n }\n };\n\n /**\n * Renders engine and render performance information.\n * @private\n * @method performance\n * @param {render} render\n * @param {RenderingContext} context\n */\n Render.performance = function(render, context) {\n var engine = render.engine,\n timing = render.timing,\n deltaHistory = timing.deltaHistory,\n elapsedHistory = timing.elapsedHistory,\n timestampElapsedHistory = timing.timestampElapsedHistory,\n engineDeltaHistory = timing.engineDeltaHistory,\n engineUpdatesHistory = timing.engineUpdatesHistory,\n engineElapsedHistory = timing.engineElapsedHistory,\n lastEngineUpdatesPerFrame = engine.timing.lastUpdatesPerFrame,\n lastEngineDelta = engine.timing.lastDelta;\n \n var deltaMean = _mean(deltaHistory),\n elapsedMean = _mean(elapsedHistory),\n engineDeltaMean = _mean(engineDeltaHistory),\n engineUpdatesMean = _mean(engineUpdatesHistory),\n engineElapsedMean = _mean(engineElapsedHistory),\n timestampElapsedMean = _mean(timestampElapsedHistory),\n rateMean = (timestampElapsedMean / deltaMean) || 0,\n neededUpdatesPerFrame = Math.round(deltaMean / lastEngineDelta),\n fps = (1000 / deltaMean) || 0;\n\n var graphHeight = 4,\n gap = 12,\n width = 60,\n height = 34,\n x = 10,\n y = 69;\n\n // background\n context.fillStyle = '#0e0f19';\n context.fillRect(0, 50, gap * 5 + width * 6 + 22, height);\n\n // show FPS\n Render.status(\n context, x, y, width, graphHeight, deltaHistory.length, \n Math.round(fps) + ' fps', \n fps / Render._goodFps,\n function(i) { return (deltaHistory[i] / deltaMean) - 1; }\n );\n\n // show engine delta\n Render.status(\n context, x + gap + width, y, width, graphHeight, engineDeltaHistory.length,\n lastEngineDelta.toFixed(2) + ' dt', \n Render._goodDelta / lastEngineDelta,\n function(i) { return (engineDeltaHistory[i] / engineDeltaMean) - 1; }\n );\n\n // show engine updates per frame\n Render.status(\n context, x + (gap + width) * 2, y, width, graphHeight, engineUpdatesHistory.length,\n lastEngineUpdatesPerFrame + ' upf', \n Math.pow(Common.clamp((engineUpdatesMean / neededUpdatesPerFrame) || 1, 0, 1), 4),\n function(i) { return (engineUpdatesHistory[i] / engineUpdatesMean) - 1; }\n );\n\n // show engine update time\n Render.status(\n context, x + (gap + width) * 3, y, width, graphHeight, engineElapsedHistory.length,\n engineElapsedMean.toFixed(2) + ' ut', \n 1 - (lastEngineUpdatesPerFrame * engineElapsedMean / Render._goodFps),\n function(i) { return (engineElapsedHistory[i] / engineElapsedMean) - 1; }\n );\n\n // show render time\n Render.status(\n context, x + (gap + width) * 4, y, width, graphHeight, elapsedHistory.length,\n elapsedMean.toFixed(2) + ' rt', \n 1 - (elapsedMean / Render._goodFps),\n function(i) { return (elapsedHistory[i] / elapsedMean) - 1; }\n );\n\n // show effective speed\n Render.status(\n context, x + (gap + width) * 5, y, width, graphHeight, timestampElapsedHistory.length, \n rateMean.toFixed(2) + ' x', \n rateMean * rateMean * rateMean,\n function(i) { return (((timestampElapsedHistory[i] / deltaHistory[i]) / rateMean) || 0) - 1; }\n );\n };\n\n /**\n * Renders a label, indicator and a chart.\n * @private\n * @method status\n * @param {RenderingContext} context\n * @param {number} x\n * @param {number} y\n * @param {number} width\n * @param {number} height\n * @param {number} count\n * @param {string} label\n * @param {string} indicator\n * @param {function} plotY\n */\n Render.status = function(context, x, y, width, height, count, label, indicator, plotY) {\n // background\n context.strokeStyle = '#888';\n context.fillStyle = '#444';\n context.lineWidth = 1;\n context.fillRect(x, y + 7, width, 1);\n\n // chart\n context.beginPath();\n context.moveTo(x, y + 7 - height * Common.clamp(0.4 * plotY(0), -2, 2));\n for (var i = 0; i < width; i += 1) {\n context.lineTo(x + i, y + 7 - (i < count ? height * Common.clamp(0.4 * plotY(i), -2, 2) : 0));\n }\n context.stroke();\n\n // indicator\n context.fillStyle = 'hsl(' + Common.clamp(25 + 95 * indicator, 0, 120) + ',100%,60%)';\n context.fillRect(x, y - 7, 4, 4);\n\n // label\n context.font = '12px Arial';\n context.textBaseline = 'middle';\n context.textAlign = 'right';\n context.fillStyle = '#eee';\n context.fillText(label, x + width, y - 5);\n };\n\n /**\n * Description\n * @private\n * @method constraints\n * @param {constraint[]} constraints\n * @param {RenderingContext} context\n */\n Render.constraints = function(constraints, context) {\n var c = context;\n\n for (var i = 0; i < constraints.length; i++) {\n var constraint = constraints[i];\n\n if (!constraint.render.visible || !constraint.pointA || !constraint.pointB)\n continue;\n\n var bodyA = constraint.bodyA,\n bodyB = constraint.bodyB,\n start,\n end;\n\n if (bodyA) {\n start = Vector.add(bodyA.position, constraint.pointA);\n } else {\n start = constraint.pointA;\n }\n\n if (constraint.render.type === 'pin') {\n c.beginPath();\n c.arc(start.x, start.y, 3, 0, 2 * Math.PI);\n c.closePath();\n } else {\n if (bodyB) {\n end = Vector.add(bodyB.position, constraint.pointB);\n } else {\n end = constraint.pointB;\n }\n\n c.beginPath();\n c.moveTo(start.x, start.y);\n\n if (constraint.render.type === 'spring') {\n var delta = Vector.sub(end, start),\n normal = Vector.perp(Vector.normalise(delta)),\n coils = Math.ceil(Common.clamp(constraint.length / 5, 12, 20)),\n offset;\n\n for (var j = 1; j < coils; j += 1) {\n offset = j % 2 === 0 ? 1 : -1;\n\n c.lineTo(\n start.x + delta.x * (j / coils) + normal.x * offset * 4,\n start.y + delta.y * (j / coils) + normal.y * offset * 4\n );\n }\n }\n\n c.lineTo(end.x, end.y);\n }\n\n if (constraint.render.lineWidth) {\n c.lineWidth = constraint.render.lineWidth;\n c.strokeStyle = constraint.render.strokeStyle;\n c.stroke();\n }\n\n if (constraint.render.anchors) {\n c.fillStyle = constraint.render.strokeStyle;\n c.beginPath();\n c.arc(start.x, start.y, 3, 0, 2 * Math.PI);\n c.arc(end.x, end.y, 3, 0, 2 * Math.PI);\n c.closePath();\n c.fill();\n }\n }\n };\n\n /**\n * Description\n * @private\n * @method bodies\n * @param {render} render\n * @param {body[]} bodies\n * @param {RenderingContext} context\n */\n Render.bodies = function(render, bodies, context) {\n var c = context,\n engine = render.engine,\n options = render.options,\n showInternalEdges = options.showInternalEdges || !options.wireframes,\n body,\n part,\n i,\n k;\n\n for (i = 0; i < bodies.length; i++) {\n body = bodies[i];\n\n if (!body.render.visible)\n continue;\n\n // handle compound parts\n for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++) {\n part = body.parts[k];\n\n if (!part.render.visible)\n continue;\n\n if (options.showSleeping && body.isSleeping) {\n c.globalAlpha = 0.5 * part.render.opacity;\n } else if (part.render.opacity !== 1) {\n c.globalAlpha = part.render.opacity;\n }\n\n if (part.render.sprite && part.render.sprite.texture && !options.wireframes) {\n // part sprite\n var sprite = part.render.sprite,\n texture = _getTexture(render, sprite.texture);\n\n c.translate(part.position.x, part.position.y);\n c.rotate(part.angle);\n\n c.drawImage(\n texture,\n texture.width * -sprite.xOffset * sprite.xScale,\n texture.height * -sprite.yOffset * sprite.yScale,\n texture.width * sprite.xScale,\n texture.height * sprite.yScale\n );\n\n // revert translation, hopefully faster than save / restore\n c.rotate(-part.angle);\n c.translate(-part.position.x, -part.position.y);\n } else {\n // part polygon\n if (part.circleRadius) {\n c.beginPath();\n c.arc(part.position.x, part.position.y, part.circleRadius, 0, 2 * Math.PI);\n } else {\n c.beginPath();\n c.moveTo(part.vertices[0].x, part.vertices[0].y);\n\n for (var j = 1; j < part.vertices.length; j++) {\n if (!part.vertices[j - 1].isInternal || showInternalEdges) {\n c.lineTo(part.vertices[j].x, part.vertices[j].y);\n } else {\n c.moveTo(part.vertices[j].x, part.vertices[j].y);\n }\n\n if (part.vertices[j].isInternal && !showInternalEdges) {\n c.moveTo(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y);\n }\n }\n\n c.lineTo(part.vertices[0].x, part.vertices[0].y);\n c.closePath();\n }\n\n if (!options.wireframes) {\n c.fillStyle = part.render.fillStyle;\n\n if (part.render.lineWidth) {\n c.lineWidth = part.render.lineWidth;\n c.strokeStyle = part.render.strokeStyle;\n c.stroke();\n }\n\n c.fill();\n } else {\n c.lineWidth = 1;\n c.strokeStyle = render.options.wireframeStrokeStyle;\n c.stroke();\n }\n }\n\n c.globalAlpha = 1;\n }\n }\n };\n\n /**\n * Optimised method for drawing body wireframes in one pass\n * @private\n * @method bodyWireframes\n * @param {render} render\n * @param {body[]} bodies\n * @param {RenderingContext} context\n */\n Render.bodyWireframes = function(render, bodies, context) {\n var c = context,\n showInternalEdges = render.options.showInternalEdges,\n body,\n part,\n i,\n j,\n k;\n\n c.beginPath();\n\n // render all bodies\n for (i = 0; i < bodies.length; i++) {\n body = bodies[i];\n\n if (!body.render.visible)\n continue;\n\n // handle compound parts\n for (k = body.parts.length > 1 ? 1 : 0; k < body.parts.length; k++) {\n part = body.parts[k];\n\n c.moveTo(part.vertices[0].x, part.vertices[0].y);\n\n for (j = 1; j < part.vertices.length; j++) {\n if (!part.vertices[j - 1].isInternal || showInternalEdges) {\n c.lineTo(part.vertices[j].x, part.vertices[j].y);\n } else {\n c.moveTo(part.vertices[j].x, part.vertices[j].y);\n }\n\n if (part.vertices[j].isInternal && !showInternalEdges) {\n c.moveTo(part.vertices[(j + 1) % part.vertices.length].x, part.vertices[(j + 1) % part.vertices.length].y);\n }\n }\n\n c.lineTo(part.vertices[0].x, part.vertices[0].y);\n }\n }\n\n c.lineWidth = 1;\n c.strokeStyle = render.options.wireframeStrokeStyle;\n c.stroke();\n };\n\n /**\n * Optimised method for drawing body convex hull wireframes in one pass\n * @private\n * @method bodyConvexHulls\n * @param {render} render\n * @param {body[]} bodies\n * @param {RenderingContext} context\n */\n Render.bodyConvexHulls = function(render, bodies, context) {\n var c = context,\n body,\n part,\n i,\n j,\n k;\n\n c.beginPath();\n\n // render convex hulls\n for (i = 0; i < bodies.length; i++) {\n body = bodies[i];\n\n if (!body.render.visible || body.parts.length === 1)\n continue;\n\n c.moveTo(body.vertices[0].x, body.vertices[0].y);\n\n for (j = 1; j < body.vertices.length; j++) {\n c.lineTo(body.vertices[j].x, body.vertices[j].y);\n }\n\n c.lineTo(body.vertices[0].x, body.vertices[0].y);\n }\n\n c.lineWidth = 1;\n c.strokeStyle = 'rgba(255,255,255,0.2)';\n c.stroke();\n };\n\n /**\n * Renders body vertex numbers.\n * @private\n * @method vertexNumbers\n * @param {render} render\n * @param {body[]} bodies\n * @param {RenderingContext} context\n */\n Render.vertexNumbers = function(render, bodies, context) {\n var c = context,\n i,\n j,\n k;\n\n for (i = 0; i < bodies.length; i++) {\n var parts = bodies[i].parts;\n for (k = parts.length > 1 ? 1 : 0; k < parts.length; k++) {\n var part = parts[k];\n for (j = 0; j < part.vertices.length; j++) {\n c.fillStyle = 'rgba(255,255,255,0.2)';\n c.fillText(i + '_' + j, part.position.x + (part.vertices[j].x - part.position.x) * 0.8, part.position.y + (part.vertices[j].y - part.position.y) * 0.8);\n }\n }\n }\n };\n\n /**\n * Renders mouse position.\n * @private\n * @method mousePosition\n * @param {render} render\n * @param {mouse} mouse\n * @param {RenderingContext} context\n */\n Render.mousePosition = function(render, mouse, context) {\n var c = context;\n c.fillStyle = 'rgba(255,255,255,0.8)';\n c.fillText(mouse.position.x + ' ' + mouse.position.y, mouse.position.x + 5, mouse.position.y - 5);\n };\n\n /**\n * Draws body bounds\n * @private\n * @method bodyBounds\n * @param {render} render\n * @param {body[]} bodies\n * @param {RenderingContext} context\n */\n Render.bodyBounds = function(render, bodies, context) {\n var c = context,\n engine = render.engine,\n options = render.options;\n\n c.beginPath();\n\n for (var i = 0; i < bodies.length; i++) {\n var body = bodies[i];\n\n if (body.render.visible) {\n var parts = bodies[i].parts;\n for (var j = parts.length > 1 ? 1 : 0; j < parts.length; j++) {\n var part = parts[j];\n c.rect(part.bounds.min.x, part.bounds.min.y, part.bounds.max.x - part.bounds.min.x, part.bounds.max.y - part.bounds.min.y);\n }\n }\n }\n\n if (options.wireframes) {\n c.strokeStyle = 'rgba(255,255,255,0.08)';\n } else {\n c.strokeStyle = 'rgba(0,0,0,0.1)';\n }\n\n c.lineWidth = 1;\n c.stroke();\n };\n\n /**\n * Draws body angle indicators and axes\n * @private\n * @method bodyAxes\n * @param {render} render\n * @param {body[]} bodies\n * @param {RenderingContext} context\n */\n Render.bodyAxes = function(render, bodies, context) {\n var c = context,\n engine = render.engine,\n options = render.options,\n part,\n i,\n j,\n k;\n\n c.beginPath();\n\n for (i = 0; i < bodies.length; i++) {\n var body = bodies[i],\n parts = body.parts;\n\n if (!body.render.visible)\n continue;\n\n if (options.showAxes) {\n // render all axes\n for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) {\n part = parts[j];\n for (k = 0; k < part.axes.length; k++) {\n var axis = part.axes[k];\n c.moveTo(part.position.x, part.position.y);\n c.lineTo(part.position.x + axis.x * 20, part.position.y + axis.y * 20);\n }\n }\n } else {\n for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) {\n part = parts[j];\n for (k = 0; k < part.axes.length; k++) {\n // render a single axis indicator\n c.moveTo(part.position.x, part.position.y);\n c.lineTo((part.vertices[0].x + part.vertices[part.vertices.length-1].x) / 2,\n (part.vertices[0].y + part.vertices[part.vertices.length-1].y) / 2);\n }\n }\n }\n }\n\n if (options.wireframes) {\n c.strokeStyle = 'indianred';\n c.lineWidth = 1;\n } else {\n c.strokeStyle = 'rgba(255, 255, 255, 0.4)';\n c.globalCompositeOperation = 'overlay';\n c.lineWidth = 2;\n }\n\n c.stroke();\n c.globalCompositeOperation = 'source-over';\n };\n\n /**\n * Draws body positions\n * @private\n * @method bodyPositions\n * @param {render} render\n * @param {body[]} bodies\n * @param {RenderingContext} context\n */\n Render.bodyPositions = function(render, bodies, context) {\n var c = context,\n engine = render.engine,\n options = render.options,\n body,\n part,\n i,\n k;\n\n c.beginPath();\n\n // render current positions\n for (i = 0; i < bodies.length; i++) {\n body = bodies[i];\n\n if (!body.render.visible)\n continue;\n\n // handle compound parts\n for (k = 0; k < body.parts.length; k++) {\n part = body.parts[k];\n c.arc(part.position.x, part.position.y, 3, 0, 2 * Math.PI, false);\n c.closePath();\n }\n }\n\n if (options.wireframes) {\n c.fillStyle = 'indianred';\n } else {\n c.fillStyle = 'rgba(0,0,0,0.5)';\n }\n c.fill();\n\n c.beginPath();\n\n // render previous positions\n for (i = 0; i < bodies.length; i++) {\n body = bodies[i];\n if (body.render.visible) {\n c.arc(body.positionPrev.x, body.positionPrev.y, 2, 0, 2 * Math.PI, false);\n c.closePath();\n }\n }\n\n c.fillStyle = 'rgba(255,165,0,0.8)';\n c.fill();\n };\n\n /**\n * Draws body velocity\n * @private\n * @method bodyVelocity\n * @param {render} render\n * @param {body[]} bodies\n * @param {RenderingContext} context\n */\n Render.bodyVelocity = function(render, bodies, context) {\n var c = context;\n\n c.beginPath();\n\n for (var i = 0; i < bodies.length; i++) {\n var body = bodies[i];\n\n if (!body.render.visible)\n continue;\n\n var velocity = Body.getVelocity(body);\n\n c.moveTo(body.position.x, body.position.y);\n c.lineTo(body.position.x + velocity.x, body.position.y + velocity.y);\n }\n\n c.lineWidth = 3;\n c.strokeStyle = 'cornflowerblue';\n c.stroke();\n };\n\n /**\n * Draws body ids\n * @private\n * @method bodyIds\n * @param {render} render\n * @param {body[]} bodies\n * @param {RenderingContext} context\n */\n Render.bodyIds = function(render, bodies, context) {\n var c = context,\n i,\n j;\n\n for (i = 0; i < bodies.length; i++) {\n if (!bodies[i].render.visible)\n continue;\n\n var parts = bodies[i].parts;\n for (j = parts.length > 1 ? 1 : 0; j < parts.length; j++) {\n var part = parts[j];\n c.font = \"12px Arial\";\n c.fillStyle = 'rgba(255,255,255,0.5)';\n c.fillText(part.id, part.position.x + 10, part.position.y - 10);\n }\n }\n };\n\n /**\n * Description\n * @private\n * @method collisions\n * @param {render} render\n * @param {pair[]} pairs\n * @param {RenderingContext} context\n */\n Render.collisions = function(render, pairs, context) {\n var c = context,\n options = render.options,\n pair,\n collision,\n corrected,\n bodyA,\n bodyB,\n i,\n j;\n\n c.beginPath();\n\n // render collision positions\n for (i = 0; i < pairs.length; i++) {\n pair = pairs[i];\n\n if (!pair.isActive)\n continue;\n\n collision = pair.collision;\n for (j = 0; j < pair.contactCount; j++) {\n var contact = pair.contacts[j],\n vertex = contact.vertex;\n c.rect(vertex.x - 1.5, vertex.y - 1.5, 3.5, 3.5);\n }\n }\n\n if (options.wireframes) {\n c.fillStyle = 'rgba(255,255,255,0.7)';\n } else {\n c.fillStyle = 'orange';\n }\n c.fill();\n\n c.beginPath();\n\n // render collision normals\n for (i = 0; i < pairs.length; i++) {\n pair = pairs[i];\n\n if (!pair.isActive)\n continue;\n\n collision = pair.collision;\n\n if (pair.contactCount > 0) {\n var normalPosX = pair.contacts[0].vertex.x,\n normalPosY = pair.contacts[0].vertex.y;\n\n if (pair.contactCount === 2) {\n normalPosX = (pair.contacts[0].vertex.x + pair.contacts[1].vertex.x) / 2;\n normalPosY = (pair.contacts[0].vertex.y + pair.contacts[1].vertex.y) / 2;\n }\n\n if (collision.bodyB === collision.supports[0].body || collision.bodyA.isStatic === true) {\n c.moveTo(normalPosX - collision.normal.x * 8, normalPosY - collision.normal.y * 8);\n } else {\n c.moveTo(normalPosX + collision.normal.x * 8, normalPosY + collision.normal.y * 8);\n }\n\n c.lineTo(normalPosX, normalPosY);\n }\n }\n\n if (options.wireframes) {\n c.strokeStyle = 'rgba(255,165,0,0.7)';\n } else {\n c.strokeStyle = 'orange';\n }\n\n c.lineWidth = 1;\n c.stroke();\n };\n\n /**\n * Description\n * @private\n * @method separations\n * @param {render} render\n * @param {pair[]} pairs\n * @param {RenderingContext} context\n */\n Render.separations = function(render, pairs, context) {\n var c = context,\n options = render.options,\n pair,\n collision,\n corrected,\n bodyA,\n bodyB,\n i,\n j;\n\n c.beginPath();\n\n // render separations\n for (i = 0; i < pairs.length; i++) {\n pair = pairs[i];\n\n if (!pair.isActive)\n continue;\n\n collision = pair.collision;\n bodyA = collision.bodyA;\n bodyB = collision.bodyB;\n\n var k = 1;\n\n if (!bodyB.isStatic && !bodyA.isStatic) k = 0.5;\n if (bodyB.isStatic) k = 0;\n\n c.moveTo(bodyB.position.x, bodyB.position.y);\n c.lineTo(bodyB.position.x - collision.penetration.x * k, bodyB.position.y - collision.penetration.y * k);\n\n k = 1;\n\n if (!bodyB.isStatic && !bodyA.isStatic) k = 0.5;\n if (bodyA.isStatic) k = 0;\n\n c.moveTo(bodyA.position.x, bodyA.position.y);\n c.lineTo(bodyA.position.x + collision.penetration.x * k, bodyA.position.y + collision.penetration.y * k);\n }\n\n if (options.wireframes) {\n c.strokeStyle = 'rgba(255,165,0,0.5)';\n } else {\n c.strokeStyle = 'orange';\n }\n c.stroke();\n };\n\n /**\n * Description\n * @private\n * @method inspector\n * @param {inspector} inspector\n * @param {RenderingContext} context\n */\n Render.inspector = function(inspector, context) {\n var engine = inspector.engine,\n selected = inspector.selected,\n render = inspector.render,\n options = render.options,\n bounds;\n\n if (options.hasBounds) {\n var boundsWidth = render.bounds.max.x - render.bounds.min.x,\n boundsHeight = render.bounds.max.y - render.bounds.min.y,\n boundsScaleX = boundsWidth / render.options.width,\n boundsScaleY = boundsHeight / render.options.height;\n\n context.scale(1 / boundsScaleX, 1 / boundsScaleY);\n context.translate(-render.bounds.min.x, -render.bounds.min.y);\n }\n\n for (var i = 0; i < selected.length; i++) {\n var item = selected[i].data;\n\n context.translate(0.5, 0.5);\n context.lineWidth = 1;\n context.strokeStyle = 'rgba(255,165,0,0.9)';\n context.setLineDash([1,2]);\n\n switch (item.type) {\n\n case 'body':\n\n // render body selections\n bounds = item.bounds;\n context.beginPath();\n context.rect(Math.floor(bounds.min.x - 3), Math.floor(bounds.min.y - 3),\n Math.floor(bounds.max.x - bounds.min.x + 6), Math.floor(bounds.max.y - bounds.min.y + 6));\n context.closePath();\n context.stroke();\n\n break;\n\n case 'constraint':\n\n // render constraint selections\n var point = item.pointA;\n if (item.bodyA)\n point = item.pointB;\n context.beginPath();\n context.arc(point.x, point.y, 10, 0, 2 * Math.PI);\n context.closePath();\n context.stroke();\n\n break;\n\n }\n\n context.setLineDash([]);\n context.translate(-0.5, -0.5);\n }\n\n // render selection region\n if (inspector.selectStart !== null) {\n context.translate(0.5, 0.5);\n context.lineWidth = 1;\n context.strokeStyle = 'rgba(255,165,0,0.6)';\n context.fillStyle = 'rgba(255,165,0,0.1)';\n bounds = inspector.selectBounds;\n context.beginPath();\n context.rect(Math.floor(bounds.min.x), Math.floor(bounds.min.y),\n Math.floor(bounds.max.x - bounds.min.x), Math.floor(bounds.max.y - bounds.min.y));\n context.closePath();\n context.stroke();\n context.fill();\n context.translate(-0.5, -0.5);\n }\n\n if (options.hasBounds)\n context.setTransform(1, 0, 0, 1, 0, 0);\n };\n\n /**\n * Updates render timing.\n * @method _updateTiming\n * @private\n * @param {render} render\n * @param {number} time\n */\n var _updateTiming = function(render, time) {\n var engine = render.engine,\n timing = render.timing,\n historySize = timing.historySize,\n timestamp = engine.timing.timestamp;\n\n timing.delta = time - timing.lastTime || Render._goodDelta;\n timing.lastTime = time;\n\n timing.timestampElapsed = timestamp - timing.lastTimestamp || 0;\n timing.lastTimestamp = timestamp;\n\n timing.deltaHistory.unshift(timing.delta);\n timing.deltaHistory.length = Math.min(timing.deltaHistory.length, historySize);\n\n timing.engineDeltaHistory.unshift(engine.timing.lastDelta);\n timing.engineDeltaHistory.length = Math.min(timing.engineDeltaHistory.length, historySize);\n\n timing.timestampElapsedHistory.unshift(timing.timestampElapsed);\n timing.timestampElapsedHistory.length = Math.min(timing.timestampElapsedHistory.length, historySize);\n\n timing.engineUpdatesHistory.unshift(engine.timing.lastUpdatesPerFrame);\n timing.engineUpdatesHistory.length = Math.min(timing.engineUpdatesHistory.length, historySize);\n\n timing.engineElapsedHistory.unshift(engine.timing.lastElapsed);\n timing.engineElapsedHistory.length = Math.min(timing.engineElapsedHistory.length, historySize);\n\n timing.elapsedHistory.unshift(timing.lastElapsed);\n timing.elapsedHistory.length = Math.min(timing.elapsedHistory.length, historySize);\n };\n\n /**\n * Returns the mean value of the given numbers.\n * @method _mean\n * @private\n * @param {Number[]} values\n * @return {Number} the mean of given values\n */\n var _mean = function(values) {\n var result = 0;\n for (var i = 0; i < values.length; i += 1) {\n result += values[i];\n }\n return (result / values.length) || 0;\n };\n\n /**\n * @method _createCanvas\n * @private\n * @param {} width\n * @param {} height\n * @return canvas\n */\n var _createCanvas = function(width, height) {\n var canvas = document.createElement('canvas');\n canvas.width = width;\n canvas.height = height;\n canvas.oncontextmenu = function() { return false; };\n canvas.onselectstart = function() { return false; };\n return canvas;\n };\n\n /**\n * Gets the pixel ratio of the canvas.\n * @method _getPixelRatio\n * @private\n * @param {HTMLElement} canvas\n * @return {Number} pixel ratio\n */\n var _getPixelRatio = function(canvas) {\n var context = canvas.getContext('2d'),\n devicePixelRatio = window.devicePixelRatio || 1,\n backingStorePixelRatio = context.webkitBackingStorePixelRatio || context.mozBackingStorePixelRatio\n || context.msBackingStorePixelRatio || context.oBackingStorePixelRatio\n || context.backingStorePixelRatio || 1;\n\n return devicePixelRatio / backingStorePixelRatio;\n };\n\n /**\n * Gets the requested texture (an Image) via its path\n * @method _getTexture\n * @private\n * @param {render} render\n * @param {string} imagePath\n * @return {Image} texture\n */\n var _getTexture = function(render, imagePath) {\n var image = render.textures[imagePath];\n\n if (image)\n return image;\n\n image = render.textures[imagePath] = new Image();\n image.src = imagePath;\n\n return image;\n };\n\n /**\n * Applies the background to the canvas using CSS.\n * @method applyBackground\n * @private\n * @param {render} render\n * @param {string} background\n */\n var _applyBackground = function(render, background) {\n var cssBackground = background;\n\n if (/(jpg|gif|png)$/.test(background))\n cssBackground = 'url(' + background + ')';\n\n render.canvas.style.background = cssBackground;\n render.canvas.style.backgroundSize = \"contain\";\n render.currentBackground = background;\n };\n\n /*\n *\n * Events Documentation\n *\n */\n\n /**\n * Fired before rendering\n *\n * @event beforeRender\n * @param {} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired after rendering\n *\n * @event afterRender\n * @param {} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /*\n *\n * Properties Documentation\n *\n */\n\n /**\n * A back-reference to the `Matter.Render` module.\n *\n * @deprecated\n * @property controller\n * @type render\n */\n\n /**\n * A reference to the `Matter.Engine` instance to be used.\n *\n * @property engine\n * @type engine\n */\n\n /**\n * A reference to the element where the canvas is to be inserted (if `render.canvas` has not been specified)\n *\n * @property element\n * @type HTMLElement\n * @default null\n */\n\n /**\n * The canvas element to render to. If not specified, one will be created if `render.element` has been specified.\n *\n * @property canvas\n * @type HTMLCanvasElement\n * @default null\n */\n\n /**\n * A `Bounds` object that specifies the drawing view region.\n * Rendering will be automatically transformed and scaled to fit within the canvas size (`render.options.width` and `render.options.height`).\n * This allows for creating views that can pan or zoom around the scene.\n * You must also set `render.options.hasBounds` to `true` to enable bounded rendering.\n *\n * @property bounds\n * @type bounds\n */\n\n /**\n * The 2d rendering context from the `render.canvas` element.\n *\n * @property context\n * @type CanvasRenderingContext2D\n */\n\n /**\n * The sprite texture cache.\n *\n * @property textures\n * @type {}\n */\n\n /**\n * The mouse to render if `render.options.showMousePosition` is enabled.\n *\n * @property mouse\n * @type mouse\n * @default null\n */\n\n /**\n * The configuration options of the renderer.\n *\n * @property options\n * @type {}\n */\n\n /**\n * The target width in pixels of the `render.canvas` to be created.\n * See also the `options.pixelRatio` property to change render quality.\n *\n * @property options.width\n * @type number\n * @default 800\n */\n\n /**\n * The target height in pixels of the `render.canvas` to be created.\n * See also the `options.pixelRatio` property to change render quality.\n *\n * @property options.height\n * @type number\n * @default 600\n */\n\n /**\n * The [pixel ratio](https://developer.mozilla.org/en-US/docs/Web/API/Window/devicePixelRatio) to use when rendering.\n *\n * @property options.pixelRatio\n * @type number\n * @default 1\n */\n\n /**\n * A CSS background color string to use when `render.options.wireframes` is disabled.\n * This may be also set to `'transparent'` or equivalent.\n *\n * @property options.background\n * @type string\n * @default '#14151f'\n */\n\n /**\n * A CSS color string to use for background when `render.options.wireframes` is enabled.\n * This may be also set to `'transparent'` or equivalent.\n *\n * @property options.wireframeBackground\n * @type string\n * @default '#14151f'\n */\n\n /**\n * A CSS color string to use for stroke when `render.options.wireframes` is enabled.\n * This may be also set to `'transparent'` or equivalent.\n *\n * @property options.wireframeStrokeStyle\n * @type string\n * @default '#bbb'\n */\n\n /**\n * A flag that specifies if `render.bounds` should be used when rendering.\n *\n * @property options.hasBounds\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable all debug information overlays together. \n * This includes and has priority over the values of:\n *\n * - `render.options.showStats`\n * - `render.options.showPerformance`\n *\n * @property options.showDebug\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the engine stats info overlay. \n * From left to right, the values shown are:\n *\n * - body parts total\n * - body total\n * - constraints total\n * - composites total\n * - collision pairs total\n *\n * @property options.showStats\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable performance charts. \n * From left to right, the values shown are:\n *\n * - average render frequency (e.g. 60 fps)\n * - exact engine delta time used for last update (e.g. 16.66ms)\n * - average updates per frame (e.g. 1)\n * - average engine execution duration (e.g. 5.00ms)\n * - average render execution duration (e.g. 0.40ms)\n * - average effective play speed (e.g. '1.00x' is 'real-time')\n *\n * Each value is recorded over a fixed sample of past frames (60 frames).\n *\n * A chart shown below each value indicates the variance from the average over the sample.\n * The more stable or fixed the value is the flatter the chart will appear.\n *\n * @property options.showPerformance\n * @type boolean\n * @default false\n */\n \n /**\n * A flag to enable or disable rendering entirely.\n *\n * @property options.enabled\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to toggle wireframe rendering otherwise solid fill rendering is used.\n *\n * @property options.wireframes\n * @type boolean\n * @default true\n */\n\n /**\n * A flag to enable or disable sleeping bodies indicators.\n *\n * @property options.showSleeping\n * @type boolean\n * @default true\n */\n\n /**\n * A flag to enable or disable the debug information overlay.\n *\n * @property options.showDebug\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the collision broadphase debug overlay.\n *\n * @deprecated no longer implemented\n * @property options.showBroadphase\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body bounds debug overlay.\n *\n * @property options.showBounds\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body velocity debug overlay.\n *\n * @property options.showVelocity\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body collisions debug overlay.\n *\n * @property options.showCollisions\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the collision resolver separations debug overlay.\n *\n * @property options.showSeparations\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body axes debug overlay.\n *\n * @property options.showAxes\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body positions debug overlay.\n *\n * @property options.showPositions\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body angle debug overlay.\n *\n * @property options.showAngleIndicator\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body and part ids debug overlay.\n *\n * @property options.showIds\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body vertex numbers debug overlay.\n *\n * @property options.showVertexNumbers\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body convex hulls debug overlay.\n *\n * @property options.showConvexHulls\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the body internal edges debug overlay.\n *\n * @property options.showInternalEdges\n * @type boolean\n * @default false\n */\n\n /**\n * A flag to enable or disable the mouse position debug overlay.\n *\n * @property options.showMousePosition\n * @type boolean\n * @default false\n */\n\n})();\n\n\n/***/ }),\n/* 27 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Runner` module is an optional utility that provides a game loop for running a `Matter.Engine` inside a browser environment.\n* A runner will continuously update a `Matter.Engine` whilst synchronising engine updates with the browser frame rate.\n* This runner favours a smoother user experience over perfect time keeping.\n* This runner is optional and is used for development and debugging but could be useful as a starting point for implementing some games and experiences.\n* Alternatively see `Engine.update` to step the engine directly inside your own game loop implementation as may be needed inside other environments.\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Runner\n*/\n\nvar Runner = {};\n\nmodule.exports = Runner;\n\nvar Events = __webpack_require__(5);\nvar Engine = __webpack_require__(17);\nvar Common = __webpack_require__(0);\n\n(function() {\n\n Runner._maxFrameDelta = 1000 / 15;\n Runner._frameDeltaFallback = 1000 / 60;\n Runner._timeBufferMargin = 1.5;\n Runner._elapsedNextEstimate = 1;\n Runner._smoothingLowerBound = 0.1;\n Runner._smoothingUpperBound = 0.9;\n\n /**\n * Creates a new Runner. \n * See the properties section below for detailed information on what you can pass via the `options` object.\n * @method create\n * @param {} options\n */\n Runner.create = function(options) {\n var defaults = {\n delta: 1000 / 60,\n frameDelta: null,\n frameDeltaSmoothing: true,\n frameDeltaSnapping: true,\n frameDeltaHistory: [],\n frameDeltaHistorySize: 100,\n frameRequestId: null,\n timeBuffer: 0,\n timeLastTick: null,\n maxUpdates: null,\n maxFrameTime: 1000 / 30,\n lastUpdatesDeferred: 0,\n enabled: true\n };\n\n var runner = Common.extend(defaults, options);\n\n // for temporary back compatibility only\n runner.fps = 0;\n\n return runner;\n };\n\n /**\n * Runs a `Matter.Engine` whilst synchronising engine updates with the browser frame rate. \n * See module and properties descriptions for more information on this runner.\n * Alternatively see `Engine.update` to step the engine directly inside your own game loop implementation.\n * @method run\n * @param {runner} runner\n * @param {engine} [engine]\n * @return {runner} runner\n */\n Runner.run = function(runner, engine) {\n // initial time buffer for the first frame\n runner.timeBuffer = Runner._frameDeltaFallback;\n\n (function onFrame(time){\n runner.frameRequestId = Runner._onNextFrame(runner, onFrame);\n\n if (time && runner.enabled) {\n Runner.tick(runner, engine, time);\n }\n })();\n\n return runner;\n };\n\n /**\n * Performs a single runner tick as used inside `Runner.run`.\n * See module and properties descriptions for more information on this runner.\n * Alternatively see `Engine.update` to step the engine directly inside your own game loop implementation.\n * @method tick\n * @param {runner} runner\n * @param {engine} engine\n * @param {number} time\n */\n Runner.tick = function(runner, engine, time) {\n var tickStartTime = Common.now(),\n engineDelta = runner.delta,\n updateCount = 0;\n\n // find frame delta time since last call\n var frameDelta = time - runner.timeLastTick;\n\n // fallback for unusable frame delta values (e.g. 0, NaN, on first frame or long pauses)\n if (!frameDelta || !runner.timeLastTick || frameDelta > Math.max(Runner._maxFrameDelta, runner.maxFrameTime)) {\n // reuse last accepted frame delta else fallback\n frameDelta = runner.frameDelta || Runner._frameDeltaFallback;\n }\n\n if (runner.frameDeltaSmoothing) {\n // record frame delta over a number of frames\n runner.frameDeltaHistory.push(frameDelta);\n runner.frameDeltaHistory = runner.frameDeltaHistory.slice(-runner.frameDeltaHistorySize);\n\n // sort frame delta history\n var deltaHistorySorted = runner.frameDeltaHistory.slice(0).sort();\n\n // sample a central window to limit outliers\n var deltaHistoryWindow = runner.frameDeltaHistory.slice(\n deltaHistorySorted.length * Runner._smoothingLowerBound, \n deltaHistorySorted.length * Runner._smoothingUpperBound\n );\n\n // take the mean of the central window\n var frameDeltaSmoothed = _mean(deltaHistoryWindow);\n frameDelta = frameDeltaSmoothed || frameDelta;\n }\n\n if (runner.frameDeltaSnapping) {\n // snap frame delta to the nearest 1 Hz\n frameDelta = 1000 / Math.round(1000 / frameDelta);\n }\n\n // update runner values for next call\n runner.frameDelta = frameDelta;\n runner.timeLastTick = time;\n\n // accumulate elapsed time\n runner.timeBuffer += runner.frameDelta;\n\n // limit time buffer size to a single frame of updates\n runner.timeBuffer = Common.clamp(\n runner.timeBuffer, 0, runner.frameDelta + engineDelta * Runner._timeBufferMargin\n );\n\n // reset count of over budget updates\n runner.lastUpdatesDeferred = 0;\n\n // get max updates per frame\n var maxUpdates = runner.maxUpdates || Math.ceil(runner.maxFrameTime / engineDelta);\n\n // create event object\n var event = {\n timestamp: engine.timing.timestamp\n };\n\n // tick events before update\n Events.trigger(runner, 'beforeTick', event);\n Events.trigger(runner, 'tick', event);\n\n var updateStartTime = Common.now();\n\n // simulate time elapsed between calls\n while (engineDelta > 0 && runner.timeBuffer >= engineDelta * Runner._timeBufferMargin) {\n // update the engine\n Events.trigger(runner, 'beforeUpdate', event);\n Engine.update(engine, engineDelta);\n Events.trigger(runner, 'afterUpdate', event);\n\n // consume time simulated from buffer\n runner.timeBuffer -= engineDelta;\n updateCount += 1;\n\n // find elapsed time during this tick\n var elapsedTimeTotal = Common.now() - tickStartTime,\n elapsedTimeUpdates = Common.now() - updateStartTime,\n elapsedNextEstimate = elapsedTimeTotal + Runner._elapsedNextEstimate * elapsedTimeUpdates / updateCount;\n\n // defer updates if over performance budgets for this frame\n if (updateCount >= maxUpdates || elapsedNextEstimate > runner.maxFrameTime) {\n runner.lastUpdatesDeferred = Math.round(Math.max(0, (runner.timeBuffer / engineDelta) - Runner._timeBufferMargin));\n break;\n }\n }\n\n // track timing metrics\n engine.timing.lastUpdatesPerFrame = updateCount;\n\n // tick events after update\n Events.trigger(runner, 'afterTick', event);\n\n // show useful warnings if needed\n if (runner.frameDeltaHistory.length >= 100) {\n if (runner.lastUpdatesDeferred && Math.round(runner.frameDelta / engineDelta) > maxUpdates) {\n Common.warnOnce('Matter.Runner: runner reached runner.maxUpdates, see docs.');\n } else if (runner.lastUpdatesDeferred) {\n Common.warnOnce('Matter.Runner: runner reached runner.maxFrameTime, see docs.');\n }\n\n if (typeof runner.isFixed !== 'undefined') {\n Common.warnOnce('Matter.Runner: runner.isFixed is now redundant, see docs.');\n }\n\n if (runner.deltaMin || runner.deltaMax) {\n Common.warnOnce('Matter.Runner: runner.deltaMin and runner.deltaMax were removed, see docs.');\n }\n\n if (runner.fps !== 0) {\n Common.warnOnce('Matter.Runner: runner.fps was replaced by runner.delta, see docs.');\n }\n }\n };\n\n /**\n * Ends execution of `Runner.run` on the given `runner` by canceling the frame loop.\n * Alternatively to temporarily pause the runner, see `runner.enabled`.\n * @method stop\n * @param {runner} runner\n */\n Runner.stop = function(runner) {\n Runner._cancelNextFrame(runner);\n };\n\n /**\n * Schedules the `callback` on this `runner` for the next animation frame.\n * @private\n * @method _onNextFrame\n * @param {runner} runner\n * @param {function} callback\n * @return {number} frameRequestId\n */\n Runner._onNextFrame = function(runner, callback) {\n if (typeof window !== 'undefined' && window.requestAnimationFrame) {\n runner.frameRequestId = window.requestAnimationFrame(callback);\n } else {\n throw new Error('Matter.Runner: missing required global window.requestAnimationFrame.');\n }\n\n return runner.frameRequestId;\n };\n\n /**\n * Cancels the last callback scheduled by `Runner._onNextFrame` on this `runner`.\n * @private\n * @method _cancelNextFrame\n * @param {runner} runner\n */\n Runner._cancelNextFrame = function(runner) {\n if (typeof window !== 'undefined' && window.cancelAnimationFrame) {\n window.cancelAnimationFrame(runner.frameRequestId);\n } else {\n throw new Error('Matter.Runner: missing required global window.cancelAnimationFrame.');\n }\n };\n\n /**\n * Returns the mean of the given numbers.\n * @method _mean\n * @private\n * @param {Number[]} values\n * @return {Number} the mean of given values.\n */\n var _mean = function(values) {\n var result = 0,\n valuesLength = values.length;\n\n for (var i = 0; i < valuesLength; i += 1) {\n result += values[i];\n }\n\n return (result / valuesLength) || 0;\n };\n\n /*\n *\n * Events Documentation\n *\n */\n\n /**\n * Fired once at the start of the browser frame, before any engine updates.\n *\n * @event beforeTick\n * @param {} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired once at the start of the browser frame, after `beforeTick`.\n *\n * @event tick\n * @param {} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired once at the end of the browser frame, after `beforeTick`, `tick` and after any engine updates.\n *\n * @event afterTick\n * @param {} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired before each and every engine update in this browser frame (if any). \n * There may be multiple engine update calls per browser frame (or none) depending on framerate and timestep delta.\n *\n * @event beforeUpdate\n * @param {} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /**\n * Fired after each and every engine update in this browser frame (if any). \n * There may be multiple engine update calls per browser frame (or none) depending on framerate and timestep delta.\n *\n * @event afterUpdate\n * @param {} event An event object\n * @param {number} event.timestamp The engine.timing.timestamp of the event\n * @param {} event.source The source object of the event\n * @param {} event.name The name of the event\n */\n\n /*\n *\n * Properties Documentation\n *\n */\n\n /**\n * The fixed timestep size used for `Engine.update` calls in milliseconds, known as `delta`.\n * \n * This value is recommended to be `1000 / 60` ms or smaller (i.e. equivalent to at least 60hz).\n * \n * Smaller `delta` values provide higher quality results at the cost of performance.\n * \n * You should usually avoid changing `delta` during running, otherwise quality may be affected. \n * \n * For smoother frame pacing choose a `delta` that is an even multiple of each display FPS you target, i.e. `1000 / (n * fps)` as this helps distribute an equal number of updates over each display frame.\n * \n * For example with a 60 Hz `delta` i.e. `1000 / 60` the runner will on average perform one update per frame on displays running 60 FPS and one update every two frames on displays running 120 FPS, etc.\n * \n * Where as e.g. using a 240 Hz `delta` i.e. `1000 / 240` the runner will on average perform four updates per frame on displays running 60 FPS and two updates per frame on displays running 120 FPS, etc.\n * \n * Therefore `Runner.run` will call multiple engine updates (or none) as needed to simulate the time elapsed between browser frames. \n * \n * In practice the number of updates in any particular frame may be restricted to respect the runner's performance budgets. These are specified by `runner.maxFrameTime` and `runner.maxUpdates`, see those properties for details.\n * \n * @property delta\n * @type number\n * @default 1000 / 60\n */\n\n /**\n * A flag that can be toggled to enable or disable tick calls on this runner, therefore pausing engine updates and events while the runner loop remains running.\n *\n * @property enabled\n * @type boolean\n * @default true\n */\n\n /**\n * The accumulated time elapsed that has yet to be simulated in milliseconds.\n * This value is clamped within certain limits (see `Runner.tick` code).\n *\n * @private\n * @property timeBuffer\n * @type number\n * @default 0\n */\n\n /**\n * The measured time elapsed between the last two browser frames measured in milliseconds.\n * This is useful e.g. to estimate the current browser FPS using `1000 / runner.frameDelta`.\n *\n * @readonly\n * @property frameDelta\n * @type number\n */\n\n /**\n * Enables averaging to smooth frame rate measurements and therefore stabilise play rate.\n *\n * @property frameDeltaSmoothing\n * @type boolean\n * @default true\n */\n\n /**\n * Rounds measured browser frame delta to the nearest 1 Hz.\n * This option can help smooth frame rate measurements and simplify handling hardware timing differences e.g. 59.94Hz and 60Hz displays.\n * For best results you should also round your `runner.delta` equivalent to the nearest 1 Hz.\n *\n * @property frameDeltaSnapping\n * @type boolean\n * @default true\n */\n\n /**\n * A performance budget that limits execution time allowed for this runner per browser frame in milliseconds.\n * \n * To calculate the effective browser FPS at which this throttle is applied use `1000 / runner.maxFrameTime`.\n * \n * This performance budget is intended to help maintain browser interactivity and help improve framerate recovery during temporary high CPU usage.\n * \n * This budget only covers the measured time elapsed executing the functions called in the scope of the runner tick, including `Engine.update` and its related user event callbacks.\n * \n * You may also reduce this budget to allow for any significant additional processing you perform on the same thread outside the scope of this runner tick, e.g. rendering time.\n * \n * See also `runner.maxUpdates`.\n *\n * @property maxFrameTime\n * @type number\n * @default 1000 / 30\n */\n\n /**\n * An optional limit for maximum engine update count allowed per frame tick in addition to `runner.maxFrameTime`.\n * \n * Unless you set a value it is automatically chosen based on `runner.delta` and `runner.maxFrameTime`.\n * \n * See also `runner.maxFrameTime`.\n * \n * @property maxUpdates\n * @type number\n * @default null\n */\n\n /**\n * The timestamp of the last call to `Runner.tick` used to measure `frameDelta`.\n *\n * @private\n * @property timeLastTick\n * @type number\n * @default 0\n */\n\n /**\n * The id of the last call to `Runner._onNextFrame`.\n *\n * @private\n * @property frameRequestId\n * @type number\n * @default null\n */\n\n})();\n\n\n/***/ }),\n/* 28 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* This module has now been replaced by `Matter.Collision`.\n*\n* All usage should be migrated to `Matter.Collision`.\n* For back-compatibility purposes this module will remain for a short term and then later removed in a future release.\n*\n* The `Matter.SAT` module contains methods for detecting collisions using the Separating Axis Theorem.\n*\n* @class SAT\n* @deprecated\n*/\n\nvar SAT = {};\n\nmodule.exports = SAT;\n\nvar Collision = __webpack_require__(8);\nvar Common = __webpack_require__(0);\nvar deprecated = Common.deprecated;\n\n(function() {\n\n /**\n * Detect collision between two bodies using the Separating Axis Theorem.\n * @deprecated replaced by Collision.collides\n * @method collides\n * @param {body} bodyA\n * @param {body} bodyB\n * @return {collision} collision\n */\n SAT.collides = function(bodyA, bodyB) {\n return Collision.collides(bodyA, bodyB);\n };\n\n deprecated(SAT, 'collides', 'SAT.collides ➤ replaced by Collision.collides');\n\n})();\n\n\n/***/ }),\n/* 29 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* The `Matter.Svg` module contains methods for converting SVG images into an array of vector points.\n*\n* To use this module you also need the SVGPathSeg polyfill: https://github.com/progers/pathseg\n*\n* See the included usage [examples](https://github.com/liabru/matter-js/tree/master/examples).\n*\n* @class Svg\n*/\n\nvar Svg = {};\n\nmodule.exports = Svg;\n\nvar Bounds = __webpack_require__(1);\nvar Common = __webpack_require__(0);\n\n(function() {\n\n /**\n * Converts an SVG path into an array of vector points.\n * If the input path forms a concave shape, you must decompose the result into convex parts before use.\n * See `Bodies.fromVertices` which provides support for this.\n * Note that this function is not guaranteed to support complex paths (such as those with holes).\n * You must load the `pathseg.js` polyfill on newer browsers.\n * @method pathToVertices\n * @param {SVGPathElement} path\n * @param {Number} [sampleLength=15]\n * @return {Vector[]} points\n */\n Svg.pathToVertices = function(path, sampleLength) {\n if (typeof window !== 'undefined' && !('SVGPathSeg' in window)) {\n Common.warn('Svg.pathToVertices: SVGPathSeg not defined, a polyfill is required.');\n }\n\n // https://github.com/wout/svg.topoly.js/blob/master/svg.topoly.js\n var i, il, total, point, segment, segments, \n segmentsQueue, lastSegment, \n lastPoint, segmentIndex, points = [],\n lx, ly, length = 0, x = 0, y = 0;\n\n sampleLength = sampleLength || 15;\n\n var addPoint = function(px, py, pathSegType) {\n // all odd-numbered path types are relative except PATHSEG_CLOSEPATH (1)\n var isRelative = pathSegType % 2 === 1 && pathSegType > 1;\n\n // when the last point doesn't equal the current point add the current point\n if (!lastPoint || px != lastPoint.x || py != lastPoint.y) {\n if (lastPoint && isRelative) {\n lx = lastPoint.x;\n ly = lastPoint.y;\n } else {\n lx = 0;\n ly = 0;\n }\n\n var point = {\n x: lx + px,\n y: ly + py\n };\n\n // set last point\n if (isRelative || !lastPoint) {\n lastPoint = point;\n }\n\n points.push(point);\n\n x = lx + px;\n y = ly + py;\n }\n };\n\n var addSegmentPoint = function(segment) {\n var segType = segment.pathSegTypeAsLetter.toUpperCase();\n\n // skip path ends\n if (segType === 'Z') \n return;\n\n // map segment to x and y\n switch (segType) {\n\n case 'M':\n case 'L':\n case 'T':\n case 'C':\n case 'S':\n case 'Q':\n x = segment.x;\n y = segment.y;\n break;\n case 'H':\n x = segment.x;\n break;\n case 'V':\n y = segment.y;\n break;\n }\n\n addPoint(x, y, segment.pathSegType);\n };\n\n // ensure path is absolute\n Svg._svgPathToAbsolute(path);\n\n // get total length\n total = path.getTotalLength();\n\n // queue segments\n segments = [];\n for (i = 0; i < path.pathSegList.numberOfItems; i += 1)\n segments.push(path.pathSegList.getItem(i));\n\n segmentsQueue = segments.concat();\n\n // sample through path\n while (length < total) {\n // get segment at position\n segmentIndex = path.getPathSegAtLength(length);\n segment = segments[segmentIndex];\n\n // new segment\n if (segment != lastSegment) {\n while (segmentsQueue.length && segmentsQueue[0] != segment)\n addSegmentPoint(segmentsQueue.shift());\n\n lastSegment = segment;\n }\n\n // add points in between when curving\n // TODO: adaptive sampling\n switch (segment.pathSegTypeAsLetter.toUpperCase()) {\n\n case 'C':\n case 'T':\n case 'S':\n case 'Q':\n case 'A':\n point = path.getPointAtLength(length);\n addPoint(point.x, point.y, 0);\n break;\n\n }\n\n // increment by sample value\n length += sampleLength;\n }\n\n // add remaining segments not passed by sampling\n for (i = 0, il = segmentsQueue.length; i < il; ++i)\n addSegmentPoint(segmentsQueue[i]);\n\n return points;\n };\n\n Svg._svgPathToAbsolute = function(path) {\n // http://phrogz.net/convert-svg-path-to-all-absolute-commands\n // Copyright (c) Gavin Kistner\n // http://phrogz.net/js/_ReuseLicense.txt\n // Modifications: tidy formatting and naming\n var x0, y0, x1, y1, x2, y2, segs = path.pathSegList,\n x = 0, y = 0, len = segs.numberOfItems;\n\n for (var i = 0; i < len; ++i) {\n var seg = segs.getItem(i),\n segType = seg.pathSegTypeAsLetter;\n\n if (/[MLHVCSQTA]/.test(segType)) {\n if ('x' in seg) x = seg.x;\n if ('y' in seg) y = seg.y;\n } else {\n if ('x1' in seg) x1 = x + seg.x1;\n if ('x2' in seg) x2 = x + seg.x2;\n if ('y1' in seg) y1 = y + seg.y1;\n if ('y2' in seg) y2 = y + seg.y2;\n if ('x' in seg) x += seg.x;\n if ('y' in seg) y += seg.y;\n\n switch (segType) {\n\n case 'm':\n segs.replaceItem(path.createSVGPathSegMovetoAbs(x, y), i);\n break;\n case 'l':\n segs.replaceItem(path.createSVGPathSegLinetoAbs(x, y), i);\n break;\n case 'h':\n segs.replaceItem(path.createSVGPathSegLinetoHorizontalAbs(x), i);\n break;\n case 'v':\n segs.replaceItem(path.createSVGPathSegLinetoVerticalAbs(y), i);\n break;\n case 'c':\n segs.replaceItem(path.createSVGPathSegCurvetoCubicAbs(x, y, x1, y1, x2, y2), i);\n break;\n case 's':\n segs.replaceItem(path.createSVGPathSegCurvetoCubicSmoothAbs(x, y, x2, y2), i);\n break;\n case 'q':\n segs.replaceItem(path.createSVGPathSegCurvetoQuadraticAbs(x, y, x1, y1), i);\n break;\n case 't':\n segs.replaceItem(path.createSVGPathSegCurvetoQuadraticSmoothAbs(x, y), i);\n break;\n case 'a':\n segs.replaceItem(path.createSVGPathSegArcAbs(x, y, seg.r1, seg.r2, seg.angle, seg.largeArcFlag, seg.sweepFlag), i);\n break;\n case 'z':\n case 'Z':\n x = x0;\n y = y0;\n break;\n\n }\n }\n\n if (segType == 'M' || segType == 'm') {\n x0 = x;\n y0 = y;\n }\n }\n };\n\n})();\n\n/***/ }),\n/* 30 */\n/***/ (function(module, exports, __webpack_require__) {\n\n/**\n* This module has now been replaced by `Matter.Composite`.\n*\n* All usage should be migrated to the equivalent functions found on `Matter.Composite`.\n* For example `World.add(world, body)` now becomes `Composite.add(world, body)`.\n*\n* The property `world.gravity` has been moved to `engine.gravity`.\n*\n* For back-compatibility purposes this module will remain as a direct alias to `Matter.Composite` in the short term during migration.\n* Eventually this alias module will be marked as deprecated and then later removed in a future release.\n*\n* @class World\n*/\n\nvar World = {};\n\nmodule.exports = World;\n\nvar Composite = __webpack_require__(6);\nvar Common = __webpack_require__(0);\n\n(function() {\n\n /**\n * See above, aliases for back compatibility only\n */\n World.create = Composite.create;\n World.add = Composite.add;\n World.remove = Composite.remove;\n World.clear = Composite.clear;\n World.addComposite = Composite.addComposite;\n World.addBody = Composite.addBody;\n World.addConstraint = Composite.addConstraint;\n\n})();\n\n\n/***/ })\n/******/ ]);\n});","\r\n\r\n\r\n\r\n","export default \"__VITE_ASSET__s$vxp38Y__\"","\r\n\r\n\r\n\r\n\r\n","export default \"__VITE_PUBLIC_ASSET__ccbabe0d__\"","export default \"data:image/svg+xml,%3csvg%20id='Layer_1'%20data-name='Layer%201'%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20115.4%20122.88'%3e%3ctitle%3eup-arrow%3c/title%3e%3cpath%20d='M24.94,67.88A14.66,14.66,0,0,1,4.38,47L47.83,4.21a14.66,14.66,0,0,1,20.56,0L111,46.15A14.66,14.66,0,0,1,90.46,67.06l-18-17.69-.29,59.17c-.1,19.28-29.42,19-29.33-.25L43.14,50,24.94,67.88Z'/%3e%3c/svg%3e\"","\r\n\r\n\r\n\r\n","import { createApp } from \"vue\";\r\nimport \"./style.css\";\r\nimport App from \"./App.vue\";\r\n//import router from \"./router\";\r\n\r\nconst app = createApp(App)\r\n//app.use(router)\r\napp.mount(\"#app\");\r\n"],"names":["makeMap","str","map","key","val","EMPTY_OBJ","EMPTY_ARR","NOOP","NO","isOn","isModelListener","extend","remove","arr","el","i","hasOwnProperty","hasOwn","isArray","isMap","toTypeString","isSet","isDate","isFunction","isString","isSymbol","isObject","isPromise","objectToString","value","toRawType","isPlainObject","isIntegerKey","isReservedProp","cacheStringFunction","fn","cache","camelizeRE","camelize","_","c","hyphenateRE","hyphenate","capitalize","toHandlerKey","hasChanged","oldValue","invokeArrayFns","fns","arg","def","obj","writable","looseToNumber","_globalThis","getGlobalThis","normalizeStyle","res","item","normalized","parseStringStyle","listDelimiterRE","propertyDelimiterRE","styleCommentRE","cssText","ret","tmp","normalizeClass","name","specialBooleanAttrs","isSpecialBooleanAttr","includeBooleanAttr","looseCompareArrays","a","b","equal","looseEqual","aValidType","bValidType","aKeysCount","bKeysCount","aHasKey","bHasKey","looseIndexOf","isRef","toDisplayString","replacer","_key","entries","val2","stringifySymbol","v","_a","activeEffectScope","EffectScope","detached","l","currentEffectScope","fromParent","last","getCurrentScope","activeSub","pausedQueueEffects","ReactiveEffect","batch","cleanupEffect","prepareDeps","prevEffect","prevShouldTrack","shouldTrack","cleanupDeps","link","removeSub","isDirty","batchDepth","batchedSub","batchedComputed","sub","isComputed","startBatch","endBatch","e","next","error","err","head","tail","prev","removeDep","refreshComputed","computed","globalVersion","dep","prevSub","soft","nextSub","prevDep","nextDep","trackStack","pauseTracking","resetTracking","cleanup","Link","Dep","debugInfo","addSub","currentTail","targetMap","ITERATE_KEY","MAP_KEY_ITERATE_KEY","ARRAY_ITERATE_KEY","track","target","type","depsMap","trigger","newValue","oldTarget","run","targetIsArray","isArrayIndex","newLength","key2","reactiveReadArray","array","raw","toRaw","isShallow","toReactive","shallowReadArray","arrayInstrumentations","iterator","args","x","thisArg","apply","searchProxy","separator","noTracking","reduce","comparer","self","method","wrapValue","iter","result","arrayProto","wrappedRetFn","needsWrap","methodFn","result2","wrappedFn","index","acc","isProxy","isNonTrackableKeys","builtInSymbols","BaseReactiveHandler","_isReadonly","_isShallow","receiver","isReadonly2","isShallow2","shallowReadonlyMap","readonlyMap","shallowReactiveMap","reactiveMap","readonly","reactive","MutableReactiveHandler","isOldValueReadonly","isReadonly","hadKey","ReadonlyReactiveHandler","mutableHandlers","readonlyHandlers","shallowReactiveHandlers","toShallow","getProto","createIterableMethod","rawTarget","targetIsMap","isPair","isKeyOnly","innerIterator","wrap","toReadonly","done","createReadonlyMethod","createInstrumentations","shallow","instrumentations","rawKey","has","callback","observed","get","hadItems","createInstrumentationGetter","mutableCollectionHandlers","shallowCollectionHandlers","readonlyCollectionHandlers","targetTypeMap","rawType","getTargetType","createReactiveObject","shallowReactive","baseHandlers","collectionHandlers","proxyMap","existingProxy","targetType","proxy","isReactive","markRaw","r","ref","createRef","rawValue","RefImpl","useDirectValue","unref","ref2","shallowUnwrapHandlers","proxyRefs","objectWithRefs","ComputedRefImpl","setter","isSSR","getterOrOptions","debugOptions","getter","INITIAL_WATCHER_VALUE","cleanupMap","activeWatcher","onWatcherCleanup","cleanupFn","failSilently","owner","cleanups","watch","source","cb","options","immediate","deep","once","scheduler","augmentJob","call","reactiveGetter","source2","traverse","effect","boundCleanup","forceTrigger","isMultiSource","s","currentEffect","baseGetter","depth","scope","watchHandle","_cb","job","immediateFirstRun","currentWatcher","cleanup2","seen","callWithErrorHandling","instance","handleError","callWithAsyncErrorHandling","values","throwInDev","contextVNode","errorHandler","throwUnhandledErrorInProduction","cur","exposedInstance","errorInfo","errorCapturedHooks","logError","throwInProd","queue","flushIndex","pendingPostFlushCbs","activePostFlushCbs","postFlushIndex","resolvedPromise","currentFlushPromise","nextTick","p","findInsertionIndex","id","start","end","middle","middleJob","middleJobId","getId","queueJob","jobId","lastJob","queueFlush","flushJobs","queuePostFlushCb","flushPreFlushCbs","flushPostFlushCbs","deduped","currentRenderingInstance","currentScopeId","setCurrentRenderingInstance","withCtx","ctx","isNonScopedSlot","renderFnWithContext","setBlockTracking","prevInstance","withDirectives","vnode","directives","getComponentPublicInstance","bindings","dir","modifiers","invokeDirectiveHook","prevVNode","oldBindings","binding","hook","TeleportEndKey","isTeleport","setTransitionHooks","hooks","markAsyncBoundary","setRef","rawRef","oldRawRef","parentSuspense","isUnmount","isAsyncWrapper","refValue","oldRef","refs","setupState","rawSetupState","canSetSetupRef","_isString","_isRef","doSet","existing","queuePostRenderEffect","isKeepAlive","onActivated","registerKeepAliveHook","onDeactivated","currentInstance","wrappedHook","current","injectHook","injectToKeepAliveRoot","keepAliveRoot","injected","onUnmounted","prepend","reset","setCurrentInstance","createHook","lifecycle","isInSSRComponentSetup","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onServerPrefetch","onRenderTriggered","onRenderTracked","onErrorCaptured","COMPONENTS","NULL_DYNAMIC_COMPONENT","resolveDynamicComponent","component","resolveAsset","warnMissing","maybeSelfReference","Component","selfName","getComponentName","resolve","registry","renderList","renderItem","cached","sourceIsArray","sourceIsReactiveArray","keys","getPublicInstance","isStatefulComponent","publicPropertiesMap","resolveMergedOptions","instanceWatch","hasSetupBinding","state","PublicInstanceProxyHandlers","data","props","accessCache","appContext","normalizedProps","n","shouldCacheAccess","publicGetter","cssModule","globalProperties","propsOptions","descriptor","normalizePropsOrEmits","applyOptions","publicThis","callHook","dataOptions","computedOptions","methods","watchOptions","provideOptions","injectOptions","created","beforeMount","mounted","beforeUpdate","updated","activated","deactivated","beforeDestroy","beforeUnmount","destroyed","unmounted","render","renderTracked","renderTriggered","errorCaptured","serverPrefetch","expose","inheritAttrs","components","filters","resolveInjections","methodHandler","opt","set","createWatcher","provides","provide","registerLifecycleHook","register","_hook","exposed","checkDuplicateProperties","normalizeInject","inject","h","createPathGetter","handler","base","mixins","extendsOptions","globalMixins","optionMergeStrategies","resolved","m","mergeOptions","to","from","strats","asMixin","strat","internalOptionMergeStrats","mergeDataFn","mergeEmitsOrPropsOptions","mergeObjectOptions","mergeAsArray","mergeWatchOptions","mergeInject","merged","createAppContext","uid$1","createAppAPI","hydrate","rootComponent","rootProps","context","installedPlugins","pluginCleanupFns","isMounted","app","version","plugin","mixin","directive","rootContainer","isHydrate","namespace","createVNode","lastApp","currentApp","parentProvides","defaultValue","treatDefaultAsFactory","internalObjectProto","createInternalObject","isInternalObject","initProps","rawProps","isStateful","attrs","setFullProps","updateProps","rawPrevProps","optimized","patchFlag","rawCurrentProps","hasAttrsChanged","propsToUpdate","isEmitListener","camelizedKey","resolvePropValue","kebabKey","needCastKeys","rawCastValues","camelKey","castValues","isAbsent","hasDefault","propsDefaults","mixinPropsCache","normalizePropsOptions","comp","hasExtends","extendProps","raw2","normalizedKey","validatePropName","prop","propType","shouldCast","shouldCastTrue","typeName","isInternalKey","normalizeSlotValue","normalizeVNode","normalizeSlot","rawSlot","normalizeObjectSlots","rawSlots","slots","normalizeVNodeSlots","children","assignSlots","initSlots","updateSlots","needDeletionCheck","deletionComparisonTarget","queueEffectWithSuspense","createRenderer","baseCreateRenderer","createHydrationFns","hostInsert","hostRemove","hostPatchProp","hostCreateElement","hostCreateText","hostCreateComment","hostSetText","hostSetElementText","hostParentNode","hostNextSibling","hostSetScopeId","hostInsertStaticContent","patch","n1","n2","container","anchor","parentComponent","slotScopeIds","isSameVNodeType","getNextHostNode","unmount","shapeFlag","Text","processText","Comment","processCommentNode","Static","mountStaticNode","Fragment","processFragment","processElement","processComponent","internals","moveStaticNode","nextSibling","removeStaticNode","mountElement","patchElement","vnodeHook","transition","dirs","mountChildren","resolveChildrenNamespace","setScopeId","invokeVNodeHook","needCallTransitionHooks","needTransition","scopeId","subTree","isSuspense","parentVNode","child","cloneIfMounted","dynamicChildren","oldProps","newProps","toggleRecurse","patchBlockChildren","patchChildren","patchProps","oldChildren","newChildren","fallbackContainer","oldVNode","newVNode","fragmentStartAnchor","fragmentEndAnchor","fragmentSlotScopeIds","traverseStaticChildren","mountComponent","updateComponent","initialVNode","createComponentInstance","setupComponent","setupRenderEffect","placeholder","shouldUpdateComponent","updateComponentPreRender","componentUpdateFn","bu","u","parent","nonHydratedAsyncRoot","locateNonHydratedAsyncRoot","originNext","nextTree","renderComponentRoot","prevTree","updateHOCHostEl","bm","root","isAsyncWrapperVNode","hydrateNode","hydrateSubTree","scopedInitialVNode","update","nextVNode","prevProps","c1","prevShapeFlag","c2","patchKeyedChildren","patchUnkeyedChildren","unmountChildren","oldLength","commonLength","nextChild","parentAnchor","l2","e1","e2","nextPos","s1","s2","keyToNewIndexMap","j","patched","toBePatched","moved","maxNewIndexSoFar","newIndexToOldIndexMap","prevChild","newIndex","increasingNewIndexSequence","getSequence","nextIndex","move","moveType","leave","delayLeave","afterLeave","remove2","performLeave","doRemove","cacheIndex","shouldInvokeDirs","shouldInvokeVnodeHook","unmountComponent","removeFragment","performRemove","bum","um","invalidateMount","teleportEnd","isFlushing","currentNamespace","allowed","ch1","ch2","len","arrI","subComponent","ssrContextKey","useSSRContext","doWatch","flush","baseWatchOptions","runsImmediately","ssrCleanup","watchStopHandle","isPre","isFirstRun","watch$1","path","segments","getModelModifiers","modelName","emit","event","rawArgs","handlerName","onceHandler","normalizeEmitsOptions","extendEmits","normalizedFromExtend","withProxy","renderCache","fallthroughAttrs","proxyToUse","thisProxy","render2","getFunctionalFallthrough","blockStack","filterModelListeners","cloneVNode","prevChildren","nextProps","nextChildren","emits","hasPropsChanged","dynamicProps","emitsOptions","nextKeys","suspense","currentBlock","openBlock","disableTracking","closeBlock","isBlockTreeEnabled","setupBlock","createElementBlock","createBaseVNode","createBlock","isVNode","normalizeKey","normalizeRef","ref_key","ref_for","isBlockNode","needFullChildrenNormalization","normalizeChildren","_createVNode","cloned","isClassComponent","guardReactiveProps","klass","style","extraProps","mergeRef","cloneTransition","mergedProps","mergeProps","createTextVNode","text","flag","createStaticVNode","content","numberOfNodes","createCommentVNode","asBlock","slot","slotFlag","toMerge","incoming","emptyAppContext","uid","internalSetCurrentInstance","setInSSRSetupState","g","registerGlobalSetter","setters","unsetCurrentInstance","setupResult","setupStatefulComponent","setup","setupContext","createSetupContext","isAsyncSetup","resolvedResult","handleSetupResult","finishComponentSetup","compile","skipOptions","template","isCustomElement","compilerOptions","delimiters","componentCompilerOptions","finalCompilerOptions","attrsProxyHandlers","includeInferred","computed$1","policy","tt","unsafeToTrustedHTML","svgNS","mathmlNS","doc","templateContainer","nodeOps","tag","is","node","selector","before","wrapper","vtcKey","patchClass","isSVG","transitionClasses","vShowOriginalDisplay","vShowHidden","vShow","setDisplay","CSS_VAR_TEXT","displayRE","patchStyle","isCssString","hasControlledDisplay","prevStyle","setStyle","cssVarText","importantRE","prefixed","autoPrefix","prefixes","prefixCache","rawName","xlinkNS","patchAttr","isBoolean","patchDOMProp","attrName","needRemove","addEventListener","removeEventListener","veiKey","patchEvent","prevValue","nextValue","invokers","existingInvoker","parseName","invoker","createInvoker","optionsModifierRE","cachedNow","getNow","initialValue","patchStopImmediatePropagation","originalStop","isNativeOn","patchProp","shouldSetAsProp","camelize$1","getModelAssigner","onCompositionStart","onCompositionEnd","assignKey","vModelText","lazy","trim","number","castToNumber","domValue","elValue","vModelSelect","isSetModel","selectedVal","getValue","setSelected","_binding","isMultiple","isArrayValue","option","optionValue","optionType","systemModifiers","modifierGuards","withModifiers","cacheKey","guard","keyNames","withKeys","eventKey","k","rendererOptions","renderer","ensureRenderer","createApp","mount","containerOrSelector","normalizeContainer","resolveRootNamespace","en3dgol","enArtisKit_Web_Designer","enBook_Bunker","enChifoumi","enDraph","enFlagle","enFun","enTempos","enWordle_Bot","fr3dgol","frArtisKit_Web_Designer","frBook_Bunker","frChifoumi","frDraph","frFlagle","frFun","frTempos","frWordle_Bot","langs","fr","en","lang","oo","loadLongDescs","languageKeys","langKey","projects","modules","__vite_glob_0_0","__vite_glob_0_1","__vite_glob_0_2","__vite_glob_0_3","__vite_glob_0_4","__vite_glob_0_5","__vite_glob_0_6","__vite_glob_0_7","__vite_glob_0_8","__vite_glob_0_9","__vite_glob_0_10","__vite_glob_0_11","__vite_glob_0_12","__vite_glob_0_13","__vite_glob_0_14","__vite_glob_0_15","__vite_glob_0_16","__vite_glob_0_17","project","fileName","importPath","htmlContent","sanitizedHTML","t","nlang","splitted","crypticTranslator","setLang","nl","input","translated","char","getLang","setOo","getOo","__props","componentKey","spec","techs","Draph","BookBunker","WordleAI","Tempos","Chifoumi","Flagle","Webdesigner","Fun","threedgol","fabricjs","vuejs","tailwindcss","kotlin","svelte","threejs","tech","reProjects","sortedTech","maxProp","distribTech","info","_imports_2","_imports_3","_imports_4","factory","module","this","installedModules","__webpack_require__","moduleId","exports","mode","ns","object","property","Common","argsStart","deepClone","begin","parts","temp","choices","min","max","_seededRandom","colorString","message","warning","haystack","needle","list","func","mapped","graph","visited","neighbors","neighbor","funcs","chain","lastResult","decomp","global","Bounds","vertices","bounds","velocity","vertex","point","boundsA","boundsB","vector","position","deltaX","deltaY","Vector","y","angle","output","cos","sin","magnitude","vectorA","vectorB","vectorC","scalar","negate","Vertices","points","body","pathPattern","match","area","centre","cross","average","signed","mass","numerator","denominator","verticesLength","translateX","translateY","pointX","pointY","dx","dy","nextVertex","scaleX","scaleY","delta","radius","quality","qualityMin","qualityMax","newVertices","prevVertex","currentRadius","prevNormal","nextNormal","diagonalRadius","radiusVector","midNormal","scaledVertex","precision","alpha","theta","vertexA","vertexB","z","upper","lower","Body","Sleeping","Axes","defaults","_initProperties","isNonColliding","defaultFillStyle","defaultStrokeStyle","defaultLineWidth","settings","isStatic","part","moment","density","inertia","autoHull","hull","hullCentre","total","relative","updateVelocity","timeScale","speed","translation","rotation","totalArea","totalInertia","deltaTime","deltaTimeSquared","correction","frictionAir","velocityPrevX","velocityPrevY","bodyVelocity","force","offset","properties","Events","eventNames","names","callbacks","newCallbacks","eventClone","events","Composite","composite","isModified","updateParents","updateChildren","childComposite","objects","compositeA","compositeB","bodies","constraint","keepStatic","constraints","composites","recursive","motionSleepThreshold","angularSpeed","motion","minMotion","maxMotion","pairs","pair","collision","bodyA","bodyB","sleepingBody","movingBody","isSleeping","wasSleeping","Collision","Pair","_supports","_overlapAB","_overlapBA","minOverlap","normal","tangent","penetration","supports","minAxis","normalX","normalY","supportsB","supportCount","supportsA","verticesA","verticesB","axes","verticesALength","verticesBLength","verticesAX","verticesAY","verticesBX","verticesBY","axesLength","overlapMin","overlapAxisNumber","overlap","overlapAB","overlapBA","dot","axis","axisX","axisY","minA","minB","maxA","maxB","direction","bodyAPositionX","bodyAPositionY","nearestDistance","vertexC","distance","Contact","timestamp","contacts","parentA","parentB","supportA","contactA","supportB","contactB","isActive","Constraint","initialPointA","initialPointB","length","impulse","fixedA","fixedB","pointA","pointB","pointAWorld","pointBWorld","currentLength","difference","isRigid","stiffness","damping","massTotal","inertiaTotal","resistanceTotal","torque","share","normalVelocity","relativeVelocity","zero","pointAX","pointAY","pointBX","pointBY","gradient","xx","Bodies","width","height","rectangle","chamfer","slope","roof","x1","x2","x3","verticesPath","trapezoid","maxSides","circle","sides","yy","polygon","vertexSets","flagInternal","removeCollinear","minimumArea","removeDuplicatePoints","canDecomp","isConvex","isConcave","concave","decomposed","chunk","chunkVertices","coincident_max_dist","partA","partB","pav","pbv","da","db","Detector","detector","bodiesLength","canCollide","collides","collisions","collisionIndex","boundXMax","boundYMax","boundYMin","bodyAStatic","partsALength","partsASingle","partsBLength","partsAStart","partsBStart","filterA","filterB","Mouse","element","mouse","touches","scale","pixelRatio","elementBounds","rootNode","scrollX","scrollY","Plugin","registered","pluginVersion","registeredVersion","dependency","parsed","plugins","dependencies","sortedDependencies","status","tracked","parsedBase","pattern","range","major","minor","Engine","Resolver","Pairs","engine","startTime","world","timing","allBodies","allConstraints","positionDamping","engineA","engineB","gravity","gravityScale","contactCount","pairsLength","contactShare","positionImpulse","positionDampen","slopDampen","positionWarming","verticesTranslate","boundsUpdate","positionImpulseX","positionImpulseY","contact","contactVertex","normalImpulse","tangentImpulse","impulseX","impulseY","timeScaleSquared","timeScaleCubed","restingThresh","restingThreshTangent","frictionNormalMultiplier","frictionMaxStatic","maxFriction","tangentX","tangentY","inverseMassTotal","friction","bodyAVelocityX","bodyAVelocityY","bodyAAngularVelocity","bodyBVelocityX","bodyBVelocityY","bodyBAngularVelocity","offsetAX","offsetAY","offsetBX","offsetBY","velocityPointAX","velocityPointAY","velocityPointBX","velocityPointBY","relativeVelocityX","relativeVelocityY","tangentVelocity","normalOverlap","normalForce","frictionLimit","oAcN","oBcN","contactNormalImpulse","contactTangentImpulse","pairUpdate","pairCreate","pairSetActive","pairsTable","pairsList","pairsListLength","pairsListIndex","collisionStart","collisionEnd","collisionActive","collisionsLength","collisionStartIndex","collisionEndIndex","collisionActiveIndex","Matter","Composites","deprecated","columns","rows","columnGap","rowGap","stack","currentX","currentY","lastBody","row","maxHeight","column","bodyHeight","bodyWidth","xOffsetA","yOffsetA","xOffsetB","yOffsetB","bodyAHeight","bodyAWidth","bodyBHeight","bodyBWidth","crossBrace","col","bodyC","stackX","stackY","actualRows","lastBodyWidth","xOffset","size","newtonsCradle","separation","wheelSize","group","wheelBase","wheelAOffset","wheelBOffset","wheelYOffset","car","wheelA","wheelB","axelA","axelB","particleRadius","particleOptions","constraintOptions","softBody","Grid","grid","forceUpdate","buckets","bucket","bucketId","gridChanged","newRegion","union","isInsideNewRegion","isInsideOldRegion","regionA","regionB","startCol","endCol","startRow","endRow","gridPairs","pairId","bucketLength","pairKeys","pairKeysLength","MouseConstraint","mouseConstraint","mouseEvents","Query","overlaps","startPoint","endPoint","rayWidth","rayAngle","rayLength","rayX","rayY","ray","outside","Render","_requestAnimationFrame","_cancelAnimationFrame","_createCanvas","loop","time","_updateTiming","canvas","_getPixelRatio","padding","center","viewHeight","viewWidth","outerRatio","innerRatio","boundsWidth","boundsHeight","boundsScaleX","boundsScaleY","background","_applyBackground","sections","section","deltaHistory","elapsedHistory","timestampElapsedHistory","engineDeltaHistory","engineUpdatesHistory","engineElapsedHistory","lastEngineUpdatesPerFrame","lastEngineDelta","deltaMean","_mean","elapsedMean","engineDeltaMean","engineUpdatesMean","engineElapsedMean","timestampElapsedMean","rateMean","neededUpdatesPerFrame","fps","graphHeight","gap","count","label","indicator","plotY","coils","showInternalEdges","sprite","texture","_getTexture","normalPosX","normalPosY","inspector","selected","historySize","devicePixelRatio","backingStorePixelRatio","imagePath","image","cssBackground","Runner","runner","onFrame","tickStartTime","engineDelta","updateCount","frameDelta","deltaHistorySorted","deltaHistoryWindow","frameDeltaSmoothed","maxUpdates","updateStartTime","elapsedTimeTotal","elapsedTimeUpdates","elapsedNextEstimate","valuesLength","SAT","Svg","sampleLength","il","segment","segmentsQueue","lastSegment","lastPoint","segmentIndex","lx","ly","addPoint","px","py","pathSegType","isRelative","addSegmentPoint","segType","x0","y0","y1","y2","segs","seg","World","f","title","link1","link2","link3","isMouseDown","activeBody","mousePosition","touchtimeout","simulating","mainC","checkDbl","upd","elements","top","onResize","createBody","elRef","heavy","rect","handleMouseDown","handleMouseMove","handleMouseUp","foundBodies","boundaries","ground","leftWall","rightWall","ceiling","lastTap","currentTime","tapLength","img","badge","v0","v1","v2","g0","g1","g2","showNameModal","userName","showCertificate","check","generateCertificate","drawCertificate","base_image","date","downloadLink","certificateContainer","discardBtn","_imports_0","_imports_1","_sfc_main","Home","About","npage","_hoisted_1","_hoisted_2","_hoisted_3","_hoisted_4","_hoisted_5","_hoisted_6","_hoisted_8","_hoisted_9","_hoisted_11","_hoisted_12","_hoisted_13","_hoisted_14","_hoisted_15","_hoisted_16","_openBlock","_createElementBlock","_Fragment","_createElementVNode","_normalizeClass","$data","_createTextVNode","$setup","$options","_createCommentVNode","_hoisted_7","_toDisplayString","_cache","_withModifiers","$event","_hoisted_10","_renderList","route","_createBlock","_resolveDynamicComponent","_withDirectives","_createStaticVNode","App"],"mappings":"ssBAAA;AAAA;AAAA;AAAA;AAAA,GAKA,2BAEA,SAASA,GAAQC,EAAK,CACd,MAAAC,EAA6B,OAAA,OAAO,IAAI,EAC9C,UAAWC,KAAOF,EAAI,MAAM,GAAG,EAAGC,EAAIC,CAAG,EAAI,EACtC,OAACC,GAAQA,KAAOF,CACzB,CAEA,MAAMG,GAA4E,CAAA,EAC5EC,GAA4E,CAAA,EAC5EC,GAAO,IAAM,CACnB,EACMC,GAAK,IAAM,GACXC,GAAQN,GAAQA,EAAI,WAAW,CAAC,IAAM,KAAOA,EAAI,WAAW,CAAC,IAAM,MACxEA,EAAI,WAAW,CAAC,EAAI,KAAOA,EAAI,WAAW,CAAC,EAAI,IAC1CO,GAAmBP,GAAQA,EAAI,WAAW,WAAW,EACrDQ,GAAS,OAAO,OAChBC,GAAS,CAACC,EAAKC,IAAO,CACpB,MAAAC,EAAIF,EAAI,QAAQC,CAAE,EACpBC,EAAI,IACFF,EAAA,OAAOE,EAAG,CAAC,CAEnB,EACMC,GAAiB,OAAO,UAAU,eAClCC,GAAS,CAACb,EAAKD,IAAQa,GAAe,KAAKZ,EAAKD,CAAG,EACn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