@arcgis/core 4.28.0-next.20230708 → 4.28.0-next.20230711
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/{9e5f59a8e8f12cd9e5e0.js → 8faf88599f86ee276185.js} +1 -1
- package/assets/esri/core/workers/chunks/ddea45acae89759e57fa.js +1 -0
- package/assets/esri/core/workers/chunks/{2c2cab197c47f080772a.js → f5f0a5318337439d464e.js} +1 -1
- package/assets/esri/themes/base/widgets/_ElevationProfile.scss +0 -12
- package/assets/esri/themes/base/widgets/_Weather.scss +4 -0
- package/assets/esri/themes/dark/main.css +1 -1
- package/assets/esri/themes/light/main.css +1 -1
- package/assets/esri/themes/light/view.css +1 -1
- package/chunks/Button.js +1 -1
- package/chunks/LineSeries.js +5 -0
- package/chunks/Responsive.js +5 -0
- package/chunks/Theme.js +1 -1
- package/chunks/Tick.js +1 -1
- package/chunks/ar.js +1 -1
- package/chunks/ar2.js +1 -1
- package/chunks/bg_BG.js +1 -1
- package/chunks/bg_BG2.js +1 -1
- package/chunks/bs_BA.js +1 -1
- package/chunks/bs_BA2.js +1 -1
- package/chunks/ca_ES.js +1 -1
- package/chunks/ca_ES2.js +1 -1
- package/chunks/chartUtilsAm5.js +5 -0
- package/chunks/cs_CZ.js +1 -1
- package/chunks/cs_CZ2.js +1 -1
- package/chunks/da_DK.js +1 -1
- package/chunks/da_DK2.js +1 -1
- package/chunks/de_CH.js +1 -1
- package/chunks/de_CH2.js +1 -1
- package/chunks/de_DE.js +1 -1
- package/chunks/de_DE2.js +1 -1
- package/chunks/el_GR.js +1 -1
- package/chunks/el_GR2.js +1 -1
- package/chunks/en_CA.js +1 -1
- package/chunks/en_CA2.js +1 -1
- package/chunks/en_US.js +1 -1
- package/chunks/en_US2.js +1 -1
- package/chunks/es_ES.js +1 -1
- package/chunks/es_ES2.js +1 -1
- package/chunks/et_EE.js +1 -1
- package/chunks/et_EE2.js +1 -1
- package/chunks/fi_FI.js +1 -1
- package/chunks/fi_FI2.js +1 -1
- package/chunks/fr_FR.js +1 -1
- package/chunks/fr_FR2.js +1 -1
- package/chunks/he_IL.js +1 -1
- package/chunks/he_IL2.js +1 -1
- package/chunks/hr_HR.js +1 -1
- package/chunks/hr_HR2.js +1 -1
- package/chunks/hu_HU.js +1 -1
- package/chunks/hu_HU2.js +1 -1
- package/chunks/id_ID.js +1 -1
- package/chunks/id_ID2.js +1 -1
- package/chunks/it_IT.js +1 -1
- package/chunks/it_IT2.js +1 -1
- package/chunks/ja_JP.js +1 -1
- package/chunks/ja_JP2.js +1 -1
- package/chunks/ko_KR.js +1 -1
- package/chunks/ko_KR2.js +1 -1
- package/chunks/lt_LT.js +1 -1
- package/chunks/lt_LT2.js +1 -1
- package/chunks/lv_LV.js +1 -1
- package/chunks/lv_LV2.js +1 -1
- package/chunks/nb_NO.js +1 -1
- package/chunks/nb_NO2.js +1 -1
- package/chunks/nl_NL.js +1 -1
- package/chunks/nl_NL2.js +1 -1
- package/chunks/pl_PL.js +1 -1
- package/chunks/pl_PL2.js +1 -1
- package/chunks/pt_BR.js +1 -1
- package/chunks/pt_BR2.js +1 -1
- package/chunks/pt_PT.js +1 -1
- package/chunks/pt_PT2.js +1 -1
- package/chunks/ro_RO.js +1 -1
- package/chunks/ro_RO2.js +1 -1
- package/chunks/ru_RU.js +1 -1
- package/chunks/ru_RU2.js +1 -1
- package/chunks/sk_SK.js +1 -1
- package/chunks/sk_SK2.js +1 -1
- package/chunks/sl_SL.js +1 -1
- package/chunks/sl_SL2.js +1 -1
- package/chunks/sr_RS.js +1 -1
- package/chunks/sr_RS2.js +1 -1
- package/chunks/sv_SE.js +1 -1
- package/chunks/sv_SE2.js +1 -1
- package/chunks/th_TH.js +1 -1
- package/chunks/th_TH2.js +1 -1
- package/chunks/tr_TR.js +1 -1
- package/chunks/tr_TR2.js +1 -1
- package/chunks/uk_UA.js +1 -1
- package/chunks/uk_UA2.js +1 -1
- package/chunks/vi_VN.js +1 -1
- package/chunks/vi_VN2.js +1 -1
- package/chunks/zh_Hans.js +1 -1
- package/chunks/zh_Hans2.js +1 -1
- package/chunks/zh_Hant.js +1 -1
- package/chunks/zh_Hant2.js +1 -1
- package/interfaces.d.ts +12 -0
- package/layers/graphics/sources/FeatureLayerSource.js +1 -1
- package/layers/knowledgeGraph/SessionMemoryStorage.js +1 -1
- package/networks/Network.js +1 -1
- package/networks/UtilityNetwork.js +1 -1
- package/package.json +1 -1
- package/rest/networks/queryAssociations.js +1 -1
- package/rest/networks/queryNamedTraceConfigurations.js +1 -1
- package/rest/networks/support/QueryAssociationsParameters.js +1 -1
- package/rest/networks/support/QueryNamedTraceConfigurationsParameters.js +1 -1
- package/rest/networks/support/SynthesizeAssociationGeometriesParameters.js +1 -1
- package/rest/networks/synthesizeAssociationGeometries.js +1 -1
- package/rest/support/meshFeatureSet.js +1 -1
- package/support/revision.js +1 -1
- package/views/2d/engine/webgl/Painter.js +1 -1
- package/views/3d/environment/CloudsData.js +1 -1
- package/views/3d/environment/CloudsGenerator.js +1 -1
- package/views/3d/environment/CloudsParameters.js +5 -0
- package/views/3d/environment/EnvironmentRenderer.js +1 -1
- package/views/3d/environment/Precipitation.js +1 -1
- package/views/3d/environment/weather.js +1 -1
- package/views/3d/webgl-engine/core/shaderLibrary/util/CloudsParallaxShading.glsl.js +9 -9
- package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
- package/widgets/Editor/Edits.js +1 -1
- package/widgets/Editor/UpdateRecordWorkflow.js +1 -1
- package/widgets/Editor.js +1 -1
- package/widgets/ElevationProfile/components/LegendItem.js +1 -1
- package/widgets/ElevationProfile/css.js +1 -1
- package/widgets/ElevationProfile/support/chartUtils.js +1 -1
- package/widgets/ElevationProfile.js +1 -1
- package/widgets/Feature/FeatureMedia/chartCommon.js +1 -1
- package/widgets/Feature/FeatureMedia/pieChart.js +1 -1
- package/widgets/Feature/FeatureMedia/xyChart.js +1 -1
- package/widgets/Feature/FeatureMedia.js +1 -1
- package/widgets/FeatureForm/FeatureFormViewModel.js +1 -1
- package/widgets/Weather/WeatherViewModel.js +1 -1
- package/widgets/Weather/css.js +1 -1
- package/widgets/Weather.js +1 -1
- package/widgets/support/chartUtils.js +1 -1
- package/widgets/support/chartUtilsAm5.js +1 -1
- package/assets/esri/core/workers/chunks/0f57b8d4fa3afb296392.js +0 -1
- package/views/3d/environment/CloudsCompositionParameters.js +0 -5
- package/views/3d/environment/weatherUtils.js +0 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[448],{95401:(t,e,n)=>{n.d(e,{e:()=>l});var r,i,o,s=n(5732),a={exports:{}};r=a,i=function(){function t(t,n,i){i=i||2;var o,s,a,c,u,h,f,p=n&&n.length,g=p?n[0]*i:t.length,d=e(t,0,g,i,!0),m=[];if(!d||d.next===d.prev)return m;if(p&&(d=l(t,n,d,i)),t.length>80*i){o=a=t[0],s=c=t[1];for(var y=i;y<g;y+=i)(u=t[y])<o&&(o=u),(h=t[y+1])<s&&(s=h),u>a&&(a=u),h>c&&(c=h);f=0!==(f=Math.max(a-o,c-s))?1/f:0}return r(d,m,i,o,s,f),m}function e(t,e,n,r,i){var o,s;if(i===I(t,e,n,r)>0)for(o=e;o<n;o+=r)s=M(o,t[o],t[o+1],s);else for(o=n-r;o>=e;o-=r)s=M(o,t[o],t[o+1],s);if(s&&v(s,s.next)){var a=s.next;S(s),s=a}return s}function n(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==x(r.prev,r,r.next))r=r.next;else{var i=r.prev;if(S(r),(r=e=i)===r.next)break;n=!0}}while(n||r!==e);return e}function r(t,e,l,c,u,h,f){if(t){!f&&h&&p(t,c,u,h);for(var g,d,m=t;t.prev!==t.next;)if(g=t.prev,d=t.next,h?o(t,c,u,h):i(t))e.push(g.i/l),e.push(t.i/l),e.push(d.i/l),S(t),t=d.next,m=d.next;else if((t=d)===m){f?1===f?r(t=s(n(t),e,l),e,l,c,u,h,2):2===f&&a(t,e,l,c,u,h):r(n(t),e,l,c,u,h,1);break}}}function i(t){var e=t.prev,n=t,r=t.next;if(x(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&x(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(t,e,n,r){var i=t.prev,o=t,s=t.next;if(x(i,o,s)>=0)return!1;for(var a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,c=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,u=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=g(a,l,e,n,r),f=g(c,u,e,n,r),p=t.prevZ,d=t.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&x(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&x(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(t,e,r){var i=t;do{var o=i.prev,s=i.next.next;!v(o,s)&&b(o,i,i.next,s)&&T(o,s)&&T(s,o)&&(e.push(o.i/r),e.push(i.i/r),e.push(s.i/r),S(i),S(i.next),i=t=s),i=i.next}while(i!==t);return n(i)}function a(t,e,i,o,s,a){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&y(l,c)){var u=_(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,e,i,o,s,a),void r(u,e,i,o,s,a)}c=c.next}l=l.next}while(l!==t)}function l(t,r,i,o){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=e(t,r[s]*o,s<a-1?r[s+1]*o:t.length,o,!1))===l.next&&(l.steiner=!0),u.push(d(l));for(u.sort(c),s=0;s<u.length;s++)i=n(i=h(u[s],i),i.next);return i}function c(t,e){return t.x-e.x}function u(t){if(t.next.prev===t)return t;let e=t;for(;;){const n=e.next;if(n.prev===e||n===e||n===t)break;e=n}return e}function h(t,e){var r=function(t,e){var n,r=e,i=t.x,o=t.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>s){if(s=a,a===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===s)return n;var l,c=n,u=n.x,h=n.y,p=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&m(o<h?i:s,o,u,h,o<h?s:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),T(r,t)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&f(n,r)))&&(n=r,p=l)),r=r.next}while(r!==c);return n}(t,e);if(!r)return e;var i=_(r,t),o=n(r,r.next);let s=u(i);return n(s,s.next),o=u(o),u(e===r?o:e)}function f(t,e){return x(t.prev,t,e.prev)<0&&x(e.next,t,t.next)<0}function p(t,e,n,r){var i=t;do{null===i.z&&(i.z=g(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,s,a,l,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,r=n,a=0,e=0;e<c&&(a++,r=r.nextZ);e++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}function g(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function m(t,e,n,r,i,o,s,a){return(i-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(r-a)-(n-s)*(e-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(x(t.prev,t,e.prev)||x(t,e.prev,e))||v(t,e)&&x(t.prev,t,t.next)>0&&x(e.prev,e,e.next)>0)}function x(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){var i=A(x(t,e,n)),o=A(x(t,e,r)),s=A(x(n,r,t)),a=A(x(n,r,e));return i!==o&&s!==a||!(0!==i||!w(t,n,e))||!(0!==o||!w(t,r,e))||!(0!==s||!w(n,t,r))||!(0!==a||!w(n,e,r))}function w(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function A(t){return t>0?1:t<0?-1:0}function T(t,e){return x(t.prev,t,t.next)<0?x(t,e,t.next)>=0&&x(t,t.prev,e)>=0:x(t,e,t.prev)<0||x(t,t.next,e)<0}function _(t,e){var n=new O(t.i,t.x,t.y),r=new O(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function M(t,e,n,r){var i=new O(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function O(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(t,e,n,r){for(var i=0,o=e,s=n-r;o<n;o+=r)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}return t.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,s=Math.abs(I(t,0,o,n));if(i)for(var a=0,l=e.length;a<l;a++){var c=e[a]*n,u=a<l-1?e[a+1]*n:t.length;s-=Math.abs(I(t,c,u,n))}var h=0;for(a=0;a<r.length;a+=3){var f=r[a]*n,p=r[a+1]*n,g=r[a+2]*n;h+=Math.abs((t[f]-t[g])*(t[p+1]-t[f+1])-(t[f]-t[p])*(t[g+1]-t[f+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},t.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[i][o][s]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n},t},void 0!==(o=i())&&(r.exports=o);const l=(0,s.g)(a.exports)},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(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]]}function o(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>s,a:()=>o,b:()=>i,c:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,createView:o,fromValues:function(t,e,n,r,i,o,s,a,l,c,u,h,f,p,g,d){return[t,e,n,r,i,o,s,a,l,c,u,h,f,p,g,d]}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3]]}function o(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>s,a:()=>r,b:()=>i,c:()=>o});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,createView:o,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},8310:(t,e,n)=>{n.d(e,{a:()=>y,c:()=>d,g:()=>x,h:()=>m,j:()=>w,l:()=>I}),n(80442);var r=n(92604),i=n(22021),o=n(52138),s=n(17896),a=n(65617),l=n(98766),c=n(88669),u=n(62155),h=n(78341),f=n(61277),p=n(12981);const g=d();function d(){return(0,c.c)()}function m(t,e=d()){return(0,l.c)(e,t)}function y(t){return t[3]}function x(t){return t}function v(t,e,n){if(null==e)return!1;const{origin:r,direction:i}=e,o=b;o[0]=r[0]-t[0],o[1]=r[1]-t[1],o[2]=r[2]-t[2];const s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===s)return!1;const a=2*(i[0]*o[0]+i[1]*o[1]+i[2]*o[2]),l=a*a-4*s*(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]-t[3]*t[3]);if(l<0)return!1;const c=Math.sqrt(l);let u=(-a-c)/(2*s);const h=(-a+c)/(2*s);return(u<0||h<u&&h>0)&&(u=h),!(u<0||(n&&(n[0]=r[0]+i[0]*u,n[1]=r[1]+i[1]*u,n[2]=r[2]+i[2]*u),0))}const b=(0,a.c)();function w(t,e){return v(t,e,null)}function A(t,e,n){const r=p.WM.get(),i=p.MP.get();(0,s.f)(r,e.origin,e.direction);const a=y(t);(0,s.f)(n,r,e.origin),(0,s.g)(n,n,1/(0,s.l)(n)*a);const l=_(t,e.origin),c=(0,f.EU)(e.origin,n);return(0,o.d)(i,c+l,r),(0,s.m)(n,n,i),n}function T(t,e,n){const r=(0,s.b)(p.WM.get(),e,t),i=(0,s.g)(p.WM.get(),r,t[3]/(0,s.l)(r));return(0,s.a)(n,i,t)}function _(t,e){const n=(0,s.b)(p.WM.get(),e,t),r=(0,s.l)(n),o=y(t),a=o+Math.abs(o-r);return(0,i.ZF)(o/a)}const M=(0,a.c)();function S(t,e,n,r){const o=(0,s.b)(M,e,t);switch(n){case u.R.X:{const t=(0,i.jE)(o,M)[2];return(0,s.s)(r,-Math.sin(t),Math.cos(t),0)}case u.R.Y:{const t=(0,i.jE)(o,M),e=t[1],n=t[2],a=Math.sin(e);return(0,s.s)(r,-a*Math.cos(n),-a*Math.sin(n),Math.cos(e))}case u.R.Z:return(0,s.n)(r,o);default:return}}function O(t,e){const n=(0,s.b)(C,e,t);return(0,s.l)(n)-t[3]}function I(t,e){const n=(0,s.d)(t,e),r=y(t);return n<=r*r}const C=(0,a.c)(),E=d();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:g,altitudeAt:O,angleToSilhouette:_,axisAt:S,clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return v(t,e,n)?n:((0,h.JI)(e,t,n),T(t,n,n))},closestPointOnSilhouette:A,containsPoint:I,copy:m,create:d,distanceToSilhouette:function(t,e){const n=(0,s.b)(p.WM.get(),e,t),r=(0,s.p)(n),i=t[3]*t[3];return Math.sqrt(Math.abs(r-i))},elevate:function(t,e,n){return t!==n&&(0,s.c)(n,t),n[3]=t[3]+e,n},fromCenterAndRadius:function(t,e){return(0,c.f)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:function(t,e,n,r){return(0,c.f)(t,e,n,r)},getCenter:x,getRadius:y,intersectRay:v,intersectRayClosestSilhouette:function(t,e,n){if(v(t,e,n))return n;const r=A(t,e,p.WM.get());return(0,s.a)(n,e.origin,(0,s.g)(p.WM.get(),e.direction,(0,s.i)(e.origin,r)/(0,s.l)(e.direction))),n},intersectsRay:w,projectPoint:T,setAltitudeAt:function(t,e,n,r){const i=O(t,e),o=S(t,e,u.R.Z,C),a=(0,s.g)(C,o,n-i);return(0,s.a)(r,e,a)},setExtent:function(t,e,n){return r.Z.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),t===n?n:m(t,n)},tmpSphere:E,union:function(t,e,n=d()){const r=(0,s.i)(t,e),i=t[3],o=e[3];return r+o<i?((0,l.c)(n,t),n):r+i<o?((0,l.c)(n,e),n):((0,s.h)(n,t,e,(r+o-i)/(2*r)),n[3]=(r+i+o)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))},20773:(t,e,n)=>{n.d(e,{a:()=>a,b:()=>s,c:()=>i,d:()=>u,e:()=>l,n:()=>h,s:()=>c,t:()=>o});var r=n(72220);function i(t,e,n){o(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function o(t,e,n,i=3,o=i){if(t.length/i!==Math.ceil(e.length/o))return r.c.error("source and destination buffers need to have the same number of elements"),t;const s=t.length/i,a=n[0],l=n[1],c=n[2],u=n[4],h=n[5],f=n[6],p=n[8],g=n[9],d=n[10],m=n[12],y=n[13],x=n[14];let v=0,b=0;for(let n=0;n<s;n++){const n=e[v],r=e[v+1],s=e[v+2];t[b]=a*n+u*r+p*s+m,t[b+1]=l*n+h*r+g*s+y,t[b+2]=c*n+f*r+d*s+x,v+=o,b+=i}return t}function s(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,i=3,o=i){if(t.length/i!==Math.ceil(e.length/o))return void r.c.error("source and destination buffers need to have the same number of elements");const s=t.length/i,a=n[0],l=n[1],c=n[2],u=n[3],h=n[4],f=n[5],p=n[6],g=n[7],d=n[8];let m=0,y=0;for(let n=0;n<s;n++){const n=e[m],r=e[m+1],s=e[m+2];t[y]=a*n+u*r+p*s,t[y+1]=l*n+h*r+g*s,t[y+2]=c*n+f*r+d*s,m+=o,y+=i}}function l(t,e,n){c(t.typedBuffer,e,n,t.typedBufferStride)}function c(t,e,n,r=3){const i=Math.min(t.length/r,e.count),o=e.typedBuffer,s=e.typedBufferStride;let a=0,l=0;for(let e=0;e<i;e++)t[l]=n*o[a],t[l+1]=n*o[a+1],t[l+2]=n*o[a+2],a+=s,l+=r}function u(t,e){h(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function h(t,e,n=3,r=n){const i=Math.min(t.length/n,e.length/r);let o=0,s=0;for(let a=0;a<i;a++){const i=e[o],a=e[o+1],l=e[o+2],c=i*i+a*a+l*l;if(c>0){const e=1/Math.sqrt(c);t[s]=e*i,t[s+1]=e*a,t[s+2]=e*l}o+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:h,normalizeView:u,scale:c,scaleView:l,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),i=t.typedBuffer,o=t.typedBufferStride,s=e.typedBuffer,a=e.typedBufferStride;let l=0,c=0;for(let t=0;t<r;t++)i[c]=s[l]>>n,i[c+1]=s[l+1]>>n,i[c+2]=s[l+2]>>n,l+=a,c+=o},transformMat3:a,transformMat3View:s,transformMat4:o,transformMat4View:i},Symbol.toStringTag,{value:"Module"}))},91303:(t,e,n)=>{var r;n.d(e,{Y:()=>r}),function(t){t[t.KILOBYTES=1024]="KILOBYTES",t[t.MEGABYTES=1048576]="MEGABYTES",t[t.GIGABYTES=1073741824]="GIGABYTES"}(r||(r={}))},22807:(t,e,n)=>{n.d(e,{x:()=>i});var r=n(41213);class i{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.Y)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,o));t++)this._items.push(this._allocator())}}const o=1024},83025:(t,e,n)=>{n.d(e,{JK:()=>a,QZ:()=>o,Rq:()=>s,bg:()=>i,mB:()=>l});var r=n(1533);function i(t,e=!1){return t<=r.DB?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function o(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.DB?Array.from(t):new Float64Array(t)}function s(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function a(t,e){for(let n=0;n<e.length;++n)t[n]=e[n];return t}function l(t){return Array.isArray(t)?new Float64Array(t):t}},24882:(t,e,n)=>{n.d(e,{$z:()=>s,KF:()=>u,mi:()=>i});var r=n(1533);function i(t){return(0,r.kJ)(t)?t.length<r.DB?t:o(t):t.length<r.DB?Array.from(t):t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:o(t)}function o(t){let e=!0;for(const n of t){if(n>=65536)return(0,r.kJ)(t)?new Uint32Array(t):t;n>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}function s(t){return t<=r.DB?new Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}let a=(()=>{const t=new Uint32Array(131072);for(let e=0;e<t.length;++e)t[e]=e;return t})();const l=[0],c=(()=>{const t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function u(t){if(1===t)return l;if(t<r.DB)return Array.from(new Uint16Array(c.buffer,0,t));if(t<c.length)return new Uint16Array(c.buffer,0,t);if(t>a.length){const e=Math.max(2*a.length,t);a=new Uint32Array(e);for(let t=0;t<a.length;t++)a[t]=t}return new Uint32Array(a.buffer,0,t)}new Uint8Array(65536)},62540:(t,e,n)=>{n.d(e,{Z:()=>x});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),h=n(75215),f=n(65542),p=n(60746),g=n(71630);const d="esri.geometry.support.MeshComponent",m=a.Z.getLogger(d);let y=r=class extends o.wq{static from(t){return(0,h.TJ)(r,t)}constructor(t){super(t),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(t){return(0,g.X)(t,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},m)}castMaterial(t){return(0,h.TJ)(t&&"object"==typeof t&&("metallic"in t||"roughness"in t||"metallicRoughnessTexture"in t)?p.Z:f.Z,t)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(t,e){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(t,e):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}get memoryUsage(){let t=0;return null!=this.faces&&(t+=this.faces.byteLength),null!=this.material&&(t+=this.material.memoryUsage),t}};(0,i._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"faces",void 0),(0,i._)([(0,c.p)("faces")],y.prototype,"castFaces",null),(0,i._)([(0,l.Cb)({type:f.Z,json:{write:!0}})],y.prototype,"material",void 0),(0,i._)([(0,c.p)("material")],y.prototype,"castMaterial",null),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"shading",void 0),(0,i._)([(0,l.Cb)({type:Boolean})],y.prototype,"trustSourceNormals",void 0),y=r=(0,i._)([(0,u.j)(d)],y);const x=y},85872:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new u.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFromPoint({x:t,y:e,z:n}){this.origin=(0,c.f)(t,e,n??0)}};(0,r._)([(0,a.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],h);const f=h},50567:(t,e,n)=>{n.d(e,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),a=n(52011);let l=class extends((0,i.J)(o.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,s.J)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const c=l},84555:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new u.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFromPoint({x:t,y:e,z:n}){this.origin=(0,c.f)(t,e,n??0)}};(0,r._)([(0,a.J)({local:"local"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],h);const f=h},65542:(t,e,n)=>{n.d(e,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(85965),u=n(80218);let h=r=class extends s.wq{constructor(t){super(t),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=null!=t?t.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(e));return null!=t&&t.set(this,i),i}clonePropertiesWithDeduplication(t){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(t),normalTexture:this.normalTexture?.cloneWithDeduplication(t),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let t=0;return t+=null!=this.color?16:0,null!=this.colorTexture&&(t+=this.colorTexture.memoryUsage),t+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(t+=this.normalTexture.memoryUsage),t+=null!=this.normalTextureTransform?20:0,t}};(0,i._)([(0,a.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"color",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"colorTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"normalTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=r=(0,i._)([(0,l.j)("esri.geometry.support.MeshMaterial")],h);const f=h},60746:(t,e,n)=>{n.d(e,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(85965),u=n(80218);let h=r=class extends l.Z{constructor(t){super(t),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=null!=t?t.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(e));return null!=t&&t.set(this,i),i}getMemoryUsage(){let t=super.getMemoryUsage();return t+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(t+=this.emissiveTexture.memoryUsage),t+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(t+=this.occlusionTexture.memoryUsage),t+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(t+=this.metallicRoughnessTexture.memoryUsage),t+=null!=this.metallicRoughnessTextureTransform?20:0,t}clonePropertiesWithDeduplication(t){return{...super.clonePropertiesWithDeduplication(t),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(t),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(t),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(t),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,i._)([(0,s.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"emissiveColor",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"emissiveTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"emissiveTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"occlusionTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"occlusionTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"metallic",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"roughness",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTextureTransform",void 0),h=r=(0,i._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],h);const f=h},85965:(t,e,n)=>{n.d(e,{Z:()=>m});var r,i=n(43697),o=(n(80442),n(79790)),s=n(96674),a=n(5600),l=n(75215),c=(n(67676),n(71715)),u=n(52011),h=n(30556),f=n(25929);const p=new WeakMap;let g=0,d=r=class extends s.wq{constructor(t){super(t),this.wrap="repeat"}get url(){return this._get("url")||null}set url(t){this._set("url",t),t&&this._set("data",null)}get data(){return this._get("data")||null}set data(t){this._set("data",t),t&&this._set("url",null)}writeData(t,e,n,r){if(t instanceof HTMLImageElement){const i={type:"image-element",src:(0,f.t)(t.src,r),crossOrigin:t.crossOrigin};e[n]=i}else if(t instanceof HTMLCanvasElement){const r=t.getContext("2d").getImageData(0,0,t.width,t.height),i={type:"canvas-element",imageData:this._encodeImageData(r)};e[n]=i}else if(t instanceof HTMLVideoElement){const i={type:"video-element",src:(0,f.t)(t.src,r),autoplay:t.autoplay,loop:t.loop,muted:t.muted,crossOrigin:t.crossOrigin,preload:t.preload};e[n]=i}else if(t instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(t)};e[n]=r}}readData(t){switch(t.type){case"image-element":{const e=new Image;return e.src=t.src,e.crossOrigin=t.crossOrigin,e}case"canvas-element":{const e=this._decodeImageData(t.imageData),n=document.createElement("canvas");return n.width=e.width,n.height=e.height,n.getContext("2d").putImageData(e,0,0),n}case"image-data":return this._decodeImageData(t.imageData);case"video-element":{const e=document.createElement("video");return e.src=t.src,e.crossOrigin=t.crossOrigin,e.autoplay=t.autoplay,e.loop=t.loop,e.muted=t.muted,e.preload=t.preload,e}default:return}}get transparent(){const t=this.data,e=this.url;if(t instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(t.getContext("2d").getImageData(0,0,t.width,t.height));if(t instanceof ImageData)return this._imageDataContainsTransparent(t);if(e){const t=e.substr(e.length-4,4).toLowerCase(),n=e.substr(0,15).toLocaleLowerCase();if(".png"===t||"data:image/png;"===n)return!0}return!1}set transparent(t){this._overrideIfSome("transparent",t)}get contentHash(){const t="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",e=(e="")=>`d:${e},t:${this.transparent},w:${t}`;return null!=this.url?e(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?e(this.data.src):(p.has(this.data)||p.set(this.data,++g),e(p.get(this.data))):e()}get memoryUsage(){let t=0;if(t+=null!=this.url?this.url.length:0,null!=this.data){const e=this.data;"data"in e?t+=e.data.byteLength:e instanceof HTMLImageElement?t+=e.naturalWidth*e.naturalHeight*3:e instanceof HTMLCanvasElement&&(t+=e.width*e.height*3)}return t}clone(){const t={url:this.url,data:this.data,wrap:this._cloneWrap()};return new r(t)}cloneWithDeduplication(t){const e=t.get(this);if(e)return e;const n=this.clone();return t.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(t){let e="";for(let n=0;n<t.data.length;n++)e+=String.fromCharCode(t.data[n]);return{data:btoa(e),width:t.width,height:t.height}}_decodeImageData(t){const e=atob(t.data),n=new Uint8ClampedArray(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return(0,o.Jl)(n,t.width,t.height)}_imageDataContainsTransparent(t){for(let e=3;e<t.data.length;e+=4)if(255!==t.data[e])return!0;return!1}static from(t){return"string"==typeof t?new r({url:t}):t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageData||t instanceof HTMLVideoElement?new r({data:t}):(0,l.TJ)(r,t)}};(0,i._)([(0,a.Cb)({type:String,json:{write:f.w}})],d.prototype,"url",null),(0,i._)([(0,a.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,a.Cb)()],d.prototype,"data",null),(0,i._)([(0,h.c)("data")],d.prototype,"writeData",null),(0,i._)([(0,c.r)("data")],d.prototype,"readData",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],d.prototype,"transparent",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"wrap",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],d.prototype,"contentHash",null),d=r=(0,i._)([(0,u.j)("esri.geometry.support.MeshTexture")],d);const m=d},80218:(t,e,n)=>{n.d(e,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,i.J)(o.wq)){constructor(t){super(t),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(t,e,n)=>{n.d(e,{Q:()=>p,X:()=>d});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const h="esri.geometry.support.MeshVertexAttributes",f=a.Z.getLogger(h);let p=r=class extends o.wq{constructor(t){super(t),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(t){return d(t,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},f)}castPosition(t){return t&&t instanceof Float32Array&&f.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),d(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},f)}castUv(t){return d(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},f)}castNormal(t){return d(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},f)}castTangent(t){return d(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},f)}clone(){const t={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(t)}clonePositional(){const t={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(t)}get memoryUsage(){let t=0;return t+=this.position.byteLength,null!=this.uv&&(t+=this.uv.byteLength),null!=this.normal&&(t+=this.normal.byteLength),null!=this.tangent&&(t+=this.tangent.byteLength),null!=this.color&&(t+=this.color.byteLength),t}};function g(t,e,n,r){const{loggerTag:i,stride:o}=e;return t.length%o!=0?(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([])):t}function d(t,e,n,r,i){if(!t)return t;if(t instanceof e)return g(t,r,e,i);for(const o of n)if(t instanceof o)return g(new e(t),r,e,i);if(Array.isArray(t))return g(new e(t),r,e,i);{const r=n.map((t=>`'${t.name}'`));return i.error(`Failed to set property, expected one of ${r}, but got ${t.constructor.name}`),new e([])}}function m(t,e,n){e[n]=function(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=t[n];return e}(t)}(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"color",void 0),(0,i._)([(0,c.p)("color")],p.prototype,"castColor",null),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:m}})],p.prototype,"position",void 0),(0,i._)([(0,c.p)("position")],p.prototype,"castPosition",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"uv",void 0),(0,i._)([(0,c.p)("uv")],p.prototype,"castUv",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"normal",void 0),(0,i._)([(0,c.p)("normal")],p.prototype,"castNormal",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"tangent",void 0),(0,i._)([(0,c.p)("tangent")],p.prototype,"castTangent",null),p=r=(0,i._)([(0,u.j)(h)],p)},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},16996:(t,e,n)=>{n.d(e,{Ue:()=>l,nF:()=>u,zk:()=>c});var r=n(22021),i=n(22807),o=n(17896),s=n(65617),a=n(12981);function l(t){return t?{origin:(0,s.a)(t.origin),vector:(0,s.a)(t.vector)}:{origin:(0,s.c)(),vector:(0,s.c)()}}function c(t,e,n=l()){return(0,o.c)(n.origin,t),(0,o.b)(n.vector,e,t),n}function u(t,e,n){return function(t,e,n,i,s){const{vector:l,origin:c}=t,u=(0,o.b)(a.WM.get(),e,c),h=(0,o.e)(l,u)/(0,o.p)(l);return(0,o.g)(s,l,(0,r.uZ)(h,0,1)),(0,o.a)(s,s,t.origin)}(t,e,0,0,n)}(0,s.c)(),(0,s.c)(),new i.x((()=>l()))},84470:(t,e,n)=>{n.d(e,{CP:()=>a,JG:()=>g,LL:()=>l,NZ:()=>c,fV:()=>d,vj:()=>y,yT:()=>v,zE:()=>x});var r=n(3172),i=n(67676),o=n(95330),s=n(2981);class a{constructor(t,e,n){this.assetName=t,this.assetMimeType=e,this.parts=n}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,i.fS)(this.parts,t.parts,((t,e)=>t.equals(e)))}isOnService(t){return this.parts.every((e=>e.isOnService(t)))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const n=await Promise.all(e.map((e=>e.toBlob(t))));return(0,o.k_)(t),new Blob(n)}}class l{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,r.default)(this.partUrl,{responseType:"blob"});return(0,o.k_)(t),e}}function c(t){return function(t){return!!t&&(Array.isArray(t)?t.some(p):p(t))}(t?.source)}function u(t){return!!Array.isArray(t)&&t.every((t=>t instanceof a))}const h=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(t){if(t instanceof File){const{type:e,name:n}=t;return h.test(e)||f.test(n)}return h.test(t.assetMimeType)||f.test(t.assetName)}function g(t,e){if(!t)return!1;const{source:n}=t;return function(t,e){return Array.isArray(t)?t.every((t=>m(t,e))):m(t,e)}(n,e)}function d(t,e){if(t===e)return!0;const{source:n}=t,{source:r}=e;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...n].sort(t),i=[...r].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(i[t]))return!1;return!0}return!1}function m(t,e){return t instanceof a&&t.isOnService(e)}function y(t,e){return t instanceof File?(0,s.Ow)(t.name,e)??(0,s.S0)(t.type,e):(0,s.S0)(t.assetMimeType,e)??(0,s.Ow)(t.assetName,e)}function x(t){return Array.isArray(t)?t:[t]}function v(t){return!!t.original}},47545:(t,e,n)=>{n.d(e,{d:()=>o});var r=n(22021),i=n(24882);function o(t,e,n){const o=Array.isArray(t),u=o?t.length/e:t.byteLength/(4*e),h=o?t:new Uint32Array(t,0,u*e),f=n?.minReduction??0,p=n?.originalIndices||null,g=p?p.length:0,d=n?.componentOffsets||null;let m=0;if(d)for(let t=0;t<d.length-1;t++){const e=d[t+1]-d[t];e>m&&(m=e)}else m=u;const y=Math.floor(1.1*m)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,r.Sf)(2*y)));for(let t=0;t<2*y;t++)c[t]=0;let x=0;const v=!!d&&!!p,b=v?g:u;let w=(0,i.$z)(u);const A=new Uint32Array(g),T=1.96;let _=0!==f?Math.ceil(4*T*T/(f*f)*f*(1-f)):b,M=1,S=d?d[1]:b;for(let t=0;t<b;t++){if(t===_){const e=1-x/t;if(e+T*Math.sqrt(e*(1-e)/t)<f)return null;_*=2}if(t===S){for(let t=0;t<2*y;t++)c[t]=0;if(p)for(let t=d[M-1];t<d[M];t++)A[t]=w[p[t]];S=d[++M]}const n=v?p[t]:t,r=n*e,i=l(h,r,e);let o=i%y,a=x;for(;0!==c[2*o+1];){if(c[2*o]===i){const t=c[2*o+1]-1;if(s(h,r,t*e,e)){a=w[t];break}}o++,o>=y&&(o-=y)}a===x&&(c[2*o]=i,c[2*o+1]=n+1,x++),w[n]=a}if(0!==f&&1-x/u<f)return null;if(v){for(let t=d[M-1];t<A.length;t++)A[t]=w[p[t]];w=(0,i.mi)(A)}const O=o?new Array(x):new Uint32Array(x*e);x=0;for(let t=0;t<b;t++)w[t]===x&&(a(h,(v?p[t]:t)*e,O,x*e,e),x++);if(p&&!v){const t=new Uint32Array(g);for(let e=0;e<t.length;e++)t[e]=w[p[e]];w=(0,i.mi)(t)}return{buffer:Array.isArray(O)?O:O.buffer,indices:w,uniqueCount:x}}function s(t,e,n,r){for(let i=0;i<r;i++)if(t[e+i]!==t[n+i])return!1;return!0}function a(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[e+o]}function l(t,e,n){let r=0;for(let i=0;i<n;i++)r=t[e+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},62073:(t,e,n)=>{n.d(e,{Ue:()=>o,zu:()=>s,mJ:()=>p}),n(22021);var r=n(17896),i=n(65617);function o(t=g){return[t[0],t[1],t[2],t[3]]}function s(t,e,n,i=0,p=Math.floor(n*(1/3)),g=Math.floor(n*(2/3))){if(n<3)return!1;e(l,i);let d=p,m=!1;for(;d<n-1&&!m;)e(c,d),d++,m=!(0,r.k)(l,c);if(!m)return!1;for(d=Math.max(d,g),m=!1;d<n&&!m;)e(u,d),d++,(0,r.b)(h,l,c),(0,r.n)(h,h),(0,r.b)(f,c,u),(0,r.n)(f,f),m=!(0,r.k)(l,u)&&!(0,r.k)(c,u)&&Math.abs((0,r.e)(h,f))<a;return m?(function(t,e,n,r=o()){const i=n[0]-e[0],s=n[1]-e[1],a=n[2]-e[2],l=t[0]-e[0],c=t[1]-e[1],u=t[2]-e[2],h=s*u-a*c,f=a*l-i*u,p=i*c-s*l,g=h*h+f*f+p*p,d=Math.abs(g-1)>1e-5&&g>1e-12?1/Math.sqrt(g):1;r[0]=h*d,r[1]=f*d,r[2]=p*d,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2])}(l,c,u,t),!0):(0!==i||1!==p||2!==g)&&s(t,e,n,0,1,2)}n(8310),n(61277),n(12981),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)();const a=.99619469809,l=(0,i.c)(),c=(0,i.c)(),u=(0,i.c)(),h=(0,i.c)(),f=(0,i.c)();function p(t){return t}const g=[0,0,1,0];var d,m;(m=d||(d={}))[m.NONE=0]="NONE",m[m.CLAMP=1]="CLAMP",m[m.INFINITE_MIN=4]="INFINITE_MIN",m[m.INFINITE_MAX=8]="INFINITE_MAX",d.INFINITE_MIN,d.INFINITE_MAX,d.INFINITE_MAX},78341:(t,e,n)=>{n.d(e,{JI:()=>c,Ue:()=>s,re:()=>l}),n(67676);var r=n(22807),i=n(17896),o=n(65617);function s(t){return t?a((0,o.a)(t.origin),(0,o.a)(t.direction)):a((0,o.c)(),(0,o.c)())}function a(t,e){return{origin:t,direction:e}}function l(t,e){const n=u.get();return n.origin=t,n.direction=e,n}function c(t,e,n){const r=(0,i.e)(t.direction,(0,i.b)(n,e,t.origin));return(0,i.a)(n,t.origin,(0,i.g)(n,t.direction,r)),n}n(12981);const u=new r.x((()=>s()))},61277:(t,e,n)=>{n.d(e,{EU:()=>s});var r=n(22021),i=n(17896),o=n(65617);function s(t,e){const n=(0,i.e)(t,e)/((0,i.l)(t)*(0,i.l)(e));return-(0,r.ZF)(n)}(0,o.c)(),(0,o.c)()},12981:(t,e,n)=>{n.d(e,{MP:()=>g,WM:()=>p});var r=n(91303),i=n(41213),o=n(46521),s=n(13598),a=n(94961),l=n(97323),c=n(65617),u=n(88669);class h{constructor(t,e,n){this._itemByteSize=t,this._itemCreate=e,this._buffers=new Array,this._items=new Array,this._itemsPtr=0,this._itemsPerBuffer=Math.ceil(n/this._itemByteSize)}get(){0===this._itemsPtr&&(0,i.Y)((()=>this._reset()));const t=Math.floor(this._itemsPtr/this._itemsPerBuffer);for(;this._buffers.length<=t;){const t=new ArrayBuffer(this._itemsPerBuffer*this._itemByteSize);for(let e=0;e<this._itemsPerBuffer;++e)this._items.push(this._itemCreate(t,e*this._itemByteSize));this._buffers.push(t)}return this._items[this._itemsPtr++]}_reset(){const t=2*(Math.floor(this._itemsPtr/this._itemsPerBuffer)+1);for(;this._buffers.length>t;)this._buffers.pop(),this._items.length=this._buffers.length*this._itemsPerBuffer;this._itemsPtr=0}static createVec2f64(t=f){return new h(16,l.c,t)}static createVec3f64(t=f){return new h(24,c.b,t)}static createVec4f64(t=f){return new h(32,u.a,t)}static createMat3f64(t=f){return new h(72,o.a,t)}static createMat4f64(t=f){return new h(128,s.a,t)}static createQuatf64(t=f){return new h(32,a.c,t)}get test(){return{size:this._buffers.length*this._itemsPerBuffer*this._itemByteSize}}}const f=4*r.Y.KILOBYTES,p=(h.createVec2f64(),h.createVec3f64()),g=(h.createVec4f64(),h.createMat3f64(),h.createMat4f64());h.createQuatf64()},70558:(t,e,n)=>{n.r(e),n.d(e,{assetMapFromAssetMapsJSON:()=>Xt,extractMesh:()=>Jt,meshFeatureSetFromJSON:()=>Yt});var r=n(38171),i=n(92604),o=n(30175),s=n(65617),a=n(6570),l=n(43697),c=n(20102),u=n(83379),h=n(609),f=n(95330),p=n(17445),g=n(5600),d=(n(75215),n(67676),n(80442),n(52011)),m=n(9361),y=n(94139),x=n(38913),v=n(3709),b=n(62540),w=n(85872),A=n(50567),T=n(84555),_=n(2674),M=n(71630),S=n(95401),O=n(62155),I=n(86662),C=n(83025),E=n(24882),R=n(47545),N=(n(66577),n(22021)),L=n(67900),Z=n(17896),P=n(62073);n(4726),n(22631),n(35065);const F=(0,P.Ue)();function U(t,e,n,r,i,o,s){i*=3;for(let a=0;a<o;++a){const o=t[e];r[i++]=o[0],r[i++]=o[1],r[i++]=s?o[2]:0,e+=n}return i/3}function D(t,e,n){if(e){const e=function(t,e,n){const r=function(t,e,n,r){const i=(t=>!Array.isArray(t[0]))(e)?(t,n)=>e[3*t+n]:(t,n)=>e[t][n],o=r?(0,L.c9)(r)/(0,L._R)(r):1;return(0,P.zu)(t,((t,e)=>(0,Z.s)(t,i(e,0)*o,i(e,1)*o,i(e,2))),n)}(F,t,e,n)?(0,P.mJ)(F):[0,0,1];return Math.abs(r[2])>Math.cos((0,N.Vl)(80))?O.R.Z:Math.abs(r[1])>Math.abs(r[0])?O.R.Y:O.R.X}(t,t.length-1,n);if(e===O.R.X)return!(0,I.bu)(t,O.R.Y,O.R.Z);if(e===O.R.Y)return!(0,I.bu)(t,O.R.X,O.R.Z)}return!(0,I.bu)(t,O.R.X,O.R.Y)}var j,B;(B=j||(j={}))[B.NONE=0]="NONE",B[B.CCW_IS_HOLE=1]="CCW_IS_HOLE";var z=n(66459);let k=null;function V(t,e){let n=1/0,r=1/0,i=1/0,o=-1/0,s=-1/0,l=-1/0;const c=t.length;let u=0;for(;u<c;){const e=t[u++],a=t[u++],c=t[u++];n=Math.min(n,e),r=Math.min(r,a),i=Math.min(i,c),o=Math.max(o,e),s=Math.max(s,a),l=Math.max(l,c)}return new a.Z({xmin:n,ymin:r,zmin:i,xmax:o,ymax:s,zmax:l,spatialReference:e})}var G=n(44547),W=n(13442);const H="esri.geometry.support.meshUtils.centerAt";const Y=(0,s.c)(),J=(0,s.c)(),q=(0,s.c)();n(99880),n(3172);var $=n(17452);function X(t){const e=(0,$.Yd)(t.url);return n=>{const r=(0,$.PF)(n,e,e),i=r?r.replace(/^ *\.\//,""):null;return(i?t.files.get(i):null)??n}}function K(t){return nt.fromBlob(t)}n(47026);const Q=/^(model\/gltf\+json)|(model\/gltf-binary)$/,tt=/\.(gltf|glb)/i;function et(t){const e=new Map;let n=null;for(const{name:r,mimeType:i,source:o}of t)(null==n||Q.test(i)||tt.test(r))&&(n=o.url),e.set(r,o.url),o.files.forEach(((t,n)=>e.set(n,t)));if(null==n)throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new nt(n,(()=>t.forEach((({source:t})=>t.dispose()))),e)}class nt{constructor(t,e=(()=>{}),n=new Map){this.url=t,this.dispose=e,this.files=n}static fromBlob(t){const e=URL.createObjectURL(t);return new nt(e,(()=>URL.revokeObjectURL(e)))}}var rt=n(2368),it=n(46791),ot=n(84470);let st=class extends rt.j{constructor(){super(),this.externalSources=new it.Z,this._explicitDisplaySource=null,this.addHandles((0,p.on)((()=>this.externalSources),"after-remove",(({item:t})=>{t===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(t){if(null!=t&&!(0,ot.NZ)(t))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=t,t&&this.externalSources.every((e=>!(0,ot.fV)(e,t)))&&this.externalSources.add(t)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(t){return this.externalSources.items.filter((e=>(0,ot.JG)(e,t)))}get _implicitDisplaySource(){return this.externalSources.find(ot.NZ)}};(0,l._)([(0,g.Cb)()],st.prototype,"externalSources",void 0),(0,l._)([(0,g.Cb)()],st.prototype,"displaySource",null),(0,l._)([(0,g.Cb)()],st.prototype,"_implicitDisplaySource",null),(0,l._)([(0,g.Cb)()],st.prototype,"_explicitDisplaySource",void 0),st=(0,l._)([(0,d.j)("esri.geometry.support.meshUtils.Metadata")],st);var at=n(21787),lt=n(46521),ct=n(13598),ut=n(58995),ht=n(56493);function ft(t,e){if(t)for(let n=0;n<t.length;n+=3)for(let r=0;r<3;r++)t[n+r]+=e[r]}const pt=(0,s.c)(),gt=(0,ct.c)(),dt=(0,lt.c)(),mt={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function yt(t,e,n){t.isPlane||function(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}(t),function(t,e){if(null==e)return;const n="number"==typeof e?[e,e,e]:[null!=e.width?e.width:1,null!=e.depth?e.depth:1,null!=e.height?e.height:1];wt[0]=n[0],wt[4]=n[1],wt[8]=n[2];for(let e=0;e<t.position.length;e+=3){for(let n=0;n<3;n++)bt[n]=t.position[e+n];(0,Z.t)(bt,bt,wt);for(let n=0;n<3;n++)t.position[e+n]=bt[n]}if(n[0]!==n[1]||n[1]!==n[2]){wt[0]=1/n[0],wt[4]=1/n[1],wt[8]=1/n[2];for(let e=0;e<t.normal.length;e+=3){for(let n=0;n<3;n++)bt[n]=t.normal[e+n];(0,Z.t)(bt,bt,wt),(0,Z.n)(bt,bt);for(let n=0;n<3;n++)t.normal[e+n]=bt[n]}}}(t,n?.size);const{vertexAttributes:r,vertexSpace:i,transform:o}=(0,z.w1)(t,e,n);return{vertexAttributes:new M.Q({...r,uv:t.uv}),vertexSpace:i,transform:o,components:[new b.Z({faces:t.faces,material:n&&n.material||null})],spatialReference:e.spatialReference}}const xt={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},vt={south:0,east:1,north:2,west:3,up:4,down:5},bt=(0,s.c)(),wt=(0,lt.c)();var At=n(52138);const Tt="esri.geometry.support.meshUtils.rotate";function _t(t,e,n,r=s.Z){if(null!=t){(0,At.d)(It,(0,v.WH)(e),(0,v.ZZ)(e));for(let e=0;e<t.length;e+=n){for(let n=0;n<3;n++)Mt[n]=t[e+n]-r[n];(0,Z.m)(Mt,Mt,It);for(let n=0;n<3;n++)t[e+n]=Mt[n]+r[n]}}}const Mt=(0,s.c)(),St=(0,s.c)(),Ot=(0,v.Ue)(),It=(0,ct.c)(),Ct=(0,lt.c)(),Et=(0,s.c)(),Rt="esri.geometry.support.meshUtils.scale";function Nt(t,e,n=s.Z){if(t)for(let r=0;r<t.length;r+=3){for(let e=0;e<3;e++)Lt[e]=t[r+e]-n[e];(0,Z.g)(Lt,Lt,e);for(let e=0;e<3;e++)t[r+e]=Lt[e]+n[e]}}const Lt=(0,s.c)(),Zt=(0,s.c)(),Pt=(0,s.c)();var Ft;const Ut="esri.geometry.Mesh",Dt={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.Z,"georeferenced-relative":w.Z,local:T.Z}};let jt=Ft=class extends(u.Z.LoadableMixin((0,h.v)(m.Z))){constructor(t){super(t),this.components=null,this.vertexSpace=new A.Z,this.transform=null,this.metadata=new st,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new M.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,p.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((t=>t.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:t,spatialReference:e,vertexAttributes:n,vertexSpace:r}=this,i=n.position;if(0===i.length||t&&0===t.length)return new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:e});if("local"===r.type){const{_untransformedExtent:t,transform:n}=this;return function({xmin:t,xmax:e,ymin:n,ymax:r,zmin:i,zmax:o},s,a,l){i??=0,o??=0,k??=new Float64Array(24);const c=k;return c[0]=t,c[1]=n,c[2]=i,c[3]=t,c[4]=r,c[5]=i,c[6]=e,c[7]=r,c[8]=i,c[9]=e,c[10]=n,c[11]=i,c[12]=t,c[13]=n,c[14]=o,c[15]=t,c[16]=r,c[17]=o,c[18]=e,c[19]=r,c[20]=o,c[21]=e,c[22]=n,c[23]=o,(0,z.project)({positions:c,transform:s,vertexSpace:a,inSpatialReference:l,outSpatialReference:l,outPositions:c,local:!1}),V(c,l)}(t,n,r,e)}if("georeferenced-relative"===r.type){const{transform:t}=this;return V((0,z.project)({positions:i,transform:t,vertexSpace:r,inSpatialReference:e,outSpatialReference:e,local:!1}),e)}return V(i,e)}get _untransformedExtent(){return V(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:t}=this;if(t.isRelative)return t.getOriginPoint(this.spatialReference);const{center:e,zmin:n}=this._transformedExtent;return new y.Z({x:e.x,y:e.y,z:n,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:t}=this;return t.isRelative?t.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(t){this.loaded?(this.components||(this.components=[]),this.components.push(b.Z.from(t)),this.notifyChange("components")):i.Z.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(t){if(this.loaded){if(this.components){const e=this.components.indexOf(t);if(-1!==e)return this.components.splice(e,1),void this.notifyChange("components")}i.Z.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else i.Z.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(t,e,n,r){return(0,v.qw)(t,e,n,zt),function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position||0===e[3])return;const{spatialReference:r,vertexSpace:o}=t;if(o.isRelative){(0,W.A)(o,Tt,n);const r=n?.origin??t.origin;t.transform??=new _.Z,function(t,e,n,r){const i=e.origin,o=(0,Z.s)(Mt,r.x,r.y,r.z??0),a=(0,Z.b)(Mt,o,i);t.applyLocalInverse(a,St),t.rotation=(0,v.qC)(t.rotation,n,(0,v.Ue)()),t.applyLocalInverse(a,a),(0,Z.b)(a,a,St),t.translation=(0,Z.a)((0,s.c)(),t.translation,a)}(t.transform,o,e,r)}else{const o=n?.origin??t.origin;(0,W.h)(r,n)?function(t,e,n){const r=t.spatialReference,i=(0,ut.rS)(r),o=Et;(0,G.KC)(n,o,i)||(0,G.KC)(t.origin,o,i);const s=t.vertexAttributes.position,a=t.vertexAttributes.normal,l=t.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,G.Bm)(i,o,It,i),(0,at.f)(Ct,It);const f=Ot;(0,Z.t)((0,v.ZZ)(Ot),(0,v.ZZ)(e),Ct),f[3]=e[3],(0,ht.XO)(s,r,c),null!=a&&null!=u&&(0,ht.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,ht.wi)(l,s,c,r,h),_t(c,f,3,o),(0,ht.To)(c,s,r),null!=a&&null!=u&&(_t(u,f,3),(0,ht.Yk)(u,s,c,r,a)),null!=l&&null!=h&&(_t(h,f,4),(0,ht.M2)(h,s,c,r,l)),t.vertexAttributesChanged()}(t,e,o):function(t,e,n){const r=Et;if(!(0,G.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,i.Z.getLogger(Tt).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}_t(t.vertexAttributes.position,e,3,r),_t(t.vertexAttributes.normal,e,3),_t(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}(t,e,o)}}(this,zt,r),this}offset(t,e,n,r){return this.loaded?(Bt[0]=t,Bt[1]=e,Bt[2]=n,function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position)return;const{vertexSpace:r}=t;r.isRelative?((0,W.A)(r,"esri.geometry.support.meshUtils.offset",n),function(t,e){const n=t.origin;t.origin=(0,Z.a)((0,s.c)(),n,e)}(r,e)):(0,W.h)(t.spatialReference,n)?function(t,e){const n=t.spatialReference,r=t.vertexAttributes.position,i=t.vertexAttributes.normal,o=t.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=i?new Float32Array(i.length):null,l=null!=o?new Float32Array(o.length):null,c=t.extent.center,u=pt;(0,G.Bm)(n,[c.x,c.y,c.z],gt,(0,ut.rS)(n)),(0,at.f)(dt,gt),(0,Z.t)(u,e,dt),(0,ht.XO)(r,n,s),null!=i&&null!=a&&(0,ht.Iz)(i,r,s,n,a),null!=o&&null!=l&&(0,ht.wi)(o,r,s,n,l),ft(s,u),(0,ht.To)(s,r,n),null!=i&&null!=a&&(0,ht.Yk)(a,r,s,n,i),null!=o&&null!=l&&(0,ht.M2)(l,r,s,n,o),t.vertexAttributesChanged()}(t,e):function(t,e){ft(t.vertexAttributes.position,e),t.vertexAttributesChanged()}(t,e)}(this,Bt,r),this):(i.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(t,e){return this.loaded?(function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=t;if(o.isRelative){(0,W.A)(o,Rt,n);const r=n?.origin??t.origin;t.transform??=new _.Z,function(t,e,n,r){const i=e.origin,o=(0,Z.s)(Lt,r.x,r.y,r.z),a=(0,Z.b)(Lt,o,i);t.applyLocalInverse(a,Zt);const l=(0,Z.g)((0,s.c)(),t.scale,n);t.scale=l,t.applyLocalInverse(a,a),(0,Z.b)(a,a,Zt),t.translation=(0,Z.a)((0,s.c)(),t.translation,a)}(t.transform,o,e,r)}else{const o=(0,W.h)(r,n),s=n?.origin??t.origin;o?function(t,e,n){const r=t.spatialReference,i=(0,ut.rS)(r),o=Pt;(0,G.KC)(n,o,i)||(0,G.KC)(t.origin,o,i);const s=t.vertexAttributes.position,a=t.vertexAttributes.normal,l=t.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,ht.XO)(s,r,c),null!=a&&null!=u&&(0,ht.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,ht.wi)(l,s,c,r,h),Nt(c,e,o),(0,ht.To)(c,s,r),null!=a&&null!=u&&(0,ht.Yk)(u,s,c,r,a),null!=l&&null!=h&&(0,ht.M2)(h,s,c,r,l),t.vertexAttributesChanged()}(t,e,s):function(t,e,n){const r=Pt;if(!(0,G.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,i.Z.getLogger(Rt).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Nt(t.vertexAttributes.position,e,r),t.vertexAttributesChanged()}(t,e,s)}}(this,t,e),this):(i.Z.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(t,e){return this.loaded?(function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position)return;const{vertexSpace:r}=t,o=n?.origin??t.origin;r.isRelative?((0,W.A)(r,H,n),function(t,e,n){const{vertexSpace:r}=t;if(!r.isRelative)return;const o=J,a=Y;if(!(0,G.KC)(e,a,t.spatialReference))return void i.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${e.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!(0,G.KC)(n,o,t.spatialReference)){const e=t.origin;o[0]=e.x,o[1]=e.y,o[2]=e.z,i.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const l=(0,Z.b)(q,a,o),c=r.origin;r.origin=(0,Z.a)((0,s.c)(),c,l)}(t,e,o)):(0,W.h)(t.spatialReference,n)?function(t,e,n){const r=(0,z.FF)(t.vertexAttributes,n,{geographic:!0}),{position:i,normal:o,tangent:s}=(0,z.iv)(r,e,{geographic:!0});t.vertexAttributes.position=i,t.vertexAttributes.normal=o,t.vertexAttributes.tangent=s,t.vertexAttributesChanged()}(t,e,o):function(t,e,n){const r=J,o=Y;if((0,G.KC)(e,o,t.spatialReference)){if(!(0,G.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,i.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(t,e,n){if(t)for(let r=0;r<t.length;r+=3)for(let i=0;i<3;i++)t[r+i]+=e[i]-n[i]})(t.vertexAttributes.position,o,r),t.vertexAttributesChanged()}else i.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${e.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(t,e,o)}(this,t,e),this):(i.Z.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(t){const{metadata:{displaySource:e}}=this;return e&&this.addResolvingPromise(async function(t,e,r){const{source:i}=e,{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(t,e){if(Array.isArray(t)){if(!t.length)throw new c.Z("mesh-load-external:missing-assets","There must be at least one file to load");return t[0]instanceof File?function(t){return et(t.map((t=>({name:t.name,mimeType:t.type,source:K(t)}))))}(t):async function(t,e){const n=await(0,f.OT)(t.map((async t=>{const n=await async function(t,e){const{parts:n}=t;if(1===n.length)return new nt(n[0].partUrl);const r=await t.toBlob(e);return(0,f.k_)(e),nt.fromBlob(r)}(t);return(0,f.k_)(e),{name:t.assetName,mimeType:t.assetMimeType,source:n}})));if((0,f.Hc)(e))throw n.forEach((t=>t.source.dispose())),(0,f.zE)();return et(n)}(t,e)}return K(t)}(i,r);(0,f.k_)(r);const a=o(new y.Z({x:0,y:0,z:0,spatialReference:t.spatialReference}),s.url,{resolveFile:X(s),requestFile:void 0,useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:u}=await a;t.vertexAttributes=l,t.components=u}(this,e,t)),Promise.resolve(this)}addExternalSources(t){this.metadata.externalSources.addMany(t)}updateDisplaySource(t){this.metadata.displaySource=t}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(t){let e=null;if(this.components){const t=new Map,n=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,n)))}const n={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:t,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ft(n)}cloneShallow(){return new Ft({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(t){const e=n.e(5575).then(n.bind(n,55575)),r=this.load(),i=await Promise.all([e,r]),{toBinaryGLTF:o}=i[0];return o(this,t)}get memoryUsage(){let t=0;if(t+=this.vertexAttributes.memoryUsage,null!=this.components)for(const e of this.components)t+=e.memoryUsage;return t}_clearSources(){this.metadata.clearSources()}static createBox(t,e){if(!(t instanceof y.Z))return i.Z.getLogger(Ut).error(".createBox()","expected location to be a Point instance"),null;const n=new Ft(yt(function(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:n}=xt,r=4*t.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*t.length*3);let l=0,c=0,u=0,h=0;for(let r=0;r<t.length;r++){const f=t[r],p=l/3;for(const t of e)a[h++]=p+t;const g=f.corners;for(let t=0;t<4;t++){const e=g[t];let r=0;s[u++]=.25*n[t][0]+f.uvOrigin[0],s[u++]=f.uvOrigin[1]-.25*n[t][1];for(let t=0;t<3;t++)0!==f.axis[t]?(i[l++]=.5*f.axis[t],o[c++]=f.axis[t]):(i[l++]=.5*e[r++],o[c++]=0)}}return{position:i,normal:o,uv:s,faces:a}}(),t,e));return e&&e.imageFace&&"all"!==e.imageFace?function(t,e){const n=t.components[0],r=n.faces,i=vt[e],o=6*i,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let t=0;t<r.length;t++)t>=o&&t<o+6?s[l++]=r[t]:a[c++]=r[t];if(null!=t.vertexAttributes.uv){const e=new Float32Array(t.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let t=0;t<r.length;t++)e[n+t]=r[t];t.vertexAttributes.uv=e}return t.components=[new b.Z({faces:s,material:n.material}),new b.Z({faces:a})],t}(n,e.imageFace):n}static createSphere(t,e){return t instanceof y.Z?new Ft(yt(function(t=0){const e=Math.round(8*2**t),n=2*e,r=(e-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((e-1)*n*2*3);let l=0,c=0,u=0,h=0;for(let t=0;t<=e;t++){const r=t/e*Math.PI+.5*Math.PI,f=Math.cos(r),p=Math.sin(r);bt[2]=p;const g=0===t||t===e,d=g?n-1:n;for(let r=0;r<=d;r++){const p=r/d*2*Math.PI;bt[0]=-Math.sin(p)*f,bt[1]=Math.cos(p)*f;for(let t=0;t<3;t++)i[l]=.5*bt[t],o[l]=bt[t],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=t/e,0!==t&&r!==n&&(t!==e&&(a[u++]=h,a[u++]=h+1,a[u++]=h-n),1!==t&&(a[u++]=h,a[u++]=h-n,a[u++]=h-n-1)),h++}}return{position:i,normal:o,uv:s,faces:a}}(e&&e.densificationFactor||0),t,e)):(i.Z.getLogger(Ut).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(t,e){return t instanceof y.Z?new Ft(yt(function(t=0){const e=Math.round(16*2**t),n=4*(e+1)+2*e,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*e*3);let a=0,l=0,c=0,u=0,h=0;for(let t=0;t<=5;t++){const n=0===t||5===t,f=t<=1||t>=4,p=2===t||4===t,g=n?e-1:e;for(let d=0;d<=g;d++){const m=d/g*2*Math.PI,y=n?0:.5;bt[0]=y*Math.sin(m),bt[1]=y*-Math.cos(m),bt[2]=t<=2?.5:-.5;for(let e=0;e<3;e++)r[a++]=bt[e],i[l++]=f?2===e?t<=1?1:-1:0:2===e?0:bt[e]/y;o[c++]=(d+(n?.5:0))/e,o[c++]=t<=1?1*t/3:t<=3?1*(t-2)/3+1/3:1*(t-4)/3+2/3,p||0===t||d===e||(5!==t&&(s[u++]=h,s[u++]=h+1,s[u++]=h-e),1!==t&&(s[u++]=h,s[u++]=h-e,s[u++]=h-e-1)),h++}}return{position:r,normal:i,uv:o,faces:s}}(e&&e.densificationFactor||0),t,e)):(i.Z.getLogger(Ut).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(t,e){if(!(t instanceof y.Z))return i.Z.getLogger(Ut).error(".createPlane()","expected location to be a Point instance"),null;const n=e?.facing??"up",r=function(t,e){const n="number"==typeof e?e:null!=e?e.width:1,r="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,e?.size);return new Ft(yt(function(t){const e=mt.facingAxisOrderSwap[t],n=mt.position,r=mt.normal,i=new Float64Array(n.length),o=new Float32Array(r.length);let s=0;for(let t=0;t<4;t++){const t=s;for(let a=0;a<3;a++){const l=e[a],c=Math.abs(l)-1,u=l>=0?1:-1;i[s]=n[t+c]*u,o[s]=r[t+c]*u,s++}}return{position:i,normal:o,uv:new Float32Array(mt.uv),faces:new Uint32Array(mt.faces),isPlane:!0}}(n),t,{...e,size:r}))}static createFromPolygon(t,e){if(!(t instanceof x.Z))return i.Z.getLogger(Ut).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(t){const e=function(t,e,n,r){const i=t.length,o=new Array(i),s=new Array(i),a=new Array(i);let l=0,c=0,u=0,h=0;for(let e=0;e<i;++e)h+=t[e].length;const f=(0,C.bg)(3*h);let p=0;for(let h=i-1;h>=0;h--){const g=t[h],d=n===j.CCW_IS_HOLE&&D(g,e,r);if(d&&1!==i)o[l++]=g;else{let t=g.length;for(let e=0;e<l;++e)t+=o[e].length;const n={index:p,pathLengths:new Array(l+1),count:t,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:p,count:g.length}),p=d?U(g,g.length-1,-1,f,p,g.length,e):U(g,0,1,f,p,g.length,e);for(let t=0;t<l;++t){const r=o[t];n.holeIndices[t]=p,n.pathLengths[t+1]=r.length,r.length>0&&(a[u++]={index:p,count:r.length}),p=U(r,0,1,f,p,r.length,e)}l=0,n.count>0&&(s[c++]=n)}}for(let t=0;t<l;++t){const n=o[t];n.length>0&&(a[u++]={index:p,count:n.length}),p=U(n,0,1,f,p,n.length,e)}return s.length=c,a.length=u,{position:f,polygons:s,outlines:a}}(t.rings,t.hasZ,j.CCW_IS_HOLE,t.spatialReference),n=new Array;let r=0,i=0;for(const t of e.polygons){const o=t.count,s=t.index,a=(0,C.Rq)(e.position,3*s,3*o),l=t.holeIndices.map((t=>t-s)),c=(0,E.mi)((0,S.e)(a,l,3));n.push({position:a,faces:c}),r+=a.length,i+=c.length}const o=function(t,e,n){if(1===t.length)return t[0];const r=(0,C.bg)(e),i=new Array(n);let o=0,s=0,a=0;for(const e of t){for(let t=0;t<e.position.length;t++)r[o++]=e.position[t];for(const t of e.faces)i[s++]=t+a;a=o/3}return{position:r,faces:(0,E.mi)(i)}}(n,r,i),s=Array.isArray(o.position)?(0,R.d)(o.position,3,{originalIndices:o.faces}):(0,R.d)(o.position.buffer,6,{originalIndices:o.faces});return o.position=(0,C.QZ)(new Float64Array(s.buffer)),o.faces=s.indices,o}(t);return new Ft({vertexAttributes:new M.Q({position:n.position}),components:[new b.Z({faces:n.faces,shading:"flat",material:e?.material??null})],spatialReference:t.spatialReference,vertexSpace:new A.Z})}static async createFromGLTF(t,e,r){if(!(t instanceof y.Z))throw i.Z.getLogger(Ut).error(".createfromGLTF()","expected location to be a Point instance"),new c.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Ft(await o(t,e,r))}static async createFromFiles(t,e,n){if(!(t instanceof y.Z)){const t="Expected location to be a Point instance";throw i.Z.getLogger(Ut).error(".createFromFiles()",t),new c.Z("invalid-input",t)}const r=Ft.createWithExternalSource(t,e),o=n?.layer;if(!o){const t="A layer is needed to convert the files";throw i.Z.getLogger(Ut).error(".createFromFiles()",t),new c.Z("invalid-input",t)}const[s]=await o.uploadAssets([r],n);return s}static createWithExternalSource(t,e,n){const r=n?.extent??null,{x:i,y:o,z:s,spatialReference:a}=t,l=n?.transform?.clone()??new _.Z,c=n?.vertexSpace??new T.Z({origin:[i,o,s??0]}),u={source:e,extent:r},h=new st;return h.externalSources.push(u),new Ft({metadata:h,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(t,e){const{x:n,y:r,z:i,spatialReference:o}=t,s=e?.transform?.clone()??new _.Z,a=e?.vertexSpace??new T.Z({origin:[n,r,i??0]}),l=new Ft({transform:s,vertexSpace:a,spatialReference:o});return l.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,l._)([(0,g.Cb)({type:[b.Z],json:{write:!0}})],jt.prototype,"components",void 0),(0,l._)([(0,g.Cb)({nonNullable:!0,types:Dt,constructOnly:!0,json:{write:!0}})],jt.prototype,"vertexSpace",void 0),(0,l._)([(0,g.Cb)({type:_.Z,json:{write:!0}})],jt.prototype,"transform",void 0),(0,l._)([(0,g.Cb)({constructOnly:!0})],jt.prototype,"metadata",void 0),(0,l._)([(0,g.Cb)()],jt.prototype,"hasExtent",null),(0,l._)([(0,g.Cb)()],jt.prototype,"_transformedExtent",null),(0,l._)([(0,g.Cb)()],jt.prototype,"_untransformedExtent",null),(0,l._)([(0,g.Cb)()],jt.prototype,"anchor",null),(0,l._)([(0,g.Cb)()],jt.prototype,"origin",null),(0,l._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],jt.prototype,"extent",null),(0,l._)([(0,g.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],jt.prototype,"hasZ",void 0),(0,l._)([(0,g.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],jt.prototype,"hasM",void 0),(0,l._)([(0,g.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],jt.prototype,"vertexAttributes",void 0),jt=Ft=(0,l._)([(0,d.j)(Ut)],jt);const Bt=(0,s.c)(),zt=(0,v.Ue)(),kt=jt;var Vt=n(82971),Gt=n(2981),Wt=n(74889);const Ht=()=>i.Z.getLogger("esri.rest.support.meshFeatureSet");function Yt(t,e,n){const i=n.features;n.features=[],delete n.geometryType;const o=Wt.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=Xt(e,n.assetMaps),a=t.sourceSpatialReference??Vt.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=t,u=null!=c&&c.length>0?(h=c.includes("*")?null:new Set(c),({attributes:t})=>{if(!t)return{};if(!h)return t;for(const e in t)h.has(e)||delete t[e];return t}):()=>({});var h;for(const t of i){const n=Jt(t,l,a,e,s);null!=n&&o.features.push(new r.Z({geometry:n,attributes:u(t)}))}return o}function Jt(t,e,n,r,i){const o=t.attributes[e],l=i.get(o);if(null==l)return Ht().error("mesh-feature-set:asset-not-found","Service returned a feature which was not found in the asset map",t),null;if(!t.geometry)return Ht().error("mesh-feature-set:no-geometry","Service returned a feature without geometry",t),null;const{originPoint:c,originVector:u}=function({attributes:t},e,{transformFieldRoles:n}){const r=t[n.originX],i=t[n.originY],o=t[n.originZ];return{originPoint:new y.Z({x:r,y:i,z:o,spatialReference:e}),originVector:(0,s.f)(r,i,o)}}(t,n,r),h=a.Z.fromJSON(t.geometry);h.spatialReference=n;const f=function(t,{transformFieldRoles:e}){return new _.Z({translation:[t[e.translationX],-t[e.translationZ],t[e.translationY]],rotationAxis:[t[e.rotationX],t[e.rotationZ],t[e.rotationY]],rotationAngle:t[e.rotationDeg],scale:[t[e.scaleX],t[e.scaleY],t[e.scaleZ]]})}(t.attributes,r),p=l.projectVertices?new w.Z({origin:u}):new T.Z({origin:u}),g=function(t){const e=Array.from(t.files.values()),n=new Array;for(const t of e){if(t.status!==qt.COMPLETED)return null;const e=new Array;for(const n of t.parts){if(!n)return null;e.push(new ot.LL(n.url,n.hash))}n.push(new ot.CP(t.name,t.mimeType,e))}return n}(l);return g?kt.createWithExternalSource(c,g,{extent:h,transform:f,vertexSpace:p}):kt.createIncomplete(c,{extent:h,transform:f,vertexSpace:p})}var qt,$t;function Xt(t,e){const n=new Map;for(const r of e){const e=r.parentGlobalId;if(null==e)continue;const i=r.assetName,s=r.assetType,a=r.assetHash,l=r.assetURL,c=r.conversionStatus,u=r.seqNo,h=(0,Gt.d1)(s,t.supportedFormats);if(!h){Ht().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${s}, but it does not list it as a supported type`);continue}const f=(0,o.s1)(n,e,(()=>({projectVertices:Qt(r.flags).projectVertices,files:new Map})));(0,o.s1)(f.files,i,(()=>({name:i,type:s,mimeType:h,status:Kt(c),parts:[]}))).parts[u]={hash:a,url:l}}return n}function Kt(t){switch(t){case"COMPLETED":case"SUBMITTED":return qt.COMPLETED;case"INPROGRESS":return qt.PENDING;default:return qt.FAILED}}function Qt(t){return{projectVertices:t.includes("PROJECT_VERTICES")}}($t=qt||(qt={}))[$t.FAILED=0]="FAILED",$t[$t.PENDING=1]="PENDING",$t[$t.COMPLETED=2]="COMPLETED"},17662:(t,e,n)=>{n.d(e,{c:()=>i});var r=n(99001);class i{constructor(){this.id=(0,r.D)()}unload(){}}},4726:(t,e,n)=>{var r;n.d(e,{U:()=>r}),function(t){t[t.Layer=0]="Layer",t[t.Object=1]="Object",t[t.Mesh=2]="Mesh",t[t.Line=3]="Line",t[t.Point=4]="Point",t[t.Material=5]="Material",t[t.Texture=6]="Texture",t[t.COUNT=7]="COUNT"}(r||(r={}))},22631:(t,e,n)=>{n.d(e,{Z:()=>C});var r=n(13598),i=n(17896),o=n(24882),s=n(1533);function a(t){if(t.length<s.DB)return Array.from(t);if((0,s.kJ)(t))return Float64Array.from(t);if(!("BYTES_PER_ELEMENT"in t))return Array.from(t);switch(t.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(t);case 2:return(0,s.Uc)(t)?Uint16Array.from(t):Int16Array.from(t);case 4:return Float32Array.from(t);default:return Float64Array.from(t)}}var l=n(47026),c=n(44553),u=n(65617),h=n(11726);class f{constructor(t,e,n,r){this.primitiveIndices=t,this._numIndexPerPrimitive=e,this.indices=n,this.position=r,this._children=void 0,(0,h.hu)(t.length>=1),(0,h.hu)(n.length%this._numIndexPerPrimitive==0),(0,h.hu)(n.length>=t.length*this._numIndexPerPrimitive),(0,h.hu)(3===r.size||4===r.size);const{data:o,size:s}=r,a=t.length;let l=s*n[this._numIndexPerPrimitive*t[0]];p.clear(),p.push(l);const c=(0,u.f)(o[l],o[l+1],o[l+2]),f=(0,u.a)(c);for(let e=0;e<a;++e){const r=this._numIndexPerPrimitive*t[e];for(let t=0;t<this._numIndexPerPrimitive;++t){l=s*n[r+t],p.push(l);let e=o[l];c[0]=Math.min(e,c[0]),f[0]=Math.max(e,f[0]),e=o[l+1],c[1]=Math.min(e,c[1]),f[1]=Math.max(e,f[1]),e=o[l+2],c[2]=Math.min(e,c[2]),f[2]=Math.max(e,f[2])}}this.bbMin=c,this.bbMax=f;const g=(0,i.h)((0,u.c)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(f[0]-c[0],f[1]-c[1]),f[2]-c[2]);let d=this.radius*this.radius;for(let t=0;t<p.length;++t){l=p.at(t);const e=o[l]-g[0],n=o[l+1]-g[1],r=o[l+2]-g[2],i=e*e+n*n+r*r;if(i<=d)continue;const s=Math.sqrt(i),a=.5*(s-this.radius);this.radius=this.radius+a,d=this.radius*this.radius;const c=a/s;g[0]+=e*c,g[1]+=n*c,g[2]+=r*c}this.center=g,p.clear()}getChildren(){if(this._children||(0,i.d)(this.bbMin,this.bbMax)<=1)return this._children;const t=(0,i.h)((0,u.c)(),this.bbMin,this.bbMax,.5),e=this.primitiveIndices.length,n=new Uint8Array(e),r=new Array(8);for(let t=0;t<8;++t)r[t]=0;const{data:o,size:s}=this.position;for(let i=0;i<e;++i){let e=0;const a=this._numIndexPerPrimitive*this.primitiveIndices[i];let l=s*this.indices[a],c=o[l],u=o[l+1],h=o[l+2];for(let t=1;t<this._numIndexPerPrimitive;++t){l=s*this.indices[a+t];const e=o[l],n=o[l+1],r=o[l+2];e<c&&(c=e),n<u&&(u=n),r<h&&(h=r)}c<t[0]&&(e|=1),u<t[1]&&(e|=2),h<t[2]&&(e|=4),n[i]=e,++r[e]}let a=0;for(let t=0;t<8;++t)r[t]>0&&++a;if(a<2)return;const l=new Array(8);for(let t=0;t<8;++t)l[t]=r[t]>0?new Uint32Array(r[t]):void 0;for(let t=0;t<8;++t)r[t]=0;for(let t=0;t<e;++t){const e=n[t];l[e][r[e]++]=this.primitiveIndices[t]}this._children=new Array;for(let t=0;t<8;++t)void 0!==l[t]&&this._children.push(new f(l[t],this._numIndexPerPrimitive,this.indices,this.position));return this._children}static prune(){p.prune()}}const p=new c.Z({deallocator:null});var g=n(17662),d=n(4726),m=n(22807),y=n(16996);function x(t,e,n){return(0,i.b)(v,e,t),(0,i.b)(b,n,t),(0,i.l)((0,i.f)(v,v,b))/2}n(12981),new m.x(y.Ue),new m.x((()=>{return t?{p0:(0,u.a)(t.p0),p1:(0,u.a)(t.p1),p2:(0,u.a)(t.p2)}:{p0:(0,u.c)(),p1:(0,u.c)(),p2:(0,u.c)()};var t}));const v=(0,u.c)(),b=(0,u.c)();function w(t,e,n,r){if(!t)return!1;(0,i.s)(r,0,0,0),(0,i.s)(M,0,0,0);let o=0,s=0;const{size:a,data:l}=t,c=e?e.length-1:l.length/a-1,u=c+(n?2:0);for(let t=0;t<u;t+=2){const n=t<c?t:c,u=t<c?t+1:0,h=(e?e[n]:n)*a,f=(e?e[u]:u)*a;A[0]=l[h],A[1]=l[h+1],A[2]=l[h+2],T[0]=l[f],T[1]=l[f+1],T[2]=l[f+2],(0,i.g)(A,(0,i.a)(A,A,T),.5);const p=(0,i.j)(A,T);p>0?((0,i.a)(r,r,(0,i.g)(A,A,p)),o+=p):0===o&&((0,i.a)(M,M,A),s++)}return 0!==o?((0,i.g)(r,r,1/o),!0):0!==s&&((0,i.g)(r,M,1/s),!0)}const A=(0,u.c)(),T=(0,u.c)(),_=(0,u.c)(),M=(0,u.c)();var S=n(99001);class O{constructor(t){this.channel=t,this.id=(0,S.D)()}}var I=n(35065);n(9820),(0,u.c)(),new Float32Array(6);class C extends g.c{constructor(t,e,n=[],r=null,i=d.U.Mesh,s=null,a=-1){super(),this.material=t,this.mapPositions=r,this.type=i,this.objectAndLayerIdColor=s,this.edgeIndicesLength=a,this.visible=!0,this._vertexAttributes=new Map,this._indices=new Map,this._boundingInfo=null;for(const[t,n]of e)n&&this._vertexAttributes.set(t,{...n});if(null==n||0===n.length){const t=function(t){const e=t.values().next().value;return null==e?0:e.data.length/e.size}(this._vertexAttributes),e=(0,o.KF)(t);this.edgeIndicesLength=this.edgeIndicesLength<0?t:this.edgeIndicesLength;for(const t of this._vertexAttributes.keys())this._indices.set(t,e)}else for(const[t,e]of n)e&&(this._indices.set(t,(0,o.mi)(e)),t===I.T.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._indices.get(t).length:this.edgeIndicesLength))}instantiate(t={}){const e=new C(t.material||this.material,[],void 0,this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._vertexAttributes.forEach(((t,n)=>{t.exclusive=!1,e._vertexAttributes.set(n,t)})),this._indices.forEach(((t,n)=>e._indices.set(n,t))),e._boundingInfo=this._boundingInfo,e.transformation=t.transformation||this.transformation,e}get vertexAttributes(){return this._vertexAttributes}getMutableAttribute(t){let e=this._vertexAttributes.get(t);return e&&!e.exclusive&&(e={...e,exclusive:!0,data:a(e.data)},this._vertexAttributes.set(t,e)),e}setAttributeData(t,e){const n=this._vertexAttributes.get(t);n&&this._vertexAttributes.set(t,{...n,exclusive:!0,data:e})}get indices(){return this._indices}get indexCount(){const t=this._indices.values().next().value;return t?t.length:0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(t){return!!(this.type===d.U.Mesh?this._computeAttachmentOriginTriangles(t):this.type===d.U.Line?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&(0,i.m)(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){const e=this.indices.get(I.T.POSITION);return function(t,e,n){if(!t||!e)return!1;const{size:r,data:o}=t;(0,i.s)(n,0,0,0),(0,i.s)(M,0,0,0);let s=0,a=0;for(let t=0;t<e.length-2;t+=3){const l=e[t]*r,c=e[t+1]*r,u=e[t+2]*r;(0,i.s)(A,o[l],o[l+1],o[l+2]),(0,i.s)(T,o[c],o[c+1],o[c+2]),(0,i.s)(_,o[u],o[u+1],o[u+2]);const h=x(A,T,_);h?((0,i.a)(A,A,T),(0,i.a)(A,A,_),(0,i.g)(A,A,1/3*h),(0,i.a)(n,n,A),s+=h):((0,i.a)(M,M,A),(0,i.a)(M,M,T),(0,i.a)(M,M,_),a+=3)}return!(0===a&&0===s||(0!==s?((0,i.g)(n,n,1/s),0):0===a||((0,i.g)(n,M,1/a),0)))}(this.vertexAttributes.get(I.T.POSITION),e,t)}_computeAttachmentOriginLines(t){const e=this.vertexAttributes.get(I.T.POSITION),n=this.indices.get(I.T.POSITION);return w(e,n,n&&function(t,e,n){return!(!("isClosed"in t)||!t.isClosed)&&(n?n.length>2:e.data.length>6)}(this.material.parameters,e,n),t)}_computeAttachmentOriginPoints(t){const e=this.indices.get(I.T.POSITION);return function(t,e,n){if(!t||!e)return!1;const{size:r,data:o}=t;(0,i.s)(n,0,0,0);let s=-1,a=0;for(let t=0;t<e.length;t++){const i=e[t]*r;s!==i&&(n[0]+=o[i],n[1]+=o[i+1],n[2]+=o[i+2],a++),s=i}return a>1&&(0,i.g)(n,n,1/a),a>0}(this.vertexAttributes.get(I.T.POSITION),e,t)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const t=this.indices.get(I.T.POSITION),e=this.vertexAttributes.get(I.T.POSITION);if(!t||0===t.length||!e)return null;const n=this.type===d.U.Mesh?3:1;(0,h.hu)(t.length%n==0,"Indexing error: "+t.length+" not divisible by "+n);const r=(0,o.KF)(t.length/n);return new f(r,n,t,e)}get transformation(){return this._transformation??r.I}set transformation(t){this._transformation=t&&t!==r.I?(0,r.b)(t):null}addHighlight(){const t=new O(l.V_.Highlight);return this.highlights=function(t,e){return null==t&&(t=[]),t.push(e),t}(this.highlights,t),t}removeHighlight(t){this.highlights=function(t,e){if(null==t)return null;const n=t.filter((t=>t!==e));return 0===n.length?null:n}(this.highlights,t)}}},11726:(t,e,n)=>{n.d(e,{hu:()=>i,yK:()=>o}),n(97323),n(98766),(0,n(88669).c)();class r{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function i(t,e){if(!t){e=e||"Assertion";const t=new Error(e).stack;throw new r(`${e} at ${t}`)}}function o(t,e,n,r){let i,o=(n[0]-t[0])/e[0],s=(r[0]-t[0])/e[0];o>s&&(i=o,o=s,s=i);let a=(n[1]-t[1])/e[1],l=(r[1]-t[1])/e[1];if(a>l&&(i=a,a=l,l=i),o>l||a>s)return!1;a>o&&(o=a),l<s&&(s=l);let c=(n[2]-t[2])/e[2],u=(r[2]-t[2])/e[2];return c>u&&(i=c,c=u,u=i),!(o>u||c>s||(u<s&&(s=u),s<0))}},35065:(t,e,n)=>{var r;n.d(e,{T:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.AUXPOS1="auxpos1",t.AUXPOS2="auxpos2",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.TANGENT="tangent",t.OFFSET="offset",t.SUBDIVISIONFACTOR="subdivisionFactor",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.FEATUREVALUE="featureValue",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMALA="normalA",t.NORMALB="normalB",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.U8PADDING="u8padding",t.U16PADDING="u16padding",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},47026:(t,e,n)=>{var r,i,o,s,a,l,c,u,h;n.d(e,{Gv:()=>i,Iq:()=>u,JJ:()=>c,Rw:()=>s,Ti:()=>h,V_:()=>l,Vr:()=>r,hU:()=>a}),function(t){t[t.None=0]="None",t[t.Front=1]="Front",t[t.Back=2]="Back",t[t.COUNT=3]="COUNT"}(r||(r={})),function(t){t[t.Less=0]="Less",t[t.Lequal=1]="Lequal",t[t.COUNT=2]="COUNT"}(i||(i={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.UPDATE=1]="UPDATE"}(o||(o={})),function(t){t[t.NOT_LOADED=0]="NOT_LOADED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED"}(s||(s={})),function(t){t[t.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",t[t.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(t){t[t.Highlight=0]="Highlight",t[t.MaskOccludee=1]="MaskOccludee",t[t.COUNT=2]="COUNT"}(l||(l={})),function(t){t[t.Blend=0]="Blend",t[t.Opaque=1]="Opaque",t[t.Mask=2]="Mask",t[t.MaskBlend=3]="MaskBlend",t[t.COUNT=4]="COUNT"}(c||(c={})),function(t){t[t.OFF=0]="OFF",t[t.ON=1]="ON"}(u||(u={})),function(t){t.DDS_ENCODING="image/vnd-ms.dds",t.KTX2_ENCODING="image/ktx2",t.BASIS_ENCODING="image/x.basis"}(h||(h={}))},9820:(t,e,n)=>{function r(t,e){const n=t.length;for(let r=0;r<n;++r)o[0]=t[r],e[r]=o[0];return e}function i(t,e){const n=t.length;for(let r=0;r<n;++r)o[0]=t[r],o[1]=t[r]-o[0],e[r]=o[1];return e}n.d(e,{GB:()=>i,U8:()=>r});const o=new Float32Array(2)}}]);
|
|
1
|
+
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[448],{95401:(t,e,n)=>{n.d(e,{e:()=>l});var r,i,o,s=n(5732),a={exports:{}};r=a,i=function(){function t(t,n,i){i=i||2;var o,s,a,c,u,h,f,p=n&&n.length,g=p?n[0]*i:t.length,d=e(t,0,g,i,!0),m=[];if(!d||d.next===d.prev)return m;if(p&&(d=l(t,n,d,i)),t.length>80*i){o=a=t[0],s=c=t[1];for(var y=i;y<g;y+=i)(u=t[y])<o&&(o=u),(h=t[y+1])<s&&(s=h),u>a&&(a=u),h>c&&(c=h);f=0!==(f=Math.max(a-o,c-s))?1/f:0}return r(d,m,i,o,s,f),m}function e(t,e,n,r,i){var o,s;if(i===I(t,e,n,r)>0)for(o=e;o<n;o+=r)s=M(o,t[o],t[o+1],s);else for(o=n-r;o>=e;o-=r)s=M(o,t[o],t[o+1],s);if(s&&v(s,s.next)){var a=s.next;S(s),s=a}return s}function n(t,e){if(!t)return t;e||(e=t);var n,r=t;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==x(r.prev,r,r.next))r=r.next;else{var i=r.prev;if(S(r),(r=e=i)===r.next)break;n=!0}}while(n||r!==e);return e}function r(t,e,l,c,u,h,f){if(t){!f&&h&&p(t,c,u,h);for(var g,d,m=t;t.prev!==t.next;)if(g=t.prev,d=t.next,h?o(t,c,u,h):i(t))e.push(g.i/l),e.push(t.i/l),e.push(d.i/l),S(t),t=d.next,m=d.next;else if((t=d)===m){f?1===f?r(t=s(n(t),e,l),e,l,c,u,h,2):2===f&&a(t,e,l,c,u,h):r(n(t),e,l,c,u,h,1);break}}}function i(t){var e=t.prev,n=t,r=t.next;if(x(e,n,r)>=0)return!1;for(var i=t.next.next;i!==t.prev;){if(m(e.x,e.y,n.x,n.y,r.x,r.y,i.x,i.y)&&x(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function o(t,e,n,r){var i=t.prev,o=t,s=t.next;if(x(i,o,s)>=0)return!1;for(var a=i.x<o.x?i.x<s.x?i.x:s.x:o.x<s.x?o.x:s.x,l=i.y<o.y?i.y<s.y?i.y:s.y:o.y<s.y?o.y:s.y,c=i.x>o.x?i.x>s.x?i.x:s.x:o.x>s.x?o.x:s.x,u=i.y>o.y?i.y>s.y?i.y:s.y:o.y>s.y?o.y:s.y,h=g(a,l,e,n,r),f=g(c,u,e,n,r),p=t.prevZ,d=t.nextZ;p&&p.z>=h&&d&&d.z<=f;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;if(p=p.prevZ,d!==t.prev&&d!==t.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&x(d.prev,d,d.next)>=0)return!1;d=d.nextZ}for(;p&&p.z>=h;){if(p!==t.prev&&p!==t.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,p.x,p.y)&&x(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;d&&d.z<=f;){if(d!==t.prev&&d!==t.next&&m(i.x,i.y,o.x,o.y,s.x,s.y,d.x,d.y)&&x(d.prev,d,d.next)>=0)return!1;d=d.nextZ}return!0}function s(t,e,r){var i=t;do{var o=i.prev,s=i.next.next;!v(o,s)&&b(o,i,i.next,s)&&T(o,s)&&T(s,o)&&(e.push(o.i/r),e.push(i.i/r),e.push(s.i/r),S(i),S(i.next),i=t=s),i=i.next}while(i!==t);return n(i)}function a(t,e,i,o,s,a){var l=t;do{for(var c=l.next.next;c!==l.prev;){if(l.i!==c.i&&y(l,c)){var u=_(l,c);return l=n(l,l.next),u=n(u,u.next),r(l,e,i,o,s,a),void r(u,e,i,o,s,a)}c=c.next}l=l.next}while(l!==t)}function l(t,r,i,o){var s,a,l,u=[];for(s=0,a=r.length;s<a;s++)(l=e(t,r[s]*o,s<a-1?r[s+1]*o:t.length,o,!1))===l.next&&(l.steiner=!0),u.push(d(l));for(u.sort(c),s=0;s<u.length;s++)i=n(i=h(u[s],i),i.next);return i}function c(t,e){return t.x-e.x}function u(t){if(t.next.prev===t)return t;let e=t;for(;;){const n=e.next;if(n.prev===e||n===e||n===t)break;e=n}return e}function h(t,e){var r=function(t,e){var n,r=e,i=t.x,o=t.y,s=-1/0;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){var a=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(a<=i&&a>s){if(s=a,a===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==e);if(!n)return null;if(i===s)return n;var l,c=n,u=n.x,h=n.y,p=1/0;r=n;do{i>=r.x&&r.x>=u&&i!==r.x&&m(o<h?i:s,o,u,h,o<h?s:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),T(r,t)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&f(n,r)))&&(n=r,p=l)),r=r.next}while(r!==c);return n}(t,e);if(!r)return e;var i=_(r,t),o=n(r,r.next);let s=u(i);return n(s,s.next),o=u(o),u(e===r?o:e)}function f(t,e){return x(t.prev,t,e.prev)<0&&x(e.next,t,t.next)<0}function p(t,e,n,r){var i=t;do{null===i.z&&(i.z=g(i.x,i.y,e,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==t);i.prevZ.nextZ=null,i.prevZ=null,function(t){var e,n,r,i,o,s,a,l,c=1;do{for(n=t,t=null,o=null,s=0;n;){for(s++,r=n,a=0,e=0;e<c&&(a++,r=r.nextZ);e++);for(l=c;a>0||l>0&&r;)0!==a&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,a--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:t=i,i.prevZ=o,o=i;n=r}o.nextZ=null,c*=2}while(s>1)}(i)}function g(t,e,n,r,i){return(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-n)*i)|t<<8))|t<<4))|t<<2))|t<<1))|(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-r)*i)|e<<8))|e<<4))|e<<2))|e<<1))<<1}function d(t){var e=t,n=t;do{(e.x<n.x||e.x===n.x&&e.y<n.y)&&(n=e),e=e.next}while(e!==t);return n}function m(t,e,n,r,i,o,s,a){return(i-s)*(e-a)-(t-s)*(o-a)>=0&&(t-s)*(r-a)-(n-s)*(e-a)>=0&&(n-s)*(o-a)-(i-s)*(r-a)>=0}function y(t,e){return t.next.i!==e.i&&t.prev.i!==e.i&&!function(t,e){var n=t;do{if(n.i!==t.i&&n.next.i!==t.i&&n.i!==e.i&&n.next.i!==e.i&&b(n,n.next,t,e))return!0;n=n.next}while(n!==t);return!1}(t,e)&&(T(t,e)&&T(e,t)&&function(t,e){var n=t,r=!1,i=(t.x+e.x)/2,o=(t.y+e.y)/2;do{n.y>o!=n.next.y>o&&n.next.y!==n.y&&i<(n.next.x-n.x)*(o-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==t);return r}(t,e)&&(x(t.prev,t,e.prev)||x(t,e.prev,e))||v(t,e)&&x(t.prev,t,t.next)>0&&x(e.prev,e,e.next)>0)}function x(t,e,n){return(e.y-t.y)*(n.x-e.x)-(e.x-t.x)*(n.y-e.y)}function v(t,e){return t.x===e.x&&t.y===e.y}function b(t,e,n,r){var i=A(x(t,e,n)),o=A(x(t,e,r)),s=A(x(n,r,t)),a=A(x(n,r,e));return i!==o&&s!==a||!(0!==i||!w(t,n,e))||!(0!==o||!w(t,r,e))||!(0!==s||!w(n,t,r))||!(0!==a||!w(n,e,r))}function w(t,e,n){return e.x<=Math.max(t.x,n.x)&&e.x>=Math.min(t.x,n.x)&&e.y<=Math.max(t.y,n.y)&&e.y>=Math.min(t.y,n.y)}function A(t){return t>0?1:t<0?-1:0}function T(t,e){return x(t.prev,t,t.next)<0?x(t,e,t.next)>=0&&x(t,t.prev,e)>=0:x(t,e,t.prev)<0||x(t,t.next,e)<0}function _(t,e){var n=new O(t.i,t.x,t.y),r=new O(e.i,e.x,e.y),i=t.next,o=e.prev;return t.next=e,e.prev=t,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function M(t,e,n,r){var i=new O(t,e,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function S(t){t.next.prev=t.prev,t.prev.next=t.next,t.prevZ&&(t.prevZ.nextZ=t.nextZ),t.nextZ&&(t.nextZ.prevZ=t.prevZ)}function O(t,e,n){this.i=t,this.x=e,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function I(t,e,n,r){for(var i=0,o=e,s=n-r;o<n;o+=r)i+=(t[s]-t[o])*(t[o+1]+t[s+1]),s=o;return i}return t.deviation=function(t,e,n,r){var i=e&&e.length,o=i?e[0]*n:t.length,s=Math.abs(I(t,0,o,n));if(i)for(var a=0,l=e.length;a<l;a++){var c=e[a]*n,u=a<l-1?e[a+1]*n:t.length;s-=Math.abs(I(t,c,u,n))}var h=0;for(a=0;a<r.length;a+=3){var f=r[a]*n,p=r[a+1]*n,g=r[a+2]*n;h+=Math.abs((t[f]-t[g])*(t[p+1]-t[f+1])-(t[f]-t[p])*(t[g+1]-t[f+1]))}return 0===s&&0===h?0:Math.abs((h-s)/s)},t.flatten=function(t){for(var e=t[0][0].length,n={vertices:[],holes:[],dimensions:e},r=0,i=0;i<t.length;i++){for(var o=0;o<t[i].length;o++)for(var s=0;s<e;s++)n.vertices.push(t[i][o][s]);i>0&&(r+=t[i-1].length,n.holes.push(r))}return n},t},void 0!==(o=i())&&(r.exports=o);const l=(0,s.g)(a.exports)},13598:(t,e,n)=>{function r(){return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function i(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]]}function o(t,e){return new Float64Array(t,e,16)}n.d(e,{I:()=>s,a:()=>o,b:()=>i,c:()=>r});const s=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,createView:o,fromValues:function(t,e,n,r,i,o,s,a,l,c,u,h,f,p,g,d){return[t,e,n,r,i,o,s,a,l,c,u,h,f,p,g,d]}},Symbol.toStringTag,{value:"Module"}))},94961:(t,e,n)=>{function r(){return[0,0,0,1]}function i(t){return[t[0],t[1],t[2],t[3]]}function o(t,e){return new Float64Array(t,e,4)}n.d(e,{I:()=>s,a:()=>r,b:()=>i,c:()=>o});const s=[0,0,0,1];Object.freeze(Object.defineProperty({__proto__:null,IDENTITY:s,clone:i,create:r,createView:o,fromValues:function(t,e,n,r){return[t,e,n,r]}},Symbol.toStringTag,{value:"Module"}))},8310:(t,e,n)=>{n.d(e,{a:()=>y,c:()=>d,g:()=>x,h:()=>m,j:()=>w,l:()=>I}),n(80442);var r=n(92604),i=n(22021),o=n(52138),s=n(17896),a=n(65617),l=n(98766),c=n(88669),u=n(62155),h=n(78341),f=n(61277),p=n(12981);const g=d();function d(){return(0,c.c)()}function m(t,e=d()){return(0,l.c)(e,t)}function y(t){return t[3]}function x(t){return t}function v(t,e,n){if(null==e)return!1;const{origin:r,direction:i}=e,o=b;o[0]=r[0]-t[0],o[1]=r[1]-t[1],o[2]=r[2]-t[2];const s=i[0]*i[0]+i[1]*i[1]+i[2]*i[2];if(0===s)return!1;const a=2*(i[0]*o[0]+i[1]*o[1]+i[2]*o[2]),l=a*a-4*s*(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]-t[3]*t[3]);if(l<0)return!1;const c=Math.sqrt(l);let u=(-a-c)/(2*s);const h=(-a+c)/(2*s);return(u<0||h<u&&h>0)&&(u=h),!(u<0||(n&&(n[0]=r[0]+i[0]*u,n[1]=r[1]+i[1]*u,n[2]=r[2]+i[2]*u),0))}const b=(0,a.c)();function w(t,e){return v(t,e,null)}function A(t,e,n){const r=p.WM.get(),i=p.MP.get();(0,s.f)(r,e.origin,e.direction);const a=y(t);(0,s.f)(n,r,e.origin),(0,s.g)(n,n,1/(0,s.l)(n)*a);const l=_(t,e.origin),c=(0,f.EU)(e.origin,n);return(0,o.d)(i,c+l,r),(0,s.m)(n,n,i),n}function T(t,e,n){const r=(0,s.b)(p.WM.get(),e,t),i=(0,s.g)(p.WM.get(),r,t[3]/(0,s.l)(r));return(0,s.a)(n,i,t)}function _(t,e){const n=(0,s.b)(p.WM.get(),e,t),r=(0,s.l)(n),o=y(t),a=o+Math.abs(o-r);return(0,i.ZF)(o/a)}const M=(0,a.c)();function S(t,e,n,r){const o=(0,s.b)(M,e,t);switch(n){case u.R.X:{const t=(0,i.jE)(o,M)[2];return(0,s.s)(r,-Math.sin(t),Math.cos(t),0)}case u.R.Y:{const t=(0,i.jE)(o,M),e=t[1],n=t[2],a=Math.sin(e);return(0,s.s)(r,-a*Math.cos(n),-a*Math.sin(n),Math.cos(e))}case u.R.Z:return(0,s.n)(r,o);default:return}}function O(t,e){const n=(0,s.b)(C,e,t);return(0,s.l)(n)-t[3]}function I(t,e){const n=(0,s.d)(t,e),r=y(t);return n<=r*r}const C=(0,a.c)(),E=d();Object.freeze(Object.defineProperty({__proto__:null,NullSphere:g,altitudeAt:O,angleToSilhouette:_,axisAt:S,clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return v(t,e,n)?n:((0,h.JI)(e,t,n),T(t,n,n))},closestPointOnSilhouette:A,containsPoint:I,copy:m,create:d,distanceToSilhouette:function(t,e){const n=(0,s.b)(p.WM.get(),e,t),r=(0,s.p)(n),i=t[3]*t[3];return Math.sqrt(Math.abs(r-i))},elevate:function(t,e,n){return t!==n&&(0,s.c)(n,t),n[3]=t[3]+e,n},fromCenterAndRadius:function(t,e){return(0,c.f)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:function(t,e,n,r){return(0,c.f)(t,e,n,r)},getCenter:x,getRadius:y,intersectRay:v,intersectRayClosestSilhouette:function(t,e,n){if(v(t,e,n))return n;const r=A(t,e,p.WM.get());return(0,s.a)(n,e.origin,(0,s.g)(p.WM.get(),e.direction,(0,s.i)(e.origin,r)/(0,s.l)(e.direction))),n},intersectsRay:w,projectPoint:T,setAltitudeAt:function(t,e,n,r){const i=O(t,e),o=S(t,e,u.R.Z,C),a=(0,s.g)(C,o,n-i);return(0,s.a)(r,e,a)},setExtent:function(t,e,n){return r.Z.getLogger("esri.geometry.support.sphere").error("sphere.setExtent is not yet supported"),t===n?n:m(t,n)},tmpSphere:E,union:function(t,e,n=d()){const r=(0,s.i)(t,e),i=t[3],o=e[3];return r+o<i?((0,l.c)(n,t),n):r+i<o?((0,l.c)(n,e),n):((0,s.h)(n,t,e,(r+o-i)/(2*r)),n[3]=(r+i+o)/2,n)},wrap:function(t){return t}},Symbol.toStringTag,{value:"Module"}))},20773:(t,e,n)=>{n.d(e,{a:()=>a,b:()=>s,c:()=>i,d:()=>u,e:()=>l,n:()=>h,s:()=>c,t:()=>o});var r=n(72220);function i(t,e,n){o(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function o(t,e,n,i=3,o=i){if(t.length/i!==Math.ceil(e.length/o))return r.c.error("source and destination buffers need to have the same number of elements"),t;const s=t.length/i,a=n[0],l=n[1],c=n[2],u=n[4],h=n[5],f=n[6],p=n[8],g=n[9],d=n[10],m=n[12],y=n[13],x=n[14];let v=0,b=0;for(let n=0;n<s;n++){const n=e[v],r=e[v+1],s=e[v+2];t[b]=a*n+u*r+p*s+m,t[b+1]=l*n+h*r+g*s+y,t[b+2]=c*n+f*r+d*s+x,v+=o,b+=i}return t}function s(t,e,n){a(t.typedBuffer,e.typedBuffer,n,t.typedBufferStride,e.typedBufferStride)}function a(t,e,n,i=3,o=i){if(t.length/i!==Math.ceil(e.length/o))return void r.c.error("source and destination buffers need to have the same number of elements");const s=t.length/i,a=n[0],l=n[1],c=n[2],u=n[3],h=n[4],f=n[5],p=n[6],g=n[7],d=n[8];let m=0,y=0;for(let n=0;n<s;n++){const n=e[m],r=e[m+1],s=e[m+2];t[y]=a*n+u*r+p*s,t[y+1]=l*n+h*r+g*s,t[y+2]=c*n+f*r+d*s,m+=o,y+=i}}function l(t,e,n){c(t.typedBuffer,e,n,t.typedBufferStride)}function c(t,e,n,r=3){const i=Math.min(t.length/r,e.count),o=e.typedBuffer,s=e.typedBufferStride;let a=0,l=0;for(let e=0;e<i;e++)t[l]=n*o[a],t[l+1]=n*o[a+1],t[l+2]=n*o[a+2],a+=s,l+=r}function u(t,e){h(t.typedBuffer,e.typedBuffer,t.typedBufferStride,e.typedBufferStride)}function h(t,e,n=3,r=n){const i=Math.min(t.length/n,e.length/r);let o=0,s=0;for(let a=0;a<i;a++){const i=e[o],a=e[o+1],l=e[o+2],c=i*i+a*a+l*l;if(c>0){const e=1/Math.sqrt(c);t[s]=e*i,t[s+1]=e*a,t[s+2]=e*l}o+=r,s+=n}}Object.freeze(Object.defineProperty({__proto__:null,normalize:h,normalizeView:u,scale:c,scaleView:l,shiftRight:function(t,e,n){const r=Math.min(t.count,e.count),i=t.typedBuffer,o=t.typedBufferStride,s=e.typedBuffer,a=e.typedBufferStride;let l=0,c=0;for(let t=0;t<r;t++)i[c]=s[l]>>n,i[c+1]=s[l+1]>>n,i[c+2]=s[l+2]>>n,l+=a,c+=o},transformMat3:a,transformMat3View:s,transformMat4:o,transformMat4View:i},Symbol.toStringTag,{value:"Module"}))},91303:(t,e,n)=>{var r;n.d(e,{Y:()=>r}),function(t){t[t.KILOBYTES=1024]="KILOBYTES",t[t.MEGABYTES=1048576]="MEGABYTES",t[t.GIGABYTES=1073741824]="GIGABYTES"}(r||(r={}))},22807:(t,e,n)=>{n.d(e,{x:()=>i});var r=n(41213);class i{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,r.Y)((()=>this._reset())),this._itemsPtr===this._items.length&&this._grow(),this._items[this._itemsPtr++]}_reset(){const t=Math.min(3*Math.max(8,this._itemsPtr),this._itemsPtr+3*o);this._items.length=Math.min(t,this._items.length),this._itemsPtr=0}_grow(){for(let t=0;t<Math.max(8,Math.min(this._items.length,o));t++)this._items.push(this._allocator())}}const o=1024},83025:(t,e,n)=>{n.d(e,{JK:()=>a,QZ:()=>o,Rq:()=>s,bg:()=>i,mB:()=>l});var r=n(1533);function i(t,e=!1){return t<=r.DB?e?new Array(t).fill(0):new Array(t):new Float64Array(t)}function o(t){return((0,r.kJ)(t)?t.length:t.byteLength/8)<=r.DB?Array.from(t):new Float64Array(t)}function s(t,e,n){return Array.isArray(t)?t.slice(e,e+n):t.subarray(e,e+n)}function a(t,e){for(let n=0;n<e.length;++n)t[n]=e[n];return t}function l(t){return Array.isArray(t)?new Float64Array(t):t}},24882:(t,e,n)=>{n.d(e,{$z:()=>s,KF:()=>u,mi:()=>i});var r=n(1533);function i(t){return(0,r.kJ)(t)?t.length<r.DB?t:o(t):t.length<r.DB?Array.from(t):t.BYTES_PER_ELEMENT===Uint16Array.BYTES_PER_ELEMENT?t:o(t)}function o(t){let e=!0;for(const n of t){if(n>=65536)return(0,r.kJ)(t)?new Uint32Array(t):t;n>=256&&(e=!1)}return e?new Uint8Array(t):new Uint16Array(t)}function s(t){return t<=r.DB?new Array(t):t<=65536?new Uint16Array(t):new Uint32Array(t)}let a=(()=>{const t=new Uint32Array(131072);for(let e=0;e<t.length;++e)t[e]=e;return t})();const l=[0],c=(()=>{const t=new Uint16Array(65536);for(let e=0;e<t.length;++e)t[e]=e;return t})();function u(t){if(1===t)return l;if(t<r.DB)return Array.from(new Uint16Array(c.buffer,0,t));if(t<c.length)return new Uint16Array(c.buffer,0,t);if(t>a.length){const e=Math.max(2*a.length,t);a=new Uint32Array(e);for(let t=0;t<a.length;t++)a[t]=t}return new Uint32Array(a.buffer,0,t)}new Uint8Array(65536)},62540:(t,e,n)=>{n.d(e,{Z:()=>x});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011),h=n(75215),f=n(65542),p=n(60746),g=n(71630);const d="esri.geometry.support.MeshComponent",m=a.Z.getLogger(d);let y=r=class extends o.wq{static from(t){return(0,h.TJ)(r,t)}constructor(t){super(t),this.faces=null,this.material=null,this.shading="source",this.trustSourceNormals=!1}castFaces(t){return(0,g.X)(t,Uint32Array,[Uint16Array],{loggerTag:".faces=",stride:3},m)}castMaterial(t){return(0,h.TJ)(t&&"object"==typeof t&&("metallic"in t||"roughness"in t||"metallicRoughnessTexture"in t)?p.Z:f.Z,t)}clone(){return new r({faces:(0,s.d9)(this.faces),shading:this.shading,material:(0,s.d9)(this.material),trustSourceNormals:this.trustSourceNormals})}cloneWithDeduplication(t,e){const n={faces:(0,s.d9)(this.faces),shading:this.shading,material:this.material?this.material.cloneWithDeduplication(t,e):null,trustSourceNormals:this.trustSourceNormals};return new r(n)}get memoryUsage(){let t=0;return null!=this.faces&&(t+=this.faces.byteLength),null!=this.material&&(t+=this.material.memoryUsage),t}};(0,i._)([(0,l.Cb)({json:{write:!0}})],y.prototype,"faces",void 0),(0,i._)([(0,c.p)("faces")],y.prototype,"castFaces",null),(0,i._)([(0,l.Cb)({type:f.Z,json:{write:!0}})],y.prototype,"material",void 0),(0,i._)([(0,c.p)("material")],y.prototype,"castMaterial",null),(0,i._)([(0,l.Cb)({type:String,json:{write:!0}})],y.prototype,"shading",void 0),(0,i._)([(0,l.Cb)({type:Boolean})],y.prototype,"trustSourceNormals",void 0),y=r=(0,i._)([(0,u.j)(d)],y);const x=y},85872:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(t){super(t),this.type="georeferenced-relative",this.isRelative=!0,this.isGeoreferenced=!0,this.origin=(0,c.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new u.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFromPoint({x:t,y:e,z:n}){this.origin=(0,c.f)(t,e,n??0)}};(0,r._)([(0,a.J)({georeferencedRelative:"georeferenced-relative"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshGeoreferencedRelativeVertexSpace")],h);const f=h},50567:(t,e,n)=>{n.d(e,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=(n(92604),n(75215),n(67676),n(80442),n(20102),n(36030)),a=n(52011);let l=class extends((0,i.J)(o.wq)){constructor(){super({}),this.type="georeferenced",this.isRelative=!1,this.isGeoreferenced=!0}};(0,r._)([(0,s.J)({georeferenced:"georeferenced"},{readOnly:!0})],l.prototype,"type",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshGeoreferencedVertexSpace")],l);const c=l},84555:(t,e,n)=>{n.d(e,{Z:()=>f});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(36030)),l=n(52011),c=n(65617),u=n(94139);let h=class extends((0,i.J)(o.wq)){constructor(t){super(t),this.type="local",this.isRelative=!0,this.isGeoreferenced=!1,this.origin=(0,c.c)()}getOriginPoint(t){const[e,n,r]=this.origin;return new u.Z({x:e,y:n,z:r,spatialReference:t})}setOriginFromPoint({x:t,y:e,z:n}){this.origin=(0,c.f)(t,e,n??0)}};(0,r._)([(0,a.J)({local:"local"},{readOnly:!0})],h.prototype,"type",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],h.prototype,"origin",void 0),h=(0,r._)([(0,l.j)("esri.geometry.support.MeshLocalVertexSpace")],h);const f=h},65542:(t,e,n)=>{n.d(e,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(96674),a=n(5600),l=(n(75215),n(67676),n(80442),n(52011)),c=n(85965),u=n(80218);let h=r=class extends s.wq{constructor(t){super(t),this.color=null,this.colorTexture=null,this.colorTextureTransform=null,this.normalTexture=void 0,this.normalTextureTransform=void 0,this.alphaMode="auto",this.alphaCutoff=.5,this.doubleSided=!0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=null!=t?t.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(e));return null!=t&&t.set(this,i),i}clonePropertiesWithDeduplication(t){return{color:null!=this.color?this.color.clone():null,colorTexture:this.colorTexture?.cloneWithDeduplication(t),normalTexture:this.normalTexture?.cloneWithDeduplication(t),alphaMode:this.alphaMode,alphaCutoff:this.alphaCutoff,doubleSided:this.doubleSided,colorTextureTransform:this.colorTextureTransform?.clone(),normalTextureTransform:this.normalTextureTransform?.clone()}}get memoryUsage(){return this.getMemoryUsage()}getMemoryUsage(){let t=0;return t+=null!=this.color?16:0,null!=this.colorTexture&&(t+=this.colorTexture.memoryUsage),t+=null!=this.colorTextureTransform?20:0,null!=this.normalTexture&&(t+=this.normalTexture.memoryUsage),t+=null!=this.normalTextureTransform?20:0,t}};(0,i._)([(0,a.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"color",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"colorTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"colorTextureTransform",void 0),(0,i._)([(0,a.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"normalTexture",void 0),(0,i._)([(0,a.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"normalTextureTransform",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaMode",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"alphaCutoff",void 0),(0,i._)([(0,a.Cb)({nonNullable:!0,json:{write:!0}})],h.prototype,"doubleSided",void 0),h=r=(0,i._)([(0,l.j)("esri.geometry.support.MeshMaterial")],h);const f=h},60746:(t,e,n)=>{n.d(e,{Z:()=>f});var r,i=n(43697),o=n(22303),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011)),l=n(65542),c=n(85965),u=n(80218);let h=r=class extends l.Z{constructor(t){super(t),this.emissiveColor=null,this.emissiveTexture=null,this.emissiveTextureTransform=void 0,this.occlusionTexture=null,this.occlusionTextureTransform=void 0,this.metallic=1,this.roughness=1,this.metallicRoughnessTexture=null,this.metallicRoughnessTextureTransform=void 0}clone(){return this.cloneWithDeduplication(null,new Map)}cloneWithDeduplication(t,e){const n=null!=t?t.get(this):null;if(n)return n;const i=new r(this.clonePropertiesWithDeduplication(e));return null!=t&&t.set(this,i),i}getMemoryUsage(){let t=super.getMemoryUsage();return t+=null!=this.emissiveColor?16:0,null!=this.emissiveTexture&&(t+=this.emissiveTexture.memoryUsage),t+=null!=this.emissiveTextureTransform?20:0,null!=this.occlusionTexture&&(t+=this.occlusionTexture.memoryUsage),t+=null!=this.occlusionTextureTransform?20:0,null!=this.metallicRoughnessTexture&&(t+=this.metallicRoughnessTexture.memoryUsage),t+=null!=this.metallicRoughnessTextureTransform?20:0,t}clonePropertiesWithDeduplication(t){return{...super.clonePropertiesWithDeduplication(t),emissiveColor:this.emissiveColor?.clone(),emissiveTexture:this.emissiveTexture?.cloneWithDeduplication(t),emissiveTextureTransform:this.emissiveTextureTransform?.clone(),occlusionTexture:this.occlusionTexture?.cloneWithDeduplication(t),occlusionTextureTransform:this.occlusionTextureTransform?.clone(),metallic:this.metallic,roughness:this.roughness,metallicRoughnessTexture:this.metallicRoughnessTexture?.cloneWithDeduplication(t),metallicRoughnessTextureTransform:this.metallicRoughnessTextureTransform?.clone()}}};(0,i._)([(0,s.Cb)({type:o.Z,json:{write:!0}})],h.prototype,"emissiveColor",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"emissiveTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"emissiveTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"occlusionTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"occlusionTextureTransform",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"metallic",void 0),(0,i._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0},range:{min:0,max:1}})],h.prototype,"roughness",void 0),(0,i._)([(0,s.Cb)({type:c.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTexture",void 0),(0,i._)([(0,s.Cb)({type:u.Z,json:{write:!0}})],h.prototype,"metallicRoughnessTextureTransform",void 0),h=r=(0,i._)([(0,a.j)("esri.geometry.support.MeshMaterialMetallicRoughness")],h);const f=h},85965:(t,e,n)=>{n.d(e,{Z:()=>m});var r,i=n(43697),o=(n(80442),n(79790)),s=n(96674),a=n(5600),l=n(75215),c=(n(67676),n(71715)),u=n(52011),h=n(30556),f=n(25929);const p=new WeakMap;let g=0,d=r=class extends s.wq{constructor(t){super(t),this.wrap="repeat"}get url(){return this._get("url")||null}set url(t){this._set("url",t),t&&this._set("data",null)}get data(){return this._get("data")||null}set data(t){this._set("data",t),t&&this._set("url",null)}writeData(t,e,n,r){if(t instanceof HTMLImageElement){const i={type:"image-element",src:(0,f.t)(t.src,r),crossOrigin:t.crossOrigin};e[n]=i}else if(t instanceof HTMLCanvasElement){const r=t.getContext("2d").getImageData(0,0,t.width,t.height),i={type:"canvas-element",imageData:this._encodeImageData(r)};e[n]=i}else if(t instanceof HTMLVideoElement){const i={type:"video-element",src:(0,f.t)(t.src,r),autoplay:t.autoplay,loop:t.loop,muted:t.muted,crossOrigin:t.crossOrigin,preload:t.preload};e[n]=i}else if(t instanceof ImageData){const r={type:"image-data",imageData:this._encodeImageData(t)};e[n]=r}}readData(t){switch(t.type){case"image-element":{const e=new Image;return e.src=t.src,e.crossOrigin=t.crossOrigin,e}case"canvas-element":{const e=this._decodeImageData(t.imageData),n=document.createElement("canvas");return n.width=e.width,n.height=e.height,n.getContext("2d").putImageData(e,0,0),n}case"image-data":return this._decodeImageData(t.imageData);case"video-element":{const e=document.createElement("video");return e.src=t.src,e.crossOrigin=t.crossOrigin,e.autoplay=t.autoplay,e.loop=t.loop,e.muted=t.muted,e.preload=t.preload,e}default:return}}get transparent(){const t=this.data,e=this.url;if(t instanceof HTMLCanvasElement)return this._imageDataContainsTransparent(t.getContext("2d").getImageData(0,0,t.width,t.height));if(t instanceof ImageData)return this._imageDataContainsTransparent(t);if(e){const t=e.substr(e.length-4,4).toLowerCase(),n=e.substr(0,15).toLocaleLowerCase();if(".png"===t||"data:image/png;"===n)return!0}return!1}set transparent(t){this._overrideIfSome("transparent",t)}get contentHash(){const t="string"==typeof this.wrap?this.wrap:"object"==typeof this.wrap?`${this.wrap.horizontal}/${this.wrap.vertical}`:"",e=(e="")=>`d:${e},t:${this.transparent},w:${t}`;return null!=this.url?e(this.url):null!=this.data?this.data instanceof HTMLImageElement||this.data instanceof HTMLVideoElement?e(this.data.src):(p.has(this.data)||p.set(this.data,++g),e(p.get(this.data))):e()}get memoryUsage(){let t=0;if(t+=null!=this.url?this.url.length:0,null!=this.data){const e=this.data;"data"in e?t+=e.data.byteLength:e instanceof HTMLImageElement?t+=e.naturalWidth*e.naturalHeight*3:e instanceof HTMLCanvasElement&&(t+=e.width*e.height*3)}return t}clone(){const t={url:this.url,data:this.data,wrap:this._cloneWrap()};return new r(t)}cloneWithDeduplication(t){const e=t.get(this);if(e)return e;const n=this.clone();return t.set(this,n),n}_cloneWrap(){return"string"==typeof this.wrap?this.wrap:{horizontal:this.wrap.horizontal,vertical:this.wrap.vertical}}_encodeImageData(t){let e="";for(let n=0;n<t.data.length;n++)e+=String.fromCharCode(t.data[n]);return{data:btoa(e),width:t.width,height:t.height}}_decodeImageData(t){const e=atob(t.data),n=new Uint8ClampedArray(e.length);for(let t=0;t<e.length;t++)n[t]=e.charCodeAt(t);return(0,o.Jl)(n,t.width,t.height)}_imageDataContainsTransparent(t){for(let e=3;e<t.data.length;e+=4)if(255!==t.data[e])return!0;return!1}static from(t){return"string"==typeof t?new r({url:t}):t instanceof HTMLImageElement||t instanceof HTMLCanvasElement||t instanceof ImageData||t instanceof HTMLVideoElement?new r({data:t}):(0,l.TJ)(r,t)}};(0,i._)([(0,a.Cb)({type:String,json:{write:f.w}})],d.prototype,"url",null),(0,i._)([(0,a.Cb)({json:{write:{overridePolicy(){return{enabled:!this.url}}}}}),(0,a.Cb)()],d.prototype,"data",null),(0,i._)([(0,h.c)("data")],d.prototype,"writeData",null),(0,i._)([(0,c.r)("data")],d.prototype,"readData",null),(0,i._)([(0,a.Cb)({type:Boolean,json:{write:{overridePolicy(){return{enabled:this._isOverridden("transparent")}}}}})],d.prototype,"transparent",null),(0,i._)([(0,a.Cb)({json:{write:!0}})],d.prototype,"wrap",void 0),(0,i._)([(0,a.Cb)({readOnly:!0})],d.prototype,"contentHash",null),d=r=(0,i._)([(0,u.j)("esri.geometry.support.MeshTexture")],d);const m=d},80218:(t,e,n)=>{n.d(e,{Z:()=>c});var r=n(43697),i=n(2368),o=n(96674),s=n(5600),a=(n(75215),n(67676),n(80442),n(52011));let l=class extends((0,i.J)(o.wq)){constructor(t){super(t),this.offset=[0,0],this.rotation=0,this.scale=[1,1]}};(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"offset",void 0),(0,r._)([(0,s.Cb)({type:Number,nonNullable:!0,json:{write:!0}})],l.prototype,"rotation",void 0),(0,r._)([(0,s.Cb)({type:[Number],nonNullable:!0,json:{write:!0}})],l.prototype,"scale",void 0),l=(0,r._)([(0,a.j)("esri.geometry.support.MeshTextureTransform")],l);const c=l},71630:(t,e,n)=>{n.d(e,{Q:()=>p,X:()=>d});var r,i=n(43697),o=n(96674),s=n(22974),a=n(92604),l=n(5600),c=n(90578),u=n(52011);const h="esri.geometry.support.MeshVertexAttributes",f=a.Z.getLogger(h);let p=r=class extends o.wq{constructor(t){super(t),this.color=null,this.position=new Float64Array(0),this.uv=null,this.normal=null,this.tangent=null}castColor(t){return d(t,Uint8Array,[Uint8ClampedArray],{loggerTag:".color=",stride:4},f)}castPosition(t){return t&&t instanceof Float32Array&&f.warn(".position=","Setting position attribute from a Float32Array may cause precision problems. Consider storing data in a Float64Array or a regular number array"),d(t,Float64Array,[Float32Array],{loggerTag:".position=",stride:3},f)}castUv(t){return d(t,Float32Array,[Float64Array],{loggerTag:".uv=",stride:2},f)}castNormal(t){return d(t,Float32Array,[Float64Array],{loggerTag:".normal=",stride:3},f)}castTangent(t){return d(t,Float32Array,[Float64Array],{loggerTag:".tangent=",stride:4},f)}clone(){const t={position:(0,s.d9)(this.position),uv:(0,s.d9)(this.uv),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),color:(0,s.d9)(this.color)};return new r(t)}clonePositional(){const t={position:(0,s.d9)(this.position),normal:(0,s.d9)(this.normal),tangent:(0,s.d9)(this.tangent),uv:this.uv,color:this.color};return new r(t)}get memoryUsage(){let t=0;return t+=this.position.byteLength,null!=this.uv&&(t+=this.uv.byteLength),null!=this.normal&&(t+=this.normal.byteLength),null!=this.tangent&&(t+=this.tangent.byteLength),null!=this.color&&(t+=this.color.byteLength),t}};function g(t,e,n,r){const{loggerTag:i,stride:o}=e;return t.length%o!=0?(r.error(i,`Invalid array length, expected a multiple of ${o}`),new n([])):t}function d(t,e,n,r,i){if(!t)return t;if(t instanceof e)return g(t,r,e,i);for(const o of n)if(t instanceof o)return g(new e(t),r,e,i);if(Array.isArray(t))return g(new e(t),r,e,i);{const r=n.map((t=>`'${t.name}'`));return i.error(`Failed to set property, expected one of ${r}, but got ${t.constructor.name}`),new e([])}}function m(t,e,n){e[n]=function(t){const e=new Array(t.length);for(let n=0;n<t.length;n++)e[n]=t[n];return e}(t)}(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"color",void 0),(0,i._)([(0,c.p)("color")],p.prototype,"castColor",null),(0,i._)([(0,l.Cb)({nonNullable:!0,json:{write:m}})],p.prototype,"position",void 0),(0,i._)([(0,c.p)("position")],p.prototype,"castPosition",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"uv",void 0),(0,i._)([(0,c.p)("uv")],p.prototype,"castUv",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"normal",void 0),(0,i._)([(0,c.p)("normal")],p.prototype,"castNormal",null),(0,i._)([(0,l.Cb)({json:{write:m}})],p.prototype,"tangent",void 0),(0,i._)([(0,c.p)("tangent")],p.prototype,"castTangent",null),p=r=(0,i._)([(0,u.j)(h)],p)},72220:(t,e,n)=>{n.d(e,{c:()=>r});const r=n(92604).Z.getLogger("esri.views.3d.support.buffer.math")},16996:(t,e,n)=>{n.d(e,{Ue:()=>l,nF:()=>u,zk:()=>c});var r=n(22021),i=n(22807),o=n(17896),s=n(65617),a=n(12981);function l(t){return t?{origin:(0,s.a)(t.origin),vector:(0,s.a)(t.vector)}:{origin:(0,s.c)(),vector:(0,s.c)()}}function c(t,e,n=l()){return(0,o.c)(n.origin,t),(0,o.b)(n.vector,e,t),n}function u(t,e,n){return function(t,e,n,i,s){const{vector:l,origin:c}=t,u=(0,o.b)(a.WM.get(),e,c),h=(0,o.e)(l,u)/(0,o.p)(l);return(0,o.g)(s,l,(0,r.uZ)(h,0,1)),(0,o.a)(s,s,t.origin)}(t,e,0,0,n)}(0,s.c)(),(0,s.c)(),new i.x((()=>l()))},84470:(t,e,n)=>{n.d(e,{CP:()=>a,JG:()=>g,LL:()=>l,NZ:()=>c,fV:()=>d,vj:()=>y,yT:()=>v,zE:()=>x});var r=n(3172),i=n(67676),o=n(95330),s=n(2981);class a{constructor(t,e,n){this.assetName=t,this.assetMimeType=e,this.parts=n}equals(t){return this===t||this.assetName===t.assetName&&this.assetMimeType===t.assetMimeType&&(0,i.fS)(this.parts,t.parts,((t,e)=>t.equals(e)))}isOnService(t){return this.parts.every((e=>e.isOnService(t)))}makeHash(){let t="";for(const e of this.parts)t+=e.partHash;return t}async toBlob(t){const{parts:e}=this;if(1===e.length)return e[0].toBlob(t);const n=await Promise.all(e.map((e=>e.toBlob(t))));return(0,o.k_)(t),new Blob(n)}}class l{constructor(t,e){this.partUrl=t,this.partHash=e}equals(t){return this===t||this.partUrl===t.partUrl&&this.partHash===t.partHash}isOnService(t){return this.partUrl.startsWith(`${t.path}/assets/`)}async toBlob(t){const{data:e}=await(0,r.default)(this.partUrl,{responseType:"blob"});return(0,o.k_)(t),e}}function c(t){return function(t){return!!t&&(Array.isArray(t)?t.some(p):p(t))}(t?.source)}function u(t){return!!Array.isArray(t)&&t.every((t=>t instanceof a))}const h=/^(model\/gltf\+json)|(model\/gltf-binary)$/,f=/\.(gltf|glb)/i;function p(t){if(t instanceof File){const{type:e,name:n}=t;return h.test(e)||f.test(n)}return h.test(t.assetMimeType)||f.test(t.assetName)}function g(t,e){if(!t)return!1;const{source:n}=t;return function(t,e){return Array.isArray(t)?t.every((t=>m(t,e))):m(t,e)}(n,e)}function d(t,e){if(t===e)return!0;const{source:n}=t,{source:r}=e;if(n===r)return!0;if(u(n)&&u(r)){if(n.length!==r.length)return!1;const t=(t,e)=>t.assetName<e.assetName?-1:t.assetName>e.assetName?1:0,e=[...n].sort(t),i=[...r].sort(t);for(let t=0;t<e.length;++t)if(!e[t].equals(i[t]))return!1;return!0}return!1}function m(t,e){return t instanceof a&&t.isOnService(e)}function y(t,e){return t instanceof File?(0,s.Ow)(t.name,e)??(0,s.S0)(t.type,e):(0,s.S0)(t.assetMimeType,e)??(0,s.Ow)(t.assetName,e)}function x(t){return Array.isArray(t)?t:[t]}function v(t){return!!t.original}},47545:(t,e,n)=>{n.d(e,{d:()=>o});var r=n(22021),i=n(24882);function o(t,e,n){const o=Array.isArray(t),u=o?t.length/e:t.byteLength/(4*e),h=o?t:new Uint32Array(t,0,u*e),f=n?.minReduction??0,p=n?.originalIndices||null,g=p?p.length:0,d=n?.componentOffsets||null;let m=0;if(d)for(let t=0;t<d.length-1;t++){const e=d[t+1]-d[t];e>m&&(m=e)}else m=u;const y=Math.floor(1.1*m)+1;(null==c||c.length<2*y)&&(c=new Uint32Array((0,r.Sf)(2*y)));for(let t=0;t<2*y;t++)c[t]=0;let x=0;const v=!!d&&!!p,b=v?g:u;let w=(0,i.$z)(u);const A=new Uint32Array(g),T=1.96;let _=0!==f?Math.ceil(4*T*T/(f*f)*f*(1-f)):b,M=1,S=d?d[1]:b;for(let t=0;t<b;t++){if(t===_){const e=1-x/t;if(e+T*Math.sqrt(e*(1-e)/t)<f)return null;_*=2}if(t===S){for(let t=0;t<2*y;t++)c[t]=0;if(p)for(let t=d[M-1];t<d[M];t++)A[t]=w[p[t]];S=d[++M]}const n=v?p[t]:t,r=n*e,i=l(h,r,e);let o=i%y,a=x;for(;0!==c[2*o+1];){if(c[2*o]===i){const t=c[2*o+1]-1;if(s(h,r,t*e,e)){a=w[t];break}}o++,o>=y&&(o-=y)}a===x&&(c[2*o]=i,c[2*o+1]=n+1,x++),w[n]=a}if(0!==f&&1-x/u<f)return null;if(v){for(let t=d[M-1];t<A.length;t++)A[t]=w[p[t]];w=(0,i.mi)(A)}const O=o?new Array(x):new Uint32Array(x*e);x=0;for(let t=0;t<b;t++)w[t]===x&&(a(h,(v?p[t]:t)*e,O,x*e,e),x++);if(p&&!v){const t=new Uint32Array(g);for(let e=0;e<t.length;e++)t[e]=w[p[e]];w=(0,i.mi)(t)}return{buffer:Array.isArray(O)?O:O.buffer,indices:w,uniqueCount:x}}function s(t,e,n,r){for(let i=0;i<r;i++)if(t[e+i]!==t[n+i])return!1;return!0}function a(t,e,n,r,i){for(let o=0;o<i;o++)n[r+o]=t[e+o]}function l(t,e,n){let r=0;for(let i=0;i<n;i++)r=t[e+i]+r|0,r=r+(r<<11)+(r>>>2)|0;return r>>>0}let c=null},62073:(t,e,n)=>{n.d(e,{Ue:()=>o,zu:()=>s,mJ:()=>p}),n(22021);var r=n(17896),i=n(65617);function o(t=g){return[t[0],t[1],t[2],t[3]]}function s(t,e,n,i=0,p=Math.floor(n*(1/3)),g=Math.floor(n*(2/3))){if(n<3)return!1;e(l,i);let d=p,m=!1;for(;d<n-1&&!m;)e(c,d),d++,m=!(0,r.k)(l,c);if(!m)return!1;for(d=Math.max(d,g),m=!1;d<n&&!m;)e(u,d),d++,(0,r.b)(h,l,c),(0,r.n)(h,h),(0,r.b)(f,c,u),(0,r.n)(f,f),m=!(0,r.k)(l,u)&&!(0,r.k)(c,u)&&Math.abs((0,r.e)(h,f))<a;return m?(function(t,e,n,r=o()){const i=n[0]-e[0],s=n[1]-e[1],a=n[2]-e[2],l=t[0]-e[0],c=t[1]-e[1],u=t[2]-e[2],h=s*u-a*c,f=a*l-i*u,p=i*c-s*l,g=h*h+f*f+p*p,d=Math.abs(g-1)>1e-5&&g>1e-12?1/Math.sqrt(g):1;r[0]=h*d,r[1]=f*d,r[2]=p*d,r[3]=-(r[0]*t[0]+r[1]*t[1]+r[2]*t[2])}(l,c,u,t),!0):(0!==i||1!==p||2!==g)&&s(t,e,n,0,1,2)}n(8310),n(61277),n(12981),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)(),(0,i.c)();const a=.99619469809,l=(0,i.c)(),c=(0,i.c)(),u=(0,i.c)(),h=(0,i.c)(),f=(0,i.c)();function p(t){return t}const g=[0,0,1,0];var d,m;(m=d||(d={}))[m.NONE=0]="NONE",m[m.CLAMP=1]="CLAMP",m[m.INFINITE_MIN=4]="INFINITE_MIN",m[m.INFINITE_MAX=8]="INFINITE_MAX",d.INFINITE_MIN,d.INFINITE_MAX,d.INFINITE_MAX},78341:(t,e,n)=>{n.d(e,{JI:()=>c,Ue:()=>s,re:()=>l}),n(67676);var r=n(22807),i=n(17896),o=n(65617);function s(t){return t?a((0,o.a)(t.origin),(0,o.a)(t.direction)):a((0,o.c)(),(0,o.c)())}function a(t,e){return{origin:t,direction:e}}function l(t,e){const n=u.get();return n.origin=t,n.direction=e,n}function c(t,e,n){const r=(0,i.e)(t.direction,(0,i.b)(n,e,t.origin));return(0,i.a)(n,t.origin,(0,i.g)(n,t.direction,r)),n}n(12981);const u=new r.x((()=>s()))},61277:(t,e,n)=>{n.d(e,{EU:()=>s});var r=n(22021),i=n(17896),o=n(65617);function s(t,e){const n=(0,i.e)(t,e)/((0,i.l)(t)*(0,i.l)(e));return-(0,r.ZF)(n)}(0,o.c)(),(0,o.c)()},12981:(t,e,n)=>{n.d(e,{MP:()=>g,WM:()=>p});var r=n(91303),i=n(41213),o=n(46521),s=n(13598),a=n(94961),l=n(97323),c=n(65617),u=n(88669);class h{constructor(t,e,n){this._itemByteSize=t,this._itemCreate=e,this._buffers=new Array,this._items=new Array,this._itemsPtr=0,this._itemsPerBuffer=Math.ceil(n/this._itemByteSize)}get(){0===this._itemsPtr&&(0,i.Y)((()=>this._reset()));const t=Math.floor(this._itemsPtr/this._itemsPerBuffer);for(;this._buffers.length<=t;){const t=new ArrayBuffer(this._itemsPerBuffer*this._itemByteSize);for(let e=0;e<this._itemsPerBuffer;++e)this._items.push(this._itemCreate(t,e*this._itemByteSize));this._buffers.push(t)}return this._items[this._itemsPtr++]}_reset(){const t=2*(Math.floor(this._itemsPtr/this._itemsPerBuffer)+1);for(;this._buffers.length>t;)this._buffers.pop(),this._items.length=this._buffers.length*this._itemsPerBuffer;this._itemsPtr=0}static createVec2f64(t=f){return new h(16,l.c,t)}static createVec3f64(t=f){return new h(24,c.b,t)}static createVec4f64(t=f){return new h(32,u.a,t)}static createMat3f64(t=f){return new h(72,o.a,t)}static createMat4f64(t=f){return new h(128,s.a,t)}static createQuatf64(t=f){return new h(32,a.c,t)}get test(){return{size:this._buffers.length*this._itemsPerBuffer*this._itemByteSize}}}const f=4*r.Y.KILOBYTES,p=(h.createVec2f64(),h.createVec3f64()),g=(h.createVec4f64(),h.createMat3f64(),h.createMat4f64());h.createQuatf64()},70558:(t,e,n)=>{n.r(e),n.d(e,{assetMapFromAssetMapsJSON:()=>Xt,extractMesh:()=>Jt,meshFeatureSetFromJSON:()=>Yt});var r=n(38171),i=n(92604),o=n(30175),s=n(65617),a=n(6570),l=n(43697),c=n(20102),u=n(83379),h=n(609),f=n(95330),p=n(17445),g=n(5600),d=(n(75215),n(67676),n(80442),n(52011)),m=n(9361),y=n(94139),x=n(38913),v=n(3709),b=n(62540),w=n(85872),A=n(50567),T=n(84555),_=n(2674),M=n(71630),S=n(95401),O=n(62155),I=n(86662),C=n(83025),E=n(24882),R=n(47545),N=(n(66577),n(22021)),L=n(67900),Z=n(17896),P=n(62073);n(4726),n(22631),n(35065);const F=(0,P.Ue)();function U(t,e,n,r,i,o,s){i*=3;for(let a=0;a<o;++a){const o=t[e];r[i++]=o[0],r[i++]=o[1],r[i++]=s?o[2]:0,e+=n}return i/3}function D(t,e,n){if(e){const e=function(t,e,n){const r=function(t,e,n,r){const i=(t=>!Array.isArray(t[0]))(e)?(t,n)=>e[3*t+n]:(t,n)=>e[t][n],o=r?(0,L.c9)(r)/(0,L._R)(r):1;return(0,P.zu)(t,((t,e)=>(0,Z.s)(t,i(e,0)*o,i(e,1)*o,i(e,2))),n)}(F,t,e,n)?(0,P.mJ)(F):[0,0,1];return Math.abs(r[2])>Math.cos((0,N.Vl)(80))?O.R.Z:Math.abs(r[1])>Math.abs(r[0])?O.R.Y:O.R.X}(t,t.length-1,n);if(e===O.R.X)return!(0,I.bu)(t,O.R.Y,O.R.Z);if(e===O.R.Y)return!(0,I.bu)(t,O.R.X,O.R.Z)}return!(0,I.bu)(t,O.R.X,O.R.Y)}var j,B;(B=j||(j={}))[B.NONE=0]="NONE",B[B.CCW_IS_HOLE=1]="CCW_IS_HOLE";var z=n(66459);let k=null;function V(t,e){let n=1/0,r=1/0,i=1/0,o=-1/0,s=-1/0,l=-1/0;const c=t.length;let u=0;for(;u<c;){const e=t[u++],a=t[u++],c=t[u++];n=Math.min(n,e),r=Math.min(r,a),i=Math.min(i,c),o=Math.max(o,e),s=Math.max(s,a),l=Math.max(l,c)}return new a.Z({xmin:n,ymin:r,zmin:i,xmax:o,ymax:s,zmax:l,spatialReference:e})}var G=n(44547),W=n(13442);const H="esri.geometry.support.meshUtils.centerAt";const Y=(0,s.c)(),J=(0,s.c)(),q=(0,s.c)();n(99880),n(3172);var $=n(17452);function X(t){const e=(0,$.Yd)(t.url);return n=>{const r=(0,$.PF)(n,e,e),i=r?r.replace(/^ *\.\//,""):null;return(i?t.files.get(i):null)??n}}function K(t){return nt.fromBlob(t)}n(47026);const Q=/^(model\/gltf\+json)|(model\/gltf-binary)$/,tt=/\.(gltf|glb)/i;function et(t){const e=new Map;let n=null;for(const{name:r,mimeType:i,source:o}of t)(null==n||Q.test(i)||tt.test(r))&&(n=o.url),e.set(r,o.url),o.files.forEach(((t,n)=>e.set(n,t)));if(null==n)throw new c.Z("mesh-load-external:missing-files","Missing files to load external mesh source");return new nt(n,(()=>t.forEach((({source:t})=>t.dispose()))),e)}class nt{constructor(t,e=(()=>{}),n=new Map){this.url=t,this.dispose=e,this.files=n}static fromBlob(t){const e=URL.createObjectURL(t);return new nt(e,(()=>URL.revokeObjectURL(e)))}}var rt=n(2368),it=n(46791),ot=n(84470);let st=class extends rt.j{constructor(){super(),this.externalSources=new it.Z,this._explicitDisplaySource=null,this.addHandles((0,p.on)((()=>this.externalSources),"after-remove",(({item:t})=>{t===this._explicitDisplaySource&&(this._explicitDisplaySource=null)}),{sync:!0,onListenerRemove:()=>this._explicitDisplaySource=null}))}get displaySource(){return this._explicitDisplaySource??this._implicitDisplaySource}set displaySource(t){if(null!=t&&!(0,ot.NZ)(t))throw new Error("Cannot use this source for display: it is not in a supported format.");this._explicitDisplaySource=t,t&&this.externalSources.every((e=>!(0,ot.fV)(e,t)))&&this.externalSources.add(t)}clearSources(){this.externalSources.removeAll()}getExternalSourcesOnService(t){return this.externalSources.items.filter((e=>(0,ot.JG)(e,t)))}get _implicitDisplaySource(){return this.externalSources.find(ot.NZ)}};(0,l._)([(0,g.Cb)()],st.prototype,"externalSources",void 0),(0,l._)([(0,g.Cb)()],st.prototype,"displaySource",null),(0,l._)([(0,g.Cb)()],st.prototype,"_implicitDisplaySource",null),(0,l._)([(0,g.Cb)()],st.prototype,"_explicitDisplaySource",void 0),st=(0,l._)([(0,d.j)("esri.geometry.support.meshUtils.Metadata")],st);var at=n(21787),lt=n(46521),ct=n(13598),ut=n(58995),ht=n(56493);function ft(t,e){if(t)for(let n=0;n<t.length;n+=3)for(let r=0;r<3;r++)t[n+r]+=e[r]}const pt=(0,s.c)(),gt=(0,ct.c)(),dt=(0,lt.c)(),mt={position:[-.5,-.5,0,.5,-.5,0,.5,.5,0,-.5,.5,0],normal:[0,0,1,0,0,1,0,0,1,0,0,1],uv:[0,1,1,1,1,0,0,0],faces:[0,1,2,0,2,3],facingAxisOrderSwap:{east:[3,1,2],west:[-3,-1,2],north:[-1,3,2],south:[1,-3,2],up:[1,2,3],down:[1,-2,-3]}};function yt(t,e,n){t.isPlane||function(t){for(let e=0;e<t.position.length;e+=3)t.position[e+2]+=.5}(t),function(t,e){if(null==e)return;const n="number"==typeof e?[e,e,e]:[null!=e.width?e.width:1,null!=e.depth?e.depth:1,null!=e.height?e.height:1];wt[0]=n[0],wt[4]=n[1],wt[8]=n[2];for(let e=0;e<t.position.length;e+=3){for(let n=0;n<3;n++)bt[n]=t.position[e+n];(0,Z.t)(bt,bt,wt);for(let n=0;n<3;n++)t.position[e+n]=bt[n]}if(n[0]!==n[1]||n[1]!==n[2]){wt[0]=1/n[0],wt[4]=1/n[1],wt[8]=1/n[2];for(let e=0;e<t.normal.length;e+=3){for(let n=0;n<3;n++)bt[n]=t.normal[e+n];(0,Z.t)(bt,bt,wt),(0,Z.n)(bt,bt);for(let n=0;n<3;n++)t.normal[e+n]=bt[n]}}}(t,n?.size);const{vertexAttributes:r,vertexSpace:i,transform:o}=(0,z.w1)(t,e,n);return{vertexAttributes:new M.Q({...r,uv:t.uv}),vertexSpace:i,transform:o,components:[new b.Z({faces:t.faces,material:n&&n.material||null})],spatialReference:e.spatialReference}}const xt={faceDescriptions:[{axis:[0,-1,0],uvOrigin:[0,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[1,0,0],uvOrigin:[.25,.625],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,1,0],uvOrigin:[.5,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[-1,0,0],uvOrigin:[.75,.625],corners:[[1,-1],[-1,-1],[-1,1],[1,1]]},{axis:[0,0,1],uvOrigin:[0,.375],corners:[[-1,-1],[1,-1],[1,1],[-1,1]]},{axis:[0,0,-1],uvOrigin:[0,.875],corners:[[-1,1],[1,1],[1,-1],[-1,-1]]}],uvScales:[[0,0],[1,0],[1,1],[0,1]],faceVertexOffsets:[0,1,2,0,2,3]},vt={south:0,east:1,north:2,west:3,up:4,down:5},bt=(0,s.c)(),wt=(0,lt.c)();var At=n(52138);const Tt="esri.geometry.support.meshUtils.rotate";function _t(t,e,n,r=s.Z){if(null!=t){(0,At.d)(It,(0,v.WH)(e),(0,v.ZZ)(e));for(let e=0;e<t.length;e+=n){for(let n=0;n<3;n++)Mt[n]=t[e+n]-r[n];(0,Z.m)(Mt,Mt,It);for(let n=0;n<3;n++)t[e+n]=Mt[n]+r[n]}}}const Mt=(0,s.c)(),St=(0,s.c)(),Ot=(0,v.Ue)(),It=(0,ct.c)(),Ct=(0,lt.c)(),Et=(0,s.c)(),Rt="esri.geometry.support.meshUtils.scale";function Nt(t,e,n=s.Z){if(t)for(let r=0;r<t.length;r+=3){for(let e=0;e<3;e++)Lt[e]=t[r+e]-n[e];(0,Z.g)(Lt,Lt,e);for(let e=0;e<3;e++)t[r+e]=Lt[e]+n[e]}}const Lt=(0,s.c)(),Zt=(0,s.c)(),Pt=(0,s.c)();var Ft;const Ut="esri.geometry.Mesh",Dt={base:null,key:"type",defaultKeyValue:"georeferenced",typeMap:{georeferenced:A.Z,"georeferenced-relative":w.Z,local:T.Z}};let jt=Ft=class extends(u.Z.LoadableMixin((0,h.v)(m.Z))){constructor(t){super(t),this.components=null,this.vertexSpace=new A.Z,this.transform=null,this.metadata=new st,this.hasZ=!0,this.hasM=!1,this.vertexAttributes=new M.Q,this.type="mesh"}initialize(){(0===this.metadata.externalSources.length||this.vertexAttributes.position.length)&&(this.loadStatus="loaded"),this.when((()=>{this.addHandles((0,p.YP)((()=>({vertexAttributes:this.vertexAttributes,components:this.components?.map((t=>t.clone()))})),(()=>this._clearSources()),{once:!0,sync:!0}))}))}get hasExtent(){return this.loaded?this.vertexAttributes.position.length>0&&(!this.components||this.components.length>0):null!=this.metadata.displaySource?.extent}get _transformedExtent(){const{components:t,spatialReference:e,vertexAttributes:n,vertexSpace:r}=this,i=n.position;if(0===i.length||t&&0===t.length)return new a.Z({xmin:0,ymin:0,zmin:0,xmax:0,ymax:0,zmax:0,spatialReference:e});if("local"===r.type){const{_untransformedExtent:t,transform:n}=this;return function({xmin:t,xmax:e,ymin:n,ymax:r,zmin:i,zmax:o},s,a,l){i??=0,o??=0,k??=new Float64Array(24);const c=k;return c[0]=t,c[1]=n,c[2]=i,c[3]=t,c[4]=r,c[5]=i,c[6]=e,c[7]=r,c[8]=i,c[9]=e,c[10]=n,c[11]=i,c[12]=t,c[13]=n,c[14]=o,c[15]=t,c[16]=r,c[17]=o,c[18]=e,c[19]=r,c[20]=o,c[21]=e,c[22]=n,c[23]=o,(0,z.project)({positions:c,transform:s,vertexSpace:a,inSpatialReference:l,outSpatialReference:l,outPositions:c,local:!1}),V(c,l)}(t,n,r,e)}if("georeferenced-relative"===r.type){const{transform:t}=this;return V((0,z.project)({positions:i,transform:t,vertexSpace:r,inSpatialReference:e,outSpatialReference:e,local:!1}),e)}return V(i,e)}get _untransformedExtent(){return V(this.vertexAttributes.position,this.spatialReference)}get anchor(){const{vertexSpace:t}=this;if(t.isRelative)return t.getOriginPoint(this.spatialReference);const{center:e,zmin:n}=this._transformedExtent;return new y.Z({x:e.x,y:e.y,z:n,spatialReference:this.spatialReference})}get origin(){const{vertexSpace:t}=this;return t.isRelative?t.getOriginPoint(this.spatialReference):this._transformedExtent.center}get extent(){return this.loaded||null==this.metadata?.displaySource?.extent?this._transformedExtent:this.metadata.displaySource.extent.clone()}addComponent(t){this.loaded?(this.components||(this.components=[]),this.components.push(b.Z.from(t)),this.notifyChange("components")):i.Z.getLogger(this).error("addComponent()","Mesh must be loaded before applying operations")}removeComponent(t){if(this.loaded){if(this.components){const e=this.components.indexOf(t);if(-1!==e)return this.components.splice(e,1),void this.notifyChange("components")}i.Z.getLogger(this).error("removeComponent()","Provided component is not part of the list of components")}else i.Z.getLogger(this).error("removeComponent()","Mesh must be loaded before applying operations")}rotate(t,e,n,r){return(0,v.qw)(t,e,n,zt),function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position||0===e[3])return;const{spatialReference:r,vertexSpace:o}=t;if(o.isRelative){(0,W.A)(o,Tt,n);const r=n?.origin??t.origin;t.transform??=new _.Z,function(t,e,n,r){const i=e.origin,o=(0,Z.s)(Mt,r.x,r.y,r.z??0),a=(0,Z.b)(Mt,o,i);t.applyLocalInverse(a,St),t.rotation=(0,v.qC)(t.rotation,n,(0,v.Ue)()),t.applyLocalInverse(a,a),(0,Z.b)(a,a,St),t.translation=(0,Z.a)((0,s.c)(),t.translation,a)}(t.transform,o,e,r)}else{const o=n?.origin??t.origin;(0,W.h)(r,n)?function(t,e,n){const r=t.spatialReference,i=(0,ut.rS)(r),o=Et;(0,G.KC)(n,o,i)||(0,G.KC)(t.origin,o,i);const s=t.vertexAttributes.position,a=t.vertexAttributes.normal,l=t.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,G.Bm)(i,o,It,i),(0,at.f)(Ct,It);const f=Ot;(0,Z.t)((0,v.ZZ)(Ot),(0,v.ZZ)(e),Ct),f[3]=e[3],(0,ht.XO)(s,r,c),null!=a&&null!=u&&(0,ht.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,ht.wi)(l,s,c,r,h),_t(c,f,3,o),(0,ht.To)(c,s,r),null!=a&&null!=u&&(_t(u,f,3),(0,ht.Yk)(u,s,c,r,a)),null!=l&&null!=h&&(_t(h,f,4),(0,ht.M2)(h,s,c,r,l)),t.vertexAttributesChanged()}(t,e,o):function(t,e,n){const r=Et;if(!(0,G.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,i.Z.getLogger(Tt).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}_t(t.vertexAttributes.position,e,3,r),_t(t.vertexAttributes.normal,e,3),_t(t.vertexAttributes.tangent,e,4),t.vertexAttributesChanged()}(t,e,o)}}(this,zt,r),this}offset(t,e,n,r){return this.loaded?(Bt[0]=t,Bt[1]=e,Bt[2]=n,function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position)return;const{vertexSpace:r}=t;r.isRelative?((0,W.A)(r,"esri.geometry.support.meshUtils.offset",n),function(t,e){const n=t.origin;t.origin=(0,Z.a)((0,s.c)(),n,e)}(r,e)):(0,W.h)(t.spatialReference,n)?function(t,e){const n=t.spatialReference,r=t.vertexAttributes.position,i=t.vertexAttributes.normal,o=t.vertexAttributes.tangent,s=new Float64Array(r.length),a=null!=i?new Float32Array(i.length):null,l=null!=o?new Float32Array(o.length):null,c=t.extent.center,u=pt;(0,G.Bm)(n,[c.x,c.y,c.z],gt,(0,ut.rS)(n)),(0,at.f)(dt,gt),(0,Z.t)(u,e,dt),(0,ht.XO)(r,n,s),null!=i&&null!=a&&(0,ht.Iz)(i,r,s,n,a),null!=o&&null!=l&&(0,ht.wi)(o,r,s,n,l),ft(s,u),(0,ht.To)(s,r,n),null!=i&&null!=a&&(0,ht.Yk)(a,r,s,n,i),null!=o&&null!=l&&(0,ht.M2)(l,r,s,n,o),t.vertexAttributesChanged()}(t,e):function(t,e){ft(t.vertexAttributes.position,e),t.vertexAttributesChanged()}(t,e)}(this,Bt,r),this):(i.Z.getLogger(this).error("offset()","Mesh must be loaded before applying operations"),this)}scale(t,e){return this.loaded?(function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position)return;const{spatialReference:r,vertexSpace:o}=t;if(o.isRelative){(0,W.A)(o,Rt,n);const r=n?.origin??t.origin;t.transform??=new _.Z,function(t,e,n,r){const i=e.origin,o=(0,Z.s)(Lt,r.x,r.y,r.z),a=(0,Z.b)(Lt,o,i);t.applyLocalInverse(a,Zt);const l=(0,Z.g)((0,s.c)(),t.scale,n);t.scale=l,t.applyLocalInverse(a,a),(0,Z.b)(a,a,Zt),t.translation=(0,Z.a)((0,s.c)(),t.translation,a)}(t.transform,o,e,r)}else{const o=(0,W.h)(r,n),s=n?.origin??t.origin;o?function(t,e,n){const r=t.spatialReference,i=(0,ut.rS)(r),o=Pt;(0,G.KC)(n,o,i)||(0,G.KC)(t.origin,o,i);const s=t.vertexAttributes.position,a=t.vertexAttributes.normal,l=t.vertexAttributes.tangent,c=new Float64Array(s.length),u=null!=a?new Float32Array(a.length):null,h=null!=l?new Float32Array(l.length):null;(0,ht.XO)(s,r,c),null!=a&&null!=u&&(0,ht.Iz)(a,s,c,r,u),null!=l&&null!=h&&(0,ht.wi)(l,s,c,r,h),Nt(c,e,o),(0,ht.To)(c,s,r),null!=a&&null!=u&&(0,ht.Yk)(u,s,c,r,a),null!=l&&null!=h&&(0,ht.M2)(h,s,c,r,l),t.vertexAttributesChanged()}(t,e,s):function(t,e,n){const r=Pt;if(!(0,G.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,i.Z.getLogger(Rt).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}Nt(t.vertexAttributes.position,e,r),t.vertexAttributesChanged()}(t,e,s)}}(this,t,e),this):(i.Z.getLogger(this).error("scale()","Mesh must be loaded before applying operations"),this)}centerAt(t,e){return this.loaded?(function(t,e,n){if(!t.vertexAttributes||!t.vertexAttributes.position)return;const{vertexSpace:r}=t,o=n?.origin??t.origin;r.isRelative?((0,W.A)(r,H,n),function(t,e,n){const{vertexSpace:r}=t;if(!r.isRelative)return;const o=J,a=Y;if(!(0,G.KC)(e,a,t.spatialReference))return void i.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${e.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`);if(!(0,G.KC)(n,o,t.spatialReference)){const e=t.origin;o[0]=e.x,o[1]=e.y,o[2]=e.z,i.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}const l=(0,Z.b)(q,a,o),c=r.origin;r.origin=(0,Z.a)((0,s.c)(),c,l)}(t,e,o)):(0,W.h)(t.spatialReference,n)?function(t,e,n){const r=(0,z.FF)(t.vertexAttributes,n,{geographic:!0}),{position:i,normal:o,tangent:s}=(0,z.iv)(r,e,{geographic:!0});t.vertexAttributes.position=i,t.vertexAttributes.normal=o,t.vertexAttributes.tangent=s,t.vertexAttributesChanged()}(t,e,o):function(t,e,n){const r=J,o=Y;if((0,G.KC)(e,o,t.spatialReference)){if(!(0,G.KC)(n,r,t.spatialReference)){const e=t.origin;r[0]=e.x,r[1]=e.y,r[2]=e.z,i.Z.getLogger(H).error(`Failed to project specified origin (wkid:${n.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(function(t,e,n){if(t)for(let r=0;r<t.length;r+=3)for(let i=0;i<3;i++)t[r+i]+=e[i]-n[i]})(t.vertexAttributes.position,o,r),t.vertexAttributesChanged()}else i.Z.getLogger(H).error(`Failed to project centerAt location (wkid:${e.spatialReference.wkid}) to mesh spatial reference (wkid:${t.spatialReference.wkid}). Projection may be possible after calling projection.load().`)}(t,e,o)}(this,t,e),this):(i.Z.getLogger(this).error("centerAt()","Mesh must be loaded before applying operations"),this)}load(t){const{metadata:{displaySource:e}}=this;return e&&this.addResolvingPromise(async function(t,e,r){const{source:i}=e,{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r),s=await async function(t,e){if(Array.isArray(t)){if(!t.length)throw new c.Z("mesh-load-external:missing-assets","There must be at least one file to load");return t[0]instanceof File?function(t){return et(t.map((t=>({name:t.name,mimeType:t.type,source:K(t)}))))}(t):async function(t,e){const n=await(0,f.OT)(t.map((async t=>{const n=await async function(t,e){const{parts:n}=t;if(1===n.length)return new nt(n[0].partUrl);const r=await t.toBlob(e);return(0,f.k_)(e),nt.fromBlob(r)}(t);return(0,f.k_)(e),{name:t.assetName,mimeType:t.assetMimeType,source:n}})));if((0,f.Hc)(e))throw n.forEach((t=>t.source.dispose())),(0,f.zE)();return et(n)}(t,e)}return K(t)}(i,r);(0,f.k_)(r);const a=o(new y.Z({x:0,y:0,z:0,spatialReference:t.spatialReference}),s.url,{resolveFile:X(s),requestFile:void 0,useTransform:!0,signal:r?.signal});a.then((()=>s.dispose()),(()=>s.dispose()));const{vertexAttributes:l,components:u}=await a;t.vertexAttributes=l,t.components=u}(this,e,t)),Promise.resolve(this)}addExternalSources(t){this.metadata.externalSources.addMany(t)}updateDisplaySource(t){this.metadata.displaySource=t}clone(){return this.cloneWithVertexSpace(this.vertexSpace.clone())}cloneWithVertexSpace(t){let e=null;if(this.components){const t=new Map,n=new Map;e=this.components.map((e=>e.cloneWithDeduplication(t,n)))}const n={components:e,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes.clone(),vertexSpace:t,transform:this.transform?.clone()??null,metadata:this.metadata.clone()};return new Ft(n)}cloneShallow(){return new Ft({components:this.components,spatialReference:this.spatialReference,vertexAttributes:this.vertexAttributes,vertexSpace:this.vertexSpace.clone(),transform:this.transform,metadata:this.metadata})}vertexAttributesChanged(){this.notifyChange("vertexAttributes")}async toBinaryGLTF(t){const e=n.e(5575).then(n.bind(n,55575)),r=this.load(),i=await Promise.all([e,r]),{toBinaryGLTF:o}=i[0];return o(this,t)}get memoryUsage(){let t=0;if(t+=this.vertexAttributes.memoryUsage,null!=this.components)for(const e of this.components)t+=e.memoryUsage;return t}_clearSources(){this.metadata.clearSources()}static createBox(t,e){if(!(t instanceof y.Z))return i.Z.getLogger(Ut).error(".createBox()","expected location to be a Point instance"),null;const n=new Ft(yt(function(){const{faceDescriptions:t,faceVertexOffsets:e,uvScales:n}=xt,r=4*t.length,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array(2*t.length*3);let l=0,c=0,u=0,h=0;for(let r=0;r<t.length;r++){const f=t[r],p=l/3;for(const t of e)a[h++]=p+t;const g=f.corners;for(let t=0;t<4;t++){const e=g[t];let r=0;s[u++]=.25*n[t][0]+f.uvOrigin[0],s[u++]=f.uvOrigin[1]-.25*n[t][1];for(let t=0;t<3;t++)0!==f.axis[t]?(i[l++]=.5*f.axis[t],o[c++]=f.axis[t]):(i[l++]=.5*e[r++],o[c++]=0)}}return{position:i,normal:o,uv:s,faces:a}}(),t,e));return e&&e.imageFace&&"all"!==e.imageFace?function(t,e){const n=t.components[0],r=n.faces,i=vt[e],o=6*i,s=new Array(6),a=new Array(r.length-6);let l=0,c=0;for(let t=0;t<r.length;t++)t>=o&&t<o+6?s[l++]=r[t]:a[c++]=r[t];if(null!=t.vertexAttributes.uv){const e=new Float32Array(t.vertexAttributes.uv),n=4*i*2,r=[0,1,1,1,1,0,0,0];for(let t=0;t<r.length;t++)e[n+t]=r[t];t.vertexAttributes.uv=e}return t.components=[new b.Z({faces:s,material:n.material}),new b.Z({faces:a})],t}(n,e.imageFace):n}static createSphere(t,e){return t instanceof y.Z?new Ft(yt(function(t=0){const e=Math.round(8*2**t),n=2*e,r=(e-1)*(n+1)+2*n,i=new Float64Array(3*r),o=new Float32Array(3*r),s=new Float32Array(2*r),a=new Uint32Array((e-1)*n*2*3);let l=0,c=0,u=0,h=0;for(let t=0;t<=e;t++){const r=t/e*Math.PI+.5*Math.PI,f=Math.cos(r),p=Math.sin(r);bt[2]=p;const g=0===t||t===e,d=g?n-1:n;for(let r=0;r<=d;r++){const p=r/d*2*Math.PI;bt[0]=-Math.sin(p)*f,bt[1]=Math.cos(p)*f;for(let t=0;t<3;t++)i[l]=.5*bt[t],o[l]=bt[t],++l;s[c++]=(r+(g?.5:0))/n,s[c++]=t/e,0!==t&&r!==n&&(t!==e&&(a[u++]=h,a[u++]=h+1,a[u++]=h-n),1!==t&&(a[u++]=h,a[u++]=h-n,a[u++]=h-n-1)),h++}}return{position:i,normal:o,uv:s,faces:a}}(e&&e.densificationFactor||0),t,e)):(i.Z.getLogger(Ut).error(".createSphere()","expected location to be a Point instance"),null)}static createCylinder(t,e){return t instanceof y.Z?new Ft(yt(function(t=0){const e=Math.round(16*2**t),n=4*(e+1)+2*e,r=new Float64Array(3*n),i=new Float32Array(3*n),o=new Float32Array(2*n),s=new Uint32Array(4*e*3);let a=0,l=0,c=0,u=0,h=0;for(let t=0;t<=5;t++){const n=0===t||5===t,f=t<=1||t>=4,p=2===t||4===t,g=n?e-1:e;for(let d=0;d<=g;d++){const m=d/g*2*Math.PI,y=n?0:.5;bt[0]=y*Math.sin(m),bt[1]=y*-Math.cos(m),bt[2]=t<=2?.5:-.5;for(let e=0;e<3;e++)r[a++]=bt[e],i[l++]=f?2===e?t<=1?1:-1:0:2===e?0:bt[e]/y;o[c++]=(d+(n?.5:0))/e,o[c++]=t<=1?1*t/3:t<=3?1*(t-2)/3+1/3:1*(t-4)/3+2/3,p||0===t||d===e||(5!==t&&(s[u++]=h,s[u++]=h+1,s[u++]=h-e),1!==t&&(s[u++]=h,s[u++]=h-e,s[u++]=h-e-1)),h++}}return{position:r,normal:i,uv:o,faces:s}}(e&&e.densificationFactor||0),t,e)):(i.Z.getLogger(Ut).error(".createCylinder()","expected location to be a Point instance"),null)}static createPlane(t,e){if(!(t instanceof y.Z))return i.Z.getLogger(Ut).error(".createPlane()","expected location to be a Point instance"),null;const n=e?.facing??"up",r=function(t,e){const n="number"==typeof e?e:null!=e?e.width:1,r="number"==typeof e?e:null!=e?e.height:1;switch(t){case"up":case"down":return{width:n,depth:r};case"north":case"south":return{width:n,height:r};case"east":case"west":return{depth:n,height:r}}}(n,e?.size);return new Ft(yt(function(t){const e=mt.facingAxisOrderSwap[t],n=mt.position,r=mt.normal,i=new Float64Array(n.length),o=new Float32Array(r.length);let s=0;for(let t=0;t<4;t++){const t=s;for(let a=0;a<3;a++){const l=e[a],c=Math.abs(l)-1,u=l>=0?1:-1;i[s]=n[t+c]*u,o[s]=r[t+c]*u,s++}}return{position:i,normal:o,uv:new Float32Array(mt.uv),faces:new Uint32Array(mt.faces),isPlane:!0}}(n),t,{...e,size:r}))}static createFromPolygon(t,e){if(!(t instanceof x.Z))return i.Z.getLogger(Ut).error(".createFromPolygon()","expected polygon to be a Polygon instance"),null;const n=function(t){const e=function(t,e,n,r){const i=t.length,o=new Array(i),s=new Array(i),a=new Array(i);let l=0,c=0,u=0,h=0;for(let e=0;e<i;++e)h+=t[e].length;const f=(0,C.bg)(3*h);let p=0;for(let h=i-1;h>=0;h--){const g=t[h],d=n===j.CCW_IS_HOLE&&D(g,e,r);if(d&&1!==i)o[l++]=g;else{let t=g.length;for(let e=0;e<l;++e)t+=o[e].length;const n={index:p,pathLengths:new Array(l+1),count:t,holeIndices:new Array(l)};n.pathLengths[0]=g.length,g.length>0&&(a[u++]={index:p,count:g.length}),p=d?U(g,g.length-1,-1,f,p,g.length,e):U(g,0,1,f,p,g.length,e);for(let t=0;t<l;++t){const r=o[t];n.holeIndices[t]=p,n.pathLengths[t+1]=r.length,r.length>0&&(a[u++]={index:p,count:r.length}),p=U(r,0,1,f,p,r.length,e)}l=0,n.count>0&&(s[c++]=n)}}for(let t=0;t<l;++t){const n=o[t];n.length>0&&(a[u++]={index:p,count:n.length}),p=U(n,0,1,f,p,n.length,e)}return s.length=c,a.length=u,{position:f,polygons:s,outlines:a}}(t.rings,t.hasZ,j.CCW_IS_HOLE,t.spatialReference),n=new Array;let r=0,i=0;for(const t of e.polygons){const o=t.count,s=t.index,a=(0,C.Rq)(e.position,3*s,3*o),l=t.holeIndices.map((t=>t-s)),c=(0,E.mi)((0,S.e)(a,l,3));n.push({position:a,faces:c}),r+=a.length,i+=c.length}const o=function(t,e,n){if(1===t.length)return t[0];const r=(0,C.bg)(e),i=new Array(n);let o=0,s=0,a=0;for(const e of t){for(let t=0;t<e.position.length;t++)r[o++]=e.position[t];for(const t of e.faces)i[s++]=t+a;a=o/3}return{position:r,faces:(0,E.mi)(i)}}(n,r,i),s=Array.isArray(o.position)?(0,R.d)(o.position,3,{originalIndices:o.faces}):(0,R.d)(o.position.buffer,6,{originalIndices:o.faces});return o.position=(0,C.QZ)(new Float64Array(s.buffer)),o.faces=s.indices,o}(t);return new Ft({vertexAttributes:new M.Q({position:n.position}),components:[new b.Z({faces:n.faces,shading:"flat",material:e?.material??null})],spatialReference:t.spatialReference,vertexSpace:new A.Z})}static async createFromGLTF(t,e,r){if(!(t instanceof y.Z))throw i.Z.getLogger(Ut).error(".createfromGLTF()","expected location to be a Point instance"),new c.Z("invalid-input","Expected location to be a Point instance");const{loadGLTFMesh:o}=await(0,f.Hl)(Promise.all([n.e(8598),n.e(8079)]).then(n.bind(n,78079)),r);return new Ft(await o(t,e,r))}static async createFromFiles(t,e,n){if(!(t instanceof y.Z)){const t="Expected location to be a Point instance";throw i.Z.getLogger(Ut).error(".createFromFiles()",t),new c.Z("invalid-input",t)}const r=Ft.createWithExternalSource(t,e),o=n?.layer;if(!o){const t="A layer is needed to convert the files";throw i.Z.getLogger(Ut).error(".createFromFiles()",t),new c.Z("invalid-input",t)}const[s]=await o.uploadAssets([r],n);return s}static createWithExternalSource(t,e,n){const r=n?.extent??null,{x:i,y:o,z:s,spatialReference:a}=t,l=n?.transform?.clone()??new _.Z,c=n?.vertexSpace??new T.Z({origin:[i,o,s??0]}),u={source:e,extent:r},h=new st;return h.externalSources.push(u),new Ft({metadata:h,transform:l,vertexSpace:c,spatialReference:a})}static createIncomplete(t,e){const{x:n,y:r,z:i,spatialReference:o}=t,s=e?.transform?.clone()??new _.Z,a=e?.vertexSpace??new T.Z({origin:[n,r,i??0]}),l=new Ft({transform:s,vertexSpace:a,spatialReference:o});return l.addResolvingPromise(Promise.reject(new c.Z("mesh-incomplete","Mesh resources are not complete"))),l}};(0,l._)([(0,g.Cb)({type:[b.Z],json:{write:!0}})],jt.prototype,"components",void 0),(0,l._)([(0,g.Cb)({nonNullable:!0,types:Dt,constructOnly:!0,json:{write:!0}})],jt.prototype,"vertexSpace",void 0),(0,l._)([(0,g.Cb)({type:_.Z,json:{write:!0}})],jt.prototype,"transform",void 0),(0,l._)([(0,g.Cb)({constructOnly:!0})],jt.prototype,"metadata",void 0),(0,l._)([(0,g.Cb)()],jt.prototype,"hasExtent",null),(0,l._)([(0,g.Cb)()],jt.prototype,"_transformedExtent",null),(0,l._)([(0,g.Cb)()],jt.prototype,"_untransformedExtent",null),(0,l._)([(0,g.Cb)()],jt.prototype,"anchor",null),(0,l._)([(0,g.Cb)()],jt.prototype,"origin",null),(0,l._)([(0,g.Cb)({readOnly:!0,json:{read:!1}})],jt.prototype,"extent",null),(0,l._)([(0,g.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!0}})],jt.prototype,"hasZ",void 0),(0,l._)([(0,g.Cb)({readOnly:!0,json:{read:!1,write:!0,default:!1}})],jt.prototype,"hasM",void 0),(0,l._)([(0,g.Cb)({type:M.Q,nonNullable:!0,json:{write:!0}})],jt.prototype,"vertexAttributes",void 0),jt=Ft=(0,l._)([(0,d.j)(Ut)],jt);const Bt=(0,s.c)(),zt=(0,v.Ue)(),kt=jt;var Vt=n(82971),Gt=n(2981),Wt=n(74889);const Ht=()=>i.Z.getLogger("esri.rest.support.meshFeatureSet");function Yt(t,e,n){const i=n.features;n.features=[],delete n.geometryType;const o=Wt.Z.fromJSON(n);if(o.geometryType="mesh",!n.assetMaps)return o;const s=Xt(e,n.assetMaps),a=t.sourceSpatialReference??Vt.Z.WGS84,l=n.globalIdFieldName,{outFields:c}=t,u=null!=c&&c.length>0?(h=c.includes("*")?null:new Set(c),({attributes:t})=>{if(!t)return{};if(!h)return t;for(const e in t)h.has(e)||delete t[e];return t}):()=>({});var h;for(const t of i){const n=Jt(t,l,a,e,s);null!=n&&o.features.push(new r.Z({geometry:n,attributes:u(t)}))}return o}function Jt(t,e,n,r,i){const o=t.attributes[e],l=i.get(o);if(null==l)return Ht().error("mesh-feature-set:asset-not-found","Service returned a feature which was not found in the asset map",t),null;if(!t.geometry)return Ht().error("mesh-feature-set:no-geometry","Service returned a feature without geometry",t),null;const{originPoint:c,originVector:u}=function({attributes:t},e,{transformFieldRoles:n}){const r=t[n.originX],i=t[n.originY],o=t[n.originZ];return{originPoint:new y.Z({x:r,y:i,z:o,spatialReference:e}),originVector:(0,s.f)(r,i,o)}}(t,n,r),h=a.Z.fromJSON(t.geometry);h.spatialReference=n;const f=function(t,{transformFieldRoles:e}){return new _.Z({translation:[t[e.translationX],-t[e.translationZ],t[e.translationY]],rotationAxis:[t[e.rotationX],-t[e.rotationZ],t[e.rotationY]],rotationAngle:t[e.rotationDeg],scale:[t[e.scaleX],t[e.scaleZ],t[e.scaleY]]})}(t.attributes,r),p=l.projectVertices?new w.Z({origin:u}):new T.Z({origin:u}),g=function(t){const e=Array.from(t.files.values()),n=new Array;for(const t of e){if(t.status!==qt.COMPLETED)return null;const e=new Array;for(const n of t.parts){if(!n)return null;e.push(new ot.LL(n.url,n.hash))}n.push(new ot.CP(t.name,t.mimeType,e))}return n}(l);return g?kt.createWithExternalSource(c,g,{extent:h,transform:f,vertexSpace:p}):kt.createIncomplete(c,{extent:h,transform:f,vertexSpace:p})}var qt,$t;function Xt(t,e){const n=new Map;for(const r of e){const e=r.parentGlobalId;if(null==e)continue;const i=r.assetName,s=r.assetType,a=r.assetHash,l=r.assetURL,c=r.conversionStatus,u=r.seqNo,h=(0,Gt.d1)(s,t.supportedFormats);if(!h){Ht().error("mesh-feature-set:unknown-format",`Service returned an asset of type ${s}, but it does not list it as a supported type`);continue}const f=(0,o.s1)(n,e,(()=>({projectVertices:Qt(r.flags).projectVertices,files:new Map})));(0,o.s1)(f.files,i,(()=>({name:i,type:s,mimeType:h,status:Kt(c),parts:[]}))).parts[u]={hash:a,url:l}}return n}function Kt(t){switch(t){case"COMPLETED":case"SUBMITTED":return qt.COMPLETED;case"INPROGRESS":return qt.PENDING;default:return qt.FAILED}}function Qt(t){return{projectVertices:t.includes("PROJECT_VERTICES")}}($t=qt||(qt={}))[$t.FAILED=0]="FAILED",$t[$t.PENDING=1]="PENDING",$t[$t.COMPLETED=2]="COMPLETED"},17662:(t,e,n)=>{n.d(e,{c:()=>i});var r=n(99001);class i{constructor(){this.id=(0,r.D)()}unload(){}}},4726:(t,e,n)=>{var r;n.d(e,{U:()=>r}),function(t){t[t.Layer=0]="Layer",t[t.Object=1]="Object",t[t.Mesh=2]="Mesh",t[t.Line=3]="Line",t[t.Point=4]="Point",t[t.Material=5]="Material",t[t.Texture=6]="Texture",t[t.COUNT=7]="COUNT"}(r||(r={}))},22631:(t,e,n)=>{n.d(e,{Z:()=>C});var r=n(13598),i=n(17896),o=n(24882),s=n(1533);function a(t){if(t.length<s.DB)return Array.from(t);if((0,s.kJ)(t))return Float64Array.from(t);if(!("BYTES_PER_ELEMENT"in t))return Array.from(t);switch(t.BYTES_PER_ELEMENT){case 1:return Uint8Array.from(t);case 2:return(0,s.Uc)(t)?Uint16Array.from(t):Int16Array.from(t);case 4:return Float32Array.from(t);default:return Float64Array.from(t)}}var l=n(47026),c=n(44553),u=n(65617),h=n(11726);class f{constructor(t,e,n,r){this.primitiveIndices=t,this._numIndexPerPrimitive=e,this.indices=n,this.position=r,this._children=void 0,(0,h.hu)(t.length>=1),(0,h.hu)(n.length%this._numIndexPerPrimitive==0),(0,h.hu)(n.length>=t.length*this._numIndexPerPrimitive),(0,h.hu)(3===r.size||4===r.size);const{data:o,size:s}=r,a=t.length;let l=s*n[this._numIndexPerPrimitive*t[0]];p.clear(),p.push(l);const c=(0,u.f)(o[l],o[l+1],o[l+2]),f=(0,u.a)(c);for(let e=0;e<a;++e){const r=this._numIndexPerPrimitive*t[e];for(let t=0;t<this._numIndexPerPrimitive;++t){l=s*n[r+t],p.push(l);let e=o[l];c[0]=Math.min(e,c[0]),f[0]=Math.max(e,f[0]),e=o[l+1],c[1]=Math.min(e,c[1]),f[1]=Math.max(e,f[1]),e=o[l+2],c[2]=Math.min(e,c[2]),f[2]=Math.max(e,f[2])}}this.bbMin=c,this.bbMax=f;const g=(0,i.h)((0,u.c)(),this.bbMin,this.bbMax,.5);this.radius=.5*Math.max(Math.max(f[0]-c[0],f[1]-c[1]),f[2]-c[2]);let d=this.radius*this.radius;for(let t=0;t<p.length;++t){l=p.at(t);const e=o[l]-g[0],n=o[l+1]-g[1],r=o[l+2]-g[2],i=e*e+n*n+r*r;if(i<=d)continue;const s=Math.sqrt(i),a=.5*(s-this.radius);this.radius=this.radius+a,d=this.radius*this.radius;const c=a/s;g[0]+=e*c,g[1]+=n*c,g[2]+=r*c}this.center=g,p.clear()}getChildren(){if(this._children||(0,i.d)(this.bbMin,this.bbMax)<=1)return this._children;const t=(0,i.h)((0,u.c)(),this.bbMin,this.bbMax,.5),e=this.primitiveIndices.length,n=new Uint8Array(e),r=new Array(8);for(let t=0;t<8;++t)r[t]=0;const{data:o,size:s}=this.position;for(let i=0;i<e;++i){let e=0;const a=this._numIndexPerPrimitive*this.primitiveIndices[i];let l=s*this.indices[a],c=o[l],u=o[l+1],h=o[l+2];for(let t=1;t<this._numIndexPerPrimitive;++t){l=s*this.indices[a+t];const e=o[l],n=o[l+1],r=o[l+2];e<c&&(c=e),n<u&&(u=n),r<h&&(h=r)}c<t[0]&&(e|=1),u<t[1]&&(e|=2),h<t[2]&&(e|=4),n[i]=e,++r[e]}let a=0;for(let t=0;t<8;++t)r[t]>0&&++a;if(a<2)return;const l=new Array(8);for(let t=0;t<8;++t)l[t]=r[t]>0?new Uint32Array(r[t]):void 0;for(let t=0;t<8;++t)r[t]=0;for(let t=0;t<e;++t){const e=n[t];l[e][r[e]++]=this.primitiveIndices[t]}this._children=new Array;for(let t=0;t<8;++t)void 0!==l[t]&&this._children.push(new f(l[t],this._numIndexPerPrimitive,this.indices,this.position));return this._children}static prune(){p.prune()}}const p=new c.Z({deallocator:null});var g=n(17662),d=n(4726),m=n(22807),y=n(16996);function x(t,e,n){return(0,i.b)(v,e,t),(0,i.b)(b,n,t),(0,i.l)((0,i.f)(v,v,b))/2}n(12981),new m.x(y.Ue),new m.x((()=>{return t?{p0:(0,u.a)(t.p0),p1:(0,u.a)(t.p1),p2:(0,u.a)(t.p2)}:{p0:(0,u.c)(),p1:(0,u.c)(),p2:(0,u.c)()};var t}));const v=(0,u.c)(),b=(0,u.c)();function w(t,e,n,r){if(!t)return!1;(0,i.s)(r,0,0,0),(0,i.s)(M,0,0,0);let o=0,s=0;const{size:a,data:l}=t,c=e?e.length-1:l.length/a-1,u=c+(n?2:0);for(let t=0;t<u;t+=2){const n=t<c?t:c,u=t<c?t+1:0,h=(e?e[n]:n)*a,f=(e?e[u]:u)*a;A[0]=l[h],A[1]=l[h+1],A[2]=l[h+2],T[0]=l[f],T[1]=l[f+1],T[2]=l[f+2],(0,i.g)(A,(0,i.a)(A,A,T),.5);const p=(0,i.j)(A,T);p>0?((0,i.a)(r,r,(0,i.g)(A,A,p)),o+=p):0===o&&((0,i.a)(M,M,A),s++)}return 0!==o?((0,i.g)(r,r,1/o),!0):0!==s&&((0,i.g)(r,M,1/s),!0)}const A=(0,u.c)(),T=(0,u.c)(),_=(0,u.c)(),M=(0,u.c)();var S=n(99001);class O{constructor(t){this.channel=t,this.id=(0,S.D)()}}var I=n(35065);n(9820),(0,u.c)(),new Float32Array(6);class C extends g.c{constructor(t,e,n=[],r=null,i=d.U.Mesh,s=null,a=-1){super(),this.material=t,this.mapPositions=r,this.type=i,this.objectAndLayerIdColor=s,this.edgeIndicesLength=a,this.visible=!0,this._vertexAttributes=new Map,this._indices=new Map,this._boundingInfo=null;for(const[t,n]of e)n&&this._vertexAttributes.set(t,{...n});if(null==n||0===n.length){const t=function(t){const e=t.values().next().value;return null==e?0:e.data.length/e.size}(this._vertexAttributes),e=(0,o.KF)(t);this.edgeIndicesLength=this.edgeIndicesLength<0?t:this.edgeIndicesLength;for(const t of this._vertexAttributes.keys())this._indices.set(t,e)}else for(const[t,e]of n)e&&(this._indices.set(t,(0,o.mi)(e)),t===I.T.POSITION&&(this.edgeIndicesLength=this.edgeIndicesLength<0?this._indices.get(t).length:this.edgeIndicesLength))}instantiate(t={}){const e=new C(t.material||this.material,[],void 0,this.mapPositions,this.type,this.objectAndLayerIdColor,this.edgeIndicesLength);return this._vertexAttributes.forEach(((t,n)=>{t.exclusive=!1,e._vertexAttributes.set(n,t)})),this._indices.forEach(((t,n)=>e._indices.set(n,t))),e._boundingInfo=this._boundingInfo,e.transformation=t.transformation||this.transformation,e}get vertexAttributes(){return this._vertexAttributes}getMutableAttribute(t){let e=this._vertexAttributes.get(t);return e&&!e.exclusive&&(e={...e,exclusive:!0,data:a(e.data)},this._vertexAttributes.set(t,e)),e}setAttributeData(t,e){const n=this._vertexAttributes.get(t);n&&this._vertexAttributes.set(t,{...n,exclusive:!0,data:e})}get indices(){return this._indices}get indexCount(){const t=this._indices.values().next().value;return t?t.length:0}get faceCount(){return this.indexCount/3}get boundingInfo(){return null==this._boundingInfo&&(this._boundingInfo=this._calculateBoundingInfo()),this._boundingInfo}computeAttachmentOrigin(t){return!!(this.type===d.U.Mesh?this._computeAttachmentOriginTriangles(t):this.type===d.U.Line?this._computeAttachmentOriginLines(t):this._computeAttachmentOriginPoints(t))&&(null!=this._transformation&&(0,i.m)(t,t,this._transformation),!0)}_computeAttachmentOriginTriangles(t){const e=this.indices.get(I.T.POSITION);return function(t,e,n){if(!t||!e)return!1;const{size:r,data:o}=t;(0,i.s)(n,0,0,0),(0,i.s)(M,0,0,0);let s=0,a=0;for(let t=0;t<e.length-2;t+=3){const l=e[t]*r,c=e[t+1]*r,u=e[t+2]*r;(0,i.s)(A,o[l],o[l+1],o[l+2]),(0,i.s)(T,o[c],o[c+1],o[c+2]),(0,i.s)(_,o[u],o[u+1],o[u+2]);const h=x(A,T,_);h?((0,i.a)(A,A,T),(0,i.a)(A,A,_),(0,i.g)(A,A,1/3*h),(0,i.a)(n,n,A),s+=h):((0,i.a)(M,M,A),(0,i.a)(M,M,T),(0,i.a)(M,M,_),a+=3)}return!(0===a&&0===s||(0!==s?((0,i.g)(n,n,1/s),0):0===a||((0,i.g)(n,M,1/a),0)))}(this.vertexAttributes.get(I.T.POSITION),e,t)}_computeAttachmentOriginLines(t){const e=this.vertexAttributes.get(I.T.POSITION),n=this.indices.get(I.T.POSITION);return w(e,n,n&&function(t,e,n){return!(!("isClosed"in t)||!t.isClosed)&&(n?n.length>2:e.data.length>6)}(this.material.parameters,e,n),t)}_computeAttachmentOriginPoints(t){const e=this.indices.get(I.T.POSITION);return function(t,e,n){if(!t||!e)return!1;const{size:r,data:o}=t;(0,i.s)(n,0,0,0);let s=-1,a=0;for(let t=0;t<e.length;t++){const i=e[t]*r;s!==i&&(n[0]+=o[i],n[1]+=o[i+1],n[2]+=o[i+2],a++),s=i}return a>1&&(0,i.g)(n,n,1/a),a>0}(this.vertexAttributes.get(I.T.POSITION),e,t)}invalidateBoundingInfo(){this._boundingInfo=null}_calculateBoundingInfo(){const t=this.indices.get(I.T.POSITION),e=this.vertexAttributes.get(I.T.POSITION);if(!t||0===t.length||!e)return null;const n=this.type===d.U.Mesh?3:1;(0,h.hu)(t.length%n==0,"Indexing error: "+t.length+" not divisible by "+n);const r=(0,o.KF)(t.length/n);return new f(r,n,t,e)}get transformation(){return this._transformation??r.I}set transformation(t){this._transformation=t&&t!==r.I?(0,r.b)(t):null}addHighlight(){const t=new O(l.V_.Highlight);return this.highlights=function(t,e){return null==t&&(t=[]),t.push(e),t}(this.highlights,t),t}removeHighlight(t){this.highlights=function(t,e){if(null==t)return null;const n=t.filter((t=>t!==e));return 0===n.length?null:n}(this.highlights,t)}}},11726:(t,e,n)=>{n.d(e,{hu:()=>i,yK:()=>o}),n(97323),n(98766),(0,n(88669).c)();class r{constructor(t){this.message=t}toString(){return`AssertException: ${this.message}`}}function i(t,e){if(!t){e=e||"Assertion";const t=new Error(e).stack;throw new r(`${e} at ${t}`)}}function o(t,e,n,r){let i,o=(n[0]-t[0])/e[0],s=(r[0]-t[0])/e[0];o>s&&(i=o,o=s,s=i);let a=(n[1]-t[1])/e[1],l=(r[1]-t[1])/e[1];if(a>l&&(i=a,a=l,l=i),o>l||a>s)return!1;a>o&&(o=a),l<s&&(s=l);let c=(n[2]-t[2])/e[2],u=(r[2]-t[2])/e[2];return c>u&&(i=c,c=u,u=i),!(o>u||c>s||(u<s&&(s=u),s<0))}},35065:(t,e,n)=>{var r;n.d(e,{T:()=>r}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.AUXPOS1="auxpos1",t.AUXPOS2="auxpos2",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.TANGENT="tangent",t.OFFSET="offset",t.SUBDIVISIONFACTOR="subdivisionFactor",t.COLORFEATUREATTRIBUTE="colorFeatureAttribute",t.SIZEFEATUREATTRIBUTE="sizeFeatureAttribute",t.OPACITYFEATUREATTRIBUTE="opacityFeatureAttribute",t.DISTANCETOSTART="distanceToStart",t.UVMAPSPACE="uvMapSpace",t.BOUNDINGRECT="boundingRect",t.UVREGION="uvRegion",t.PROFILERIGHT="profileRight",t.PROFILEUP="profileUp",t.PROFILEVERTEXANDNORMAL="profileVertexAndNormal",t.FEATUREVALUE="featureValue",t.INSTANCEMODELORIGINHI="instanceModelOriginHi",t.INSTANCEMODELORIGINLO="instanceModelOriginLo",t.INSTANCEMODEL="instanceModel",t.INSTANCEMODELNORMAL="instanceModelNormal",t.INSTANCECOLOR="instanceColor",t.INSTANCEFEATUREATTRIBUTE="instanceFeatureAttribute",t.LOCALTRANSFORM="localTransform",t.GLOBALTRANSFORM="globalTransform",t.BOUNDINGSPHERE="boundingSphere",t.MODELORIGIN="modelOrigin",t.MODELSCALEFACTORS="modelScaleFactors",t.FEATUREATTRIBUTE="featureAttribute",t.STATE="state",t.LODLEVEL="lodLevel",t.POSITION0="position0",t.POSITION1="position1",t.NORMALA="normalA",t.NORMALB="normalB",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.U8PADDING="u8padding",t.U16PADDING="u16padding",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(r||(r={}))},47026:(t,e,n)=>{var r,i,o,s,a,l,c,u,h;n.d(e,{Gv:()=>i,Iq:()=>u,JJ:()=>c,Rw:()=>s,Ti:()=>h,V_:()=>l,Vr:()=>r,hU:()=>a}),function(t){t[t.None=0]="None",t[t.Front=1]="Front",t[t.Back=2]="Back",t[t.COUNT=3]="COUNT"}(r||(r={})),function(t){t[t.Less=0]="Less",t[t.Lequal=1]="Lequal",t[t.COUNT=2]="COUNT"}(i||(i={})),function(t){t[t.BACKGROUND=0]="BACKGROUND",t[t.UPDATE=1]="UPDATE"}(o||(o={})),function(t){t[t.NOT_LOADED=0]="NOT_LOADED",t[t.LOADING=1]="LOADING",t[t.LOADED=2]="LOADED"}(s||(s={})),function(t){t[t.IntegratedMeshMaskExcluded=1]="IntegratedMeshMaskExcluded",t[t.OutlineVisualElementMask=2]="OutlineVisualElementMask"}(a||(a={})),function(t){t[t.Highlight=0]="Highlight",t[t.MaskOccludee=1]="MaskOccludee",t[t.COUNT=2]="COUNT"}(l||(l={})),function(t){t[t.Blend=0]="Blend",t[t.Opaque=1]="Opaque",t[t.Mask=2]="Mask",t[t.MaskBlend=3]="MaskBlend",t[t.COUNT=4]="COUNT"}(c||(c={})),function(t){t[t.OFF=0]="OFF",t[t.ON=1]="ON"}(u||(u={})),function(t){t.DDS_ENCODING="image/vnd-ms.dds",t.KTX2_ENCODING="image/ktx2",t.BASIS_ENCODING="image/x.basis"}(h||(h={}))},9820:(t,e,n)=>{function r(t,e){const n=t.length;for(let r=0;r<n;++r)o[0]=t[r],e[r]=o[0];return e}function i(t,e){const n=t.length;for(let r=0;r<n;++r)o[0]=t[r],o[1]=t[r]-o[0],e[r]=o[1];return e}n.d(e,{GB:()=>i,U8:()=>r});const o=new Float32Array(2)}}]);
|