PageSourceSearch

https://rxburnplanner.com/assets/FlowWorker-CW1A0X0T.js

js rxburnplanner.com collected 2026-10-05 11:46:01 UTC 2,279 bytes, 1 lines download raw bytes

1import{bb as S,jJ as _,jI as v,lD as E,_ as b,e as j}from"./index-CyVzZKgG.js";import{f as y,d as z}from"./dataUtils-Cu_DMW3N.js";function $(n,a,t){const{extent:i,valid:u}=n,[e,l,r,s]=i;return!(t<l||t>s)&&(u!=null&&e>r?a>=r||a<=e:a>=e&&a<=r)}function T(n,a,t,i){const{extent:u,modelSize:e,valid:l}=n,[r,s,c]=u,f=k(r,c,l);let o=a/e[0]*f+r;return l!=null&&i&&(o=new S(l[0],l[1]).normalize(o)),[o,(e[1]-t)/e[1]*_(u)+s]}function k(n,a,t){if(t!=null&&n>a){const[i,u]=t;return u-n+(a-i)}return a-n}function I(n){return n?4:3}function A(n,a,t){const[i,u]=t.modelSize;let e=null;const l=new Map;a.forEach(s=>{l.set(s.lij,y(n,s))});const r=(s,c,f)=>E(s.extent,c,f);return(s,c)=>{const f=Math.round(s),o=Math.round(c);if(!n.wrapAround&&(f<0||f>=i||o<0||o>=u))return[0,0];const[d,h]=T(t,s,c,!0);if(!$(t,d,h))return[0,0];if(e==null||!r(e,d,h)){e=null;for(const[F,x]of a)if(r(x,d,h)){e=x;break}}if((e==null?void 0:e.data)==null)return[0,0];const g=l.get(e.lij);if(g==null)return[0,0];const{width:M,height:w,extent:p}=e;return g((d-p[0])/v(p)*M,w-(h-p[1])/_(p)*w)}}let m=class{constructor(){this._tileData=new Map}async generateStreamlines(n){const{flowData:a,flowExtentInfo:t,needsMagnitude:i,simulationSettings:u,startPositions:e}=n,l=D(y(u,a),u,t.modelSize,i,e);return{result:{streamlines:l},transferList:l==null?void 0:l.map(r=>r.vertices.buffer)}}async generateTiledStreamlines(n){const{flowDataTiles:a,flowExtentInfo:t,needsMagnitude:i,reset:u,simulationSettings:e,startPositions:l}=n;this._updateTileData(a,u);const r=D(A(e,this._tileData,t),e,t.modelSize,i,l);return{result:{streamlines:r},transferList:(r==null?void 0:r.map(s=>s.vertices.buffer))??[]}}_updateTileData(n,a){a&&this._tileData.forEach((t,i)=>{n.get(i)==null&&this._tileData.delete(i)}),n.forEach((t,i)=>{t.type==="delete"?this._tileData.delete(i):t.type!=="on-worker"&&t.type!=="waiting"&&this._tileData.set(i,t.data)})}};m=b([j("esri.views.3d.support.flow.FlowWorker")],m);const J=m;function D(n,a,t,i,u){if(n==null)return;const e=z(a,n,t[0],t[1],{positions:u}),l=[],r=I(i);for(const{vertices:s,stage:c}of e){const f=new Float32Array(s.length*r);for(let o=0;o<s.length;o++)f[o*r]=s[o].x,f[o*r+1]=s[o].y,f[o*r+2]=s[o].t,i&&(f[o*r+3]=s[o].speed);l.push({vertices:f,stage:c,hasMagnitude:i})}return l}export{J as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.