diff --git a/dist/aframe-street-component.js b/dist/aframe-street-component.js index 2c05da67c..91167587d 100644 --- a/dist/aframe-street-component.js +++ b/dist/aframe-street-component.js @@ -1,4 +1,4 @@ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(self,(()=>(()=>{var t={631:t=>{var e=[new THREE.Vector2,new THREE.Vector2,new THREE.Vector2,new THREE.Vector2];function i(t,i,n,a){const r=1/a,s=1/n;return e[0].set(r*i,s*t+s),e[1].set(r*i,s*t),e[2].set(r*i+r,s*t),e[3].set(r*i+r,s*t+s),e}AFRAME.registerComponent("atlas-uvs",{dependencies:["geometry"],schema:{totalColumns:{type:"int",default:1},totalRows:{type:"int",default:1},column:{type:"int",default:1},row:{type:"int",default:1}},update:function(){const t=this.data,e=i(t.row-1,t.column-1,t.totalRows,t.totalColumns),n=this.el.getObject3D("mesh").geometry;var a=new Float32Array([e[0].x,e[0].y,e[3].x,e[3].y,e[1].x,e[1].y,e[2].x,e[2].y]);n.setAttribute("uv",new THREE.BufferAttribute(a,2)),n.uvsNeedUpdate=!0}}),AFRAME.registerComponent("dynamic-texture-atlas",{schema:{canvasId:{default:"dynamicAtlas"},canvasHeight:{default:1024},canvasWidth:{default:1024},debug:{default:!1},numColumns:{default:8},numRows:{default:8}},multiple:!0,init:function(){const t=this.canvas=document.createElement("canvas");t.id=this.data.canvasId,t.height=this.data.canvasHeight,t.width=this.data.canvasWidth,this.ctx=t.getContext("2d"),document.body.appendChild(t),this.data.debug&&(t.style.left=0,t.style.top=0,t.style.position="fixed",t.style.zIndex=9999999999)},drawTexture:function(t,e,n,a,r){const s=this.canvas,o=this.data;t.complete||(t.onload=()=>{this.drawTexture(t,e,n)});const l=r||s.height/o.numRows,c=a||s.width/o.numColumns;return this.ctx.drawImage(t,c*e,c*n,c,l),i(e,n,o.numRows,o.numColumns)}}),t.exports.getGridUvs=i},844:(t,e,i)=>{function n(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||r(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,a=!1,r=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){a=!0,r=t}finally{try{n||null==o.return||o.return()}finally{if(a)throw r}}return i}(t,e)||r(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){if(t){if("string"==typeof t)return s(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i3&&void 0!==arguments[3]?arguments[3]:2.25,a=h(e,"dividers-".concat(t,"-parent"));return d({objectMixinId:"dividers-".concat(t),parentEl:a,step:n,radius:i}),a}function g(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2.25,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"0 0 0",r=h(e,"".concat(t,"-parent"));return d({objectMixinId:t,parentEl:r,step:n,radius:i,rotation:a}),r}function y(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1)+t)}function b(t,e){return Math.random()*(e-t)+t}function x(t,e,i){var n=Math.floor((e-t)/i)+1;return Array(n).fill().map((function(e,n){return t+n*i})).sort((function(){return.5-Math.random()}))}function v(t,e,i,n){for(var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"random",r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=[-.37*e,.37*e],o=x(-.5*n,.5*n,1.5),l=parseInt({empty:0,sparse:.0625,normal:.125,dense:.25}[i]*n,10),c=h(t,"pedestrians-parent"),d=0;d3&&void 0!==arguments[3]?arguments[3]:void 0,l=t.object3D,c=o||(n=l,a=(new THREE.Box3).setFromObject(n),{x:a.max.x-a.min.x,y:a.max.y-a.min.y,z:a.max.z-a.min.z})[e],d={start:-.5*(r=i)+.5*(s=c),end:.5*r-.5*s},u=d.start,m=d.end,p="set".concat(e.toUpperCase()),h=b(u,m);return l.position[p](h),h}function E(t,e,i,n,a){if(a){var r="inbound"===t[0]?0:180,s=document.createElement("a-entity");return s.setAttribute("class",e),s.setAttribute("position",i+" 0 0"),s.setAttribute("rotation","0 "+r+" 0"),s.setAttribute("mixin",e),s.addEventListener("model-loaded",(function(t){w(t.target,"z",n)}),{once:!0}),s}}function _(t,e,i,n){if(n){var a="inbound"===t[0]?0:180,r=document.createElement("a-entity"),s=document.createElement("a-entity");s.setAttribute("rotation","0 "+a+" 0"),s.setAttribute("mixin","bus");var o=w(s,"z",i,12);return s.setAttribute("position",e+" 0 "+o),r.append(s),r}}function k(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5?arguments[5]:void 0,s=i/e*1e3,o="outbound"===(arguments.length>6?arguments[6]:void 0)?-i/2:i/2,l=Math.abs(o-r)/e*1e3,c={property:"position",easing:"linear",loop:"false",from:{x:n,y:a,z:r},to:{z:o},dur:l},d={property:"position",easing:"linear",loop:"true",from:{x:n,y:a,z:-o},to:{x:n,y:a,z:o},delay:l,dur:s};return t.setAttribute("animation__1",c),t.setAttribute("animation__2",d),t}function C(t,e,i,n){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0;if(!(arguments.length>5&&void 0!==arguments[5])||arguments[5]){var l=0,c=a(t,3),d=c[0],u=c[1],m=c[2];2===t.length&&(m=u);var p,h={inbound:0,outbound:180,sideways:{left:-90,right:90},"angled-front-left":-60,"angled-front-right":60,"angled-rear-left":-120,"angled-rear-right":120};if(p="sideways"==d?h.sideways[u]:h[d],"pedestrian"===m)return v(e,i,"normal",n,d,r);var f=document.createElement("a-entity");if(1==t.length)return f;var g={car:{mixin:"sedan-rig",wheelDiameter:.76,length:5.17,width:2},microvan:{mixin:"suv-rig",wheelDiameter:.84,length:5,width:2},truck:{mixin:"box-truck-rig",wheelDiameter:1.05,length:6.95,width:2.5}};if(s>1){var y=n/2,b=o/2+o,A=x(-y+b,y-b,o).slice(0,s),E="sideways"==d||d.includes("angled")?"width":"length",_=g[m][E];A.forEach((function(t){var e=o-_-.2,i=-e/2+e*Math.random();e>0&&C(t+i,m)}))}else C();return f}function C(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=g[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"car"],a=document.createElement("a-entity");return t||(t=w(a,"z",n,i.length)),a.setAttribute("position","".concat(e," 0 ").concat(t)),a.setAttribute("mixin",i.mixin),a.setAttribute("rotation","0 ".concat(p," 0")),r&&(l=5,a.setAttribute("wheel",{speed:l,wheelDiameter:i.wheelDiameter}),k(a,l,n,e,0,t,u)),f.append(a),a}}function M(t,e,i){var n=document.createElement("a-entity"),a=document.createElement("a-entity"),r="left"===t[0]?0:180;return a.setAttribute("position",e+" 0 0"),a.setAttribute("rotation","0 "+r+" 0"),a.setAttribute("mixin","food-trailer-rig"),a.addEventListener("model-loaded",(function(t){w(t.target,"z",i)}),{once:!0}),n.append(a),n}function S(t,e){if(e){var i=document.createElement("a-entity"),n=document.createElement("a-entity");n.setAttribute("position",t+" 1.75 0"),n.setAttribute("rotation","0 0 0"),n.setAttribute("mixin","magic-carpet"),i.append(n);var a=document.createElement("a-entity");return a.setAttribute("position",t+" 1.75 0"),a.setAttribute("rotation","0 0 0"),a.setAttribute("mixin","Character_1_M"),i.append(a),i}}function R(t,e){var i=document.createElement("a-entity"),n=document.createElement("a-entity");n.setAttribute("mixin","outdoor_dining");var a=w(n,"z",e,2.27);return n.setAttribute("position",t+" 0 "+a),i.append(n),i}function N(t,e,i,n,a){if(a){var r=document.createElement("a-entity"),s=document.createElement("a-entity"),o="inbound"===t[0]?0:180;s.setAttribute("rotation","0 "+o+" 0"),"bike-lane"===i?s.setAttribute("mixin","Bicycle_1"):s.setAttribute("mixin","ElectricScooter_1");var l=w(s,"z",n,2.03);return s.setAttribute("position",e+" 0 "+l),r.append(s),r}}function j(t,e,i){if(!(arguments.length>3&&void 0!==arguments[3])||arguments[3]){var n=document.createElement("a-entity"),a=document.createElement("a-entity"),r="inbound"===t[1]?0:180;a.setAttribute("rotation","0 "+r+" 0"),"taxi"===t[0]?a.setAttribute("mixin","sedan-taxi"):"rideshare"===t[0]&&a.setAttribute("mixin","sedan-rig");var s=w(a,"z",i,5);return a.setAttribute("position",e+" 0 "+s),n.append(a),n}}function O(t){var e,i=document.createElement("a-entity");return(e=document.createElement("a-entity")).setAttribute("position",t+" 1 0"),e.setAttribute("mixin","wayfinding-box"),i.append(e),(e=document.createElement("a-entity")).setAttribute("position",t+" 1.2 0.06"),e.setAttribute("geometry","primitive: plane; width: 0.8; height: 1.6"),e.setAttribute("material","src:#wayfinding-map"),i.append(e),(e=document.createElement("a-entity")).setAttribute("position",t+" 1.2 -0.06"),e.setAttribute("rotation","0 180 0"),e.setAttribute("geometry","primitive: plane; width: 0.8; height: 1.6"),e.setAttribute("material","src:#wayfinding-map"),i.append(e),i}function T(t){var e=document.createElement("a-entity");return e.setAttribute("class","bench-parent"),e.setAttribute("position",t+" 0.2 3.5"),e}function L(t){var e=document.createElement("a-entity");return e.setAttribute("class","bikerack-parent"),e.setAttribute("position",t+" 0 -3.5"),e}function P(t,e){var i=document.createElement("a-entity");i.setAttribute("class","bikeshare"),i.setAttribute("position",t+" 0 0"),i.setAttribute("mixin","bikeshare");var n="left"===e[0]?90:270;return i.setAttribute("rotation","0 "+n+" 0"),i}function I(t,e){var i=document.createElement("a-entity");i.setAttribute("class","parklet"),i.setAttribute("position",t+" .02 0"),i.setAttribute("mixin","parklet");var n="left"===e[0]?90:270;return i.setAttribute("rotation","0 "+n+" 0"),i}function D(t){var e=document.createElement("a-entity");return e.setAttribute("class","tree-parent"),e.setAttribute("position",t+" 0.2 7"),e}function z(t){var e=document.createElement("a-entity");return e.setAttribute("class","lamp-parent"),e.setAttribute("position",t+" 0.2 0"),e}function B(t,e){var i=document.createElement("a-entity");return i.setAttribute("class","bus-stop"),i.setAttribute("position",t+" 0 0"),i.setAttribute("rotation","0 "+e+" 0"),i.setAttribute("mixin","bus-stop"),i}function F(t){var e=document.createElement("a-entity");return e.setAttribute("class","brt-station"),e.setAttribute("position",t+" 0 0"),e.setAttribute("mixin","brt-station"),e}function H(t,e,i,n,a,r,s){var o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=document.createElement("a-entity"),c=t+" "+r/150+" 1",d=t+" 1 1";return"sidewalk"===a||1===o?(l.setAttribute("geometry","primitive","box"),l.setAttribute("geometry","height: 0.4"),l.setAttribute("geometry","depth",r),l.setAttribute("scale",d)):a.match("lane")?(i-=.1,l.setAttribute("geometry","primitive","box"),l.setAttribute("geometry","height: 0.2"),l.setAttribute("geometry","depth",r),l.setAttribute("scale",d)):(l.setAttribute("rotation","270 "+n+" 0"),l.setAttribute("scale",c)),l.setAttribute("position",e+" "+i+" 0"),l.setAttribute("mixin",a),0!==s.length&&l.setAttribute("material","repeat: ".concat(s[0]," ").concat(s[1])),l}t.exports.processSegments=function(t,e,i,a,r){var s=i/2;i>12&&(s=(i-12)/2),e&&(t=function(t){function e(t){return"lane"===t.slice(t.length-4)||"light-rail"===t||"streetcar"===t||"flex-zone"===t}return t.reduce((function(t,i,n,a){if(0===n)return t.concat(i);var r=a[n-1];if(e(i.type)&&e(r.type)){var s="solid";i.type===r.type&&(s="dashed"),("drive-lane"===i.type&&"turn-lane"===r.type||"drive-lane"===r.type&&"turn-lane"===i.type)&&(s="dashed"),i.variantString.split("|")[0]!==r.variantString.split("|")[0]&&(s="doubleyellow","bike-lane"===i.type&&"bike-lane"===r.type&&(s="shortdashedyellow"),"flex-zone"!==i.type&&"flex-zone"!==r.type||(s="solid")),"turn-lane"===i.type&&"shared"===i.variantString.split("|")[1]?s="soliddashedyellow":"turn-lane"===r.type&&"shared"===r.variantString.split("|")[1]&&(s="soliddashedyellowinverted"),"parking-lane"!==i.type&&"parking-lane"!==r.type||(s="invisible"),t.push({type:"separator",variantString:s,width:0})}return(e(i.type)&&"divider"===r.type||e(r.type)&&"divider"===i.type)&&t.push({type:"separator",variantString:"solid",width:0}),t.push(i),t}),[])}(t));var h=function(t){var e=document.createElement("a-entity"),i=0-l.calcStreetWidth(t)/2;return e.setAttribute("position",i+" 0 0"),e}(t);h.classList.add("street-parent");for(var y,b=0,x=0;x{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var i=0;i\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),people:'\n \x3c!-- human characters --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),"people-rigged":' \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),vehicles:'\n \x3c!-- vehicles --\x3e\n \n \n \n \x3c!-- micro mobility vehicles --\x3e\n \n \n \n '),"vehicles-rigged":'\n \x3c!-- vehicles rigged --\x3e\n \n \n \n \n \n \n '),buildings:'\n \x3c!-- blocks --\x3e\n \n \n \n\n \x3c!-- buildings and blocks --\x3e\n \n \n \n \n \n\n \x3c!-- suburban buildings --\x3e\n \n \n \n\n \x3c!-- arched style buildings --\x3e\n \n \n \n \n'),"intersection-props":'\n \n \n \n \n \n \n '),"segment-textures":' \n \x3c!-- segment mixins with textures --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n '),"segment-colors":' \n \x3c!-- segment color modifier mixins --\x3e\n \n \n \n ',"lane-separator":'\n \x3c!-- lane separator markings --\x3e\n \n \n \n \n \n \n \n \n '),stencils:' \n \x3c!-- stencil markings --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),"vehicles-transit":'\n \x3c!-- vehicles-transit --\x3e\n \n \n \n \n \n \n '),dividers:'\n \x3c!-- dividers --\x3e\n \n \n \n \n \n \n \n \n \n \n \n '),sky:'\n \x3c!-- sky --\x3e\n \n \n '),grounds:'\n \x3c!-- grounds --\x3e\n \n \n \n\n \n \n \n \n\n \n \n '),"loud-bicycle":'\n \x3c!-- loud-bicycle-game --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ')};if(e){var n=e.split(" "),a=Object.keys(i).filter((function(t){return n.includes(t)})),r="";for(var s in i)a.includes(s)&&(r+=i[s]);return r}return Object.values(i).join("")}(e,t)),AFRAME.ANode.prototype.load.call(this)}}])&&e(a.prototype,r),s&&e(a,s),l}();customElements.define("street-assets",r);document.addEventListener("DOMSubtreeModified",(function t(e){if("A-SCENE"===e.target.nodeName){var i=e.target.querySelector("a-assets");if(i||(i=document.createElement("a-assets"),e.target.append(i)),i.querySelector("street-assets"))document.removeEventListener("DOMSubtreeModified",t);else{var n=document.createElement("street-assets");i.append(n),document.removeEventListener("DOMSubtreeModified",t)}}}),!1)},51:()=>{AFRAME.registerComponent("anisotropy",{schema:{default:0},dependencies:["material","geometry"],init:function(){var t=this;this.maxAnisotropy=this.el.sceneEl.renderer.capabilities.getMaxAnisotropy(),["model-loaded","materialtextureloaded"].forEach((function(e){return t.el.addEventListener(e,(function(){var e=t.el.getObject3D("mesh"),i=t.data;0===(i=+i||0)&&(i=t.maxAnisotropy),e.traverse((function(t){!0===t.isMesh&&null!==t.material.map&&(t.material.map.anisotropy=i,t.material.map.needsUpdate=!0)}))}),!1)}))}})},391:(t,e,i)=>{var n=i(334);AFRAME.registerComponent("create-from-json",{schema:{jsonString:{type:"string",default:""}},update:function(t){var e=this.data,i=this.el;if(t.string&&e.string!==t.string)for(;i.firstChild;)i.removeChild(i.lastChild);n.appendChildElementsFromArray(JSON.parse(e.jsonString),i)}})},71:()=>{var t={},e={};AFRAME.registerComponent("gltf-part",{schema:{buffer:{default:!0},part:{type:"string"},src:{type:"asset"}},init:function(){this.dracoLoader=document.querySelector("a-scene").systems["gltf-model"].getDRACOLoader()},update:function(){var t=this.el;!this.data.part&&this.data.src||this.getModel((function(e){e&&t.setObject3D("mesh",e)}))},getModel:function(i){var n=this;if(!e[this.data.src])return t[this.data.src]?t[this.data.src].then((function(t){i(n.selectFromModel(t))})):void(t[this.data.src]=new Promise((function(a){var r=new THREE.GLTFLoader;n.dracoLoader&&r.setDRACOLoader(n.dracoLoader),r.load(n.data.src,(function(r){var s=r.scene||r.scenes[0];e[n.data.src]=s,delete t[n.data.src],i(n.selectFromModel(s)),a(s)}),(function(){}),console.error)})));i(this.selectFromModel(e[this.data.src]))},selectFromModel:function(t){var e,i;if(i=t.getObjectByName(this.data.part))return e=i.getObjectByProperty("type","Mesh").clone(!0),this.data.buffer?(e.geometry=e.geometry.toNonIndexed(),e):(e.geometry=(new THREE.Geometry).fromBufferGeometry(e.geometry),e);console.error("[gltf-part] `"+this.data.part+"` not found in model.")}})},247:(t,e,i)=>{var n=i(502).Notyf;AFRAME.registerComponent("notify",{schema:{duration:{type:"number",default:2e3},ripple:{type:"boolean",default:!0},position:{type:"string",default:{x:"center",y:"bottom"}},dismissible:{type:"boolean",default:!1},type:{type:"string",default:"info"},message:{type:"string",default:""}},init:function(){this.notify=new n({types:[{type:"info",background:"blue",icon:!1}],duration:this.data.duration,ripple:this.data.ripple,position:this.data.position,dismissible:this.data.dismissible}),this.types=this.notify.options.types.map((function(t){return t.type}))},message:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";t&&this.types.includes(e)&&this.notify.open({type:e,message:t})},update:function(t){if(0!==Object.keys(t).length){var e=this.data.message,i=this.data.type;e&&this.types.includes(i)&&(this.message(e,i),this.data.message="")}}})},699:()=>{takeScreenshotNow=function(t,e,i){var n=AFRAME.scenes[0].renderer;function a(t,e){var i=document.createElement("a"),n=e.replace(/^data:image\/[^;]/,"data:application/octet-stream");i.setAttribute("href",n),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}var r=t+"."+e;"img"!=e?a(r,"png"==e?n.domElement.toDataURL("image/png"):n.domElement.toDataURL("image/jpeg",.95)):i.src=n.domElement.toDataURL()},AFRAME.registerComponent("screentock",{schema:{takeScreenshot:{type:"boolean",default:!1},filename:{type:"string",default:"screenshot"},type:{type:"string",default:"jpg"},imgElementSelector:{type:"selector"}},tock:function(){this.data.takeScreenshot&&(this.el.setAttribute("screentock","takeScreenshot",!1),takeScreenshotNow(this.data.filename,this.data.type,this.data.imgElementSelector))}})},54:function(t,e,i){var n,a,r,s;function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}t=i.nmd(t),s=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==o(t)&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("cursor-teleport",{schema:{cameraHead:{type:"selector",default:""},cameraRig:{type:"selector",default:""},collisionEntities:{type:"string",default:""},ignoreEntities:{type:"string",default:""},landingMaxAngle:{default:45,min:0,max:360},landingNormal:{type:"vec3",default:{x:0,y:1,z:0}},transitionSpeed:{type:"number",default:6e-4}},init:function(){var t=this;this.mobile=AFRAME.utils.device.isMobile();var e=this.el.sceneEl;this.canvas=e.renderer.domElement,this.data.cameraHead.object3D.traverse((function(e){e instanceof THREE.Camera&&(t.cam=e)})),this.camRig=this.data.cameraRig.object3D,this.rayCaster=new THREE.Raycaster,this.referenceNormal=new THREE.Vector3,this.rayCastObjects=[],this.referenceNormal.copy(this.data.landingNormal);var i=new THREE.RingGeometry(.25,.3,32,1);i.rotateX(-Math.PI/2),i.translate(0,.02,0);var n=new THREE.MeshBasicMaterial({color:7818734}),a=new THREE.Mesh(i,n),r=new THREE.CylinderGeometry(.3,.3,.5,32,1,!0);r.translate(0,.25,0);var s=(new THREE.TextureLoader).load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAQCAYAAADXnxW3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNM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l/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAADJJREFUeNpEx7ENgDAAAzArK0JA6f8X9oewlcWStU1wBGdwB08wgjeYm79jc2nbYH0DAC/+CORJxO5fAAAAAElFTkSuQmCC"),o=new THREE.MeshBasicMaterial({color:7818734,side:"double",map:s,transparent:!0,depthTest:!1}),l=new THREE.Mesh(r,o),c=new THREE.Group;c.add(a),c.add(l),this.teleportIndicator=c,e.object3D.add(this.teleportIndicator),this.transitioning=!1,this.transitionProgress=0,this.transitionCamPosStart=new THREE.Vector3,this.transitionCamPosEnd=new THREE.Vector3,this.updateRaycastObjects=this.updateRaycastObjects.bind(this),this.getMouseState=this.getMouseState.bind(this),this.getTeleportPosition=this.getTeleportPosition.bind(this),this.isValidNormalsAngle=this.isValidNormalsAngle.bind(this),this.transition=this.transition.bind(this),this.mouseMove=this.mouseMove.bind(this),this.mouseDown=this.mouseDown.bind(this),this.mouseUp=this.mouseUp.bind(this),this.easeInOutQuad=this.easeInOutQuad.bind(this),this.updateRaycastObjects()},remove:function(){this.cam=null,this.canvas=null,this.rayCastObjects.length=0,this.el.sceneEl.object3D.remove(this.teleportIndicator),this.teleportIndicator.children[0].material.dispose(),this.teleportIndicator.children[0].geometry.dispose(),this.teleportIndicator.children[1].material.dispose(),this.teleportIndicator.children[1].geometry.dispose(),this.teleportIndicator=null,this.collisionMesh&&(this.collisionMesh.geometry.dispose(),this.collisionMesh.material.dispose(),this.collisionMesh=null)},play:function(){var t=this.canvas;t.addEventListener("mousedown",this.mouseDown,!1),t.addEventListener("mousemove",this.mouseMove,!1),t.addEventListener("mouseup",this.mouseUp,!1),t.addEventListener("touchstart",this.mouseDown,!1),t.addEventListener("touchmove",this.mouseMove,!1),t.addEventListener("touchend",this.mouseUp,!1)},pause:function(){var t=this.canvas;t.removeEventListener("mousedown",this.mouseDown),t.removeEventListener("mousemove",this.mouseMove),t.removeEventListener("mouseup",this.mouseUp),t.removeEventListener("touchstart",this.mouseDown),t.removeEventListener("touchmove",this.mouseMove),t.removeEventListener("touchend",this.mouseUp)},updateRaycastObjects:function(){var t=this;if(this.rayCastObjects.length=0,""!==this.data.collisionEntities)this.el.sceneEl.querySelectorAll(this.data.collisionEntities).forEach((function(e){e.object3D.traverse((function(e){e.isMesh&&(e.userData.collision=!0,t.rayCastObjects.push(e))}))}));else{if(!this.collisionMesh){var e=new THREE.PlaneGeometry(500,500,1);e.rotateX(-Math.PI/2);var i=new THREE.MeshNormalMaterial,n=new THREE.Mesh(e,i);n.userData.collision=!0,this.collisionMesh=n}this.rayCastObjects.push(this.collisionMesh)}""!==this.data.ignoreEntities&&this.el.sceneEl.querySelectorAll(this.data.ignoreEntities).forEach((function(e){e.object3D.traverse((function(e){e.isMesh&&t.rayCastObjects.push(e)}))}))},getMouseState:function(){var t=new THREE.Vector2;return function(e){var i=this.canvas.getBoundingClientRect();return null!=e.clientX?(t.x=e.clientX-i.left,t.y=e.clientY-i.top,t):null!=e.touches[0]?(t.x=e.touches[0].clientX-i.left,t.y=e.touches[0].clientY-i.top,t):void 0}}(),getTeleportPosition:function(){var t=new THREE.Vector2;return function(e,i){if(0!==this.rayCastObjects.length){if(this.cam&&this.canvas){var n=this.cam,a=this.canvas.getBoundingClientRect();t.x=e/(a.right-a.left)*2-1,t.y=-i/(a.bottom-a.top)*2+1,this.rayCaster.setFromCamera(t,n);var r=this.rayCaster.intersectObjects(this.rayCastObjects);return!(0===r.length||!this.isValidNormalsAngle(r[0].face.normal))&&!0===r[0].object.userData.collision&&r[0].point}return!1}return!1}}(),isValidNormalsAngle:function(t){var e=this.referenceNormal.angleTo(t);return THREE.MathUtils.RAD2DEG*e<=this.data.landingMaxAngle},transition:function(t){this.transitionProgress=0,this.transitionCamPosEnd.copy(t),this.transitionCamPosStart.copy(this.camRig.position),this.transitioning=!0},mouseMove:function(t){var e=this.getMouseState(t);this.mouseX=e.x,this.mouseY=e.y},mouseDown:function(t){this.updateRaycastObjects();var e=this.getMouseState(t);this.mouseX=e.x,this.mouseY=e.y,this.mouseXOrig=e.x,this.mouseYOrig=e.y},mouseUp:function(t){if(this.mouseX===this.mouseXOrig&&this.mouseY===this.mouseYOrig){var e=this.getTeleportPosition(this.mouseX,this.mouseY);e&&(this.teleportIndicator.position.copy(e),this.transition(e))}},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},tick:function(t,e){if(!this.transitioning&&!this.mobile){var i=this.getTeleportPosition(this.mouseX,this.mouseY);i&&this.teleportIndicator.position.copy(i)}if(this.transitioning){this.transitionProgress+=e*this.data.transitionSpeed;var n=this.easeInOutQuad(this.transitionProgress),a=n<.5?n:1.5-1*(n+.5);this.teleportIndicator.scale.set(1+a,1,1+a);var r=this.camRig.position;r.x=this.transitionCamPosStart.x+(this.transitionCamPosEnd.x-this.transitionCamPosStart.x)*n,r.y=this.transitionCamPosStart.y+(this.transitionCamPosEnd.y-this.transitionCamPosStart.y)*n,r.z=this.transitionCamPosStart.z+(this.transitionCamPosEnd.z-this.transitionCamPosStart.z)*n,this.transitionProgress>=1&&(this.transitioning=!1,r.copy(this.transitionCamPosEnd))}}})}])},"object"==o(e)&&"object"==o(t)?t.exports=s():(a=[],void 0===(r="function"==typeof(n=s)?n.apply(e,a):n)||(t.exports=r))},475:t=>{var e={once:THREE.LoopOnce,repeat:THREE.LoopRepeat,pingpong:THREE.LoopPingPong};function i(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}t.exports=AFRAME.registerComponent("animation-mixer",{schema:{clip:{default:"*"},duration:{default:0},clampWhenFinished:{default:!1,type:"boolean"},crossFadeDuration:{default:0},loop:{default:"repeat",oneOf:Object.keys(e)},repetitions:{default:1/0,min:0},timeScale:{default:1},startAt:{default:0}},init:function(){var t=this;this.model=null,this.mixer=null,this.activeActions=[];var e=this.el.getObject3D("mesh");e?this.load(e):this.el.addEventListener("model-loaded",(function(e){t.load(e.detail.model)}))},load:function(t){var e=this.el;this.model=t,this.mixer=new THREE.AnimationMixer(t),this.mixer.addEventListener("loop",(function(t){e.emit("animation-loop",{action:t.action,loopDelta:t.loopDelta})})),this.mixer.addEventListener("finished",(function(t){e.emit("animation-finished",{action:t.action,direction:t.direction})})),this.data.clip&&this.update({})},remove:function(){this.mixer&&this.mixer.stopAllAction()},update:function(t){if(t){var i=this.data,n=AFRAME.utils.diff(i,t);if("clip"in n)return this.stopAction(),void(i.clip&&this.playAction());this.activeActions.forEach((function(t){"duration"in n&&i.duration&&t.setDuration(i.duration),"clampWhenFinished"in n&&(t.clampWhenFinished=i.clampWhenFinished),("loop"in n||"repetitions"in n)&&t.setLoop(e[i.loop],i.repetitions),"timeScale"in n&&t.setEffectiveTimeScale(i.timeScale)}))}},stopAction:function(){for(var t=this.data,e=0;e{"use strict";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}Object.defineProperty(e,"__esModule",{value:!0}); +!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var i=e();for(var n in i)("object"==typeof exports?exports:t)[n]=i[n]}}(self,(()=>(()=>{var t={631:t=>{var e=[new THREE.Vector2,new THREE.Vector2,new THREE.Vector2,new THREE.Vector2];function i(t,i,n,a){const r=1/a,s=1/n;return e[0].set(r*i,s*t+s),e[1].set(r*i,s*t),e[2].set(r*i+r,s*t),e[3].set(r*i+r,s*t+s),e}AFRAME.registerComponent("atlas-uvs",{dependencies:["geometry"],schema:{totalColumns:{type:"int",default:1},totalRows:{type:"int",default:1},column:{type:"int",default:1},row:{type:"int",default:1}},update:function(){const t=this.data,e=i(t.row-1,t.column-1,t.totalRows,t.totalColumns),n=this.el.getObject3D("mesh").geometry;var a=new Float32Array([e[0].x,e[0].y,e[3].x,e[3].y,e[1].x,e[1].y,e[2].x,e[2].y]);n.setAttribute("uv",new THREE.BufferAttribute(a,2)),n.uvsNeedUpdate=!0}}),AFRAME.registerComponent("dynamic-texture-atlas",{schema:{canvasId:{default:"dynamicAtlas"},canvasHeight:{default:1024},canvasWidth:{default:1024},debug:{default:!1},numColumns:{default:8},numRows:{default:8}},multiple:!0,init:function(){const t=this.canvas=document.createElement("canvas");t.id=this.data.canvasId,t.height=this.data.canvasHeight,t.width=this.data.canvasWidth,this.ctx=t.getContext("2d"),document.body.appendChild(t),this.data.debug&&(t.style.left=0,t.style.top=0,t.style.position="fixed",t.style.zIndex=9999999999)},drawTexture:function(t,e,n,a,r){const s=this.canvas,o=this.data;t.complete||(t.onload=()=>{this.drawTexture(t,e,n)});const l=r||s.height/o.numRows,c=a||s.width/o.numColumns;return this.ctx.drawImage(t,c*e,c*n,c,l),i(e,n,o.numRows,o.numColumns)}}),t.exports.getGridUvs=i},844:(t,e,i)=>{function n(t){return function(t){if(Array.isArray(t))return s(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||r(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var i=[],n=!0,a=!1,r=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done)&&(i.push(s.value),!e||i.length!==e);n=!0);}catch(t){a=!0,r=t}finally{try{n||null==o.return||o.return()}finally{if(a)throw r}}return i}(t,e)||r(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){if(t){if("string"==typeof t)return s(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,n=new Array(e);i3&&void 0!==arguments[3]?arguments[3]:2.25,a=h(e,"dividers-".concat(t,"-parent"));return d({objectMixinId:"dividers-".concat(t),parentEl:a,step:n,radius:i}),a}function g(t,e,i){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2.25,a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"0 0 0",r=h(e,"".concat(t,"-parent"));return d({objectMixinId:t,parentEl:r,step:n,radius:i,rotation:a}),r}function y(t,e){return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t+1)+t)}function b(t,e){return Math.random()*(e-t)+t}function x(t,e,i){var n=Math.floor((e-t)/i)+1;return Array(n).fill().map((function(e,n){return t+n*i})).sort((function(){return.5-Math.random()}))}function v(t,e,i,n){for(var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"random",r=arguments.length>5&&void 0!==arguments[5]&&arguments[5],s=[-.37*e,.37*e],o=x(-.5*n,.5*n,1.5),l=parseInt({empty:0,sparse:.03,normal:.125,dense:.25}[i]*n,10),c=h(t,"pedestrians-parent"),d=0;d3&&void 0!==arguments[3]?arguments[3]:void 0,l=t.object3D,c=o||(n=l,a=(new THREE.Box3).setFromObject(n),{x:a.max.x-a.min.x,y:a.max.y-a.min.y,z:a.max.z-a.min.z})[e],d={start:-.5*(r=i)+.5*(s=c),end:.5*r-.5*s},u=d.start,m=d.end,p="set".concat(e.toUpperCase()),h=b(u,m);return l.position[p](h),h}function E(t,e,i,n,a){if(a){var r="inbound"===t[0]?0:180,s=document.createElement("a-entity");return s.setAttribute("class",e),s.setAttribute("position",i+" 0 0"),s.setAttribute("rotation","0 "+r+" 0"),s.setAttribute("mixin",e),s.addEventListener("model-loaded",(function(t){w(t.target,"z",n)}),{once:!0}),s}}function _(t,e,i,n){if(n){var a="inbound"===t[0]?0:180,r=document.createElement("a-entity"),s=document.createElement("a-entity");s.setAttribute("rotation","0 "+a+" 0"),s.setAttribute("mixin","bus");var o=w(s,"z",i,12);return s.setAttribute("position",e+" 0 "+o),r.append(s),r}}function k(t,e,i,n){var a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,r=arguments.length>5?arguments[5]:void 0,s=i/e*1e3,o="outbound"===(arguments.length>6?arguments[6]:void 0)?-i/2:i/2,l=Math.abs(o-r)/e*1e3,c={property:"position",easing:"linear",loop:"false",from:{x:n,y:a,z:r},to:{z:o},dur:l},d={property:"position",easing:"linear",loop:"true",from:{x:n,y:a,z:-o},to:{x:n,y:a,z:o},delay:l,dur:s};return t.setAttribute("animation__1",c),t.setAttribute("animation__2",d),t}function C(t,e,i,n){var r=arguments.length>4&&void 0!==arguments[4]&&arguments[4],s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:void 0;if(!(arguments.length>5&&void 0!==arguments[5])||arguments[5]){var l=0,c=a(t,3),d=c[0],u=c[1],m=c[2];2===t.length&&(m=u);var p,h={inbound:0,outbound:180,sideways:{left:-90,right:90},"angled-front-left":-60,"angled-front-right":60,"angled-rear-left":-120,"angled-rear-right":120};if(p="sideways"==d?h.sideways[u]:h[d],"pedestrian"===m)return v(e,i,"normal",n,d,r);var f=document.createElement("a-entity");if(1==t.length)return f;var g={car:{mixin:"sedan-rig",wheelDiameter:.76,length:5.17,width:2},microvan:{mixin:"suv-rig",wheelDiameter:.84,length:5,width:2},truck:{mixin:"box-truck-rig",wheelDiameter:1.05,length:6.95,width:2.5}};if(s>1){var y=n/2,b=o/2+o,A=x(-y+b,y-b,o).slice(0,s),E="sideways"==d||d.includes("angled")?"width":"length",_=g[m][E];A.forEach((function(t){var e=o-_-.2,i=-e/2+e*Math.random();e>0&&C(t+i,m)}))}else C();return f}function C(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,i=g[arguments.length>1&&void 0!==arguments[1]?arguments[1]:"car"],a=document.createElement("a-entity");return t||(t=w(a,"z",n,i.length)),a.setAttribute("position","".concat(e," 0 ").concat(t)),a.setAttribute("mixin",i.mixin),a.setAttribute("rotation","0 ".concat(p," 0")),r&&(l=5,a.setAttribute("wheel",{speed:l,wheelDiameter:i.wheelDiameter}),k(a,l,n,e,0,t,u)),f.append(a),a}}function M(t,e,i){var n=document.createElement("a-entity"),a=document.createElement("a-entity"),r="left"===t[0]?0:180;return a.setAttribute("position",e+" 0 0"),a.setAttribute("rotation","0 "+r+" 0"),a.setAttribute("mixin","food-trailer-rig"),a.addEventListener("model-loaded",(function(t){w(t.target,"z",i)}),{once:!0}),n.append(a),n}function S(t,e){if(e){var i=document.createElement("a-entity"),n=document.createElement("a-entity");n.setAttribute("position",t+" 1.75 0"),n.setAttribute("rotation","0 0 0"),n.setAttribute("mixin","magic-carpet"),i.append(n);var a=document.createElement("a-entity");return a.setAttribute("position",t+" 1.75 0"),a.setAttribute("rotation","0 0 0"),a.setAttribute("mixin","Character_1_M"),i.append(a),i}}function R(t,e){var i=document.createElement("a-entity"),n=document.createElement("a-entity");n.setAttribute("mixin","outdoor_dining");var a=w(n,"z",e,2.27);return n.setAttribute("position",t+" 0 "+a),i.append(n),i}function N(t,e,i,n,a){if(a){var r=document.createElement("a-entity"),s=document.createElement("a-entity"),o="inbound"===t[0]?0:180;s.setAttribute("rotation","0 "+o+" 0"),"bike-lane"===i?s.setAttribute("mixin","Bicycle_1"):s.setAttribute("mixin","ElectricScooter_1");var l=w(s,"z",n,2.03);return s.setAttribute("position",e+" 0 "+l),r.append(s),r}}function j(t,e,i){if(!(arguments.length>3&&void 0!==arguments[3])||arguments[3]){var n=document.createElement("a-entity"),a=document.createElement("a-entity"),r="inbound"===t[1]?0:180;a.setAttribute("rotation","0 "+r+" 0"),"taxi"===t[0]?a.setAttribute("mixin","sedan-taxi"):"rideshare"===t[0]&&a.setAttribute("mixin","sedan-rig");var s=w(a,"z",i,5);return a.setAttribute("position",e+" 0 "+s),n.append(a),n}}function O(t){var e,i=document.createElement("a-entity");return(e=document.createElement("a-entity")).setAttribute("position",t+" 1 0"),e.setAttribute("mixin","wayfinding-box"),i.append(e),(e=document.createElement("a-entity")).setAttribute("position",t+" 1.2 0.06"),e.setAttribute("geometry","primitive: plane; width: 0.8; height: 1.6"),e.setAttribute("material","src:#wayfinding-map"),i.append(e),(e=document.createElement("a-entity")).setAttribute("position",t+" 1.2 -0.06"),e.setAttribute("rotation","0 180 0"),e.setAttribute("geometry","primitive: plane; width: 0.8; height: 1.6"),e.setAttribute("material","src:#wayfinding-map"),i.append(e),i}function T(t){var e=document.createElement("a-entity");return e.setAttribute("class","bench-parent"),e.setAttribute("position",t+" 0.2 3.5"),e}function L(t){var e=document.createElement("a-entity");return e.setAttribute("class","bikerack-parent"),e.setAttribute("position",t+" 0 -3.5"),e}function P(t,e){var i=document.createElement("a-entity");i.setAttribute("class","bikeshare"),i.setAttribute("position",t+" 0 0"),i.setAttribute("mixin","bikeshare");var n="left"===e[0]?90:270;return i.setAttribute("rotation","0 "+n+" 0"),i}function I(t,e){var i=document.createElement("a-entity");i.setAttribute("class","parklet"),i.setAttribute("position",t+" .02 0"),i.setAttribute("mixin","parklet");var n="left"===e[0]?90:270;return i.setAttribute("rotation","0 "+n+" 0"),i}function D(t){var e=document.createElement("a-entity");return e.setAttribute("class","tree-parent"),e.setAttribute("position",t+" 0.2 7"),e}function z(t){var e=document.createElement("a-entity");return e.setAttribute("class","lamp-parent"),e.setAttribute("position",t+" 0.2 0"),e}function B(t,e){var i=document.createElement("a-entity");return i.setAttribute("class","bus-stop"),i.setAttribute("position",t+" 0 0"),i.setAttribute("rotation","0 "+e+" 0"),i.setAttribute("mixin","bus-stop"),i}function F(t){var e=document.createElement("a-entity");return e.setAttribute("class","brt-station"),e.setAttribute("position",t+" 0 0"),e.setAttribute("mixin","brt-station"),e}function H(t,e,i,n,a,r,s){var o=arguments.length>7&&void 0!==arguments[7]?arguments[7]:0,l=document.createElement("a-entity"),c=t+" "+r/150+" 1",d=t+" 1 1";return"sidewalk"===a||1===o?(l.setAttribute("geometry","primitive","box"),l.setAttribute("geometry","height: 0.4"),l.setAttribute("geometry","depth",r),l.setAttribute("scale",d)):a.match("lane")?(i-=.1,l.setAttribute("geometry","primitive","box"),l.setAttribute("geometry","height: 0.2"),l.setAttribute("geometry","depth",r),l.setAttribute("scale",d)):(l.setAttribute("rotation","270 "+n+" 0"),l.setAttribute("scale",c)),l.setAttribute("position",e+" "+i+" 0"),l.setAttribute("mixin",a),0!==s.length&&l.setAttribute("material","repeat: ".concat(s[0]," ").concat(s[1])),l}t.exports.processSegments=function(t,e,i,a,r){var s=i/2;i>12&&(s=(i-12)/2),e&&(t=function(t){function e(t){return"lane"===t.slice(t.length-4)||"light-rail"===t||"streetcar"===t||"flex-zone"===t}return t.reduce((function(t,i,n,a){if(0===n)return t.concat(i);var r=a[n-1];if(e(i.type)&&e(r.type)){var s="solid";i.type===r.type&&(s="dashed"),("drive-lane"===i.type&&"turn-lane"===r.type||"drive-lane"===r.type&&"turn-lane"===i.type)&&(s="dashed"),i.variantString.split("|")[0]!==r.variantString.split("|")[0]&&(s="doubleyellow","bike-lane"===i.type&&"bike-lane"===r.type&&(s="shortdashedyellow"),"flex-zone"!==i.type&&"flex-zone"!==r.type||(s="solid")),"turn-lane"===i.type&&"shared"===i.variantString.split("|")[1]?s="soliddashedyellow":"turn-lane"===r.type&&"shared"===r.variantString.split("|")[1]&&(s="soliddashedyellowinverted"),"parking-lane"!==i.type&&"parking-lane"!==r.type||(s="invisible"),t.push({type:"separator",variantString:s,width:0})}return(e(i.type)&&"divider"===r.type||e(r.type)&&"divider"===i.type)&&t.push({type:"separator",variantString:"solid",width:0}),t.push(i),t}),[])}(t));var h=function(t){var e=document.createElement("a-entity"),i=0-l.calcStreetWidth(t)/2;return e.setAttribute("position",i+" 0 0"),e}(t);h.classList.add("street-parent");for(var y,b=0,x=0;x{function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var i=0;i\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),people:'\n \x3c!-- human characters --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),"people-rigged":' \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),vehicles:'\n \x3c!-- vehicles --\x3e\n \n \n \n \x3c!-- micro mobility vehicles --\x3e\n \n \n \n '),"vehicles-rigged":'\n \x3c!-- vehicles rigged --\x3e\n \n \n \n \n \n \n '),buildings:'\n \x3c!-- blocks --\x3e\n \n \n \n\n \x3c!-- buildings and blocks --\x3e\n \n \n \n \n \n\n \x3c!-- suburban buildings --\x3e\n \n \n \n\n \x3c!-- arched style buildings --\x3e\n \n \n \n \n'),"intersection-props":'\n \n \n \n \n \n \n '),"segment-textures":' \n \x3c!-- segment mixins with textures --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n '),"segment-colors":' \n \x3c!-- segment color modifier mixins --\x3e\n \n \n \n ',"lane-separator":'\n \x3c!-- lane separator markings --\x3e\n \n \n \n \n \n \n \n \n '),stencils:' \n \x3c!-- stencil markings --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n '),"vehicles-transit":'\n \x3c!-- vehicles-transit --\x3e\n \n \n \n \n \n \n '),dividers:'\n \x3c!-- dividers --\x3e\n \n \n \n \n \n \n \n \n \n \n \n '),sky:'\n \x3c!-- sky --\x3e\n \n \n '),grounds:'\n \x3c!-- grounds --\x3e\n \n \n \n\n \n \n \n \n\n \n \n '),"loud-bicycle":'\n \x3c!-- loud-bicycle-game --\x3e\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n ')};if(e){var n=e.split(" "),a=Object.keys(i).filter((function(t){return n.includes(t)})),r="";for(var s in i)a.includes(s)&&(r+=i[s]);return r}return Object.values(i).join("")}(e,t)),AFRAME.ANode.prototype.load.call(this)}}])&&e(a.prototype,r),s&&e(a,s),l}();customElements.define("street-assets",r);document.addEventListener("DOMSubtreeModified",(function t(e){if("A-SCENE"===e.target.nodeName){var i=e.target.querySelector("a-assets");if(i||(i=document.createElement("a-assets"),e.target.append(i)),i.querySelector("street-assets"))document.removeEventListener("DOMSubtreeModified",t);else{var n=document.createElement("street-assets");i.append(n),document.removeEventListener("DOMSubtreeModified",t)}}}),!1)},51:()=>{AFRAME.registerComponent("anisotropy",{schema:{default:0},dependencies:["material","geometry"],init:function(){var t=this;this.maxAnisotropy=this.el.sceneEl.renderer.capabilities.getMaxAnisotropy(),["model-loaded","materialtextureloaded"].forEach((function(e){return t.el.addEventListener(e,(function(){var e=t.el.getObject3D("mesh"),i=t.data;0===(i=+i||0)&&(i=t.maxAnisotropy),e.traverse((function(t){!0===t.isMesh&&null!==t.material.map&&(t.material.map.anisotropy=i,t.material.map.needsUpdate=!0)}))}),!1)}))}})},391:(t,e,i)=>{var n=i(334);AFRAME.registerComponent("create-from-json",{schema:{jsonString:{type:"string",default:""}},update:function(t){var e=this.data,i=this.el;if(t.string&&e.string!==t.string)for(;i.firstChild;)i.removeChild(i.lastChild);n.appendChildElementsFromArray(JSON.parse(e.jsonString),i)}})},71:()=>{var t={},e={};AFRAME.registerComponent("gltf-part",{schema:{buffer:{default:!0},part:{type:"string"},src:{type:"asset"}},init:function(){this.dracoLoader=document.querySelector("a-scene").systems["gltf-model"].getDRACOLoader()},update:function(){var t=this.el;!this.data.part&&this.data.src||this.getModel((function(e){e&&t.setObject3D("mesh",e)}))},getModel:function(i){var n=this;if(!e[this.data.src])return t[this.data.src]?t[this.data.src].then((function(t){i(n.selectFromModel(t))})):void(t[this.data.src]=new Promise((function(a){var r=new THREE.GLTFLoader;n.dracoLoader&&r.setDRACOLoader(n.dracoLoader),r.load(n.data.src,(function(r){var s=r.scene||r.scenes[0];e[n.data.src]=s,delete t[n.data.src],i(n.selectFromModel(s)),a(s)}),(function(){}),console.error)})));i(this.selectFromModel(e[this.data.src]))},selectFromModel:function(t){var e,i;if(i=t.getObjectByName(this.data.part))return e=i.getObjectByProperty("type","Mesh").clone(!0),this.data.buffer?(e.geometry=e.geometry.toNonIndexed(),e):(e.geometry=(new THREE.Geometry).fromBufferGeometry(e.geometry),e);console.error("[gltf-part] `"+this.data.part+"` not found in model.")}})},247:(t,e,i)=>{var n=i(502).Notyf;AFRAME.registerComponent("notify",{schema:{duration:{type:"number",default:2e3},ripple:{type:"boolean",default:!0},position:{type:"string",default:{x:"center",y:"bottom"}},dismissible:{type:"boolean",default:!1},type:{type:"string",default:"info"},message:{type:"string",default:""}},init:function(){this.notify=new n({types:[{type:"info",background:"blue",icon:!1}],duration:this.data.duration,ripple:this.data.ripple,position:this.data.position,dismissible:this.data.dismissible}),this.types=this.notify.options.types.map((function(t){return t.type}))},message:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"info";t&&this.types.includes(e)&&this.notify.open({type:e,message:t})},update:function(t){if(0!==Object.keys(t).length){var e=this.data.message,i=this.data.type;e&&this.types.includes(i)&&(this.message(e,i),this.data.message="")}}})},699:()=>{takeScreenshotNow=function(t,e,i){var n=AFRAME.scenes[0].renderer;function a(t,e){var i=document.createElement("a"),n=e.replace(/^data:image\/[^;]/,"data:application/octet-stream");i.setAttribute("href",n),i.setAttribute("download",t),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i)}var r=t+"."+e;"img"!=e?a(r,"png"==e?n.domElement.toDataURL("image/png"):n.domElement.toDataURL("image/jpeg",.95)):i.src=n.domElement.toDataURL()},AFRAME.registerComponent("screentock",{schema:{takeScreenshot:{type:"boolean",default:!1},filename:{type:"string",default:"screenshot"},type:{type:"string",default:"jpg"},imgElementSelector:{type:"selector"}},tock:function(){this.data.takeScreenshot&&(this.el.setAttribute("screentock","takeScreenshot",!1),takeScreenshotNow(this.data.filename,this.data.type,this.data.imgElementSelector))}})},54:function(t,e,i){var n,a,r,s;function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}t=i.nmd(t),s=function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==o(t)&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e){if("undefined"==typeof AFRAME)throw new Error("Component attempted to register before AFRAME was available.");AFRAME.registerComponent("cursor-teleport",{schema:{cameraHead:{type:"selector",default:""},cameraRig:{type:"selector",default:""},collisionEntities:{type:"string",default:""},ignoreEntities:{type:"string",default:""},landingMaxAngle:{default:45,min:0,max:360},landingNormal:{type:"vec3",default:{x:0,y:1,z:0}},transitionSpeed:{type:"number",default:6e-4}},init:function(){var t=this;this.mobile=AFRAME.utils.device.isMobile();var e=this.el.sceneEl;this.canvas=e.renderer.domElement,this.data.cameraHead.object3D.traverse((function(e){e instanceof THREE.Camera&&(t.cam=e)})),this.camRig=this.data.cameraRig.object3D,this.rayCaster=new THREE.Raycaster,this.referenceNormal=new THREE.Vector3,this.rayCastObjects=[],this.referenceNormal.copy(this.data.landingNormal);var i=new THREE.RingGeometry(.25,.3,32,1);i.rotateX(-Math.PI/2),i.translate(0,.02,0);var n=new THREE.MeshBasicMaterial({color:7818734}),a=new THREE.Mesh(i,n),r=new THREE.CylinderGeometry(.3,.3,.5,32,1,!0);r.translate(0,.25,0);var s=(new THREE.TextureLoader).load("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAAQCAYAAADXnxW3AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8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5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAADJJREFUeNpEx7ENgDAAAzArK0JA6f8X9oewlcWStU1wBGdwB08wgjeYm79jc2nbYH0DAC/+CORJxO5fAAAAAElFTkSuQmCC"),o=new THREE.MeshBasicMaterial({color:7818734,side:"double",map:s,transparent:!0,depthTest:!1}),l=new THREE.Mesh(r,o),c=new THREE.Group;c.add(a),c.add(l),this.teleportIndicator=c,e.object3D.add(this.teleportIndicator),this.transitioning=!1,this.transitionProgress=0,this.transitionCamPosStart=new THREE.Vector3,this.transitionCamPosEnd=new THREE.Vector3,this.updateRaycastObjects=this.updateRaycastObjects.bind(this),this.getMouseState=this.getMouseState.bind(this),this.getTeleportPosition=this.getTeleportPosition.bind(this),this.isValidNormalsAngle=this.isValidNormalsAngle.bind(this),this.transition=this.transition.bind(this),this.mouseMove=this.mouseMove.bind(this),this.mouseDown=this.mouseDown.bind(this),this.mouseUp=this.mouseUp.bind(this),this.easeInOutQuad=this.easeInOutQuad.bind(this),this.updateRaycastObjects()},remove:function(){this.cam=null,this.canvas=null,this.rayCastObjects.length=0,this.el.sceneEl.object3D.remove(this.teleportIndicator),this.teleportIndicator.children[0].material.dispose(),this.teleportIndicator.children[0].geometry.dispose(),this.teleportIndicator.children[1].material.dispose(),this.teleportIndicator.children[1].geometry.dispose(),this.teleportIndicator=null,this.collisionMesh&&(this.collisionMesh.geometry.dispose(),this.collisionMesh.material.dispose(),this.collisionMesh=null)},play:function(){var t=this.canvas;t.addEventListener("mousedown",this.mouseDown,!1),t.addEventListener("mousemove",this.mouseMove,!1),t.addEventListener("mouseup",this.mouseUp,!1),t.addEventListener("touchstart",this.mouseDown,!1),t.addEventListener("touchmove",this.mouseMove,!1),t.addEventListener("touchend",this.mouseUp,!1)},pause:function(){var t=this.canvas;t.removeEventListener("mousedown",this.mouseDown),t.removeEventListener("mousemove",this.mouseMove),t.removeEventListener("mouseup",this.mouseUp),t.removeEventListener("touchstart",this.mouseDown),t.removeEventListener("touchmove",this.mouseMove),t.removeEventListener("touchend",this.mouseUp)},updateRaycastObjects:function(){var t=this;if(this.rayCastObjects.length=0,""!==this.data.collisionEntities)this.el.sceneEl.querySelectorAll(this.data.collisionEntities).forEach((function(e){e.object3D.traverse((function(e){e.isMesh&&(e.userData.collision=!0,t.rayCastObjects.push(e))}))}));else{if(!this.collisionMesh){var e=new THREE.PlaneGeometry(500,500,1);e.rotateX(-Math.PI/2);var i=new THREE.MeshNormalMaterial,n=new THREE.Mesh(e,i);n.userData.collision=!0,this.collisionMesh=n}this.rayCastObjects.push(this.collisionMesh)}""!==this.data.ignoreEntities&&this.el.sceneEl.querySelectorAll(this.data.ignoreEntities).forEach((function(e){e.object3D.traverse((function(e){e.isMesh&&t.rayCastObjects.push(e)}))}))},getMouseState:function(){var t=new THREE.Vector2;return function(e){var i=this.canvas.getBoundingClientRect();return null!=e.clientX?(t.x=e.clientX-i.left,t.y=e.clientY-i.top,t):null!=e.touches[0]?(t.x=e.touches[0].clientX-i.left,t.y=e.touches[0].clientY-i.top,t):void 0}}(),getTeleportPosition:function(){var t=new THREE.Vector2;return function(e,i){if(0!==this.rayCastObjects.length){if(this.cam&&this.canvas){var n=this.cam,a=this.canvas.getBoundingClientRect();t.x=e/(a.right-a.left)*2-1,t.y=-i/(a.bottom-a.top)*2+1,this.rayCaster.setFromCamera(t,n);var r=this.rayCaster.intersectObjects(this.rayCastObjects);return!(0===r.length||!this.isValidNormalsAngle(r[0].face.normal))&&!0===r[0].object.userData.collision&&r[0].point}return!1}return!1}}(),isValidNormalsAngle:function(t){var e=this.referenceNormal.angleTo(t);return THREE.MathUtils.RAD2DEG*e<=this.data.landingMaxAngle},transition:function(t){this.transitionProgress=0,this.transitionCamPosEnd.copy(t),this.transitionCamPosStart.copy(this.camRig.position),this.transitioning=!0},mouseMove:function(t){var e=this.getMouseState(t);this.mouseX=e.x,this.mouseY=e.y},mouseDown:function(t){this.updateRaycastObjects();var e=this.getMouseState(t);this.mouseX=e.x,this.mouseY=e.y,this.mouseXOrig=e.x,this.mouseYOrig=e.y},mouseUp:function(t){if(this.mouseX===this.mouseXOrig&&this.mouseY===this.mouseYOrig){var e=this.getTeleportPosition(this.mouseX,this.mouseY);e&&(this.teleportIndicator.position.copy(e),this.transition(e))}},easeInOutQuad:function(t){return t<.5?2*t*t:(4-2*t)*t-1},tick:function(t,e){if(!this.transitioning&&!this.mobile){var i=this.getTeleportPosition(this.mouseX,this.mouseY);i&&this.teleportIndicator.position.copy(i)}if(this.transitioning){this.transitionProgress+=e*this.data.transitionSpeed;var n=this.easeInOutQuad(this.transitionProgress),a=n<.5?n:1.5-1*(n+.5);this.teleportIndicator.scale.set(1+a,1,1+a);var r=this.camRig.position;r.x=this.transitionCamPosStart.x+(this.transitionCamPosEnd.x-this.transitionCamPosStart.x)*n,r.y=this.transitionCamPosStart.y+(this.transitionCamPosEnd.y-this.transitionCamPosStart.y)*n,r.z=this.transitionCamPosStart.z+(this.transitionCamPosEnd.z-this.transitionCamPosStart.z)*n,this.transitionProgress>=1&&(this.transitioning=!1,r.copy(this.transitionCamPosEnd))}}})}])},"object"==o(e)&&"object"==o(t)?t.exports=s():(a=[],void 0===(r="function"==typeof(n=s)?n.apply(e,a):n)||(t.exports=r))},475:t=>{var e={once:THREE.LoopOnce,repeat:THREE.LoopRepeat,pingpong:THREE.LoopPingPong};function i(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")}t.exports=AFRAME.registerComponent("animation-mixer",{schema:{clip:{default:"*"},duration:{default:0},clampWhenFinished:{default:!1,type:"boolean"},crossFadeDuration:{default:0},loop:{default:"repeat",oneOf:Object.keys(e)},repetitions:{default:1/0,min:0},timeScale:{default:1},startAt:{default:0}},init:function(){var t=this;this.model=null,this.mixer=null,this.activeActions=[];var e=this.el.getObject3D("mesh");e?this.load(e):this.el.addEventListener("model-loaded",(function(e){t.load(e.detail.model)}))},load:function(t){var e=this.el;this.model=t,this.mixer=new THREE.AnimationMixer(t),this.mixer.addEventListener("loop",(function(t){e.emit("animation-loop",{action:t.action,loopDelta:t.loopDelta})})),this.mixer.addEventListener("finished",(function(t){e.emit("animation-finished",{action:t.action,direction:t.direction})})),this.data.clip&&this.update({})},remove:function(){this.mixer&&this.mixer.stopAllAction()},update:function(t){if(t){var i=this.data,n=AFRAME.utils.diff(i,t);if("clip"in n)return this.stopAction(),void(i.clip&&this.playAction());this.activeActions.forEach((function(t){"duration"in n&&i.duration&&t.setDuration(i.duration),"clampWhenFinished"in n&&(t.clampWhenFinished=i.clampWhenFinished),("loop"in n||"repetitions"in n)&&t.setLoop(e[i.loop],i.repetitions),"timeScale"in n&&t.setEffectiveTimeScale(i.timeScale)}))}},stopAction:function(){for(var t=this.data,e=0;e{"use strict";function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}Object.defineProperty(e,"__esModule",{value:!0}); /*! ***************************************************************************** Copyright (c) Microsoft Corporation.