????

Your IP : 18.220.192.109


Current Path : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/
Upload File :
Current File : C:/inetpub/vhost/binhdinhinvest.gdtvietnam.com/www/7.ec7dc2998e68ea73d9e6.js

(function(){var t={"esri/core/libs/gl-matrix-2/mat4f64":"1m5D","esri/views/3d/layers/support/FastSymbolUpdates":"3w6h","esri/core/libs/gl-matrix-2/mat3f64":"51bw","esri/core/libs/gl-matrix-2/factories/mat4f64":"CIzB","esri/views/3d/support/debugFlags":"Dk48","esri/core/libs/gl-matrix-2/mat4":"FXVB","esri/core/libs/gl-matrix-2/math/mat4":"Jl7l","esri/views/2d/layers/features/tileRenderers/support/visualVariablesUtils":"iHXi","esri/views/2d/layers/features/support/AttributeStore":"lvbU","esri/core/libs/gl-matrix-2/factories/mat3f64":"xf8T"},e=this||window,r=e.webpackJsonp=e.webpackJsonp||[];r.registerAbsMids?r.registerAbsMids(t):(r.absMidsWaiting=r.absMidsWaiting||[]).push(t)})(),(window.webpackJsonp=window.webpackJsonp||[]).push([[7],{"1m5D":function(t,e,r){var i,o;i=[r.dj.c(t.i),e,r("CIzB")],void 0===(o=(function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.mat4f64=r}).apply(null,i))||(t.exports=o)},"3w6h":function(t,e,r){var i,o;i=[r.dj.c(t.i),e,r("pcDC"),r("xoE+"),r("YX1r"),r("51bw"),r("FXVB"),r("1m5D"),r("0LE5"),r("Rdxj"),r("4oaH"),r("Dk48")],void 0===(o=(function(t,e,r,i,o,a,n,s,l,u,c,p){var f;function d(t){return null!=t}function h(t){return"number"==typeof t}function _(t){return"string"==typeof t}function v(t,e){t&&t.push(e)}function y(t,e,r,i,o){var a=t.minSize,n=t.maxSize;if(t.expression)return v(o,"Could not convert size info: expression not supported"),!1;if(t.useSymbolValue){var s=i.symbolSize[r];return e.minSize[r]=s,e.maxSize[r]=s,e.offset[r]=e.minSize[r],e.factor[r]=0,e.type[r]=1,!0}if(d(t.field))return d(t.stops)?2===t.stops.length&&h(t.stops[0].size)&&h(t.stops[1].size)?(E(t.stops[0].size,t.stops[1].size,t.stops[0].value,t.stops[1].value,e,r),e.type[r]=1,!0):(v(o,"Could not convert size info: stops only supported with 2 elements"),!1):h(a)&&h(n)&&d(t.minDataValue)&&d(t.maxDataValue)?(E(a,n,t.minDataValue,t.maxDataValue,e,r),e.type[r]=1,!0):null!=c.meterIn[t.valueUnit]?(e.minSize[r]=-1/0,e.maxSize[r]=1/0,e.offset[r]=0,e.factor[r]=1/c.meterIn[t.valueUnit],e.type[r]=1,!0):"unknown"===t.valueUnit?(v(o,"Could not convert size info: proportional size not supported"),!1):(v(o,"Could not convert size info: scale-dependent size not supported"),!1);if(!d(t.field)){if(t.stops&&t.stops[0]&&h(t.stops[0].size))return e.minSize[r]=t.stops[0].size,e.maxSize[r]=t.stops[0].size,e.offset[r]=e.minSize[r],e.factor[r]=0,e.type[r]=1,!0;if(h(a))return e.minSize[r]=a,e.maxSize[r]=a,e.offset[r]=a,e.factor[r]=0,e.type[r]=1,!0}return v(o,"Could not convert size info: unsupported variant of sizeInfo"),!1}function E(t,e,r,i,o,a){var n=Math.abs(i-r)>0?(e-t)/(i-r):0;o.minSize[a]=n>0?t:e,o.maxSize[a]=n>0?e:t,o.offset[a]=t-r*n,o.factor[a]=n}function S(t,e,r){t[4*e+0]=r.r/255,t[4*e+1]=r.g/255,t[4*e+2]=r.b/255,t[4*e+3]=r.a}function m(t,e,r){var i=2===r&&"arithmetic"===t.rotationType;e.offset[r]=i?90:0,e.factor[r]=i?-1:1,e.type[r]=1}function b(t,e,i){if(!t)return null;var o=!e.supportedTypes||!!e.supportedTypes.size,a=!e.supportedTypes||!!e.supportedTypes.color,n=!e.supportedTypes||!!e.supportedTypes.rotation,s=!!e.supportedTypes&&!!e.supportedTypes.opacity,l=t.reduce((function(t,l){if(!t)return t;if(l.valueExpression)return v(i,"Could not convert visual variables: arcade expressions not supported"),null;switch(l.type){case"size":return o?function(t,e,r,i){if(t.normalizationField||t.valueRepresentation)return v(i,"Could not convert size info: unsupported property"),null;if(null!=(o=t.field)&&!_(o))return v(i,"Could not convert size info: field is not a string"),null;var o,a;if(e.size){if(t.field)if(e.size.field){if(t.field!==e.size.field)return v(i,"Could not convert size info: multiple fields in use"),null}else e.size.field=t.field}else e.size={field:t.field,minSize:[0,0,0],maxSize:[0,0,0],offset:[0,0,0],factor:[0,0,0],type:[0,0,0]};switch(t.axis){case"width":return(a=y(t,e.size,0,r,i))?e:null;case"height":return(a=y(t,e.size,2,r,i))?e:null;case"depth":return(a=y(t,e.size,1,r,i))?e:null;case"width-and-depth":return(a=y(t,e.size,0,r,i))&&y(t,e.size,1,r,i),a?e:null;case null:case void 0:case"all":return(a=(a=(a=y(t,e.size,0,r,i))&&y(t,e.size,1,r,i))&&y(t,e.size,2,r,i))?e:null;default:return v(i,'Could not convert size info: unknown axis "'+t.axis+'""'),null}}(l,t,e,i):t;case"color":return a?function(t,e,r){if(t.normalizationField)return v(r,"Could not convert color info: unsupported property"),null;if(_(t.field)){if(!t.stops)return v(r,"Could not convert color info: missing stops or colors"),null;if(t.stops.length>8)return v(r,"Could not convert color info: too many color stops"),null;e.color={field:t.field,values:[0,0,0,0,0,0,0,0],colors:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]};for(var i=t.stops,o=0;o<8;++o){var a=i[Math.min(o,i.length-1)];e.color.values[o]=a.value,S(e.color.colors,o,a.color)}}else{if(!(t.stops&&t.stops.length>=0))return v(r,"Could not convert color info: no field and no colors/stops"),null;var n=t.stops&&t.stops.length>=0&&t.stops[0].color;for(e.color={field:null,values:[0,0,0,0,0,0,0,0],colors:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},o=0;o<8;o++)e.color.values[o]=1/0,S(e.color.colors,o,n)}return e}(l,t,i):t;case"opacity":return s?function(t,e,r){if(t.normalizationField)return v(r,"Could not convert opacity info: unsupported property"),null;if(_(t.field)){if(!t.stops)return v(r,"Could not convert opacity info: missing stops or opacities"),null;if(t.stops.length>8)return v(r,"Could not convert opacity info: too many opacity stops"),null;e.opacity={field:t.field,values:[0,0,0,0,0,0,0,0],opacityValues:[0,0,0,0,0,0,0,0]};for(var i=t.stops,o=0;o<8;++o){var a=i[Math.min(o,i.length-1)];e.opacity.values[o]=a.value,e.opacity.opacityValues[o]=a.opacity}}else{if(!(t.stops&&t.stops.length>=0))return v(r,"Could not convert opacity info: no field and no opacities/stops"),null;var n=t.stops&&t.stops.length>=0&&t.stops[0].opacity;for(e.opacity={field:null,values:[0,0,0,0,0,0,0,0],opacityValues:[0,0,0,0,0,0,0,0]},o=0;o<8;o++)e.opacity.values[o]=1/0,e.opacity.opacityValues[o]=n}return e}(l,t,i):null;case"rotation":return n?function(t,e,r){if(!_(t.field))return v(r,"Could not convert rotation info: field is not a string"),null;if(e.rotation){if(t.field)if(e.rotation.field){if(t.field!==e.rotation.field)return v(r,"Could not convert rotation info: multiple fields in use"),null}else e.rotation.field=t.field}else e.rotation={field:t.field,offset:[0,0,0],factor:[1,1,1],type:[0,0,0]};switch(t.axis){case"tilt":return m(t,e.rotation,0),e;case"roll":return m(t,e.rotation,1),e;case null:case void 0:case"heading":return m(t,e.rotation,2),e;default:return v(r,'Could not convert rotation info: unknown axis "'+t.axis+'""'),null}}(l,t,i):t;default:return r.neverReached(l),null}}),{size:null,color:null,opacity:null,rotation:null});return!(t.length>0&&l)||l.size||l.color||l.opacity||l.rotation?l&&l.size&&!function(t,e,r){for(var i=0;i<3;++i){var o=e.unitInMeters;1===t.type[i]&&(o*=e.modelSize[i],t.type[i]=2),t.minSize[i]=t.minSize[i]/o,t.maxSize[i]=t.maxSize[i]/o,t.offset[i]=t.offset[i]/o,t.factor[i]=t.factor[i]/o}var a;if(0!==t.type[0])a=0;else if(0!==t.type[1])a=1;else{if(0===t.type[2])return v(r,"No size axis contains a valid size or scale"),!1;a=2}for(i=0;i<3;++i)0===t.type[i]&&(t.minSize[i]=t.minSize[a],t.maxSize[i]=t.maxSize[a],t.offset[i]=t.offset[a],t.factor[i]=t.factor[a],t.type[i]=t.type[a]);return!0}(l.size,e,i)?null:l:null}function M(t){return t&&null!=t.size}function g(t,e,r){if(!!t!=!!e)return!1;if(t&&t.field!==e.field)return!1;if(t&&"rotation"===r)for(var i=t,o=e,a=0;a<3;a++)if(i.type[a]!==o.type[a]||i.offset[a]!==o.offset[a]||i.factor[a]!==o.factor[a])return!1;return!0}function T(t,e){var r={vvSizeEnabled:!1,vvSizeMinSize:null,vvSizeMaxSize:null,vvSizeOffset:null,vvSizeFactor:null,vvSizeValue:null,vvColorEnabled:!1,vvColorValues:null,vvColorColors:null,vvOpacityEnabled:!1,vvOpacityValues:null,vvOpacityOpacities:null,vvSymbolAnchor:null,vvSymbolRotationMatrix:null},i=M(t);return t&&t.size?(r.vvSizeEnabled=!0,r.vvSizeMinSize=t.size.minSize,r.vvSizeMaxSize=t.size.maxSize,r.vvSizeOffset=t.size.offset,r.vvSizeFactor=t.size.factor):t&&i&&(r.vvSizeValue=e.transformation.scale),t&&i&&(r.vvSymbolAnchor=e.transformation.anchor,r.vvSymbolRotationMatrix=a.mat3f64.create(),n.mat4.identity(I),function(t,e,r,i){void 0===i&&(i=s.mat4f64.create());var o=t||0,a=e||0,l=r||0;0!==o&&n.mat4.rotateZ(i,i,-o/180*Math.PI),0!==a&&n.mat4.rotateX(i,i,a/180*Math.PI),0!==l&&n.mat4.rotateY(i,i,l/180*Math.PI)}(e.transformation.rotation[2],e.transformation.rotation[0],e.transformation.rotation[1],I),o.mat3.fromMat4(r.vvSymbolRotationMatrix,I)),t&&t.color&&(r.vvColorEnabled=!0,r.vvColorValues=t.color.values,r.vvColorColors=t.color.colors),t&&t.opacity&&(r.vvOpacityEnabled=!0,r.vvOpacityValues=t.opacity.values,r.vvOpacityOpacities=t.opacity.opacityValues),r}Object.defineProperty(e,"__esModule",{value:!0}),e.convertVisualVariables=b,e.initFastSymbolUpdatesState=function(t,e){if(!t)return{enabled:!1};if(p.DISABLE_FAST_UPDATES)return{enabled:!1};var r=b(t.visualVariables,e);return r?{enabled:!0,visualVariables:r,materialParameters:T(r,e),requiresShaderTransformation:M(r)}:{enabled:!1}},e.updateFastSymbolUpdatesState=function(t,e,r){if(!e||!t.enabled)return!1;var i=t.visualVariables,o=b(e.visualVariables,r);return!!o&&!!(g(i.size,o.size,"size")&&g(i.color,o.color,"color")&&g(i.rotation,o.rotation,"rotation")&&g(i.opacity,o.opacity,"opacity"))&&(t.visualVariables=o,t.materialParameters=T(o,r),t.requiresShaderTransformation=M(o),!0)},e.getMaterialParams=T,function(t){var e=s.mat4f64.create(),r=u.vec3f64.create();t.evaluateModelTransform=function(t,o,a){if(!t.vvSizeEnabled)return a;n.mat4.copy(e,a);var s=t.vvSymbolRotationMatrix;n.mat4.set(I,s[0],s[1],s[2],0,s[3],s[4],s[5],0,s[6],s[7],s[8],0,0,0,0,1),n.mat4.multiply(e,e,I);for(var l=0;l<3;++l)r[l]=i.clamp(t.vvSizeOffset[l]+o[0]*t.vvSizeFactor[l],t.vvSizeMinSize[l],t.vvSizeMaxSize[l]);return n.mat4.scale(e,e,r),n.mat4.translate(e,e,t.vvSymbolAnchor),e},t.evaluateModelTransformScale=function(t,e,r){if(!e.vvSizeEnabled)return l.vec3.set(t,1,1,1);for(var o=0;o<3;++o)t[o]=i.clamp(e.vvSizeOffset[o]+r[0]*e.vvSizeFactor[o],e.vvSizeMinSize[o],e.vvSizeMaxSize[o]);return t}}(f||(f={}));var I=s.mat4f64.create();e.evaluateModelTransform=f.evaluateModelTransform,e.evaluateModelTransformScale=f.evaluateModelTransformScale}).apply(null,i))||(t.exports=o)},"51bw":function(t,e,r){var i,o;i=[r.dj.c(t.i),e,r("xf8T")],void 0===(o=(function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.mat3f64=r}).apply(null,i))||(t.exports=o)},CIzB:function(t,e,r){var i,o;i=[r.dj.c(t.i),e],void 0===(o=(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.create=function(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},e.clone=function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15]]},e.fromValues=function(t,e,r,i,o,a,n,s,l,u,c,p,f,d,h,_){return[t,e,r,i,o,a,n,s,l,u,c,p,f,d,h,_]},e.createView=function(t,e){return new Float64Array(t,e,16)},e.IDENTITY=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}).apply(null,i))||(t.exports=o)},Dk48:function(t,e,r){var i,o;i=[r.dj.c(t.i),e,r("zOht"),r("Gtr7"),r("Vx27")],o=(function(t,e,r,i,o){return new(function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.SCENEVIEW_HITTEST_RETURN_INTERSECTOR=!1,e.SCENEVIEW_LOCKING_LOG=!1,e.HIGHLIGHTS_GRID_OPTIMIZATION_DISABLED=!1,e.HIGHLIGHTS_PROFILE_TO_CONSOLE=!1,e.DECONFLICTOR_SHOW_VISIBLE=!1,e.DECONFLICTOR_SHOW_INVISIBLE=!1,e.DECONFLICTOR_SHOW_GRID=!1,e.LABELS_SHOW_BORDER=!1,e.OVERLAY_DRAW_DEBUG_TEXTURE=!1,e.OVERLAY_SHOW_CENTER=!1,e.TERRAIN_DEBUG_POPUP=!1,e.TESTS_DISABLE_UPDATE_THRESHOLDS=!1,e.DISABLE_DECONFLICTOR_VISIBILITY_OFFSET=!1,e.DISABLE_ELEVATION_ALIGNERS_ITERATIVE_UPDATES=!1,e.DRAW_MESH_GEOMETRY_NORMALS=!1,e.FEATURE_TILE_FETCH_SHOW_TILES=!1,e.FEATURE_TILE_TREE_SHOW_TILES=!1,e.I3S_TREE_SHOW_TILES=!1,e.I3S_SHOW_MODIFICATIONS=!1,e.ENABLE_PROFILE_DEPTH_RANGE=!1,e.DISABLE_FAST_UPDATES=!1,e.LOD_INSTANCE_RENDERER_DISABLE_UPDATES=!1,e.LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL=!1,e.EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES=!1,e}return r.__extends(e,t),r.__decorate([o.property()],e.prototype,"SCENEVIEW_HITTEST_RETURN_INTERSECTOR",void 0),r.__decorate([o.property()],e.prototype,"SCENEVIEW_LOCKING_LOG",void 0),r.__decorate([o.property()],e.prototype,"HIGHLIGHTS_GRID_OPTIMIZATION_DISABLED",void 0),r.__decorate([o.property()],e.prototype,"HIGHLIGHTS_PROFILE_TO_CONSOLE",void 0),r.__decorate([o.property()],e.prototype,"DECONFLICTOR_SHOW_VISIBLE",void 0),r.__decorate([o.property()],e.prototype,"DECONFLICTOR_SHOW_INVISIBLE",void 0),r.__decorate([o.property()],e.prototype,"DECONFLICTOR_SHOW_GRID",void 0),r.__decorate([o.property()],e.prototype,"LABELS_SHOW_BORDER",void 0),r.__decorate([o.property()],e.prototype,"OVERLAY_DRAW_DEBUG_TEXTURE",void 0),r.__decorate([o.property()],e.prototype,"OVERLAY_SHOW_CENTER",void 0),r.__decorate([o.property()],e.prototype,"TERRAIN_DEBUG_POPUP",void 0),r.__decorate([o.property()],e.prototype,"TESTS_DISABLE_UPDATE_THRESHOLDS",void 0),r.__decorate([o.property()],e.prototype,"DISABLE_DECONFLICTOR_VISIBILITY_OFFSET",void 0),r.__decorate([o.property()],e.prototype,"DISABLE_ELEVATION_ALIGNERS_ITERATIVE_UPDATES",void 0),r.__decorate([o.property()],e.prototype,"DRAW_MESH_GEOMETRY_NORMALS",void 0),r.__decorate([o.property()],e.prototype,"FEATURE_TILE_FETCH_SHOW_TILES",void 0),r.__decorate([o.property()],e.prototype,"FEATURE_TILE_TREE_SHOW_TILES",void 0),r.__decorate([o.property()],e.prototype,"I3S_TREE_SHOW_TILES",void 0),r.__decorate([o.property()],e.prototype,"I3S_SHOW_MODIFICATIONS",void 0),r.__decorate([o.property()],e.prototype,"ENABLE_PROFILE_DEPTH_RANGE",void 0),r.__decorate([o.property()],e.prototype,"DISABLE_FAST_UPDATES",void 0),r.__decorate([o.property()],e.prototype,"LOD_INSTANCE_RENDERER_DISABLE_UPDATES",void 0),r.__decorate([o.property()],e.prototype,"LOD_INSTANCE_RENDERER_COLORIZE_BY_LEVEL",void 0),r.__decorate([o.property()],e.prototype,"EDGES_SHOW_HIDDEN_TRANSPARENT_EDGES",void 0),r.__decorate([o.subclass("esri.views.3d.support.DebugFlags")],e)}(i))}).apply(null,i),void 0===o||(t.exports=o)},FXVB:function(t,e,r){var i,o;i=[r.dj.c(t.i),e,r("Jl7l")],void 0===(o=(function(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.mat4=r}).apply(null,i))||(t.exports=o)},Jl7l:function(t,e,r){var i,o;i=[r.dj.c(t.i),e,r("jaBu"),r("qysZ")],void 0===(o=(function(t,e,r,i){function o(t){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t}function a(t,e,r){var i=e[0],o=e[1],a=e[2],n=e[3],s=e[4],l=e[5],u=e[6],c=e[7],p=e[8],f=e[9],d=e[10],h=e[11],_=e[12],v=e[13],y=e[14],E=e[15],S=r[0],m=r[1],b=r[2],M=r[3];return t[0]=S*i+m*s+b*p+M*_,t[1]=S*o+m*l+b*f+M*v,t[2]=S*a+m*u+b*d+M*y,t[3]=S*n+m*c+b*h+M*E,t[4]=(S=r[4])*i+(m=r[5])*s+(b=r[6])*p+(M=r[7])*_,t[5]=S*o+m*l+b*f+M*v,t[6]=S*a+m*u+b*d+M*y,t[7]=S*n+m*c+b*h+M*E,t[8]=(S=r[8])*i+(m=r[9])*s+(b=r[10])*p+(M=r[11])*_,t[9]=S*o+m*l+b*f+M*v,t[10]=S*a+m*u+b*d+M*y,t[11]=S*n+m*c+b*h+M*E,t[12]=(S=r[12])*i+(m=r[13])*s+(b=r[14])*p+(M=r[15])*_,t[13]=S*o+m*l+b*f+M*v,t[14]=S*a+m*u+b*d+M*y,t[15]=S*n+m*c+b*h+M*E,t}function n(t,e,r){var i=e[0],o=e[1],a=e[2],n=e[3],s=i+i,l=o+o,u=a+a,c=i*s,p=i*l,f=i*u,d=o*l,h=o*u,_=a*u,v=n*s,y=n*l,E=n*u;return t[0]=1-(d+_),t[1]=p+E,t[2]=f-y,t[3]=0,t[4]=p-E,t[5]=1-(c+_),t[6]=h+v,t[7]=0,t[8]=f+y,t[9]=h-v,t[10]=1-(c+d),t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t}Object.defineProperty(e,"__esModule",{value:!0}),e.copy=function(t,e){return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.set=function(t,e,r,i,o,a,n,s,l,u,c,p,f,d,h,_,v){return t[0]=e,t[1]=r,t[2]=i,t[3]=o,t[4]=a,t[5]=n,t[6]=s,t[7]=l,t[8]=u,t[9]=c,t[10]=p,t[11]=f,t[12]=d,t[13]=h,t[14]=_,t[15]=v,t},e.identity=o,e.transpose=function(t,e){if(t===e){var r=e[1],i=e[2],o=e[3],a=e[6],n=e[7],s=e[11];t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=r,t[6]=e[9],t[7]=e[13],t[8]=i,t[9]=a,t[11]=e[14],t[12]=o,t[13]=n,t[14]=s}else t[0]=e[0],t[1]=e[4],t[2]=e[8],t[3]=e[12],t[4]=e[1],t[5]=e[5],t[6]=e[9],t[7]=e[13],t[8]=e[2],t[9]=e[6],t[10]=e[10],t[11]=e[14],t[12]=e[3],t[13]=e[7],t[14]=e[11],t[15]=e[15];return t},e.invert=function(t,e){var r=e[0],i=e[1],o=e[2],a=e[3],n=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],f=e[10],d=e[11],h=e[12],_=e[13],v=e[14],y=e[15],E=r*s-i*n,S=r*l-o*n,m=r*u-a*n,b=i*l-o*s,M=i*u-a*s,g=o*u-a*l,T=c*_-p*h,I=c*v-f*h,z=c*y-d*h,O=p*v-f*_,x=p*y-d*_,A=f*y-d*v,D=E*A-S*x+m*O+b*z-M*I+g*T;return D?(t[0]=(s*A-l*x+u*O)*(D=1/D),t[1]=(o*x-i*A-a*O)*D,t[2]=(_*g-v*M+y*b)*D,t[3]=(f*M-p*g-d*b)*D,t[4]=(l*z-n*A-u*I)*D,t[5]=(r*A-o*z+a*I)*D,t[6]=(v*m-h*g-y*S)*D,t[7]=(c*g-f*m+d*S)*D,t[8]=(n*x-s*z+u*T)*D,t[9]=(i*z-r*x-a*T)*D,t[10]=(h*M-_*m+y*E)*D,t[11]=(p*m-c*M-d*E)*D,t[12]=(s*I-n*O-l*T)*D,t[13]=(r*O-i*I+o*T)*D,t[14]=(_*S-h*b-v*E)*D,t[15]=(c*b-p*S+f*E)*D,t):null},e.adjoint=function(t,e){var r=e[0],i=e[1],o=e[2],a=e[3],n=e[4],s=e[5],l=e[6],u=e[7],c=e[8],p=e[9],f=e[10],d=e[11],h=e[12],_=e[13],v=e[14],y=e[15];return t[0]=s*(f*y-d*v)-p*(l*y-u*v)+_*(l*d-u*f),t[1]=-(i*(f*y-d*v)-p*(o*y-a*v)+_*(o*d-a*f)),t[2]=i*(l*y-u*v)-s*(o*y-a*v)+_*(o*u-a*l),t[3]=-(i*(l*d-u*f)-s*(o*d-a*f)+p*(o*u-a*l)),t[4]=-(n*(f*y-d*v)-c*(l*y-u*v)+h*(l*d-u*f)),t[5]=r*(f*y-d*v)-c*(o*y-a*v)+h*(o*d-a*f),t[6]=-(r*(l*y-u*v)-n*(o*y-a*v)+h*(o*u-a*l)),t[7]=r*(l*d-u*f)-n*(o*d-a*f)+c*(o*u-a*l),t[8]=n*(p*y-d*_)-c*(s*y-u*_)+h*(s*d-u*p),t[9]=-(r*(p*y-d*_)-c*(i*y-a*_)+h*(i*d-a*p)),t[10]=r*(s*y-u*_)-n*(i*y-a*_)+h*(i*u-a*s),t[11]=-(r*(s*d-u*p)-n*(i*d-a*p)+c*(i*u-a*s)),t[12]=-(n*(p*v-f*_)-c*(s*v-l*_)+h*(s*f-l*p)),t[13]=r*(p*v-f*_)-c*(i*v-o*_)+h*(i*f-o*p),t[14]=-(r*(s*v-l*_)-n*(i*v-o*_)+h*(i*l-o*s)),t[15]=r*(s*f-l*p)-n*(i*f-o*p)+c*(i*l-o*s),t},e.determinant=function(t){var e=t[0],r=t[1],i=t[2],o=t[3],a=t[4],n=t[5],s=t[6],l=t[7],u=t[8],c=t[9],p=t[10],f=t[11],d=t[12],h=t[13],_=t[14],v=t[15];return(e*n-r*a)*(p*v-f*_)-(e*s-i*a)*(c*v-f*h)+(e*l-o*a)*(c*_-p*h)+(r*s-i*n)*(u*v-f*d)-(r*l-o*n)*(u*_-p*d)+(i*l-o*s)*(u*h-c*d)},e.multiply=a,e.translate=function(t,e,r){var i=r[0],o=r[1],a=r[2],n=void 0,s=void 0,l=void 0,u=void 0,c=void 0,p=void 0,f=void 0,d=void 0,h=void 0,_=void 0,v=void 0,y=void 0;return e===t?(t[12]=e[0]*i+e[4]*o+e[8]*a+e[12],t[13]=e[1]*i+e[5]*o+e[9]*a+e[13],t[14]=e[2]*i+e[6]*o+e[10]*a+e[14],t[15]=e[3]*i+e[7]*o+e[11]*a+e[15]):(s=e[1],l=e[2],u=e[3],c=e[4],p=e[5],f=e[6],d=e[7],h=e[8],_=e[9],v=e[10],y=e[11],t[0]=n=e[0],t[1]=s,t[2]=l,t[3]=u,t[4]=c,t[5]=p,t[6]=f,t[7]=d,t[8]=h,t[9]=_,t[10]=v,t[11]=y,t[12]=n*i+c*o+h*a+e[12],t[13]=s*i+p*o+_*a+e[13],t[14]=l*i+f*o+v*a+e[14],t[15]=u*i+d*o+y*a+e[15]),t},e.scale=function(t,e,r){var i=r[0],o=r[1],a=r[2];return t[0]=e[0]*i,t[1]=e[1]*i,t[2]=e[2]*i,t[3]=e[3]*i,t[4]=e[4]*o,t[5]=e[5]*o,t[6]=e[6]*o,t[7]=e[7]*o,t[8]=e[8]*a,t[9]=e[9]*a,t[10]=e[10]*a,t[11]=e[11]*a,t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t},e.rotate=function(t,e,r,o){var a,n,s,l,u,c,p,f,d,h,_,v,y,E,S,m,b,M,g,T,I,z,O,x,A=o[0],D=o[1],L=o[2],R=Math.sqrt(A*A+D*D+L*L);return R<i.EPSILON?null:(A*=R=1/R,D*=R,L*=R,a=Math.sin(r),s=1-(n=Math.cos(r)),u=e[1],c=e[2],p=e[3],d=e[5],h=e[6],_=e[7],y=e[9],E=e[10],S=e[11],g=A*D*s-L*a,T=D*D*s+n,I=L*D*s+A*a,z=A*L*s+D*a,O=D*L*s-A*a,x=L*L*s+n,t[0]=(l=e[0])*(m=A*A*s+n)+(f=e[4])*(b=D*A*s+L*a)+(v=e[8])*(M=L*A*s-D*a),t[1]=u*m+d*b+y*M,t[2]=c*m+h*b+E*M,t[3]=p*m+_*b+S*M,t[4]=l*g+f*T+v*I,t[5]=u*g+d*T+y*I,t[6]=c*g+h*T+E*I,t[7]=p*g+_*T+S*I,t[8]=l*z+f*O+v*x,t[9]=u*z+d*O+y*x,t[10]=c*z+h*O+E*x,t[11]=p*z+_*O+S*x,e!==t&&(t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t)},e.rotateX=function(t,e,r){var i=Math.sin(r),o=Math.cos(r),a=e[4],n=e[5],s=e[6],l=e[7],u=e[8],c=e[9],p=e[10],f=e[11];return e!==t&&(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[4]=a*o+u*i,t[5]=n*o+c*i,t[6]=s*o+p*i,t[7]=l*o+f*i,t[8]=u*o-a*i,t[9]=c*o-n*i,t[10]=p*o-s*i,t[11]=f*o-l*i,t},e.rotateY=function(t,e,r){var i=Math.sin(r),o=Math.cos(r),a=e[0],n=e[1],s=e[2],l=e[3],u=e[8],c=e[9],p=e[10],f=e[11];return e!==t&&(t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*o-u*i,t[1]=n*o-c*i,t[2]=s*o-p*i,t[3]=l*o-f*i,t[8]=a*i+u*o,t[9]=n*i+c*o,t[10]=s*i+p*o,t[11]=l*i+f*o,t},e.rotateZ=function(t,e,r){var i=Math.sin(r),o=Math.cos(r),a=e[0],n=e[1],s=e[2],l=e[3],u=e[4],c=e[5],p=e[6],f=e[7];return e!==t&&(t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15]),t[0]=a*o+u*i,t[1]=n*o+c*i,t[2]=s*o+p*i,t[3]=l*o+f*i,t[4]=u*o-a*i,t[5]=c*o-n*i,t[6]=p*o-s*i,t[7]=f*o-l*i,t},e.fromTranslation=function(t,e){return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=e[0],t[13]=e[1],t[14]=e[2],t[15]=1,t},e.fromScaling=function(t,e){return t[0]=e[0],t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=e[1],t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=e[2],t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromRotation=function(t,e,r){var o,a,n,s=r[0],l=r[1],u=r[2],c=Math.sqrt(s*s+l*l+u*u);return c<i.EPSILON?null:(s*=c=1/c,l*=c,u*=c,o=Math.sin(e),n=1-(a=Math.cos(e)),t[0]=s*s*n+a,t[1]=l*s*n+u*o,t[2]=u*s*n-l*o,t[3]=0,t[4]=s*l*n-u*o,t[5]=l*l*n+a,t[6]=u*l*n+s*o,t[7]=0,t[8]=s*u*n+l*o,t[9]=l*u*n-s*o,t[10]=u*u*n+a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t)},e.fromXRotation=function(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=i,t[6]=r,t[7]=0,t[8]=0,t[9]=-r,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromYRotation=function(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=0,t[2]=-r,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=r,t[9]=0,t[10]=i,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromZRotation=function(t,e){var r=Math.sin(e),i=Math.cos(e);return t[0]=i,t[1]=r,t[2]=0,t[3]=0,t[4]=-r,t[5]=i,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.fromRotationTranslation=n,e.fromQuat2=function(t,e){var r=s,i=-e[0],o=-e[1],a=-e[2],l=e[3],u=e[4],c=e[5],p=e[6],f=e[7],d=i*i+o*o+a*a+l*l;return d>0?(r[0]=2*(u*l+f*i+c*a-p*o)/d,r[1]=2*(c*l+f*o+p*i-u*a)/d,r[2]=2*(p*l+f*a+u*o-c*i)/d):(r[0]=2*(u*l+f*i+c*a-p*o),r[1]=2*(c*l+f*o+p*i-u*a),r[2]=2*(p*l+f*a+u*o-c*i)),n(t,e,r),t};var s=r.create();function l(t,e,r){return t[0]=e[0]-r[0],t[1]=e[1]-r[1],t[2]=e[2]-r[2],t[3]=e[3]-r[3],t[4]=e[4]-r[4],t[5]=e[5]-r[5],t[6]=e[6]-r[6],t[7]=e[7]-r[7],t[8]=e[8]-r[8],t[9]=e[9]-r[9],t[10]=e[10]-r[10],t[11]=e[11]-r[11],t[12]=e[12]-r[12],t[13]=e[13]-r[13],t[14]=e[14]-r[14],t[15]=e[15]-r[15],t}e.getTranslation=function(t,e){return t[0]=e[12],t[1]=e[13],t[2]=e[14],t},e.getScaling=function(t,e){var r=e[0],i=e[1],o=e[2],a=e[4],n=e[5],s=e[6],l=e[8],u=e[9],c=e[10];return t[0]=Math.sqrt(r*r+i*i+o*o),t[1]=Math.sqrt(a*a+n*n+s*s),t[2]=Math.sqrt(l*l+u*u+c*c),t},e.getRotation=function(t,e){var r=e[0]+e[5]+e[10],i=0;return r>0?(i=2*Math.sqrt(r+1),t[3]=.25*i,t[0]=(e[6]-e[9])/i,t[1]=(e[8]-e[2])/i,t[2]=(e[1]-e[4])/i):e[0]>e[5]&&e[0]>e[10]?(i=2*Math.sqrt(1+e[0]-e[5]-e[10]),t[3]=(e[6]-e[9])/i,t[0]=.25*i,t[1]=(e[1]+e[4])/i,t[2]=(e[8]+e[2])/i):e[5]>e[10]?(i=2*Math.sqrt(1+e[5]-e[0]-e[10]),t[3]=(e[8]-e[2])/i,t[0]=(e[1]+e[4])/i,t[1]=.25*i,t[2]=(e[6]+e[9])/i):(i=2*Math.sqrt(1+e[10]-e[0]-e[5]),t[3]=(e[1]-e[4])/i,t[0]=(e[8]+e[2])/i,t[1]=(e[6]+e[9])/i,t[2]=.25*i),t},e.fromRotationTranslationScale=function(t,e,r,i){var o=e[0],a=e[1],n=e[2],s=e[3],l=o+o,u=a+a,c=n+n,p=o*l,f=o*u,d=o*c,h=a*u,_=a*c,v=n*c,y=s*l,E=s*u,S=s*c,m=i[0],b=i[1],M=i[2];return t[0]=(1-(h+v))*m,t[1]=(f+S)*m,t[2]=(d-E)*m,t[3]=0,t[4]=(f-S)*b,t[5]=(1-(p+v))*b,t[6]=(_+y)*b,t[7]=0,t[8]=(d+E)*M,t[9]=(_-y)*M,t[10]=(1-(p+h))*M,t[11]=0,t[12]=r[0],t[13]=r[1],t[14]=r[2],t[15]=1,t},e.fromRotationTranslationScaleOrigin=function(t,e,r,i,o){var a=e[0],n=e[1],s=e[2],l=e[3],u=a+a,c=n+n,p=s+s,f=a*u,d=a*c,h=a*p,_=n*c,v=n*p,y=s*p,E=l*u,S=l*c,m=l*p,b=i[0],M=i[1],g=i[2],T=o[0],I=o[1],z=o[2],O=(1-(_+y))*b,x=(d+m)*b,A=(h-S)*b,D=(d-m)*M,L=(1-(f+y))*M,R=(v+E)*M,w=(h+S)*g,N=(v-E)*g,C=(1-(f+_))*g;return t[0]=O,t[1]=x,t[2]=A,t[3]=0,t[4]=D,t[5]=L,t[6]=R,t[7]=0,t[8]=w,t[9]=N,t[10]=C,t[11]=0,t[12]=r[0]+T-(O*T+D*I+w*z),t[13]=r[1]+I-(x*T+L*I+N*z),t[14]=r[2]+z-(A*T+R*I+C*z),t[15]=1,t},e.fromQuat=function(t,e){var r=e[0],i=e[1],o=e[2],a=e[3],n=r+r,s=i+i,l=o+o,u=r*n,c=i*n,p=i*s,f=o*n,d=o*s,h=o*l,_=a*n,v=a*s,y=a*l;return t[0]=1-p-h,t[1]=c+y,t[2]=f-v,t[3]=0,t[4]=c-y,t[5]=1-u-h,t[6]=d+_,t[7]=0,t[8]=f+v,t[9]=d-_,t[10]=1-u-p,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,t},e.frustum=function(t,e,r,i,o,a,n){var s=1/(r-e),l=1/(o-i),u=1/(a-n);return t[0]=2*a*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=2*a*l,t[6]=0,t[7]=0,t[8]=(r+e)*s,t[9]=(o+i)*l,t[10]=(n+a)*u,t[11]=-1,t[12]=0,t[13]=0,t[14]=n*a*2*u,t[15]=0,t},e.perspective=function(t,e,r,i,o){var a=1/Math.tan(e/2),n=void 0;return t[0]=a/r,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=a,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[11]=-1,t[12]=0,t[13]=0,t[15]=0,null!=o&&o!==1/0?(t[10]=(o+i)*(n=1/(i-o)),t[14]=2*o*i*n):(t[10]=-1,t[14]=-2*i),t},e.perspectiveFromFieldOfView=function(t,e,r,i){var o=Math.tan(e.upDegrees*Math.PI/180),a=Math.tan(e.downDegrees*Math.PI/180),n=Math.tan(e.leftDegrees*Math.PI/180),s=Math.tan(e.rightDegrees*Math.PI/180),l=2/(n+s),u=2/(o+a);return t[0]=l,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=u,t[6]=0,t[7]=0,t[8]=-(n-s)*l*.5,t[9]=(o-a)*u*.5,t[10]=i/(r-i),t[11]=-1,t[12]=0,t[13]=0,t[14]=i*r/(r-i),t[15]=0,t},e.ortho=function(t,e,r,i,o,a,n){var s=1/(e-r),l=1/(i-o),u=1/(a-n);return t[0]=-2*s,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=-2*l,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=2*u,t[11]=0,t[12]=(e+r)*s,t[13]=(o+i)*l,t[14]=(n+a)*u,t[15]=1,t},e.lookAt=function(t,e,r,a){var n=void 0,s=void 0,l=void 0,u=void 0,c=void 0,p=void 0,f=void 0,d=void 0,h=void 0,_=void 0,v=e[0],y=e[1],E=e[2],S=a[0],m=a[1],b=a[2],M=r[0],g=r[1],T=r[2];return Math.abs(v-M)<i.EPSILON&&Math.abs(y-g)<i.EPSILON&&Math.abs(E-T)<i.EPSILON?o(t):(f=v-M,d=y-g,h=E-T,n=m*(h*=_=1/Math.sqrt(f*f+d*d+h*h))-b*(d*=_),s=b*(f*=_)-S*h,l=S*d-m*f,(_=Math.sqrt(n*n+s*s+l*l))?(n*=_=1/_,s*=_,l*=_):(n=0,s=0,l=0),u=d*l-h*s,c=h*n-f*l,p=f*s-d*n,(_=Math.sqrt(u*u+c*c+p*p))?(u*=_=1/_,c*=_,p*=_):(u=0,c=0,p=0),t[0]=n,t[1]=u,t[2]=f,t[3]=0,t[4]=s,t[5]=c,t[6]=d,t[7]=0,t[8]=l,t[9]=p,t[10]=h,t[11]=0,t[12]=-(n*v+s*y+l*E),t[13]=-(u*v+c*y+p*E),t[14]=-(f*v+d*y+h*E),t[15]=1,t)},e.targetTo=function(t,e,r,i){var o=e[0],a=e[1],n=e[2],s=i[0],l=i[1],u=i[2],c=o-r[0],p=a-r[1],f=n-r[2],d=c*c+p*p+f*f;d>0&&(c*=d=1/Math.sqrt(d),p*=d,f*=d);var h=l*f-u*p,_=u*c-s*f,v=s*p-l*c;return(d=h*h+_*_+v*v)>0&&(h*=d=1/Math.sqrt(d),_*=d,v*=d),t[0]=h,t[1]=_,t[2]=v,t[3]=0,t[4]=p*v-f*_,t[5]=f*h-c*v,t[6]=c*_-p*h,t[7]=0,t[8]=c,t[9]=p,t[10]=f,t[11]=0,t[12]=o,t[13]=a,t[14]=n,t[15]=1,t},e.str=function(t){return"mat4("+t[0]+", "+t[1]+", "+t[2]+", "+t[3]+", "+t[4]+", "+t[5]+", "+t[6]+", "+t[7]+", "+t[8]+", "+t[9]+", "+t[10]+", "+t[11]+", "+t[12]+", "+t[13]+", "+t[14]+", "+t[15]+")"},e.frob=function(t){return Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2)+Math.pow(t[3],2)+Math.pow(t[4],2)+Math.pow(t[5],2)+Math.pow(t[6],2)+Math.pow(t[7],2)+Math.pow(t[8],2)+Math.pow(t[9],2)+Math.pow(t[10],2)+Math.pow(t[11],2)+Math.pow(t[12],2)+Math.pow(t[13],2)+Math.pow(t[14],2)+Math.pow(t[15],2))},e.add=function(t,e,r){return t[0]=e[0]+r[0],t[1]=e[1]+r[1],t[2]=e[2]+r[2],t[3]=e[3]+r[3],t[4]=e[4]+r[4],t[5]=e[5]+r[5],t[6]=e[6]+r[6],t[7]=e[7]+r[7],t[8]=e[8]+r[8],t[9]=e[9]+r[9],t[10]=e[10]+r[10],t[11]=e[11]+r[11],t[12]=e[12]+r[12],t[13]=e[13]+r[13],t[14]=e[14]+r[14],t[15]=e[15]+r[15],t},e.subtract=l,e.multiplyScalar=function(t,e,r){return t[0]=e[0]*r,t[1]=e[1]*r,t[2]=e[2]*r,t[3]=e[3]*r,t[4]=e[4]*r,t[5]=e[5]*r,t[6]=e[6]*r,t[7]=e[7]*r,t[8]=e[8]*r,t[9]=e[9]*r,t[10]=e[10]*r,t[11]=e[11]*r,t[12]=e[12]*r,t[13]=e[13]*r,t[14]=e[14]*r,t[15]=e[15]*r,t},e.multiplyScalarAndAdd=function(t,e,r,i){return t[0]=e[0]+r[0]*i,t[1]=e[1]+r[1]*i,t[2]=e[2]+r[2]*i,t[3]=e[3]+r[3]*i,t[4]=e[4]+r[4]*i,t[5]=e[5]+r[5]*i,t[6]=e[6]+r[6]*i,t[7]=e[7]+r[7]*i,t[8]=e[8]+r[8]*i,t[9]=e[9]+r[9]*i,t[10]=e[10]+r[10]*i,t[11]=e[11]+r[11]*i,t[12]=e[12]+r[12]*i,t[13]=e[13]+r[13]*i,t[14]=e[14]+r[14]*i,t[15]=e[15]+r[15]*i,t},e.exactEquals=function(t,e){return t[0]===e[0]&&t[1]===e[1]&&t[2]===e[2]&&t[3]===e[3]&&t[4]===e[4]&&t[5]===e[5]&&t[6]===e[6]&&t[7]===e[7]&&t[8]===e[8]&&t[9]===e[9]&&t[10]===e[10]&&t[11]===e[11]&&t[12]===e[12]&&t[13]===e[13]&&t[14]===e[14]&&t[15]===e[15]},e.equals=function(t,e){var r=t[0],o=t[1],a=t[2],n=t[3],s=t[4],l=t[5],u=t[6],c=t[7],p=t[8],f=t[9],d=t[10],h=t[11],_=t[12],v=t[13],y=t[14],E=t[15],S=e[0],m=e[1],b=e[2],M=e[3],g=e[4],T=e[5],I=e[6],z=e[7],O=e[8],x=e[9],A=e[10],D=e[11],L=e[12],R=e[13],w=e[14],N=e[15];return Math.abs(r-S)<=i.EPSILON*Math.max(1,Math.abs(r),Math.abs(S))&&Math.abs(o-m)<=i.EPSILON*Math.max(1,Math.abs(o),Math.abs(m))&&Math.abs(a-b)<=i.EPSILON*Math.max(1,Math.abs(a),Math.abs(b))&&Math.abs(n-M)<=i.EPSILON*Math.max(1,Math.abs(n),Math.abs(M))&&Math.abs(s-g)<=i.EPSILON*Math.max(1,Math.abs(s),Math.abs(g))&&Math.abs(l-T)<=i.EPSILON*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(u-I)<=i.EPSILON*Math.max(1,Math.abs(u),Math.abs(I))&&Math.abs(c-z)<=i.EPSILON*Math.max(1,Math.abs(c),Math.abs(z))&&Math.abs(p-O)<=i.EPSILON*Math.max(1,Math.abs(p),Math.abs(O))&&Math.abs(f-x)<=i.EPSILON*Math.max(1,Math.abs(f),Math.abs(x))&&Math.abs(d-A)<=i.EPSILON*Math.max(1,Math.abs(d),Math.abs(A))&&Math.abs(h-D)<=i.EPSILON*Math.max(1,Math.abs(h),Math.abs(D))&&Math.abs(_-L)<=i.EPSILON*Math.max(1,Math.abs(_),Math.abs(L))&&Math.abs(v-R)<=i.EPSILON*Math.max(1,Math.abs(v),Math.abs(R))&&Math.abs(y-w)<=i.EPSILON*Math.max(1,Math.abs(y),Math.abs(w))&&Math.abs(E-N)<=i.EPSILON*Math.max(1,Math.abs(E),Math.abs(N))},e.mul=a,e.sub=l}).apply(null,i))||(t.exports=o)},iHXi:function(t,e,r){var i,o;i=[r.dj.c(t.i),e,r("zOht"),r("jBNx"),r("YaB4"),r("tI6k"),r("3w6h")],void 0===(o=(function(t,e,r,i,o,a,n){Object.defineProperty(e,"__esModule",{value:!0});var s=o.enums.WGLVVFlag;function l(t){return{value:t.value,size:i.toPt(t.size)}}function u(t){return t.map((function(t){return l(t)}))}function c(t){return"string"==typeof t||"number"==typeof t?i.toPt(t):{type:"size",expression:t.expression,stops:u(t.stops)}}e.getVisualVariableSizeValueRepresentationRatio=function(t,e){if(!t||!e)return t;switch(e){case"radius":case"distance":return 2*t;case"diameter":case"width":return t;case"area":return Math.sqrt(t)}return t},e.stopToSizeStop=l,e.normalizeSizeStops=u,e.normalizeSizeElement=c,e.getVisualVariablesFields=function(t){var e=t&&t.length>0?{}:null;return e&&t.forEach((function(t){t.field&&(e[t.type]=t.field)})),e};var p=function(t){for(var e=[],r=[],o=u(t),n=o.length,s=0;s<6;s++){var l=o[Math.min(s,n-1)];e.push(l.value),r.push(null==l.size?a.NAN_MAGIC_NUMBER:i.pt2px(l.size))}return{values:new Float32Array(e),sizes:new Float32Array(r)}};function f(t){var e={values:[0,0,0,0,0,0,0,0],opacities:[0,0,0,0,0,0,0,0]};if(o.Utils.isString(t.field)){if(!t.stops)return null;if(t.stops.length>8)return null;for(var r=t.stops,i=0;i<8;++i){var a=r[Math.min(i,r.length-1)];e.values[i]=a.value,e.opacities[i]=a.opacity}}else{if(!(t.stops&&t.stops.length>=0))return null;var n=t.stops&&t.stops.length>=0&&t.stops[0].opacity;for(i=0;i<8;i++)e.values[i]=1/0,e.opacities[i]=n}return e}e.convertVisualVariables=function(t){var e=t&&t.length>0?{}:null,i=e?{}:null;if(!e)return{vvFields:e,vvRanges:i};for(var a=0,l=t;a<l.length;a++){var d=l[a],h=d.type;if(d.field&&(e[h]=d.field),"size"===h){i.size||(i.size={});var _=d;switch(o.getTypeOfSizeVisualVariable(_)){case s.SIZE_MINMAX_VALUE:i.size.minMaxValue={minDataValue:_.minDataValue,maxDataValue:_.maxDataValue,minSize:c(_.minSize),maxSize:c(_.maxSize)};break;case s.SIZE_SCALE_STOPS:i.size.scaleStops={stops:u(_.stops)};break;case s.SIZE_FIELD_STOPS:if(_.levels){var v={};for(var y in _.levels)v[y]=p(_.levels[y]);i.size.fieldStops={type:"level-dependent",levels:v}}else i.size.fieldStops=r.__assign({type:"static"},p(_.stops));break;case s.SIZE_UNIT_VALUE:i.size.unitValue={unit:_.valueUnit,valueRepresentation:_.valueRepresentation}}}else if("color"===h){var E=n.convertVisualVariables([d],{modelSize:null,symbolSize:null,unitInMeters:1,transformation:null});if(!E)continue;i.color=E.color;for(var S=0;S<32;S+=4)o.color.premultiplyAlpha(i.color.colors,S,!0)}else"opacity"===h?i.opacity=f(d):"rotation"===h&&(i.rotation={type:d.rotationType})}return{vvFields:e,vvRanges:i}}}).apply(null,i))||(t.exports=o)},lvbU:function(t,e,r){var i,o;i=[r.dj.c(t.i),e,r("zOht"),r("ma1f"),r("H1tY"),r("qsST"),r("xoE+"),r("LxLY"),r("qMld"),r("I90O"),r("sCbS"),r("YaB4"),r("WEAo"),r("tI6k"),r("iHXi"),r("2Kdy")],void 0===(o=(function(t,e,i,o,a,n,s,l,u,c,p,f,d,h,_){Object.defineProperty(e,"__esModule",{value:!0});var v=n.getLogger("esri.views.layers.2d.features.support.AttributeStore"),y=f.debug.createDebugLogger(f.debug.DEBUG_ATTR_UPDATES,v);e.LOCAL_ID_TYPE_AGGREGATE=1;var E=function(t){return(2147483648&t)>>>31},S=function(t){return 2147483647&t};e.isAggregateId=function(t){return E(t)===e.LOCAL_ID_TYPE_AGGREGATE};var m=function(t,e){return function(r,i,o){var a;try{a=e(r,i,o)}catch(t){a=NaN}return(null===a||isNaN(a)||a===1/0)&&t||a}},b={sharedArrayBuffer:a("esri-shared-array-buffer"),oesTextureFloat:a("esri-webgl-texture-float"),maxTextureSize:a("esri-webgl-max-texture-size"),atomics:a("esri-atomics")},M=function(){function t(t,e,r,i){this.texelSize=4;var o=i.pixelType,a=i.layout,n=i.textureOnly;this.textureOnly=n||!1,this.pixelType=o,this._ctype=e,this.layout=a,this._resetRange(),this._shared=t,n||(this.data=this._initData(o,r,t,e))}return Object.defineProperty(t.prototype,"buffer",{get:function(){return l.andThen(this.data,(function(t){return t.buffer}))},enumerable:!0,configurable:!0}),t.prototype.getData=function(t,e){var r=S(t);return l.unwrap(this.data)[r*this.texelSize+e]},t.prototype.setData=function(t,e,r){var i=S(t);0!=(this.layout&1<<e)?(this.data[i*this.texelSize+e]=r,this.dirtyStart=Math.min(this.dirtyStart,i),this.dirtyEnd=Math.max(this.dirtyEnd,i)):v.error("mapview-attributes-store","Tried to set a value for a texel's readonly component")},t.prototype.lock=function(){5121===this.pixelType?this._shared&&b.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,1):a("esri-2d-debug")&&v.error("AttributeStore-Bad-Type","Tried to unlock non integer array type with float array")},t.prototype.unlock=function(){5121===this.pixelType?this._shared&&b.atomics&&"local"!==this._ctype&&Atomics.store(this.data,0,0):a("esri-2d-debug")&&v.error("AttributeStore-Bad-Type","Tried to unlock non integer array type with float array")},t.prototype.expand=function(t){if(!this.textureOnly){var e=this._initData(this.pixelType,t,this._shared,this._ctype),r=l.unwrap(this.data);e.set(r),this.data=e}},t.prototype.toMessage=function(){var t=this.dirtyStart,e=this.dirtyEnd,r=this.texelSize;if(t>e)return null;this._resetRange();var i=!(this._shared||"local"===this._ctype),o=this.pixelType,a=this.layout,n=l.unwrap(this.data);return n.slice?{start:t,end:e,data:i&&n.slice(t*r,(e+1)*r)||null,pixelType:o,layout:a}:i?{start:t,end:e,data:new(f.Utils.getPixelArrayCtor(this.pixelType))(Array.prototype.slice.call(this.data,t*r,(e+1)*r)),pixelType:o,layout:a}:{start:t,end:e,data:null,pixelType:o,layout:a}},t.prototype._initData=function(t,e,r,i){for(var o=r&&"local"!==i?SharedArrayBuffer:ArrayBuffer,a=f.Utils.getPixelArrayCtor(t),n=new a(new o(e*e*4*a.BYTES_PER_ELEMENT)),s=0;s<n.length;s+=4)n[s+1]=255;return n},t.prototype._resetRange=function(){this.dirtyStart=2147483647,this.dirtyEnd=0},t}(),g=function(){function t(t){this._attributeComputeMap=new Map,this._blocks=new Array,this._idMap=new Map,this._localToObjectId=new Map,this._filters=new Array(f.definitions.MAX_FILTERS),this._freeTexelsList=[],this._abortController=u.createAbortController(),this._hasScaleExpr=!1,this._size=32,this._idCounter=1,this._idsToHighlight=new Set;var e=b.oesTextureFloat?5126:5121;y("Creating AttributeStore "+(b.sharedArrayBuffer?"with":"without")+" shared memory"),a("esri-2d-debug")&&b.sharedArrayBuffer&&!b.atomics&&v.warn("Browser supports SharedArrayBuffer but not Atomics. Rendering may be impacted"),this._client=t,this._blockDescriptors=[{pixelType:5121,layout:1},{pixelType:5121,layout:15,textureOnly:!0},{pixelType:e,layout:15},{pixelType:e,layout:15}],this._blocks=this._blockDescriptors.map((function(){return null}))}return t.prototype.destroy=function(){this._abortController.abort()},Object.defineProperty(t.prototype,"hasScaleExpr",{get:function(){return this._hasScaleExpr},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"_signal",{get:function(){return this._abortController.signal},enumerable:!0,configurable:!0}),t.prototype.invalidateResources=function(){this._createResourcesPromise=null,this._abortController.abort(),this._abortController=u.createAbortController()},t.prototype.createLocalId=function(t,e){if(void 0===e&&(e=!1),!this._idMap.has(t)){var r=function(t,e){return((e?2147483648:0)|t)>>>0}(this._getFreeTexel(),e);this._idMap.set(t,-1===r?0:r),this._localToObjectId.set(r,t)}return this._idMap.get(t)},t.prototype.addLocalId=function(t){this._getBlock(0).setData(t,0,0),this._freeTexelsList.push(S(t))},t.prototype.removeLocalId=function(t){var e=this._idMap.get(t);return this._idMap.delete(t),this._localToObjectId.delete(e),e},t.prototype.freeLocalId=function(t){var e=this._idMap.get(t);a("esri-2d-debug")&&!e&&console.debug("Called freeLocalId for an invalid id"),this._getBlock(0).setData(e,0,0),this._idMap.delete(t),this._localToObjectId.delete(e),this._freeTexelsList.push(S(e))},t.prototype.getFeatureId=function(t){return this._localToObjectId.get(t)},t.prototype.getLocalId=function(t){return this._idMap.has(t)?this._idMap.get(t):null},t.prototype.setHighlight=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,r,o,a,n,s=this;return i.__generator(this,(function(i){switch(i.label){case 0:for(this._getBlock(0).lock(),this._idsToHighlight.forEach((function(t){var e=s.getLocalId(t);if(e){var r=s._getBlock(0).getData(e,0);s._getBlock(0).setData(e,0,-2&r)}})),this._idsToHighlight.clear(),e=0,r=t;e<r.length;e++)this._idsToHighlight.add(r[e]);for(o=0;o<t.length;o++)null!=(a=this.getLocalId(t[o]))&&(n=this._getBlock(0).getData(a,0),this._getBlock(0).setData(a,0,1|n));return this._getBlock(0).unlock(),[4,this.sendUpdates()];case 1:return i.sent(),[2]}}))}))},t.prototype.addHighlight=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){return[2]}))}))},t.prototype.removeHighlight=function(){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(t){return[2]}))}))},t.prototype.updateFilters=function(t){return i.__awaiter(this,void 0,void 0,(function(){var e,r,o,a=this;return i.__generator(this,(function(i){switch(i.label){case 0:return e=t.service,r=t.spatialReference,o=t.config.filters.map((function(i,o){return a._updateFilter(t,i,o,e,r)})),[4,u.all(o)];case 1:return i.sent(),[2]}}))}))},t.prototype.setAttributeBindings=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){return i.__generator(this,(function(r){switch(this._hasScaleExpr=!1,t.type){case"simple":case"class-breaks":case"unique-value":case"dictionary":return[2,this._bindVVEvaluators(t.visualVariables,e)];case"dot-density":return[2,this._bindDDEvaluators(t.attributes,e)];case"heatmap":break;default:v.error(new o("attribute-store","Found invalid renderer type: "+t))}return[2]}))}))},t.prototype.setData=function(t,e,r,i){this._getBlock(e).setData(t,r,i)},t.prototype.getData=function(t,e,r){return this._getBlock(e).getData(t,r)},t.prototype.getHighlightFlag=function(t){return this._idsToHighlight.has(t)?h.HIGHLIGHT_FLAG:0},t.prototype.setAttributeData=function(t,e,r,i){var o=this,a=t;this._getBlock(0).setData(a,0,this.getFilterFlags(e));var n=b.oesTextureFloat?1:2;this._attributeComputeMap.forEach((function(t,l){var u=l*n%4,c=Math.floor(l*n/4),p=o._getBlock(c+h.ATTRIBUTE_DATA_VV),d=t(e,{$view:i},r);if(b.oesTextureFloat)p.setData(a,u,d);else if(d===f.definitions.NAN_MAGIC_NUMBER)p.setData(a,u,255),p.setData(a,u+1,255);else{var _=s.clamp(Math.round(d),-32767,32766)+32768,v=(65280&_)>>8;p.setData(a,u,255&_),p.setData(a,u+1,v)}}))},t.prototype.sendUpdates=function(){var t=this;if(this._nextUpdate)return this._nextUpdate.promise;if(this._currUpdate)return this._nextUpdate=u.createResolver(),this._nextUpdate.promise;var e={blocks:this._blocks.map((function(t){return l.isSome(t)?t.toMessage():null}))};return this._currUpdate=this._createResources().then((function(){var r=function(){if(t._currUpdate=null,t._nextUpdate){var e=t._nextUpdate;t._nextUpdate=null,t.sendUpdates().then((function(){return e.resolve()}))}},i=t._client.update(e,t._signal).then(r).catch(r);return t._client.render(),i})).catch((function(e){return u.isAbortError(e)?(t._createResourcesPromise=null,t._createResources()):(v.error(new o("mapview-attribute-store","Encountered an error during client update",e)),u.resolve())})),this._currUpdate},t.prototype._createResources=function(){var t=this;if(l.isSome(this._createResourcesPromise))return this._createResourcesPromise;this._getBlock(h.ATTRIBUTE_DATA_ANIMATION),y("Initializing AttributeStore");var e={shared:b.sharedArrayBuffer&&!("local"===this._client.type),size:this._size,blocks:l.mapMany(this._blocks,(function(t){return{textureOnly:t.textureOnly,buffer:t.buffer,pixelType:t.pixelType}}))},r=this._client.initialize(e,this._signal).catch((function(e){u.isAbortError(e)?t._createResourcesPromise=null:v.error(new o("mapview-attribute-store","Encountered an error during client initialization",e))}));return this._createResourcesPromise=r,r.then((function(){return l.isNone(t._createResourcesPromise)?t._createResources():void 0})),r},t.prototype._getBlock=function(t){var e=this._blocks[t];if(l.isSome(e))return e;y("Initializing AttributeBlock at index "+t);var r=new M(b.sharedArrayBuffer,this._client.type,this._size,this._blockDescriptors[t]);return this._blocks[t]=r,this._createResourcesPromise=null,r},t.prototype._expand=function(){if(this._size<b.maxTextureSize){var t=this._size<<=1;return y("Expanding block size to",t,this._blocks),l.forEachSome(this._blocks,(function(e){return e.expand(t)})),this._createResourcesPromise=null,this._size=t,0}return v.error(new o("mapview-limitations","Maximum number of onscreen features exceeded.")),-1},t.prototype._getFreeTexel=function(){return this._freeTexelsList.length?this._freeTexelsList.pop():this._idCounter>=this._size*this._size&&this._expand()?-1:this._idCounter++},t.prototype._updateFilter=function(t,r,o,a,n){return i.__awaiter(this,void 0,void 0,(function(){var s,u,c,p,f,d,h,_=this;return i.__generator(this,(function(i){switch(i.label){case 0:return(l.isSome(s=this._filters[o])&&s.hash)===JSON.stringify(r)?[2]:(u=1<<o+1,l.isNone(r)?(this._filters[o]=null,this._idMap.forEach((function(t){var e=_._getBlock(0).getData(t,0);_._getBlock(0).setData(t,0,e|u)})),[2]):[4,t.queryObjectIds(r)]);case 1:return c=i.sent(),r.hiddenIds&&r.hiddenIds.length&&(c=c.filter((function(t){return-1===r.hiddenIds.indexOf(t)}))),p=c.map((function(t){return _._idMap.get(t)})),[4,this._getFilter(o,a)];case 2:for(i.sent().update(r,n),this._getBlock(0).lock(),this._idMap.forEach((function(t){if(E(t)!==e.LOCAL_ID_TYPE_AGGREGATE){var r=_._getBlock(0).getData(t,0);_._getBlock(0).setData(t,0,r&~u)}})),f=0;f<p.length;f++)null!=(d=p[f])&&(h=this._getBlock(0).getData(d,0),this._getBlock(0).setData(d,0,h|u));return this._getBlock(0).unlock(),[2]}}))}))},t.prototype._getFilter=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var o,a,n;return i.__generator(this,(function(i){switch(i.label){case 0:return l.isSome(o=this._filters[t])?[2,o]:[4,new Promise((function(t,e){Promise.all([r.e(6),r.e(8),r.e(57)]).then((function(){var e=[r("Z0JH")];t.apply(null,e)}).bind(this)).catch(e.bind(this))}))];case 1:return a=i.sent().default,n=new a({geometryType:e.geometryType,hasM:!1,hasZ:!1,timeInfo:e.timeInfo,fieldsIndex:new c(e.fields)}),this._filters[t]=n,[2,n]}}))}))},t.prototype.isVisible=function(t){return!!(2&this._getBlock(0).getData(t.localId,0))},t.prototype.getFilterFlags=function(t){for(var r=0,i=E(t.localId)===e.LOCAL_ID_TYPE_AGGREGATE?254:255,o=0;o<this._filters.length;o++){var a=this._filters[o];r|=(i&1<<o&&!l.isNone(a)&&!a.check(t)?0:1)<<o}var n=this.getFeatureId(t.localId);return r<<1|this.getHighlightFlag(n)},t.prototype._bindVVEvaluators=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var r=this;return i.__generator(this,(function(o){switch(o.label){case 0:return this._attributeComputeMap.clear(),l.isSome(t)?[4,u.all(t.map((function(t){return i.__awaiter(r,void 0,void 0,(function(){var r,o;return i.__generator(this,(function(i){switch(i.label){case 0:return r=f.Utils.getVVType(t.type),[4,this._createGetValueFunction(t,e)];case 1:return o=i.sent(),l.isSome(o)&&this._attributeComputeMap.set(r,o),[2]}}))}))})))]:[3,2];case 1:o.sent(),o.label=2;case 2:return[2]}}))}))},t.prototype._bindDDEvaluators=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var r,o,a,n=this;return i.__generator(this,(function(i){switch(i.label){case 0:return this._attributeComputeMap.clear(),t.length>f.definitions.DOT_DENSITY_MAX_FIELDS&&v.warn("mapview-invalid-value","DotDensityRenderer supports a maximum of "+f.definitions.DOT_DENSITY_MAX_FIELDS+" attribtues, but found "+t.length),[4,u.all(t.map((function(t){return n._createNormalizedFunction(t,e)})))];case 1:for(r=i.sent().map((function(t){return m(0,t)})),o=0;o<f.definitions.DOT_DENSITY_MAX_FIELDS;o++)(a=o<t.length&&r[o])?this._attributeComputeMap.set(o,a):this._attributeComputeMap.has(o)&&this._attributeComputeMap.delete(o);return[2]}}))}))},t.prototype._createGetValueFunction=function(t,e){return i.__awaiter(this,void 0,void 0,(function(){var r,o,a,n,s,l;return i.__generator(this,(function(i){switch(i.label){case 0:return"size"!==t.type?[3,2]:(r=f.getTypeOfSizeVisualVariable(t))===f.enums.WGLVVFlag.SIZE_SCALE_STOPS?[2,null]:(o=r===f.enums.WGLVVFlag.SIZE_UNIT_VALUE&&function(e){return _.getVisualVariableSizeValueRepresentationRatio(e,t.valueRepresentation)},a=m,n=[f.definitions.NAN_MAGIC_NUMBER],[4,this._createNormalizedFunction(t,e,o)]);case 1:return[2,a.apply(void 0,n.concat([i.sent()]))];case 2:return s=m,l=[f.definitions.NAN_MAGIC_NUMBER],[4,this._createNormalizedFunction(t,e)];case 3:return[2,s.apply(void 0,l.concat([i.sent()]))]}}))}))},t.prototype._createNormalizedFunction=function(t,e,r){return i.__awaiter(this,void 0,void 0,(function(){var a,n,s;return i.__generator(this,(function(i){switch(i.label){case 0:return(a=t.field)?"string"==typeof a?(n=t.normalizationField)?[2,function(t){if(t.attributes[a]&&t.attributes[n]){var e=t.attributes[a]/t.attributes[n];return r?r(e):e}}]:[2,r?function(t){return r(t.attributes[a])}:function(t){return t.attributes[a]}]:(v.error(new o("mapview-rendering:invalid-type","The field for a vv must be a string or a number, but got "+typeof a)),[2,function(){}]):t.valueExpression?(this._hasScaleExpr=this._hasScaleExpr||-1!==t.valueExpression.indexOf("scale"),[4,p.createVVExpression(t.valueExpression,e.spatialReference,e.fields)]):[3,2];case 1:return s=i.sent(),[2,d.callWithOptimizedFeature.bind(null,s)];case 2:return v.error("Unable to create a normalized function for visual variable: "+t),[2,function(){}]}}))}))},t}();e.default=g}).apply(null,i))||(t.exports=o)},xf8T:function(t,e,r){var i,o;i=[r.dj.c(t.i),e],void 0===(o=(function(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.create=function(){return[1,0,0,0,1,0,0,0,1]},e.clone=function(t){return[t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8]]},e.fromValues=function(t,e,r,i,o,a,n,s,l){return[t,e,r,i,o,a,n,s,l]},e.createView=function(t,e){return new Float64Array(t,e,9)}}).apply(null,i))||(t.exports=o)}}]);