1"use strict";(self.webpackChunkodmp_angular=self.webpackChunkodmp_angular||[]).push([[6180],{56180:(re,S,d)=>{d.r(S),d.d(S,{load:()=>J});var c=d(10467),m=d(5922),R=d(68438),U=d(23154),C=d(61597),K=d(66323),B=d(64833),F=d(73874),b=d(15764),p=d(43092),W=d(69927),w=d(8691),G=d(56151);function J(t,r){return h.apply(this,arguments)}function h(){return h=(0,c.A)(function*(t,r){const n=t.instance.portalItem;if(null!=n&&n.id)return yield n.load(r),function N(t){const r=t.instance.portalItem;if(null==r||!r.type||!t.supportedTypes.includes(r.type))throw new m.A("portal:invalid-layer-item-type","Invalid layer item type '${type}', expected '${expectedType}'",{type:null==r?void 0:r.type,expectedType:t.supportedTypes.join(", ")})}(t),t.validateItem&&t.validateItem(n),function H(t,r){return g.apply(this,arguments)}(t,r)}),h.apply(this,arguments)}function g(){return g=(0,c.A)(function*(t,r){var n;const e=t.instance,o=e.portalItem;if(!o)return;const{url:a,title:u}=o,l=(0,b.v)(o,"portal-item");if("group"===e.type)return function X(t,r,n){return E.apply(this,arguments)}(e,l,t);a&&"media"!==e.type&&e.read({url:a},l);const s=new C.v,i=yield j(t,s,r);return i&&e.read(i,l),e.resourceReferences={portalItem:o,paths:null!==(n=l.readResourcePaths)&&void 0!==n?n:[]},"subtype-group"!==e.type&&e.read({title:u},l),(0,w.L)(e,l)}),g.apply(this,arguments)}function E(){return E=(0,c.A)(function*(t,r,n){const e=t.portalItem;if(!t.sourceIsPortalItem)return;const{title:o,type:a}=e;if("Group Layer"===a){if(!(0,W.Y)(e,"Map"))throw new m.A("portal:invalid-layer-item-typekeyword","'Group Layer' item without 'Map' type keyword is not supported");return function z(t){return I.apply(this,arguments)}(t)}return t.read({title:o},r),function Q(t,r){return P.apply(this,arguments)}(t,n)}),E.apply(this,arguments)}function I(){return(I=(0,c.A)(function*(t){var r;const n=t.portalItem,e=yield n.fetchData("json");if(!e)return;const o=(0,b.v)(n,"web-map");t.read(e,o),yield(0,K.populateGroupLayer)(t,e,{context:o}),t.resourceReferences={portalItem:n,paths:null!==(r=o.readResourcePaths)&&void 0!==r?r:[]}})).apply(this,arguments)}function P(){return P=(0,c.A)(function*(t,r){let n;const{portalItem:e}=t;if(!e)return;const o=e.type,a=r.layerModuleTypeMap;switch(o){case"Feature Service":case"Feature Collection":n=a.FeatureLayer;break;case"Stream Service":n=a.StreamLayer;break;case"Scene Service":n=a.SceneLayer;break;default:throw new m.A("portal:unsupported-item-type-as-group",`The item type '${o}' is not supported as a 'IGroupLayer'`)}const u=new C.v;let[l,s]=yield Promise.all([n(),j(r,u)]),i=()=>l;if("Feature Service"===o){var y;const _=null===(y=(0,p.pJ)(s))||void 0===y?void 0:y.customParameters;s=e.url?yield(0,p.bO)(s,e.url,u):{},i=(yield function te(t,r){return O.apply(this,arguments)}(s,a))||i;const v=yield function ee(t,r){return A.apply(this,arguments)}(e.url,{customParameters:_,loadContext:u});return yield M(t,i,s,v)}return"Scene Service"===o&&e.url&&(s=yield(0,p.nu)(e,s,u)),(0,p.XH)(s)>0?yield M(t,i,s):yield function V(t,r){return L.apply(this,arguments)}(t,i)}),P.apply(this,arguments)}function L(){return(L=(0,c.A)(function*(t,r){var n,e;const{portalItem:o}=t;if(null==o||!o.url)return;const a=yield(0,G.V)(o.url);a&&M(t,r,{layers:null===(n=a.layers)||void 0===n?void 0:n.map(p._r),tables:null===(e=a.tables)||void 0===e?void 0:e.map(p._r)})})).apply(this,arguments)}function M(t,r,n,e){return D.apply(this,arguments)}function D(){return(D=(0,c.A)(function*(t,r,n,e){var o;let a=n.layers||[];const u=n.tables||[];if("Feature Collection"===(null===(o=t.portalItem)||void 0===o?void 0:o.type)?(a.forEach((l,s)=>{var i;l.id=s,"Table"===(null==l||null===(i=l.layerDefinition)||void 0===i?void 0:i.type)&&u.push(l)}),a=a.filter(l=>{var s;return"Table"!==(null==l||null===(s=l.layerDefinition)||void 0===s?void 0:s.type)})):(a.reverse(),u.reverse()),a.forEach(l=>{const s=null==e?void 0:e(l);if(s||!e){const i=$(t,r(l),n,l,s);t.add(i)}}),u.length){const l=yield B.S.FeatureLayer();u.forEach(s=>{const i=null==e?void 0:e(s);if(i||!e){const y=$(t,l,n,s,i);t.tables.add(y)}})}})).apply(this,arguments)}function $(t,r,n,e,o){const a=t.portalItem,u={portalItem:a.clone(),layerId:e.id};null!=e.url&&(u.url=e.url);const l=new r(u);if("sourceJSON"in l&&(l.sourceJSON=o),"subtype-group"!==l.type&&"catalog"!==l.type&&(l.sublayerTitleMode="service-name"),"Feature Collection"===a.type){const s={origin:"portal-item",portal:a.portal||F.A.getDefault()};l.read(e,s);const i=n.showLegend;null!=i&&l.read({showLegend:i},s)}return l}function j(t,r,n){return T.apply(this,arguments)}function T(){return T=(0,c.A)(function*(t,r,n){if(!1===t.supportsD
1ata)return;const e=t.instance,o=e.portalItem;if(!o)return;let a=null;try{a=yield o.fetchData("json",n)}catch{}if(function k(t){return"stream"!==t.type&&"layerId"in t}(e)){var u,l;let i=null;const y=yield function Y(t,r,n){return x.apply(this,arguments)}(o,a,r);if((null!==(u=a)&&void 0!==u&&u.layers||null!==(l=a)&&void 0!==l&&l.tables)&&y>0){var s;if(null==e.layerId){const _=(0,p.iK)(e.type),v=_?(0,p.Ju)(a,_)[0]:(0,p.pJ)(a);v&&(e.layerId=v.id)}i=function Z(t,r){var n,e;const{layerId:o}=r,a=(null===(n=t.layers)||void 0===n?void 0:n.find(u=>u.id===o))||(null===(e=t.tables)||void 0===e?void 0:e.find(u=>u.id===o));return a&&function q(t,r){const n="layerType"in t&&t.layerType,{type:e}=r;return!("feature"===e&&n&&"ArcGISFeatureLayer"!==t.layerType||"catalog"===e&&!n||"oriented-imagery"===e&&!n||"subtype-group"===e&&!n)}(a,r)?a:null}(a,e),"OrientedImageryLayer"===(null===(s=i)||void 0===s?void 0:s.layerType)&&"oriented-imagery"===e.type&&e.supportedSourceTypes.add("Feature Layer"),i&&null!=a.showLegend&&(i.showLegend=a.showLegend)}return y>1&&"sublayerTitleMode"in e&&"service-name"!==e.sublayerTitleMode&&(e.sublayerTitleMode="item-title-and-service-name"),i}return a}),T.apply(this,arguments)}function x(){return(x=(0,c.A)(function*(t,r,n){var e,o,a,u,l,s,i,y,_;if(null!=r&&r.layers&&null!=r&&r.tables)return(0,p.XH)(r);const v=(0,R.qg)(t.url);if(!v)return 1;const f=yield n.fetchServiceMetadata(v.url.path,{customParameters:null===(e=(0,p.pJ)(r))||void 0===e?void 0:e.customParameters}).catch(()=>null);return(null!==(o=null!==(a=null==r||null===(u=r.layers)||void 0===u?void 0:u.length)&&void 0!==a?a:null==f||null===(l=f.layers)||void 0===l?void 0:l.length)&&void 0!==o?o:0)+(null!==(s=null!==(i=null==r||null===(y=r.tables)||void 0===y?void 0:y.length)&&void 0!==i?i:null==f||null===(_=f.tables)||void 0===_?void 0:_.length)&&void 0!==s?s:0)})).apply(this,arguments)}function A(){return(A=(0,c.A)(function*(t,r){const{layersJSON:n}=yield(0,U.Q)(t,r);if(!n)return null;const e=[...n.layers,...n.tables];return o=>e.find(a=>a.id===o.id)})).apply(this,arguments)}function O(){return(O=(0,c.A)(function*(t,r){const{layers:n}=t;if(null==n||!n.length)return;const e=new Set,o=[];for(const{layerType:l}of n){const s=null!=l?l:"ArcGISFeatureLayer";if(e.has(s))continue;e.add(s);const i=r[(0,p.K8)(s)];o.push(i())}const a=yield Promise.all(o),u=new Map;return Array.from(e).forEach((l,s)=>{u.set(l,a[s])}),({layerType:l})=>u.get(null!=l?l:"ArcGISFeatureLayer")})).apply(this,arguments)}}}]);
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.