PageSourceSearch

https://sig.cm-paredes.pt/portal/apps/dashboards/assets/chunk.5042.ab09b4a9d6d95ce2eebc.js

js cm-paredes.pt collected 2026-10-02 12:13:41 UTC 14,586 bytes, 167 lines download raw bytes

1"use strict";(globalThis.webpackChunk_ember_auto_import_=globalThis.webpackChunk_ember_auto_import_||[]).push([[1082,5042,78701],{159202:(e,t,n)=>{n.d(t,{J:()=>a})
2var r=n(934594),i=n(986395),o=n(311774),s=n(803603)
3async function a(e,t,n,a){const l=(0,s.Dl)(e),c=t[0].spatialReference,u={...a,responseType:"json",query:{...l.query,f:"json",sr:(0,o.YX)(c),target:JSON.stringify({geometryType:(0,i.getJsonType)(t[0]),geometries:t}),cutter:JSON.stringify(n)}},f=await(0,r.default)(l.path+"/cut",u),{cutIndexes:p,geometries:d=[]}=f.data
4return{cutIndexes:p,geometries:d.map((e=>{const t=(0,i.fromJSON)(e)
5return t.spatialReference=c,t}))}}},379559:(e,t,n)=>{n.d(t,{C:()=>l})
6var r=n(934594),i=n(180325),o=n(986395),s=n(311774),a=n(607843)
7async function l(e,t,n){const l="string"==typeof e?(0,i.urlToObject)(e):e,c=t[0].spatialReference,u=(0,o.getJsonType)(t[0]),f={...n,query:{...l.query,f:"json",sr:(0,s.YX)(c),geometries:JSON.stringify((0,a.X)(t))}},{data:p}=await(0,r.default)(l.path+"/simplify",f)
8return(0,a.V)(p.geometries,u,c)}},410299:(e,t,n)=>{n.d(t,{X:()=>r,b:()=>i})
9const r=50,i=5},464991:(e,t,n)=>{n.d(t,{j7:()=>s,kS:()=>l,kd:()=>a,r8:()=>c})
10var r=n(816678),i=n(539519),o=n(986395)
11const s={102100:{maxX:20037508.342788905,minX:-20037508.342788905,plus180Line:new r.default({paths:[[[20037508.342788905,-20037508.342788905],[20037508.342788905,20037508.342788905]]],spatialReference:i.default.WebMercator}),minus180Line:new r.default({paths:[[[-20037508.342788905,-20037508.342788905],[-20037508.342788905,20037508.342788905]]],spatialReference:i.default.WebMercator})},4326:{maxX:180,minX:-180,plus180Line:new r.default({paths:[[[180,-180],[180,180]]],spatialReference:i.default.WGS84}),minus180Line:new r.default({paths:[[[-180,-180],[-180,180]]],spatialReference:i.default.WGS84})}}
12function a(e,t){return Math.ceil((e-t)/(2*t))}function l(e,t){const n=c(e)
13for(const r of n)for(const e of r)e[0]+=t
14return e}function c(e){return(0,o.isPolygon)(e)?e.rings:e.paths}},607843:(e,t,n)=>{n.d(t,{V:()=>o,X:()=>i})
15var r=n(986395)
16function i(e){return{geometryType:(0,r.getJsonType)(e[0]),geometries:e.map((e=>e.toJSON()))}}function o(e,t,n){const i=(0,r.getGeometryType)(t)
17return e.map((e=>{const t=i.fromJSON(e)
18return t.spatialReference=n,t}))}},680077:(e,t,n)=>{n.d(t,{X_:()=>s,eU:()=>u,gB:()=>c,i1:()=>a,j8:()=>l,oW:()=>p,zx:()=>f})
19var r=n(579504),i=n(120456)
20const o=96
21function s(e,t){const n=t||e.extent,r=e.width,s=(0,i.GA)(n?.spatialReference)
22return n&&r?n.width/r*s*i.dy*o:0}function a(e,t){return e/((0,i.GA)(t)*i.dy*o)}function l(e){return e/(i.dy*o)}function c(e,t){return e*((0,i.GA)(t)*i.dy*o)}function u(e,t){const n=e.extent,r=e.width-(e.padding?e.padding.left+e.padding.right:0),i=a(t,n.spatialReference)
23return n.clone().expand(i*r/n.width)}function f(e,t,n){return function(e,t){return 0===t||(0,r.Sp)(e,t)||e<t}(e,t)&&function(e,t){return 0===t||(0,r.Sp)(e,t)||e>t}(e,n)}function p(e,t){return(0,r.Sp)(e,t)?0:(e||Number.POSITIVE_INFINITY)>(t||Number.POSITIVE_INFINITY)?1:-1}},701082:(e,t,n)=>{n.r(t),n.d(t,{getClosestDenormalizedXToReference:()=>R,getDenormalizedExtent:()=>v,normalizeCentralMeridian:()=>x,normalizeMapX:()=>b,straightLineDensify:()=>m})
24var r=n(224809),i=n(948489),o=n(600323),s=n(959130),a=n(816678),l=n(464991),c=n(311774),u=n(141722),f=n(159202),p=n(379559)
25const d=()=>o.A.getLogger("esri.geometry.support.normalizeUtils")
26function h(e){return"polygon"===e[0].type}function g(e){return"polyline"===e[0].type}function y(e){const t=[]
27let n=0,r=0
28for(let i=0;i<e.length;i++){const o=e[i]
29let s=null
30for(let e=0;e<o.length;e++)s=o[e],t.push(s),0===e?(n=s[0],r=n):(n=Math.min(n,s[0]),r=Math.max(r,s[0]))
31s&&t.push([(n+r)/2,0])}return t}function m(e,t){if(!(e instanceof a.default||e instanceof s.default)){const e="straightLineDensify: the input geometry is neither polyline nor polygon"
32throw d().error(e),new i.default("internal:geometry",e)}const n=(0,l.r8)(e),r=[]
33for(const i of n){const e=[]
34r.push(e),e.push([i[0][0],i[0][1]])
35for(let n=0;n<i.length-1;n++){const r=i[n][0],o=i[n][1],s=i[n+1][0],a=i[n+1][1],l=Math.sqrt((s-r)*(s-r)+(a-o)*(a-o)),c=(a-o)/l,u=(s-r)/l,f=l/t
36if(f>1){for(let a=1;a<=f-1;a++){const n=a*t,i=u*n+r,s=c*n+o
37e.push([i,s])}const n=(l+Math.floor(f-1)*t)/2,i=u*n+r,s=c*n+o
38e.push([i,s])}e.push([s,a])}}return function(e){return"polygon"===e.type}(e)?new s.default({rings:r,spatialReference:e.spatialReference}):new a.default({paths:r,spatialReference:e.spatialReference})}function M(e,t,n){if(t){const t=m(e,1e6)
39e=(0,u.webMercatorToGeographic)(t,!0)}return n&&(e=(0,l.kS)(e,n)),e}function w(e,t,n){if(Array.isArray(e)){const r=e[0]
40if(r>t){const n=(0,l.kd)(r,t)
41e[0]=r+n*(-2*t)}else if(r<n){const t=(0,l.kd)(r,n)
42e[0]=r+t*(-2*n)}}else{const r=e.x
43if(r>t){const n=(0,l.kd)(r,t)
44e=e.clone().offset(n*(-2*t),0)}else if(r<n){const t=(0,l.kd)(r,n)
45e=e.clone().offset(t*(-2*n),0)}}return e}function S(e,t){let n=-1
46for(let r=0;
46r<t.cutIndexes.length;r++){const i=t.cutIndexes[r],o=t.geometries[r],s=(0,l.r8)(o)
47for(let e=0;e<s.length;e++){const t=s[e]
48t.some((n=>{if(n[0]<180)return!0
49{let n=0
50for(let e=0;e<t.length;e++){const r=t[e][0]
51n=r>n?r:n}n=Number(n.toFixed(9))
52const r=-360*(0,l.kd)(n,180)
53for(let i=0;i<t.length;i++){const t=o.getPoint(e,i)
54o.setPoint(e,i,t.clone().offset(r,0))}return!0}}))}if(i===n){if(h(e))for(const t of(0,l.r8)(o))e[i]=e[i].addRing(t)
55else if(g(e))for(const t of(0,l.r8)(o))e[i]=e[i].addPath(t)}else n=i,e[i]=o}return e}async function x(e,t,n){if(!Array.isArray(e))return x([e],t)
56t&&"string"!=typeof t&&d().warn("normalizeCentralMeridian()","The url object is deprecated, use the url string instead")
57const i="string"==typeof t?t:t?.url??r.default.geometryServiceUrl
58let o,h,g,y,m,v,R,b,P=0
59const T=[],_=[]
60for(const r of e)if(null!=r)if(o||(o=r.spatialReference,h=(0,c.Vp)(o),g=o.isWebMercator,v=g?102100:4326,y=l.j7[v].maxX,m=l.j7[v].minX,R=l.j7[v].plus180Line,b=l.j7[v].minus180Line),h)if("mesh"===r.type)_.push(r)
61else if("point"===r.type)_.push(w(r.clone(),y,m))
62else if("multipoint"===r.type){const e=r.clone()
63e.points=e.points.map((e=>w(e,y,m))),_.push(e)}else if("extent"===r.type){const e=r.clone()._normalize(!1,!1,h)
64_.push(e.rings?new s.default(e):e)}else if(r.extent){const e=r.extent,t=(0,l.kd)(e.xmin,m)*(2*y)
65let n=0===t?r.clone():(0,l.kS)(r.clone(),t)
66e.offset(t,0)
67let{xmin:i,xmax:o}=e
68i=Number(i.toFixed(9)),o=Number(o.toFixed(9)),e.intersects(R)&&o!==y?(P=o>P?o:P,n=M(n,g),T.push(n),_.push("cut")):e.intersects(b)&&i!==m?(P=o*(2*y)>P?o*(2*y):P,n=M(n,g,360),T.push(n),_.push("cut")):_.push(n)}else _.push(r.clone())
69else _.push(r)
70else _.push(r)
71let G=(0,l.kd)(P,y),k=-90
72const C=G,N=new a.default
73for(;G>0;){const e=360*G-180
74N.addPath([[e,k],[e,-1*k]]),k*=-1,G--}if(T.length>0&&C>0){const t=S(T,await(0,f.J)(i,T,N,n)),r=[],o=[]
75for(let n=0;n<_.length;n++){const i=_[n]
76if("cut"!==i)o.push(i)
77else{const i=t.shift(),s=e[n]
78null!=s&&"polygon"===s.type&&s.rings&&s.rings.length>1&&i.rings.length>=s.rings.length?(r.push(i),o.push("simplify")):o.push(g?(0,u.geographicToWebMercator)(i):i)}}if(!r.length)return o
79const s=await(0,p.C)(i,r,n),a=[]
80for(let e=0;e<o.length;e++){const t=o[e]
81"simplify"!==t?a.push(t):a.push(g?(0,u.geographicToWebMercator)(s.shift()):s.shift())}return a}const X=[]
82for(let r=0;r<_.length;r++){const e=_[r]
83if("cut"!==e)X.push(e)
84else{const e=T.shift()
85X.push(!0===g?(0,u.geographicToWebMercator)(e):e)}}return X}function v(e){if(!e)return null
86const t=e.extent
87if(!t)return null
88const n=e.spatialReference&&(0,c.Vp)(e.spatialReference)
89if(!n)return t
90const[r,i]=n.valid,o=2*i,{width:s}=t
91let a,{xmin:l,xmax:u}=t
92if([l,u]=[u,l],"extent"===e.type||0===s||s<=i||s>o||l<r||u>i)return t
93switch(e.type){case"polygon":if(!(e.rings.length>1))return t
94a=y(e.rings)
95break
96case"polyline":if(!(e.paths.length>1))return t
97a=y(e.paths)
98break
99case"multipoint":a=e.points}const f=t.clone()
100for(let c=0;c<a.length;c++){let e=a[c][0]
101e<0?(e+=i,u=Math.max(e,u)):(e-=i,l=Math.min(e,l))}return f.xmin=l,f.xmax=u,f.width<s?(f.xmin-=i,f.xmax-=i,f):t}function R(e,t,n){const r=(0,c.Vp)(n)
102if(null==r)return e
103const[i,o]=r.valid,s=2*o
104let a=0,l=0
105t>o?a=Math.ceil(Math.abs(t-o)/s):t<i&&(a=-Math.ceil(Math.abs(t-i)/s)),e>o?l=Math.ceil(Math.abs(e-o)/s):e<i&&(l=-Math.ceil(Math.abs(e-i)/s))
106let u=e+(a-l)*s
107const f=u-t
108return f>o?u-=s:f<i&&(u+=s),u}function b(e,t){const n=(0,c.Vp)(t)
109if(n){const[t,r]=n.valid,i=r-t
110if(e<t)for(;e<t;)e+=i
111if(e>r)for(;e>r;)e-=i}return e}},803603:(e,t,n)=>{n.d(t,{Dl:()=>c,fm:()=>f,gf:()=>p,jV:()=>l,lF:()=>u})
112var r=n(224809),i=n(978758),o=n(164571),s=n(180325),a=n(940887)
113function l(e,t){return t?{...t,query:{...e??{},...t.query}}:{query:e}}function c(e){return"string"==typeof e?(0,s.urlToObject)(e):(0,o.clone)(e)}function u(e,t,n){const r={}
114for(const i in e){if("declaredClass"===i)continue
115const o=e[i]
116if(null!=o&&"function"!=typeof o)if(Array.isArray(o))r[i]=o.map((e=>u(e)))
117else if("object"==typeof o)if(o.toJSON){const e=o.toJSON(n?.[i])
118r[i]=t?e:JSON.stringify(e)}else r[i]=t?o:JSON.stringify(o)
119else r[i]=o}return r}function f(e,t){return e?t&&(0,a.Qc)(e)?t:(0,a.CG)(e)??i.id?.findCredential(e)?.token:null}async function p(e,t,o){const s=f(e,t)
120if(s)return s
121!i.id&&r.default.request.useIdentity&&await Promise.resolve().then(n.bind(n,572207))
122const a=await i.id.getCredential(e,o)
123return a?.token}},805042:(e,t,n)=>{n.d(t,{GridSnappingEngine:()=>S})
124var r=n(784570),i=n(994917),o=n(600323),s=n(579504),a=n(120456),l=n(688340),c=(n(894143),n(859568),n(93439)),u=n(361617),f=n(414094),p=n(701082),d=n(680077),h=n(410299),g=n(885815),y=n(880623),m=n(645987),M=n(777627),w=n(901226)
125let S=class extends i.default{constructor(e){super(e),this.options=null}destroy(){this._set("options",null)}get grid(){return this.view.grid}get effectiveViewRotation(){return this.grid?.rotateWithMap?0:(0,s.kU)(this.view.rotation??0)}get gridRotation(){return(0,s.kU)(this.grid?.rotation??0)}get gridCenter(){const{spatialReference:e,grid:t}=this
126if(!t||!e||!(0,f.isLoadedOrLoadFor)(t.center.spatialReference,e))return null
127try{const n=(0,f.project)(t.center,e),r=e.isWrappable&&null!=this.view?.center?(0,p.getClosestDenormalizedXToReference)(n.x,this.view.center.x,e):n.x
128return(0,y.vt)(r,n.y,n.z)}catch(e){return o.A.getLogger(this).errorOnce("Grid Snapping - Failed to project grid center.",e),null}}get offsetScaleFactor(){const{pixelsPerStride:e,grid:t}=this
129if(!t||!e)return 1
130const{majorLineInterval:n,dynamicScaling:r}=t
131return n<1?null:(0,g.Ge)(n,e,r)}get spatialReference(){return this.view.spatialReference}get gridMetersPerStride(){const{grid:e}=this
132return e?(0,a.oU)(e.spacing,e.units,"meters"):null}get viewMetersPerPixel(){const{viewMetersPerSRUnit:e}=this
133return null==e?null:e*(0,d.i1)(this.view.scale,this.view.spatialReference)}get viewMetersPerSRUnit(){const{spatialReference:e}=this.view
134return this.gridCenter?(0,g.WT)(this.gridCenter[0],this.gridCenter[1],e):null}get pixelsPerStride(){const{gridMetersPerStride:e,viewMetersPerPixel:t}=this
135return t&&e?e/t:null}get updating(){return null!=this.grid&&null!=this.spatialReference&&null==this.viewMetersPerSRUnit}
135async fetchCandidates(e,t,n){const{options:r,view:i}=this
136if(!r?.effectiveGridEnabled||!i.grid||n.feature?.attributes&&m.io in n.feature.attributes)return[]
137const o=n.coordinateHelper.arrayToPoint(e),s=r.distance*("touch"===n.pointer?r.touchSensitivityMultiplier:1)
138return this.fetchCandidatesSync(o,s)}fetchCandidatesSync(e,t){const n=[],{grid:r,effectiveViewRotation:i,gridRotation:o,gridCenter:s,viewMetersPerPixel:a,viewMetersPerSRUnit:l,offsetScaleFactor:c,spatialReference:u,gridMetersPerStride:p,pixelsPerStride:d}=this
139if(!(r&&a&&l&&s&&u&&c&&p&&d))return n
140if(!r.dynamicScaling&&d<h.b)return n
141if(!(0,f.isLoadedOrLoadFor)(e.spatialReference,u))return n
142const g=(0,f.project)(e,u),m=(0,y.vt)(g.x,g.y,g.z),S=x(m,-o,s,-i),P=p/l*c,T=v(S,P,s),{shouldSnapX:_,shouldSnapY:G}=R(T,S,t,a,l)
143if(!_&&!G)return[]
144const k=(0,y.vt)((_?T:S)[0],(G?T:S)[1]),C=x(k,o,s,i),N=x(T,o,s,i)
145if(G){const e=b(T,S,P,"y"),t=x(e,o,s,i)
146n.push(new w.o({lineStart:N,lineEnd:t,targetPoint:C,isDraped:!1}))}if(_){const e=b(T,S,P,"x"),t=x(e,o,s,i)
147n.push(new w.o({lineStart:N,lineEnd:t,targetPoint:C,isDraped:!1}))}return _&&G&&n.push(new M.N(C,n[0],n[1],!1)),n}};(0,r._)([(0,l.MZ)({constructOnly:!0})],S.prototype,"view",void 0),(0,r._)([(0,l.MZ)()],S.prototype,"options",void 0),(0,r._)([(0,l.MZ)()],S.prototype,"grid",null),(0,r._)([(0,l.MZ)()],S.prototype,"effectiveViewRotation",null),(0,r._)([(0,l.MZ)()],S.prototype,"gridRotation",null),(0,r._)([(0,l.MZ)()],S.prototype,"gridCenter",null),(0,r._)([(0,l.MZ)()],S.prototype,"offsetScaleFactor",null),(0,r._)([(0,l.MZ)()],S.prototype,"spatialReference",null),(0,r._)([(0,l.MZ)()],S.prototype,"gridMetersPerStride",null),(0,r._)([(0,l.MZ)()],S.prototype,"viewMetersPerPixel",null),(0,r._)([(0,l.MZ)()],S.prototype,"viewMetersPerSRUnit",null),(0,r._)([(0,l.MZ)()],S.prototype,"pixelsPerStride",null),(0,r._)([(0,l.MZ)()],S.prototype,"updating",null),S=(0,r._)([(0,c.$)("esri.views.interactive.snapping.GridSnappingEngine")],S)
148const x=(e,t,n,r)=>{const i=(0,y.Hh)(e[0],e[1],e[2])
149return(0,u.K)(i,(0,u.K)(i,i,n,t),n,r)},v=(e,t,n)=>{const r=(e[0]-n[0])/t,i=(e[1]-n[1])/t,o=Math.trunc(r),s=Math.trunc(i),a=Math.round(r%1),l=Math.round(i%1),c=n[0]+(o+a)*t,u=n[1]+(s+l)*t
150return(0,y.vt)(c,u)},R=(e,t,n,r,i)=>{if(r<=0)return{shouldSnapX:!1,shouldSnapY:!1}
151const o=(e[0]-t[0])/r,s=(e[1]-t[1])/r
152return{shouldSnapX:Math.abs(o*i)<n,shouldSnapY:Math.abs(s*i)<n}},b=(e,t,n,r)=>{if("y"===r){const r=t[0]>e[0]?1:-1
153return(0,y.vt)(e[0]+n*r,e[1])}const i=t[1]>e[1]?1:-1
154return(0,y.vt)(e[0],e[1]+n*i)}},885815:(e,t,n)=>{n.d(t,{Ge:()=>p,WT:()=>h,XV:()=>d})
155var r=n(120456),i=n(348882),o=n(816678),s=n(539519),a=n(982920),l=n(701082),c=n(311774),u=n(141722),f=n(410299)
156function p(e,t,n){const r=1===e?10:e
157return r**(n?Math.round(function(e,t){return Math.log(e)/Math.log(t)}(f.X/t,r)):0)}function d(e){const{isGeographic:t,isWebMercator:n}=e
158return!t&&!n}function h(e,t,n){const f="number"==typeof e?null:e,p=n??f?.spatialReference
159if(null==p||!(0,c.fn)(p)||d(p))return(0,r.GA)(p)
160let h=f?.x??e,g=f?.y??t
161const y=1/Math.sqrt(2)
162let m=h+y,M=g+y
163const{isWebMercator:w,isGeographic:S}=p
164let x=S&&!(0,a.isSupported)(p)?s.default.WGS84:p
165if(w){let e=new i.default({x:h,y:g,spatialReference:p});(0,u.webMercatorToGeographic)(e,!0,e),h=e.x,g=e.y,e=new i.default({x:m,y:M,spatialReference:p}),(0,u.webMercatorToGeographic)(e,!0,e),m=e.x,M=e.y,x=s.default.WGS84}const v=new o.default({paths:[[[h,g],[m,M]]],spatialReference:x}),R=(0,l.straightLineDensify)(v,10)
166let b
167try{[b]=(0,a.geodesicLengths)([R],"meters")}catch{return(0,r.GA)(p)}return b}}}])

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.