@arcgis/core 4.31.0-next.20240920 → 4.31.0-next.20240921
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/WebDocument2D.js +1 -1
- package/applications/SceneViewer/sceneViewerUtils.js +1 -1
- package/arcade/featureset/actions/Adapted.js +1 -1
- package/arcade/featureset/support/StatsField.js +1 -1
- package/arcade/featureset/support/errorsupport.js +1 -1
- package/arcade/featureset/support/sqlUtils.js +1 -1
- package/arcade/functions/maths.js +1 -1
- package/assets/esri/core/workers/RemoteClient.js +1 -1
- package/assets/esri/core/workers/chunks/24d45530fe47b3114daf.js +1 -0
- package/assets/esri/core/workers/chunks/35f92652df2561845d47.js +1 -0
- package/assets/esri/core/workers/chunks/736e0c5cb9010ca818d8.js +1 -0
- package/assets/esri/core/workers/chunks/757b83799555958e059c.js +1 -0
- package/assets/esri/core/workers/chunks/76d8192015ce46dbf92a.js +1 -0
- package/assets/esri/core/workers/chunks/884cd0bd036c65567929.js +1 -0
- package/assets/esri/core/workers/chunks/{da3a4eb3fbb9dd509b4b.js → 98e872da08203455a5b6.js} +1 -1
- package/assets/esri/core/workers/chunks/d9c34e07627d93d4670b.js +1 -0
- package/assets/esri/core/workers/chunks/f7c96d34c70ed36da7c2.js +1 -0
- package/assets/esri/themes/base/_functions.scss +6 -2
- package/assets/esri/themes/base/widgets/_BasemapLayerList.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/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ar.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bg.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_bs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ca.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_cs.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_da.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_de.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_el.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_es.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_et.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_fr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_he.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_hu.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_id.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_it.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ja.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ko.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lt.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_lv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nb.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_nl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-BR.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_pt-PT.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ro.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_ru.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sl.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_sv.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_th.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_tr.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_uk.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_vi.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-CN.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-HK.json +1 -1
- package/assets/esri/widgets/BasemapGallery/t9n/BasemapGallery_zh-TW.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ar.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bg.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_bs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ca.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_cs.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_da.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_de.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_el.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_es.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_et.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_fr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_he.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_hu.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_id.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_it.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ja.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ko.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lt.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_lv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nb.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_nl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-BR.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_pt-PT.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ro.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_ru.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sl.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_sv.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_th.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_tr.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_uk.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_vi.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-CN.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-HK.json +1 -1
- package/assets/esri/widgets/OrientedImageryViewer/t9n/OrientedImageryViewer_zh-TW.json +1 -1
- package/chunks/Bufferer-93RDFIRm.js +5 -0
- package/chunks/GeodeticDistanceCalculator-CN7xMqrJ.js +1 -1
- package/chunks/OperatorGeodeticArea.js +1 -1
- package/chunks/Polyline.js +1 -1
- package/chunks/Theme.js +1 -1
- package/core/mathUtils.js +1 -1
- package/core/sql/AggregateFunctions.js +1 -1
- package/core/sql/SqlInterval.js +1 -1
- package/core/sql/StandardizedFunctions.js +1 -1
- package/core/sql/WhereClause.js +1 -1
- package/core/sql/WhereGrammar.js +1 -1
- package/core/sql/errorSupport.js +5 -0
- package/core/sql/sqlArithmeticUtils.js +1 -1
- package/core/sql/sqlCompareUtils.js +1 -1
- package/core/sql/sqlDateParsingUtils.js +1 -1
- package/geometry/operators/crossesOperator.js +1 -1
- package/geometry/operators/equalsOperator.js +1 -1
- package/geometry/operators/graphicBufferOperator.js +5 -0
- package/geometry/operators/gx/operatorBuffer.js +1 -1
- package/geometry/operators/gx/operatorConvexHull.js +1 -1
- package/geometry/operators/gx/operatorCut.js +1 -1
- package/geometry/operators/gx/operatorGraphicBuffer.js +5 -0
- package/geometry/operators/gx/operatorIntegrate.js +1 -1
- package/geometry/operators/gx/operatorLabelPoint.js +1 -1
- package/geometry/operators/gx/operatorOffset.js +1 -1
- package/geometry/operators/gx/operatorSymmetricDifference.js +1 -1
- package/geometry/operators/intersectsOperator.js +1 -1
- package/geometry/operators/overlapsOperator.js +1 -1
- package/geometry/operators/proximityOperator.d.ts +4 -0
- package/geometry/operators/proximityOperator.js +1 -1
- package/geometry/operators/relateOperator.js +1 -1
- package/geometry/operators/reshapeOperator.js +1 -1
- package/geometry/operators/touchesOperator.js +1 -1
- package/geometry/operators/withinOperator.js +1 -1
- package/interfaces.d.ts +306 -24
- package/layers/mixins/ArcGISMapService.js +1 -1
- package/package.json +1 -1
- package/support/revision.js +1 -1
- package/views/2d/layers/GraphicsLayerView2D.js +1 -1
- package/views/2d/layers/LayerView2D.js +1 -1
- package/views/2d/support/highlightGroupUtils.js +1 -1
- package/views/3d/interactive/editingTools/move/MoveTool3D.js +1 -1
- package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
- package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
- package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
- package/views/3d/interactive/editingTools/transform/TransformTool3D.js +1 -1
- package/views/View.js +1 -1
- package/views/View2D.js +1 -1
- package/views/draw/DrawGraphicTool.js +1 -1
- package/views/draw/support/Box.js +1 -1
- package/views/draw/support/Reshape.js +1 -1
- package/views/interactive/Tooltip.d.ts +4 -0
- package/views/interactive/Tooltip.js +5 -0
- package/views/interactive/tooltip/tooltipCommonUtils.js +1 -1
- package/webdoc/widgets/TimeSlider.js +1 -1
- package/webmap/InitialViewProperties.js +1 -1
- package/widgets/BasemapLayerList/css.js +1 -1
- package/widgets/BasemapLayerList.js +1 -1
- package/widgets/CatalogLayerList.js +1 -1
- package/widgets/Feature/FeatureMedia/pieChart.js +1 -1
- package/widgets/LayerList/LayerListItem.js +1 -1
- package/widgets/LayerList.js +1 -1
- package/widgets/Sketch/SketchViewModel.js +1 -1
- package/widgets/Sketch.js +1 -1
- package/assets/esri/core/workers/chunks/3cb1de0b9bf9a25112e0.js +0 -1
- package/assets/esri/core/workers/chunks/41205645790e5f2bdaf7.js +0 -1
- package/assets/esri/core/workers/chunks/59833b27d8413b6d9312.js +0 -1
- package/assets/esri/core/workers/chunks/6d668f7696f280ec9588.js +0 -1
- package/assets/esri/core/workers/chunks/907e74abb4a85a76e3b5.js +0 -1
- package/assets/esri/core/workers/chunks/a6c3c1827d2e8bbfcd9e.js +0 -1
- package/assets/esri/core/workers/chunks/df9daac7ea581e9e5ca4.js +0 -1
- package/assets/esri/core/workers/chunks/ef7dcb8758e7f21d30bc.js +0 -1
- package/views/interactive/tooltip/Tooltip.js +0 -5
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunkRemoteClient=self.webpackChunkRemoteClient||[]).push([[6064],{97937:(t,e,n)=>{n.d(e,{c:()=>g,d:()=>A,f:()=>R,g:()=>N,h:()=>E,k:()=>v,o:()=>x,s:()=>j,w:()=>p}),n(44208),n(53966);var o=n(34727),r=n(58083),i=n(38954),s=n(51850),c=n(87317),a=n(91829),u=n(34304),l=n(88582),h=n(71351);function d(t,e){const n=(0,i.m)(t),r=(0,o.YN)(t[2]/n),s=Math.atan2(t[1]/n,t[0]/n);return(0,i.a)(e,n,r,s),e}var f=n(44280),T=n(32114);const _=g();function g(){return(0,a.vt)()}const m=c.e,O=c.e;function A(t,e){return(0,c.c)(e,t)}function p(t){return t}function E(t){return t[3]}function N(t){return t}function R(t,e,n,o){return(0,a.fA)(t,e,n,o)}function I(t,e,n){if(null==e)return!1;if(!M(t,e,S))return!1;let{t0:o,t1:r}=S;if((o<0||r<o&&r>0)&&(o=r),o<0)return!1;if(n){const{origin:t,direction:r}=e;n[0]=t[0]+r[0]*o,n[1]=t[1]+r[1]*o,n[2]=t[2]+r[2]*o}return!0}const S={t0:0,t1:0};function M(t,e,n){const{origin:o,direction:r}=e,i=b;i[0]=o[0]-t[0],i[1]=o[1]-t[1],i[2]=o[2]-t[2];const s=r[0]*r[0]+r[1]*r[1]+r[2]*r[2];if(0===s)return!1;const c=2*(r[0]*i[0]+r[1]*i[1]+r[2]*i[2]),a=c*c-4*s*(i[0]*i[0]+i[1]*i[1]+i[2]*i[2]-t[3]*t[3]);if(a<0)return!1;const u=Math.sqrt(a);return n.t0=(-c-u)/(2*s),n.t1=(-c+u)/(2*s),!0}const b=(0,s.vt)();function v(t,e){return I(t,e,null)}function F(t,e,n){const o=T.rq.get(),s=T.Rc.get();(0,i.b)(o,e.origin,e.direction);const c=E(t);(0,i.b)(n,o,e.origin),(0,i.j)(n,n,1/(0,i.m)(n)*c);const a=L(t,e.origin),u=(0,f.g7)(e.origin,n);return(0,r.$0)(s,u+a,o),(0,i.h)(n,n,s),n}function P(t,e,n){const o=(0,i.f)(T.rq.get(),e,t),r=(0,i.j)(T.rq.get(),o,t[3]/(0,i.m)(o));return(0,i.g)(n,r,t)}function L(t,e){const n=(0,i.f)(T.rq.get(),e,t),r=(0,i.m)(n),s=E(t),c=s+Math.abs(s-r);return(0,o.XM)(s/c)}const C=(0,s.vt)();function B(t,e,n,o){const r=(0,i.f)(C,e,t);switch(n){case l._.X:{const t=d(r,C)[2];return(0,i.a)(o,-Math.sin(t),Math.cos(t),0)}case l._.Y:{const t=d(r,C),e=t[1],n=t[2],s=Math.sin(e);return(0,i.a)(o,-s*Math.cos(n),-s*Math.sin(n),Math.cos(e))}case l._.Z:return(0,i.n)(o,r);default:return}}function w(t,e){const n=(0,i.f)(y,e,t);return(0,i.m)(n)-t[3]}function x(t,e){const n=(0,i.s)(t,e),o=E(t);return n<=o*o}const y=(0,s.vt)(),D=g(),j=Object.freeze(Object.defineProperty({__proto__:null,NullSphere:_,altitudeAt:w,angleToSilhouette:L,axisAt:B,cameraFrustumCoverage:function(t,e,n,o){const r=E(t),i=r*r,s=e+.5*Math.PI,c=n*n+i-2*Math.cos(s)*n*r,a=Math.sqrt(c),u=c-i;if(u<=0)return.5;const l=Math.sqrt(u),h=Math.acos(l/a)-Math.asin(r/(a/Math.sin(s)));return Math.min(1,(h+.5*o)/o)},clear:function(t){t[0]=t[1]=t[2]=t[3]=0},closestPoint:function(t,e,n){return I(t,e,n)?n:((0,h.oC)(e,t,n),P(t,n,n))},closestPointOnSilhouette:F,containsPoint:x,copy:A,create:g,distanceToSilhouette:function(t,e){const n=(0,i.f)(T.rq.get(),e,t),o=(0,i.q)(n),r=t[3]*t[3];return Math.sqrt(Math.abs(o-r))},elevate:function(t,e,n){return t!==n&&(n[0]=t[0],n[1]=t[1],n[2]=t[2]),n[3]=t[3]+e,n},equals:O,exactEquals:m,fromCenterAndRadius:function(t,e){return(0,a.fA)(t[0],t[1],t[2],e)},fromRadius:function(t,e){return t[0]=t[1]=t[2]=0,t[3]=e,t},fromValues:R,getCenter:N,getExtent:function(t,e){return e},getRadius:E,intersectLine:function(t,e,n){const o=(0,h.Cr)(e,n);if(!M(t,o,S))return[];const{origin:r,direction:c}=o,{t0:a,t1:l}=S,d=e=>{const n=(0,s.vt)();return(0,i.r)(n,r,c,e),P(t,n,n)};return Math.abs(a-l)<(0,u.FD)()?[d(a)]:[d(a),d(l)]},intersectRay:I,intersectRayClosestSilhouette:function(t,e,n){if(I(t,e,n))return n;const o=F(t,e,T.rq.get());return(0,i.g)(n,e.origin,(0,i.j)(T.rq.get(),e.direction,(0,i.p)(e.origin,o)/(0,i.m)(e.direction))),n},intersectsRay:v,projectPoint:P,setAltitudeAt:function(t,e,n,o){const r=w(t,e),s=B(t,e,l._.Z,y),c=(0,i.j)(y,s,n-r);return(0,i.g)(o,e,c)},setExtent:function(t,e,n){return t!==n&&A(t,n),n},tmpSphere:D,union:function(t,e,n=(0,a.vt)()){const o=(0,i.p)(t,e),r=t[3],s=e[3];return o+s<r?((0,c.c)(n,t),n):o+r<s?((0,c.c)(n,e),n):((0,i.o)(n,t,e,(o+s-r)/(2*o)),n[3]=(o+r+s)/2,n)},wrap:p},Symbol.toStringTag,{value:"Module"}))},4341:(t,e,n)=>{n.d(e,{I:()=>r});var o=n(26390);class r{constructor(t){this._allocator=t,this._items=[],this._itemsPtr=0,this._grow()}get(){return 0===this._itemsPtr&&(0,o.d)((()=>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*i);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,i));t++)this._items.push(this._allocator())}}const i=1024},91829:(t,e,n)=>{function o(){return[0,0,0,0]}function r(t,e,n,o){return[t,e,n,o]}function i(t,e,n,o){return[t,e,n,o]}function s(t,e=[0,0,0,0]){const n=Math.min(4,t.length);for(let o=0;o<n;++o)e[o]=t[o];return e}function c(){return r(1,1,1,1)}function a(){return r(1,0,0,0)}function u(){return r(0,1,0,0)}function l(){return r(0,0,1,0)}function h(){return r(0,0,0,1)}n.d(e,{CN:()=>i,Un:()=>f,ci:()=>s,fA:()=>r,uY:()=>d,vt:()=>o});const d=[0,0,0,0],f=c(),T=a(),_=u(),g=l(),m=h();Object.freeze(Object.defineProperty({__proto__:null,ONES:f,UNIT_W:m,UNIT_X:T,UNIT_Y:_,UNIT_Z:g,ZEROS:d,clone:function(t){return[t[0],t[1],t[2],t[3]]},create:o,createView:function(t,e){return new Float64Array(t,e,4)},freeze:i,fromArray:s,fromValues:r,ones:c,unitW:h,unitX:a,unitY:u,unitZ:l,zeros:function(){return[0,0,0,0]}},Symbol.toStringTag,{value:"Module"}))},34727:(t,e,n)=>{n.d(e,{$8:()=>A,Cc:()=>s,Io:()=>O,KJ:()=>u,Sp:()=>d,XM:()=>l,YN:()=>h,cU:()=>r,hs:()=>c,kU:()=>a,or:()=>E,pq:()=>N,qE:()=>i});const o=new Float32Array(1);function r(t){--t;for(let e=1;e<32;e<<=1)t|=t>>e;return t+1}function i(t,e,n){return Math.min(Math.max(t,e),n)}function s(t,e,n){return t+(e-t)*n}function c(t,e,n,o,r){return s(o,r,(t-e)/(n-e))}function a(t){return t*Math.PI/180}function u(t){return 180*t/Math.PI}function l(t){return Math.acos(i(t,-1,1))}function h(t){return Math.asin(i(t,-1,1))}function d(t,e,n=1e-6){return t===e||!(!Number.isFinite(t)||!Number.isFinite(e))&&(t>e?t-e:e-t)<=n}const f=new DataView(new ArrayBuffer(Float64Array.BYTES_PER_ELEMENT));function T(t){return f.setFloat64(0,t),f.getBigInt64(0)}const _=BigInt("1000000"),g=m(1);function m(t){const e=T(t=Math.abs(t)),n=function(t){return f.setBigInt64(0,t),f.getFloat64(0)}(e<=_?_:e-_);return Math.abs(t-n)}function O(t,e,n=g){if(t===e)return!0;if(!Number.isFinite(t)||!Number.isFinite(e))return!1;if(null!=n&&m(Math.min(Math.abs(t),Math.abs(e)))<n)return Math.abs(t-e)<=n;const o=T(t),r=T(e);return o<0==r<0&&!((o<r?r-o:o-r)>_)}function A(t){return p(Math.max(-N,Math.min(t,N)))}function p(t){return o[0]=t,o[0]}function E(t){const e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[3]*t[3]+t[4]*t[4]+t[5]*t[5],o=t[6]*t[6]+t[7]*t[7]+t[8]*t[8];return!(d(e,1)&&d(n,1)&&d(o,1))}const N=p(34028234663852886e22)},88582:(t,e,n)=>{var o;n.d(e,{_:()=>o}),function(t){t[t.X=0]="X",t[t.Y=1]="Y",t[t.Z=2]="Z"}(o||(o={}))},82919:(t,e,n)=>{n.d(e,{C:()=>m,vt:()=>g,ui:()=>O,m7:()=>A});var o=n(4341),r=n(58083),i=n(38954),s=n(51850),c=n(87317),a=n(91829),u=n(71351);function l(t){return t?{ray:(0,u.vt)(t.ray),c0:t.c0,c1:t.c1}:{ray:(0,u.vt)(),c0:0,c1:Number.MAX_VALUE}}new o.I((()=>l()));var h,d,f,T=n(27921),_=n(32114);function g(t){return t?[(0,T.vt)(t[0]),(0,T.vt)(t[1]),(0,T.vt)(t[2]),(0,T.vt)(t[3]),(0,T.vt)(t[4]),(0,T.vt)(t[5])]:[(0,T.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)(),(0,T.vt)()]}function m(t,e){for(let n=0;n<p;n++)(0,T.C)(t[n],e[n]);return t}function O(t,e,n,o=R){const s=(0,r.lw)(_.Rc.get(),e,t);(0,r.B8)(s,s);for(let t=0;t<E;++t){const e=(0,c.t)(_.Km.get(),N[t],s);(0,i.a)(o[t],e[0]/e[3],e[1]/e[3],e[2]/e[3])}!function(t,e){(0,T.Cr)(e[d.FAR_BOTTOM_LEFT],e[d.NEAR_BOTTOM_LEFT],e[d.NEAR_TOP_LEFT],t[h.LEFT]),(0,T.Cr)(e[d.NEAR_BOTTOM_RIGHT],e[d.FAR_BOTTOM_RIGHT],e[d.FAR_TOP_RIGHT],t[h.RIGHT]),(0,T.Cr)(e[d.FAR_BOTTOM_LEFT],e[d.FAR_BOTTOM_RIGHT],e[d.NEAR_BOTTOM_RIGHT],t[h.BOTTOM]),(0,T.Cr)(e[d.NEAR_TOP_LEFT],e[d.NEAR_TOP_RIGHT],e[d.FAR_TOP_RIGHT],t[h.TOP]),(0,T.Cr)(e[d.NEAR_BOTTOM_LEFT],e[d.NEAR_BOTTOM_RIGHT],e[d.NEAR_TOP_RIGHT],t[h.NEAR]),(0,T.Cr)(e[d.FAR_BOTTOM_RIGHT],e[d.FAR_BOTTOM_LEFT],e[d.FAR_TOP_LEFT],t[h.FAR])}(n,o)}function A(t,e){for(let n=0;n<p;n++){const o=t[n];if(o[0]*e[0]+o[1]*e[1]+o[2]*e[2]+o[3]>=e[3])return!1}return!0}(f=h||(h={}))[f.LEFT=0]="LEFT",f[f.RIGHT=1]="RIGHT",f[f.BOTTOM=2]="BOTTOM",f[f.TOP=3]="TOP",f[f.NEAR=4]="NEAR",f[f.FAR=5]="FAR",function(t){t[t.NEAR_BOTTOM_LEFT=0]="NEAR_BOTTOM_LEFT",t[t.NEAR_BOTTOM_RIGHT=1]="NEAR_BOTTOM_RIGHT",t[t.NEAR_TOP_RIGHT=2]="NEAR_TOP_RIGHT",t[t.NEAR_TOP_LEFT=3]="NEAR_TOP_LEFT",t[t.FAR_BOTTOM_LEFT=4]="FAR_BOTTOM_LEFT",t[t.FAR_BOTTOM_RIGHT=5]="FAR_BOTTOM_RIGHT",t[t.FAR_TOP_RIGHT=6]="FAR_TOP_RIGHT",t[t.FAR_TOP_LEFT=7]="FAR_TOP_LEFT"}(d||(d={})),d.FAR_BOTTOM_RIGHT,d.NEAR_BOTTOM_RIGHT,d.NEAR_BOTTOM_LEFT,d.FAR_BOTTOM_LEFT,d.NEAR_BOTTOM_LEFT,d.NEAR_BOTTOM_RIGHT,d.NEAR_TOP_RIGHT,d.NEAR_TOP_LEFT,d.FAR_BOTTOM_RIGHT,d.FAR_BOTTOM_LEFT,d.FAR_TOP_LEFT,d.FAR_TOP_RIGHT,d.NEAR_BOTTOM_RIGHT,d.FAR_BOTTOM_RIGHT,d.FAR_TOP_RIGHT,d.NEAR_TOP_RIGHT,d.FAR_BOTTOM_LEFT,d.NEAR_BOTTOM_LEFT,d.NEAR_TOP_LEFT,d.FAR_TOP_LEFT,d.FAR_TOP_LEFT,d.NEAR_TOP_LEFT,d.NEAR_TOP_RIGHT,d.FAR_TOP_RIGHT;const p=6,E=8,N=[(0,a.fA)(-1,-1,-1,1),(0,a.fA)(1,-1,-1,1),(0,a.fA)(1,1,-1,1),(0,a.fA)(-1,1,-1,1),(0,a.fA)(-1,-1,1,1),(0,a.fA)(1,-1,1,1),(0,a.fA)(1,1,1,1),(0,a.fA)(-1,1,1,1)],R=(new o.I(l),[(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,s.vt)()])},11964:(t,e,n)=>{n.d(e,{Cr:()=>u,H6:()=>d,_I:()=>h,kb:()=>l,vt:()=>a});var o=n(34727),r=n(4341),i=n(38954),s=n(51850),c=n(32114);function a(t){return t?{origin:(0,s.o8)(t.origin),vector:(0,s.o8)(t.vector)}:{origin:(0,s.vt)(),vector:(0,s.vt)()}}function u(t,e,n=a()){return(0,i.c)(n.origin,t),(0,i.f)(n.vector,e,t),n}function l(t,e){const n=(0,i.f)(c.rq.get(),e,t.origin),r=(0,i.l)(t.vector,n),s=(0,i.l)(t.vector,t.vector),a=(0,o.qE)(r/s,0,1),u=(0,i.f)(c.rq.get(),(0,i.j)(c.rq.get(),t.vector,a),n);return(0,i.l)(u,u)}function h(t,e,n){return d(t,e,0,1,n)}function d(t,e,n,r,s){const{vector:a,origin:u}=t,l=(0,i.f)(c.rq.get(),e,u),h=(0,i.l)(a,l)/(0,i.q)(a);return(0,i.j)(s,a,(0,o.qE)(h,n,r)),(0,i.g)(s,s,t.origin)}(0,s.vt)(),(0,s.vt)(),new r.I((()=>a()))},9318:(t,e,n)=>{n.d(e,{b:()=>i});var o=n(34727),r=n(97146);function i(t,e,n){const i=Array.isArray(t),l=i?t.length/e:t.byteLength/(4*e),h=i?t:new Uint32Array(t,0,l*e),d=n?.minReduction??0,f=n?.originalIndices||null,T=f?f.length:0,_=n?.componentOffsets||null;let g=0;if(_)for(let t=0;t<_.length-1;t++){const e=_[t+1]-_[t];e>g&&(g=e)}else g=l;const m=Math.floor(1.1*g)+1;(null==u||u.length<2*m)&&(u=new Uint32Array((0,o.cU)(2*m)));for(let t=0;t<2*m;t++)u[t]=0;let O=0;const A=!!_&&!!f,p=A?T:l;let E=(0,r.my)(l);const N=new Uint32Array(T),R=1.96;let I=0!==d?Math.ceil(4*R*R/(d*d)*d*(1-d)):p,S=1,M=_?_[1]:p;for(let t=0;t<p;t++){if(t===I){const e=1-O/t;if(e+R*Math.sqrt(e*(1-e)/t)<d)return null;I*=2}if(t===M){for(let t=0;t<2*m;t++)u[t]=0;if(f)for(let t=_[S-1];t<_[S];t++)N[t]=E[f[t]];M=_[++S]}const n=A?f[t]:t,o=n*e,r=a(h,o,e);let i=r%m,c=O;for(;0!==u[2*i+1];){if(u[2*i]===r){const t=u[2*i+1]-1;if(s(h,o,t*e,e)){c=E[t];break}}i++,i>=m&&(i-=m)}c===O&&(u[2*i]=r,u[2*i+1]=n+1,O++),E[n]=c}if(0!==d&&1-O/l<d)return null;if(A){for(let t=_[S-1];t<N.length;t++)N[t]=E[f[t]];E=(0,r.Dg)(N)}const b=i?new Array(O):new Uint32Array(O*e);O=0;for(let t=0;t<p;t++)E[t]===O&&(c(h,(A?f[t]:t)*e,b,O*e,e),O++);if(f&&!A){const t=new Uint32Array(T);for(let e=0;e<t.length;e++)t[e]=E[f[e]];E=(0,r.Dg)(t)}return{buffer:Array.isArray(b)?b:b.buffer,indices:E,uniqueCount:O}}function s(t,e,n,o){for(let r=0;r<o;r++)if(t[e+r]!==t[n+r])return!1;return!0}function c(t,e,n,o,r){for(let i=0;i<r;i++)n[o+i]=t[e+i]}function a(t,e,n){let o=0;for(let r=0;r<n;r++)o=t[e+r]+o|0,o=o+(o<<11)+(o>>>2)|0;return o>>>0}let u=null},71351:(t,e,n)=>{n.d(e,{C:()=>h,Cr:()=>d,LV:()=>l,kb:()=>f,oC:()=>T,vt:()=>a}),n(4576);var o=n(4341),r=(n(77690),n(29242)),i=n(38954),s=n(51850),c=n(32114);function a(t){return t?u((0,s.o8)(t.origin),(0,s.o8)(t.direction)):u((0,s.vt)(),(0,s.vt)())}function u(t,e){return{origin:t,direction:e}}function l(t,e){const n=_.get();return n.origin=t,n.direction=e,n}function h(t,e=a()){return function(t,e,n=a()){return(0,i.c)(n.origin,t),(0,i.c)(n.direction,e),n}(t.origin,t.direction,e)}function d(t,e,n=a()){return(0,i.c)(n.origin,t),(0,i.f)(n.direction,e,t),n}function f(t,e){const n=(0,i.b)(c.rq.get(),(0,i.n)(c.rq.get(),t.direction),(0,i.f)(c.rq.get(),e,t.origin));return(0,i.l)(n,n)}function T(t,e,n){const o=(0,i.l)(t.direction,(0,i.f)(n,e,t.origin));return(0,i.g)(n,t.origin,(0,i.j)(n,t.direction,o)),n}const _=new o.I((()=>a()));(0,s.vt)(),(0,s.vt)(),(0,s.vt)(),(0,r.vt)()},4431:(t,e,n)=>{n.d(e,{U:()=>i});var o=n(63907),r=n(74038);function i(t,e=0){const n=t.stride;return Array.from(t.fields.keys()).map((o=>{const i=t.fields.get(o),c=i.constructor.ElementCount,a=s(i.constructor.ElementType),u=i.offset,l=i.optional?.glNormalized??!1;return new r._(o,c,a,u,n,l,e)}))}function s(t){const e=c[t];if(e)return e;throw new Error("BufferType not supported in WebGL")}const c={u8:o.pe.UNSIGNED_BYTE,u16:o.pe.UNSIGNED_SHORT,u32:o.pe.UNSIGNED_INT,i8:o.pe.BYTE,i16:o.pe.SHORT,i32:o.pe.INT,f32:o.pe.FLOAT}},78230:(t,e,n)=>{n.d(e,{A:()=>G});var o,r,i=n(93687),s=n(3694),c=n(38954),a=n(51850),u=n(82919),l=n(71351),h=n(97937),d=n(620);class f{get bounds(){return this._root.bounds}get halfSize(){return this._root.halfSize}get root(){return this._root.node}get maximumObjectsPerNode(){return this._maximumObjectsPerNode}get maximumDepth(){return this._maximumDepth}get objectCount(){return this._objectCount}constructor(t,e){this.objectToBoundingSphere=t,this._maximumObjectsPerNode=10,this._maximumDepth=20,this._degenerateObjects=new Set,this._root=new T,this._objectCount=0,e&&(void 0!==e.maximumObjectsPerNode&&(this._maximumObjectsPerNode=e.maximumObjectsPerNode),void 0!==e.maximumDepth&&(this._maximumDepth=e.maximumDepth))}destroy(){this._degenerateObjects.clear(),T.clearPool(),P[0]=null,x.prune(),H.prune()}add(t,e=t.length){this._objectCount+=e,this._grow(t,e);const n=T.acquire();for(let o=0;o<e;o++){const e=t[o];this._isDegenerate(e)?this._degenerateObjects.add(e):(n.init(this._root),this._add(e,n))}T.release(n)}remove(t,e=null){this._objectCount-=t.length;const n=T.acquire();for(const o of t){const t=e??(0,h.d)(this.objectToBoundingSphere(o),y);M(t[3])?(n.init(this._root),m(o,t,n)):this._degenerateObjects.delete(o)}T.release(n),this._shrink()}update(t,e){if(!M(e[3])&&this._isDegenerate(t))return;const n=function(t){return P[0]=t,P}(t);this.remove(n,e),this.add(n)}forEachAlongRay(t,e,n){const o=(0,l.LV)(t,e);_(this._root,(t=>{if(!function(t,e){return N((0,h.g)(e.bounds),2*-e.halfSize,B),N((0,h.g)(e.bounds),2*e.halfSize,w),(0,d.O_)(t.origin,t.direction,B,w)}(o,t))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObject(o,t)&&n(t)})),!0}))}forEachAlongRayWithVerticalOffset(t,e,n,o){const r=(0,l.LV)(t,e);_(this._root,(t=>{if(!function(t,e,n){return N((0,h.g)(e.bounds),2*-e.halfSize,B),N((0,h.g)(e.bounds),2*e.halfSize,w),n.applyToMinMax(B,w),(0,d.O_)(t.origin,t.direction,B,w)}(r,t,o))return!1;const e=t.node;return e.terminals.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),null!==e.residents&&e.residents.forAll((t=>{this._intersectsObjectWithOffset(r,t,o)&&n(t)})),!0}))}forEach(t){_(this._root,(e=>{const n=e.node;return n.terminals.forAll(t),null!==n.residents&&n.residents.forAll(t),!0})),this._degenerateObjects.forEach(t)}forEachDegenerateObject(t){this._degenerateObjects.forEach(t)}findClosest(t,e,n,o=()=>!0,r=1/0){let i=1/0,s=1/0,a=null;const l=I(t,e),d=c=>{if(--r,!o(c))return;const l=this.objectToBoundingSphere(c);if(!(0,u.m7)(n,l))return;const d=S(t,e,(0,h.g)(l)),f=d-l[3],T=d+l[3];f<i&&(i=f,s=T,a=c)};return g(this._root,(o=>{if(r<=0||!(0,u.m7)(n,o.bounds))return!1;if((0,c.j)(C,l,o.halfSize),(0,c.g)(C,C,(0,h.g)(o.bounds)),S(t,e,C)>s)return!1;const i=o.node;return i.terminals.forAll((t=>d(t))),null!==i.residents&&i.residents.forAll((t=>d(t))),!0}),t,e),a}forEachInDepthRange(t,e,n,o,r,i,s){let a=-1/0,l=1/0;const d={setRange:t=>{n===f.DepthOrder.FRONT_TO_BACK?(a=Math.max(a,t.near),l=Math.min(l,t.far)):(a=Math.max(a,-t.far),l=Math.min(l,-t.near))}};d.setRange(o);const T=S(e,n,t),_=I(e,n),m=I(e,-n),O=t=>{if(!s(t))return;const o=this.objectToBoundingSphere(t),c=(0,h.g)(o),f=S(e,n,c)-T,_=f-o[3],g=f+o[3];_>l||g<a||!(0,u.m7)(i,o)||r(t,d)};g(this._root,(t=>{if(!(0,u.m7)(i,t.bounds))return!1;if((0,c.j)(C,_,t.halfSize),(0,c.g)(C,C,(0,h.g)(t.bounds)),S(e,n,C)-T>l)return!1;if((0,c.j)(C,m,t.halfSize),(0,c.g)(C,C,(0,h.g)(t.bounds)),S(e,n,C)-T<a)return!1;const o=t.node;return o.terminals.forAll((t=>O(t))),null!==o.residents&&o.residents.forAll((t=>O(t))),!0}),e,n)}forEachNode(t){_(this._root,(e=>t(e.node,e.bounds,e.halfSize,e.depth)))}forEachNeighbor(t,e){const n=(0,h.h)(e),o=(0,h.g)(e),r=e=>{const r=this.objectToBoundingSphere(e),i=(0,h.h)(r),s=n+i;return!((0,c.s)((0,h.g)(r),o)-s*s<=0)||t(e)};let i=!0;const s=t=>{i&&(i=r(t))};_(this._root,(t=>{const e=(0,h.h)(t.bounds),r=n+e;if((0,c.s)((0,h.g)(t.bounds),o)-r*r>0)return!1;const a=t.node;return a.terminals.forAll(s),i&&null!==a.residents&&a.residents.forAll(s),i})),i&&this.forEachDegenerateObject(s)}_intersectsObject(t,e){const n=this.objectToBoundingSphere(e);return!(n[3]>0)||(0,h.k)(n,t)}_intersectsObjectWithOffset(t,e,n){const o=this.objectToBoundingSphere(e);return!(o[3]>0)||(0,h.k)(n.applyToBoundingSphere(o),t)}_add(t,e){e.advanceTo(this.objectToBoundingSphere(t))?e.node.terminals.push(t):(e.node.residents.push(t),e.node.residents.length>this._maximumObjectsPerNode&&e.depth<this._maximumDepth&&this._split(e))}_split(t){const e=t.node.residents;t.node.residents=null;for(let n=0;n<e.length;n++){const o=T.acquire().init(t);this._add(e.at(n),o),T.release(o)}}_grow(t,e){if(0!==e&&(R(t,e,(t=>this.objectToBoundingSphere(t)),D),M(D[3])&&!this._fitsInsideTree(D)))if(A(this._root.node))(0,h.d)(D,this._root.bounds),this._root.halfSize=1.25*this._root.bounds[3],this._root.updateBoundsRadiusFromHalfSize();else{const t=this._rootBoundsForRootAsSubNode(D);this._placingRootViolatesMaxDepth(t)?this._rebuildTree(D,t):this._growRootAsSubNode(t),T.release(t)}}_rebuildTree(t,e){(0,c.c)((0,h.g)(j),(0,h.g)(e.bounds)),j[3]=e.halfSize,R([t,j],2,(t=>t),U);const n=T.acquire().init(this._root);this._root.initFrom(null,U,U[3]),this._root.increaseHalfSize(1.25),_(n,(t=>(this.add(t.node.terminals.data,t.node.terminals.length),null!==t.node.residents&&this.add(t.node.residents.data,t.node.residents.length),!0))),T.release(n)}_placingRootViolatesMaxDepth(t){const e=Math.log(t.halfSize/this._root.halfSize)*Math.LOG2E;let n=0;return _(this._root,(t=>(n=Math.max(n,t.depth),n+e<=this._maximumDepth))),n+e>this._maximumDepth}_rootBoundsForRootAsSubNode(t){const e=t[3],n=t;let o=-1/0;const r=this._root.bounds,i=this._root.halfSize;for(let t=0;t<3;t++){const s=r[t]-i-(n[t]-e),c=n[t]+e-(r[t]+i),a=Math.max(0,Math.ceil(s/(2*i))),u=Math.max(0,Math.ceil(c/(2*i)))+1,l=2**Math.ceil(Math.log(a+u)*Math.LOG2E);o=Math.max(o,l),z[t].min=a,z[t].max=u}for(let t=0;t<3;t++){let e=z[t].min,n=z[t].max;const s=(o-(e+n))/2;e+=Math.ceil(s),n+=Math.floor(s);const c=r[t]-i-e*i*2;L[t]=c+(n+e)*i}const s=o*i;return L[3]=s*F,T.acquire().initFrom(null,L,s,0)}_growRootAsSubNode(t){const e=this._root.node;(0,c.c)((0,h.g)(D),(0,h.g)(this._root.bounds)),D[3]=this._root.halfSize,this._root.init(t),t.advanceTo(D,null,!0),t.node.children=e.children,t.node.residents=e.residents,t.node.terminals=e.terminals}_shrink(){for(;;){const t=this._findShrinkIndex();if(-1===t)break;this._root.advance(t),this._root.depth=0}}_findShrinkIndex(){if(0!==this._root.node.terminals.length||this._root.isLeaf())return-1;let t=null;const e=this._root.node.children;let n=0,o=0;for(;o<e.length&&null==t;)n=o++,t=e[n];for(;o<e.length;)if(e[o++])return-1;return n}_isDegenerate(t){return!M(this.objectToBoundingSphere(t)[3])}_fitsInsideTree(t){const e=this._root.bounds,n=this._root.halfSize;return t[3]<=n&&t[0]>=e[0]-n&&t[0]<=e[0]+n&&t[1]>=e[1]-n&&t[1]<=e[1]+n&&t[2]>=e[2]-n&&t[2]<=e[2]+n}toJSON(){const{maximumDepth:t,maximumObjectsPerNode:e,_objectCount:n}=this,o=this._nodeToJSON(this._root.node);return{maximumDepth:t,maximumObjectsPerNode:e,objectCount:n,root:{bounds:this._root.bounds,halfSize:this._root.halfSize,depth:this._root.depth,node:o}}}_nodeToJSON(t){const e=t.children.map((t=>t?this._nodeToJSON(t):null)),n=t.residents?.map((t=>this.objectToBoundingSphere(t))),o=t.terminals?.map((t=>this.objectToBoundingSphere(t)));return{children:e,residents:n,terminals:o}}static fromJSON(t){const e=new f((t=>t),{maximumDepth:t.maximumDepth,maximumObjectsPerNode:t.maximumObjectsPerNode});return e._objectCount=t.objectCount,e._root.initFrom(t.root.node,t.root.bounds,t.root.halfSize,t.root.depth),e}}class T{constructor(){this.bounds=(0,h.c)(),this.halfSize=0,this.initFrom(null,null,0,0)}init(t){return this.initFrom(t.node,t.bounds,t.halfSize,t.depth)}initFrom(t,e,n,o=this.depth){return this.node=null!=t?t:T.createEmptyNode(),e&&(0,h.d)(e,this.bounds),this.halfSize=n,this.depth=o,this}increaseHalfSize(t){this.halfSize*=t,this.updateBoundsRadiusFromHalfSize()}updateBoundsRadiusFromHalfSize(){this.bounds[3]=this.halfSize*F}advance(t){let e=this.node.children[t];e||(e=T.createEmptyNode(),this.node.children[t]=e),this.node=e,this.halfSize/=2,this.depth++;const n=b[t];return this.bounds[0]+=n[0]*this.halfSize,this.bounds[1]+=n[1]*this.halfSize,this.bounds[2]+=n[2]*this.halfSize,this.updateBoundsRadiusFromHalfSize(),this}advanceTo(t,e,n=!1){for(;;){if(this.isTerminalFor(t))return e&&e(this,-1),!0;if(this.isLeaf()){if(!n)return e&&e(this,-1),!1;this.node.residents=null}const o=this._childIndex(t);e&&e(this,o),this.advance(o)}}isLeaf(){return null!=this.node.residents}isTerminalFor(t){return t[3]>this.halfSize/2}_childIndex(t){const e=this.bounds;return(e[0]<t[0]?1:0)+(e[1]<t[1]?2:0)+(e[2]<t[2]?4:0)}static createEmptyNode(){return{children:[null,null,null,null,null,null,null,null],terminals:new s.A({shrink:!0}),residents:new s.A({shrink:!0})}}static acquire(){return T._pool.acquire()}static release(t){T._pool.release(t)}static clearPool(){T._pool.prune()}}function _(t,e){let n=T.acquire().init(t);const o=[n];for(;0!==o.length;){if(n=o.pop(),e(n)&&!n.isLeaf())for(let t=0;t<n.node.children.length;t++)n.node.children[t]&&o.push(T.acquire().init(n).advance(t));T.release(n)}}function g(t,e,n,o=f.DepthOrder.FRONT_TO_BACK){let r=T.acquire().init(t);const i=[r];for(function(t,e,n){if(!H.length)for(let t=0;t<8;++t)H.push({index:0,distance:0});for(let n=0;n<8;++n){const o=b[n];H.data[n].index=n,H.data[n].distance=S(t,e,o)}H.sort(((t,e)=>t.distance-e.distance));for(let t=0;t<8;++t)n[t]=H.data[t].index}(n,o,V);0!==i.length;){if(r=i.pop(),e(r)&&!r.isLeaf())for(let t=7;t>=0;--t){const e=V[t];r.node.children[e]&&i.push(T.acquire().init(r).advance(e))}T.release(r)}}function m(t,e,n){x.clear();const o=n.advanceTo(e,((t,e)=>{x.push(t.node),x.push(e)}))?n.node.terminals:n.node.residents;if(o.removeUnordered(t),0===o.length)for(let t=x.length-2;t>=0&&O(x.data[t],x.data[t+1]);t-=2);}function O(t,e){return e>=0&&(t.children[e]=null),!!A(t)&&(null===t.residents&&(t.residents=new s.A({shrink:!0})),!0)}function A(t){if(0!==t.terminals.length)return!1;if(null!==t.residents)return 0===t.residents.length;for(let e=0;e<t.children.length;e++)if(t.children[e])return!1;return!0}function p(t,e){t[0]=Math.min(t[0],e[0]-e[3]),t[1]=Math.min(t[1],e[1]-e[3]),t[2]=Math.min(t[2],e[2]-e[3])}function E(t,e){t[0]=Math.max(t[0],e[0]+e[3]),t[1]=Math.max(t[1],e[1]+e[3]),t[2]=Math.max(t[2],e[2]+e[3])}function N(t,e,n){n[0]=t[0]+e,n[1]=t[1]+e,n[2]=t[2]+e}function R(t,e,n,o){if(1===e){const e=n(t[0]);(0,h.d)(e,o)}else{B[0]=1/0,B[1]=1/0,B[2]=1/0,w[0]=-1/0,w[1]=-1/0,w[2]=-1/0;for(let o=0;o<e;o++){const e=n(t[o]);M(e[3])&&(p(B,e),E(w,e))}(0,c.o)((0,h.g)(o),B,w,.5),o[3]=Math.max(w[0]-B[0],w[1]-B[1],w[2]-B[2])/2}}function I(t,e){let n,o=1/0;for(let r=0;r<8;++r){const i=S(t,e,v[r]);i<o&&(o=i,n=v[r])}return n}function S(t,e,n){return e*(t[0]*n[0]+t[1]*n[1]+t[2]*n[2])}function M(t){return!isNaN(t)&&t!==-1/0&&t!==1/0&&t>0}T._pool=new i.A(T),o=f||(f={}),(r=o.DepthOrder||(o.DepthOrder={}))[r.FRONT_TO_BACK=1]="FRONT_TO_BACK",r[r.BACK_TO_FRONT=-1]="BACK_TO_FRONT";const b=[(0,a.fA)(-1,-1,-1),(0,a.fA)(1,-1,-1),(0,a.fA)(-1,1,-1),(0,a.fA)(1,1,-1),(0,a.fA)(-1,-1,1),(0,a.fA)(1,-1,1),(0,a.fA)(-1,1,1),(0,a.fA)(1,1,1)],v=[(0,a.fA)(-1,-1,-1),(0,a.fA)(-1,-1,1),(0,a.fA)(-1,1,-1),(0,a.fA)(-1,1,1),(0,a.fA)(1,-1,-1),(0,a.fA)(1,-1,1),(0,a.fA)(1,1,-1),(0,a.fA)(1,1,1)],F=Math.sqrt(3),P=[null],L=(0,h.c)(),C=(0,a.vt)(),B=(0,a.vt)(),w=(0,a.vt)(),x=new s.A,y=(0,h.c)(),D=(0,h.c)(),j=(0,h.c)(),U=(0,h.c)(),z=[{min:0,max:0},{min:0,max:0},{min:0,max:0}],H=new s.A,V=[0,0,0,0,0,0,0,0],G=f},46540:(t,e,n)=>{var o;n.d(e,{r:()=>o}),function(t){t.POSITION="position",t.NORMAL="normal",t.NORMALCOMPRESSED="normalCompressed",t.UV0="uv0",t.COLOR="color",t.SYMBOLCOLOR="symbolColor",t.SIZE="size",t.ROTATION="rotation",t.TANGENT="tangent",t.OFFSET="offset",t.PERSPECTIVEDIVIDE="perspectiveDivide",t.CENTEROFFSETANDDISTANCE="centerOffsetAndDistance",t.LENGTH="length",t.PREVPOSITION="prevPosition",t.NEXTPOSITION="nextPosition",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.NORMAL2COMPRESSED="normal2Compressed",t.COMPONENTINDEX="componentIndex",t.VARIANTOFFSET="variantOffset",t.VARIANTSTROKE="variantStroke",t.VARIANTEXTENSION="variantExtension",t.SIDENESS="sideness",t.START="start",t.END="end",t.UP="up",t.START_UP="startUp",t.END_UP="endUp",t.EXTRUDE="extrude",t.OBJECTANDLAYERIDCOLOR="objectAndLayerIdColor",t.INSTANCEOBJECTANDLAYERIDCOLOR="instanceObjectAndLayerIdColor"}(o||(o={}))},3055:(t,e,n)=>{n.d(e,{I$:()=>s,In:()=>u,gr:()=>a});var o=n(4431),r=n(1843),i=n(46540);const s=(0,r.BP)().vec3f(i.r.POSITION).u16(i.r.COMPONENTINDEX).freeze(),c=(0,r.BP)().vec2u8(i.r.SIDENESS).freeze(),a=((0,o.U)(c),(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze()),u=(0,r.BP)().vec3f(i.r.POSITION0).vec3f(i.r.POSITION1).vec2i16(i.r.NORMALCOMPRESSED).vec2i16(i.r.NORMAL2COMPRESSED).u16(i.r.COMPONENTINDEX).u8(i.r.VARIANTOFFSET,{glNormalized:!0}).u8(i.r.VARIANTSTROKE).u8(i.r.VARIANTEXTENSION,{glNormalized:!0}).freeze();new Map([[i.r.POSITION0,0],[i.r.POSITION1,1],[i.r.COMPONENTINDEX,2],[i.r.VARIANTOFFSET,3],[i.r.VARIANTSTROKE,4],[i.r.VARIANTEXTENSION,5],[i.r.NORMALCOMPRESSED,6],[i.r.NORMAL2COMPRESSED,7],[i.r.SIDENESS,8]])},93406:(t,e,n)=>{n.d(e,{K:()=>a});var o=n(34727),r=n(3694),i=n(38954),s=n(51850);const c=-1;function a(t,e,n){const o=t.vertices.position,r=t.vertices.componentIndex,s=_.position0,a=_.position1,h=_.faceNormal0,f=_.faceNormal1,{edges:T,normals:g}=l(t),m=T.length/4,O=e.allocate(m);let A=0;const p=m,R=n?.allocate(p);let S=0,M=0,b=0;d.length=0;for(let t=0;t<m;++t){const e=4*t;o.getVec(T.data[e],s),o.getVec(T.data[e+1],a);const n=d.pushNew();n.index=4*t,n.length=(0,i.p)(s,a)}d.sort(((t,e)=>e.length-t.length));const v=new Array,F=new Array;d.forAll((({length:t,index:l})=>{const d=T.data[l],m=T.data[l+1],p=T.data[l+2],P=T.data[l+3],L=P===c;if(o.getVec(d,s),o.getVec(m,a),L){const t=3*p;(0,i.a)(h,g.data[t],g.data[t+1],g.data[t+2]),(0,i.c)(f,h),_.componentIndex=r.get(d),_.cosAngle=(0,i.l)(h,f)}else{let t=3*p;if((0,i.a)(h,g.data[t],g.data[t+1],g.data[t+2]),t=3*P,(0,i.a)(f,g.data[t],g.data[t+1],g.data[t+2]),_.componentIndex=r.get(d),_.cosAngle=(0,i.l)(h,f),function(t,e){return t.cosAngle>e}(_,N))return;_.cosAngle<-.9999&&(0,i.c)(f,h)}M+=t,b++,L||function(t,e){return t.cosAngle<e}(_,I)?(e.write(O,A++,_),v.push(t)):u(_,E)&&(R&&n&&n.write(R,S++,_),F.push(t))}));const P=new Float32Array(v.reverse()),L=new Float32Array(F.reverse()),C=R&&n?{instancesData:R.slice(0,S),lodInfo:{lengths:L}}:void 0;return{regular:{instancesData:O.slice(0,A),lodInfo:{lengths:P}},silhouette:C,averageEdgeLength:M/b}}function u(t,e){const n=(0,o.XM)(t.cosAngle);return(0,i.E)(m,t.position1,t.position0),n*((0,i.l)((0,i.b)(g,t.faceNormal0,t.faceNormal1),m)>0?-1:1)>e}function l(t){const e=t.faces.length/3,n=t.faces,o=t.neighbors,r=t.vertices.position;f.length=T.length=0;for(let t=0;t<e;t++){const e=3*t,s=o[e],a=o[e+1],u=o[e+2],l=n[e],h=n[e+1],d=n[e+2];r.getVec(l,O),r.getVec(h,A),r.getVec(d,p),(0,i.f)(A,A,O),(0,i.f)(p,p,O),(0,i.b)(O,A,p),(0,i.n)(O,O),T.pushArray(O),(s===c||l<h)&&(f.push(l),f.push(h),f.push(t),f.push(s)),(a===c||h<d)&&(f.push(h),f.push(d),f.push(t),f.push(a)),(u===c||d<l)&&(f.push(d),f.push(l),f.push(t),f.push(u))}return{edges:f,normals:T}}class h{constructor(){this.index=0,this.length=0}}const d=new r.A({allocator:t=>t||new h,deallocator:null}),f=new r.A({deallocator:null}),T=new r.A({deallocator:null}),_=new class{constructor(){this.position0=(0,s.vt)(),this.position1=(0,s.vt)(),this.faceNormal0=(0,s.vt)(),this.faceNormal1=(0,s.vt)(),this.componentIndex=0,this.cosAngle=0}},g=(0,s.vt)(),m=(0,s.vt)(),O=(0,s.vt)(),A=(0,s.vt)(),p=(0,s.vt)(),E=(0,o.kU)(4),N=Math.cos(E),R=(0,o.kU)(35),I=Math.cos(R)},53099:(t,e,n)=>{n.d(e,{o6:()=>v,HY:()=>w,hx:()=>F,Jb:()=>B});var o=n(9318);function r(t,e,n){const o=e/3,r=new Uint32Array(n+1),i=new Uint32Array(n+1),s=(t,e)=>{t<e?r[t+1]++:i[e+1]++};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];s(n,o),s(o,r),s(r,n)}let c=0,a=0;for(let t=0;t<n;t++){const e=r[t+1],n=i[t+1];r[t+1]=c,i[t+1]=a,c+=e,a+=n}const u=new Uint32Array(6*o),l=r[n],h=(t,e,n)=>{if(t<e){const o=r[t+1]++;u[2*o]=e,u[2*o+1]=n}else{const o=i[e+1]++;u[2*l+2*o]=t,u[2*l+2*o+1]=n}};for(let e=0;e<o;e++){const n=t[3*e],o=t[3*e+1],r=t[3*e+2];h(n,o,e),h(o,r,e),h(r,n,e)}const d=(t,e)=>{const n=2*t,o=e-t;for(let t=1;t<o;t++){const e=u[n+2*t],o=u[n+2*t+1];let r=t-1;for(;r>=0&&u[n+2*r]>e;r--)u[n+2*r+2]=u[n+2*r],u[n+2*r+3]=u[n+2*r+1];u[n+2*r+2]=e,u[n+2*r+3]=o}};for(let t=0;t<n;t++)d(r[t],r[t+1]),d(l+i[t],l+i[t+1]);const f=new Int32Array(3*o),T=(e,n)=>e===t[3*n]?0:e===t[3*n+1]?1:e===t[3*n+2]?2:-1,_=(t,e)=>{const n=T(t,e);f[3*e+n]=-1},g=(t,e,n,o)=>{const r=T(t,e);f[3*e+r]=o;const i=T(n,o);f[3*o+i]=e};for(let t=0;t<n;t++){let e=r[t];const n=r[t+1];let o=i[t];const s=i[t+1];for(;e<n&&o<s;){const n=u[2*e],r=u[2*l+2*o];n===r?(g(t,u[2*e+1],r,u[2*l+2*o+1]),e++,o++):n<r?(_(t,u[2*e+1]),e++):(_(r,u[2*l+2*o+1]),o++)}for(;e<n;)_(t,u[2*e+1]),e++;for(;o<s;)_(u[2*l+2*o],u[2*l+2*o+1]),o++}return f}var i=n(1843),s=n(46540),c=n(3055),a=n(87811),u=n(38954),l=n(51850),h=n(4431),d=n(34727);function f(t,e,n,o,r,i=2){const s=1/(Math.abs(n)+Math.abs(o)+Math.abs(r)),c=n*s,a=o*s,u=r<=0?(c>=0?1:-1)*(1-Math.abs(a)):c,l=r<=0?(a>=0?1:-1)*(1-Math.abs(c)):a,h=e*i;t[h]=T(u),t[h+1]=T(l)}function T(t){return(0,d.qE)(Math.round(32767*t),-32767,32767)}n(11868);class _{updateSettings(t){this.settings=t,this._edgeHashFunction=t.reducedPrecision?p:A}write(t,e,n){M.seed=this._edgeHashFunction(n);const o=M.getIntRange(0,255),r=M.getIntRange(0,this.settings.variants-1),i=M.getFloat(),s=255*(.5*function(t){return Math.abs(t)**1.2*Math.sign(t)}(-(1-Math.min(i/.7,1))+Math.max(0,i-.7)/(1-.7))+.5);t.position0.setVec(e,n.position0),t.position1.setVec(e,n.position1),t.componentIndex.set(e,n.componentIndex),t.variantOffset.set(e,o),t.variantStroke.set(e,r),t.variantExtension.set(e,s)}}const g=new Float32Array(6),m=new Uint32Array(g.buffer),O=new Uint32Array(1);function A(t){return g[0]=t.position0[0],g[1]=t.position0[1],g[2]=t.position0[2],g[3]=t.position1[0],g[4]=t.position1[1],g[5]=t.position1[2],O[0]=31*(31*(31*(31*(31*(166811+m[0])+m[1])+m[2])+m[3])+m[4])+m[5],O[0]}function p(t){const e=g;e[0]=N(t.position0[0]),e[1]=N(t.position0[1]),e[2]=N(t.position0[2]),e[3]=N(t.position1[0]),e[4]=N(t.position1[1]),e[5]=N(t.position1[2]),O[0]=5381;for(let t=0;t<m.length;t++)O[0]=31*O[0]+m[t];return O[0]}const E=1e4;function N(t){return Math.round(t*E)/E}class R{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return c.gr.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n),(0,u.g)(S,n.faceNormal0,n.faceNormal1),(0,u.n)(S,S);const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,S[0],S[1],S[2],r)}}R.Layout=c.gr,R.glLayout=(0,h.U)(c.gr,1);class I{constructor(){this._commonWriter=new _}updateSettings(t){this._commonWriter.updateSettings(t)}allocate(t){return c.In.createBuffer(t)}write(t,e,n){this._commonWriter.write(t,e,n);{const{typedBuffer:o,typedBufferStride:r}=t.normalCompressed;f(o,e,n.faceNormal0[0],n.faceNormal0[1],n.faceNormal0[2],r)}{const{typedBuffer:o,typedBufferStride:r}=t.normal2Compressed;f(o,e,n.faceNormal1[0],n.faceNormal1[1],n.faceNormal1[2],r)}}}I.Layout=c.In,I.glLayout=(0,h.U)(c.In,1);const S=(0,l.vt)(),M=new a.A;var b=n(93406);function v(t){const e=F(t.data,t.skipDeduplicate,t.indices,t.indicesLength);return L.updateSettings(t.writerSettings),C.updateSettings(t.writerSettings),(0,b.K)(e,L,C)}function F(t,e,n,i){if(e){const e=r(n,i,t.count);return new P(n,i,e,t)}const s=(0,o.b)(t.buffer,t.stride/4,{originalIndices:n,originalIndicesLength:i}),a=r(s.indices,i,s.uniqueCount);return{faces:s.indices,facesLength:s.indices.length,neighbors:a,vertices:c.I$.createView(s.buffer)}}class P{constructor(t,e,n,o){this.faces=t,this.facesLength=e,this.neighbors=n,this.vertices=o}}const L=new R,C=new I,B=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1),w=(0,i.BP)().vec3f(s.r.POSITION0).vec3f(s.r.POSITION1).u16(s.r.COMPONENTINDEX)},46064:(t,e,n)=>{n.r(e),n.d(e,{default:()=>T});var o=n(90237),r=n(74887),i=(n(53966),n(44208),n(87811),n(49186),n(40608)),s=n(38954),c=n(51850),a=n(11964),u=n(97937),l=n(78230),h=n(53099);function d(t,e,n){const o=(0,u.c)(),r=(0,u.g)(o);return(0,s.r)(r,r,t,.5),(0,s.r)(r,r,e,.5),o[3]=(0,s.p)(r,t),(0,s.g)(r,r,n),o}let f=class{constructor(){this._idToComponent=new Map,this._components=new l.A((t=>t.bounds)),this._edges=new l.A((t=>t.bounds)),this._tmpLineSegment=(0,a.vt)(),this._tmpP1=(0,c.vt)(),this._tmpP2=(0,c.vt)(),this._tmpP3=(0,c.vt)(),this.remoteClient=null}async fetchCandidates(t,e){await Promise.resolve(),(0,r.Te)(e),await this._ensureEdgeLocations(t,e);const n=[];return this._edges.forEachNeighbor((e=>(this._addCandidates(t,e,n),n.length<1e3)),t.bounds),{result:{candidates:n}}}async _ensureEdgeLocations(t,e){const n=[];if(this._components.forEachNeighbor((t=>{if(null==t.info){const{id:e,uid:o}=t;n.push({id:e,uid:o})}return!0}),t.bounds),!n.length)return;const o={components:n},r=await this.remoteClient.invoke("fetchAllEdgeLocations",o,e??{});for(const t of r.components)this._setFetchEdgeLocations(t)}async add(t){const e=new g(t.id,t.bounds);return this._idToComponent.set(e.id,e),this._components.add([e]),{result:{}}}async remove(t){const e=this._idToComponent.get(t.id);if(e){const t=[];this._edges.forEachNeighbor((n=>(n.component===e&&t.push(n),!0)),e.bounds),this._edges.remove(t),this._components.remove([e]),this._idToComponent.delete(e.id)}return{result:{}}}_setFetchEdgeLocations(t){const e=this._idToComponent.get(t.id);if(null==e||t.uid!==e.uid)return;const n=h.HY.createView(t.locations),o=new Array(n.count),r=(0,c.vt)(),i=(0,c.vt)();for(let s=0;s<n.count;s++){n.position0.getVec(s,r),n.position1.getVec(s,i);const c=d(r,i,t.origin),a=new m(e,s,c);o[s]=a}this._edges.add(o);const{objectIds:s,origin:a}=t;e.info={locations:n,objectIds:s,origin:a}}_addCandidates(t,e,n){const{info:o}=e.component,{origin:r,objectIds:i}=o,c=o.locations,a=c.position0.getVec(e.index,this._tmpP1),u=c.position1.getVec(e.index,this._tmpP2);(0,s.g)(a,a,r),(0,s.g)(u,u,r);const l=i[c.componentIndex.get(e.index)];this._addEdgeCandidate(t,l,a,u,n),_(t,l,a,n),_(t,l,u,n)}_addEdgeCandidate(t,e,n,o,r){if(!t.returnEdge)return;const i=(0,u.g)(t.bounds),l=(0,a.Cr)(n,o,this._tmpLineSegment),h=(0,a._I)(l,i,this._tmpP3);(0,u.o)(t.bounds,h)&&r.push({type:"edge",objectId:e,target:(0,c.o8)(h),distance:(0,s.p)(i,h),start:(0,c.o8)(n),end:(0,c.o8)(o)})}};f=(0,o._)([(0,i.$)("esri.views.interactive.snapping.featureSources.sceneLayerSource.SceneLayerSnappingSourceWorker")],f);const T=f;function _(t,e,n,o){if(!t.returnVertex||!(0,u.o)(t.bounds,n))return;const r=(0,u.g)(t.bounds);o.push({type:"vertex",objectId:e,target:(0,c.o8)(n),distance:(0,s.p)(r,n)})}class g{constructor(t,e){this.id=t,this.bounds=e,this.info=null,this.uid=++g.uid}}g.uid=0;class m{constructor(t,e,n){this.component=t,this.index=e,this.bounds=n}}},74038:(t,e,n)=>{n.d(e,{_:()=>o});class o{constructor(t,e,n,o,r,i=!1,s=0){this.name=t,this.count=e,this.type=n,this.offset=o,this.stride=r,this.normalized=i,this.divisor=s}}}}]);
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
3
|
-
See https://js.arcgis.com/4.31/esri/copyright.txt for details.
|
|
4
|
-
*/
|
|
5
|
-
import{_ as t}from"../../../chunks/tslib.es6.js";import e from"../../../core/Evented.js";import{on as o}from"../../../core/events.js";import{destroyMaybe as i}from"../../../core/maybe.js";import{watch as n,when as s,syncAndInitial as r,initial as c,sync as p}from"../../../core/reactiveUtils.js";import{cloneScreenPoint as l,createScreenPoint as a}from"../../../core/screenUtils.js";import{property as u}from"../../../core/accessorSupport/decorators/property.js";import"../../../core/has.js";import"../../../core/Logger.js";import"../../../core/RandomLCG.js";import{subclass as h}from"../../../core/accessorSupport/decorators/subclass.js";import{setCalciteThemeClass as f}from"../../../support/themeUtils.js";import{base as d}from"./css.js";import{tooltipContentFactory as m}from"./content/tooltipContentFactory.js";import{isRTL as v}from"../../../widgets/support/widgetUtils.js";const g={base:`${d}`,ltr:`${d}--ltr`,rtl:`${d}--rtl`,debug:`${d}--debug`},y=20,_=16,b="bottom-end";let C=class extends e.EventedAccessor{constructor(t){super(t),this.info=null,this.options=null,this.position=null,this.content=null,this._focused=!1,this.outerContainer=document.createElement("div"),this.debug=!1,this._lastPosition=null,this._rtl=!1,this._prevXY=[0,0]}initialize(){const{outerContainer:t}=this;this.addHandles([n((()=>this.view.overlay?.surface),(e=>{t.remove(),e?.appendChild(t),this._rtl=v(e)}),r),n((()=>this.info),((e,o)=>{if(null!=this.content&&null!=e&&null!=o&&e.type===o.type)this.content.info=e;else{i(this.content);const o=m(this,e);o?(this.content=o,o.container&&t.appendChild(o.container),this.exitInputMode()):this.content=null}}),r),n((()=>({container:this.outerContainer,content:this.content,screenPoint:this._screenPoint,position:this.position})),(()=>this._updatePosition()),c),n((()=>({outerContainer:this.outerContainer,placement:this.effectivePlacement,effectiveOffset:this.effectiveOffset,rtl:this._rtl,debug:this.debug})),(({outerContainer:t,placement:e,effectiveOffset:o,rtl:i,debug:n})=>{const{classList:s}=t;s.add(g.base),s.toggle(g.rtl,i),s.toggle(g.ltr,!i),s.toggle(g.debug,n),this.outerContainer.style.setProperty("--offset",`${o}px`),f(t),$(t,e)}),c),s((()=>"feedback"===this.mode),(()=>{this.position=null,this._clearOverride("effectivePlacement")}),p),o(this.outerContainer,"paste",(t=>{this.emit("paste",t)})),o(this.outerContainer,["focusin","focusout"],(()=>{setTimeout((()=>{this._focused=this.content?.container?.contains(document.activeElement)??!1}))}))])}destroy(){this.info=null,this.content=i(this.content),this.outerContainer.remove()}get mode(){return this.content?.mode??"feedback"}get focused(){return this._focused}get visible(){return"none"!==this.outerContainer?.style.display}get contentContainer(){return this.content?.container}get effectivePlacement(){const t=this.options?.placement;return"auto"===t?"bottom-end":t??b}get _screenPoint(){const{inputManager:t}=this.view;return t?.multiTouchActive?null:t?.latestPointerLocation}get effectiveOffset(){return this.options?.offset??y}clear(){this.info=null}async enterInputMode(t){const e=this.position??this._lastPosition??this._screenPoint,o=this.position=l(e),{effectivePlacement:i}=this;this._override("effectivePlacement",i);const n=()=>{o&&(this.position=j(this.contentContainer,o,this.effectiveOffset,this.view),this._updatePosition())};await(this.content?.enterInputMode(t,n))}async exitInputMode(t){await(this.content?.exitInputMode(t))}onDragStart(t,e){this._prevXY=[t,e]}onDrag(t,e){const o=t-this._prevXY[0],i=e-this._prevXY[1];this._prevXY=[t,e];const{position:n}=this;if(n){const{view:s}=this,r=t-s.position[0],c=e-s.position[1];if(r<0||r>s.width||c<0||c>s.height-_)return;this.position=a(n.x+o,n.y+i)}}onDragEnd(){this._prevXY=[0,0]}_updatePosition(){const{style:t}=this.outerContainer,e=this.position??this._screenPoint;if(this._lastPosition=l(e),null!=e&&null!=this.content){t.display="block";const o=Math.round(e.x),i=Math.round(e.y);t.transform=`translate(${o}px, ${i}px)`}else t.display="none"}};function P(t){const e=new C(t());return e.addHandles(n((()=>t()),(({view:t,options:o,info:i})=>{e.view=t,void 0!==o&&(e.options=o),void 0!==i&&(e.info=i)}))),e}function j(t,e,o,i){if(!t||!i.container)return e;const n=t.getBoundingClientRect(),{left:s,top:r}=i.container.getBoundingClientRect();let{x:c,y:p}=e;const l=n.left-s-o;l<0&&(c-=l);const u=n.right-s+o-i.width;u>0&&(c-=u);const h=n.top-r-o;h<0&&(p-=h);const f=n.bottom-r+o-i.height;return f>0&&(p-=f),a(c,p)}t([u({nonNullable:!0})],C.prototype,"view",void 0),t([u()],C.prototype,"info",void 0),t([u()],C.prototype,"options",void 0),t([u()],C.prototype,"position",void 0),t([u()],C.prototype,"content",void 0),t([u()],C.prototype,"mode",null),t([u()],C.prototype,"_focused",void 0),t([u()],C.prototype,"focused",null),t([u()],C.prototype,"outerContainer",void 0),t([u()],C.prototype,"contentContainer",null),t([u()],C.prototype,"effectivePlacement",null),t([u()],C.prototype,"debug",void 0),t([u()],C.prototype,"_lastPosition",void 0),t([u()],C.prototype,"_screenPoint",null),t([u()],C.prototype,"_rtl",void 0),t([u()],C.prototype,"effectiveOffset",null),C=t([h("esri.views.interactive.tooltip.Tooltip")],C);const w=["top","bottom","leading","trailing"].flatMap((t=>[x(`${t}-start`),x(t),x(`${t}-end`)]));function x(t){return`${g.base}--${t}`}function $({classList:t},e){w.forEach((e=>t.remove(e))),t.add(x(e))}export{P as makeTooltip};
|